npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lewo-media/class-transformer

v0.7.1

Published

Proper decorator-based transformation / serialization / deserialization of plain javascript objects to class constructors

Readme

@lewo-media/class-transformer

An MIT-licensed continuation of TypeStack's decorator-based object transformer, through Moritz Hein / Kage0x3B's @kage0x3b/[email protected] fork. The first LEWO release is 0.7.1: an ownership and release-engineering change with the intermediate release's runtime and declaration output preserved. It is prepared for publication; this handoff has not published it.

Lineage and ownership

TypeStack contributors wrote the original library. The original Copyright (c) 2015-2020 TypeStack and MIT terms remain in LICENSE, together with credit to the intermediate fork. LEWO does not claim that work as its own. UPSTREAM_CHANGES.md describes the patches that LEWO now maintains and their edge cases. PROVENANCE.json records immutable source revisions and archive checksums.

The source baseline is TypeStack [email protected], tag v0.5.1, commit 9c9012f1bfe720d5f0d5252e93b331aaf5fe9e4e. Intermediate public master 12a39661aef1943320bf8e6783c9f3db599a8ce7 identifies itself as 0.7.0. The published 0.7.1 has no release tag or registry gitHead; one runtime file differs from that master. All 38 TypeScript source files were therefore recovered from the integrity-verified release's embedded sourcesContent. Thirty-seven match public master. The original tests and build configuration come from that pinned public source. This is verified source recovery, not an assertion that a corresponding release commit exists.

All 114 rebuilt JavaScript, declaration and source-map files matched the intermediate npm release byte for byte during preparation. LEWO added release metadata, attribution, a working Jest adapter, explicit .js test imports, regression and packed-artifact checks, lifecycle hooks, and standalone release workflows. One inherited test expectation now reflects the shipped raw-value transform contract; no runtime source was changed. See CHANGELOG.md.

Install and use after publication

For NestJS consumers, preserve the literal dependency key class-transformer:

pnpm add class-transformer@npm:@lewo-media/[email protected]

NestJS declares and resolves its optional peer by that literal name. Installing only the scoped key does not supply that peer. Standalone consumers without that peer requirement may install the scoped name directly.

import 'reflect-metadata';
import { plainToInstance, Transform } from 'class-transformer';

class Config {
  @Transform(({ value }) => value === 'true' || value === true)
  enabled!: boolean;
}

const config = plainToInstance(Config, { enabled: 'false' }, {
  enableImplicitConversion: true,
});
// config.enabled === false

The package retains native ESM and the original export map: ., ./storage, and ./package.json, with declarations under build/types. It does not add a CommonJS build. Applications using reflected decorator types must load reflect-metadata and enable TypeScript's experimentalDecorators and emitDecoratorMetadata. The only runtime dependency remains luxon: ^3.3.0. The historical API guide is preserved in UPSTREAM_README.md; its upstream installation and build-format advice is not this fork's release contract.

Develop

Use Node 22 and pnpm 10.30.0. This directory has its own workspace boundary and lockfile and can be copied directly into a public lewo-media/class-transformer repository. It does not need any OSIO workspace package.

pnpm install --frozen-lockfile --ignore-scripts # First checkout only.
pnpm build
pnpm test
pnpm release:check

pnpm test runs the inherited Jest suite, the fork contracts, and an actual packed-package consumer in a temporary directory. The consumer checks ESM alias imports, ./storage, declaration resolution, nested DTO conversion, boolean conversion and metadata shared between two physical copies. prepack builds from TypeScript; prepublishOnly runs the complete tests. release:check also leaves the release archive under artifacts/.

The first prepared release passes 17 suites / 102 tests. The original 0.7.1 source with the unmodified inherited suite passes 95 of 96 tests: its old Date-string expectation conflicts with the raw-timestamp transform introduced in 0.7.1. Both results were reproduced; the updated expectation preserves the installed behavior. The five new runtime cases fail against upstream 0.5.1; the boolean case and updated Date expectation fail against public master 0.7.0. The release-artifact test rejects the original publisher manifest.

Release

Follow RELEASING.md. The repository URL in package metadata is the intended public destination; no GitHub repository was created in this task. Keep this package MIT with its own release cycle. The workflows under this directory become active only when this directory is the root of that repository.