Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

class-transformer

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

class-transformer - npm Package Versions

234

0.5.1

Diff

Changelog

Source

[0.5.1][v0.5.1] [BREAKING CHANGE] - 2021-11-22

Changed
  • re-added accidentally removed deprecated function names classToPlain and plainToClass
typestack-release-bot
published 0.5.0 •

Changelog

Source

[0.5.0][v0.5.0] [BREAKING CHANGE] - 2021-11-20

NOTE: This version fixes a security vulnerability allowing denial of service attacks with a specially crafted request payload. Please update as soon as possible.

Breaking Changes

See the breaking changes from 0.4.1 release. It was accidentally released as patch version.

typestack-release-bot
published 0.4.1 •

Changelog

Source

[0.4.1][v0.4.1] [BREAKING CHANGE] - 2021-11-20

NOTE: This version fixes a security vulnerability allowing denial of service attacks with a specially crafted request payload. Please update as soon as possible.

Breaking Changes

Exported functions has been renamed Some of the exported functions has been renamed to better reflect what they are doing.

  • classToPlain -> instanceToPlain
  • plainToClass -> plainToInstance
  • classToClass -> instanceToInstance
Fixed
  • prevent unhandled error in plaintToclass when union-type member is undefined
  • fixed a scenario when a specially crafted JS object would be parsed to Array
Changed
  • various dev-dependencies updated
typestack-release-bot
published 0.4.0 •

Changelog

Source

[0.4.0][v0.4.0] [BREAKING CHANGE] - 2021-02-14

Breaking Changes

See the breaking changes from 0.3.2 release. It was accidentally released as patch version.

Added
  • add option to ignore unset properties
  • group information is exposed in the @Transform handler
  • transformation options are exposed in the @Transform handler
Fixed
  • fixed TypeError when discriminator.subTypes is not defined
Changed
  • various dev-dependencies has been updated
typestack-release-bot
published 0.3.2 •

Changelog

Source

[0.3.2][v0.3.2] [BREAKING CHANGE] - 2021-01-14

Breaking Changes

Signature change for @Transform decorator From this version the @Transform decorator receives the transformation parameters in a a wrapper object. You need to destructure the values you are interested in.

Old way:

@Transform((value, obj, type) => /* Do some stuff with value here. */)

New way with wrapper object:

@Transform(({ value, key, obj, type }) => /* Do some stuff with value here. */)
Added
  • exposeDefaultValues option has been added, when enabled properties will use their default values when no value is present for the property
  • the name of the currently transformed parameter is exposed in the @Transform decorator
Fixed
  • fixed an issue with transforming Map (#319)
  • fixed an issue with sourcemap generation (#472)
Changed
  • various internal refactors
  • various changes to the project tooling
  • various dev-dependencies has been updated
typestack-release-bot
published 0.3.1 •

Changelog

Source

[0.3.1][v0.3.1] - 2020-07-29

Added
  • table of content added to readme
Changed
  • moved from Mocha to Jest
  • added Prettier for code formatting
  • added Eslint for linting
  • updated CI configuration
  • removed some unused dev dependencies
  • updated dependencies to latest version
Fixed
  • circular dependency fixed
  • dev dependencies removed from package.json before publishing (no more security warnings)
  • transformer order is deterministic now (#231)
  • fix prototype pollution issue (#367)
  • various fixes in documentation
nonameprovided
published 0.2.3 •

Changelog

Source

[0.2.3][v0.2.3] [BREAKING CHANGE]

Changed
  • enableImplicitConversion has been added and imlplicit value conversion is disabled by default.
  • reverted #234 - fix: write properties with defined default values on prototype which broke the @Exclude decorator.
nonameprovided
published 0.2.2 •

Changelog

Source

[0.2.2][v0.2.2] [BREAKING CHANGE]

NOTE: This version is deprecated.

This version has introduced a breaking-change when this library is used with class-validator. See #257 for details.

Added
  • implicity type conversion between values.
nonameprovided
published 0.2.1 •

Changelog

Source

[0.2.1][v0.2.1]

NOTE: This version is deprecated.

Added
  • add option to strip unkown properties via using the excludeExtraneousValues option
nonameprovided
published 0.2.0 •

Changelog

Source

[0.2.0][v0.2.0] [BREAKING CHANGE]

Added
  • add documentation for using Sets and Maps
  • add opotion to pass a discriminator function to convert values into different types based on custom conditions
  • added support for polymorphism based on a named type property
Fixed
  • fix bug when transforming null values as primitives
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc