Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.3.1 #382

Merged
merged 37 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
20eb3ef
table of contents
May 12, 2020
38fc545
Enable CI for the project
jotamorais Jun 29, 2020
fb8f6a0
Bump version
jotamorais Jun 29, 2020
7072a78
Merge branch 'jest-eslint' of https://github.com/rmuchall/class-trans…
jotamorais Jun 29, 2020
41a472d
Update devDependencies and contributors
jotamorais Jun 29, 2020
4e2bb6d
Merge branch 'rmuchall-jest-eslit' into develop
jotamorais Jun 29, 2020
43e2b39
Add CI step to build project after installing dependencies
jotamorais Jun 29, 2020
c84fac9
Merge remote-tracking branch 'origin/master' into develop
jotamorais Jul 20, 2020
36f8a98
Merge remote-tracking branch 'origin/master' into develop
jotamorais Jul 20, 2020
8aad84e
Merge pull request #369 from saulotoledo/develop
jotamorais Jul 21, 2020
0a2cb3d
Merge branch 'develop' into patch-1
jotamorais Jul 21, 2020
eaf5412
Merge pull request #347 from shymanel/patch-1
jotamorais Jul 21, 2020
5abcb96
fix: make transformers order deterministic
leon19 May 29, 2020
9b8563f
Merge pull request #355 from leon19/bugfix/make-transformers-order-de…
jotamorais Jul 21, 2020
1f037a9
Fixed link to changelog.md
NadavK Sep 14, 2019
1b02c24
typo correction
yairopro Nov 22, 2019
915159b
docs: fix examples and table of contents
saulotoledo Jul 23, 2020
056ae01
Merge pull request #371 from saulotoledo/minor_doc_fixes
jotamorais Jul 29, 2020
bb21d22
build: update gitignore
NoNameProvided Jul 29, 2020
9f05b71
build: update year in license
NoNameProvided Jul 29, 2020
894a5fc
build: update TS and Jest config
NoNameProvided Jul 29, 2020
7e44f31
build: add Prettier
NoNameProvided Jul 29, 2020
4fe1ca3
build: configure Husky and lint-staged
NoNameProvided Jul 29, 2020
b638900
build: remove Travis in favor of GH Actions
NoNameProvided Jul 29, 2020
f324a5b
build: add codecov config
NoNameProvided Jul 29, 2020
987e14c
build: remove private true from package.json
NoNameProvided Jul 29, 2020
422ad80
build: remove unused packages
NoNameProvided Jul 29, 2020
d013554
build: updated dev dependencies to latest
NoNameProvided Jul 29, 2020
4d587dc
style: add newline to end of config files
NoNameProvided Jul 29, 2020
2a15295
style: remove empty firstline from Codecov config
NoNameProvided Jul 29, 2020
376e4d6
merge: update project tooling (#376)
NoNameProvided Jul 29, 2020
a797726
build: update eslint config (#377)
NoNameProvided Jul 29, 2020
f6413c9
refactor: format code with prettier (#379)
NoNameProvided Jul 29, 2020
b8f4c47
build: strip pacakge.json before publishing package
NoNameProvided Jul 29, 2020
9c61aff
refactor: extract TransformationType enum from executor (#380)
NoNameProvided Jul 29, 2020
9b634f5
docs: add changelog for 0.3.1
NoNameProvided Jul 29, 2020
ba88a60
build: bump version to 0.3.1
NoNameProvided Jul 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 0 additions & 32 deletions .eslintrc.js

This file was deleted.

31 changes: 31 additions & 0 deletions .eslintrc.yml
@@ -0,0 +1,31 @@
parser: '@typescript-eslint/parser'
plugins:
- '@typescript-eslint'
parserOptions:
ecmaVersion: 2018
sourceType: module
project:
- ./tsconfig.json
- ./tsconfig.spec.json
extends:
- 'plugin:@typescript-eslint/recommended'
- 'plugin:@typescript-eslint/recommended-requiring-type-checking'
- 'plugin:jest/recommended'
- 'prettier'
- 'prettier/@typescript-eslint'
rules:
'@typescript-eslint/explicit-member-accessibility': off
'@typescript-eslint/no-angle-bracket-type-assertion': off
'@typescript-eslint/no-parameter-properties': off
'@typescript-eslint/explicit-function-return-type': off
'@typescript-eslint/member-delimiter-style': off
'@typescript-eslint/no-inferrable-types': off
'@typescript-eslint/no-explicit-any': off
'@typescript-eslint/member-ordering': 'error'
# TODO: Remove these and fixed issues once we merged all the current PRs.
'@typescript-eslint/ban-types': off
'@typescript-eslint/no-unsafe-return': off
'@typescript-eslint/no-unsafe-assignment': off
'@typescript-eslint/no-unsafe-call': off
'@typescript-eslint/no-unsafe-member-access': off
'@typescript-eslint/explicit-module-boundary-types': off
24 changes: 24 additions & 0 deletions .github/workflows/continuous-deployment-workflow.yml
@@ -0,0 +1,24 @@
name: CD
on:
release:
types: [created]
jobs:
publish:
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
registry-url: https://registry.npmjs.org
- run: npm ci --ignore-scripts
- run: npm run prettier:check
- run: npm run lint:check
- run: npm run test:ci
- run: npm run build
- run: cp LICENSE build/LICENSE
- run: cp README.md build/README.md
- run: jq 'del(.devDependencies) | del(.scripts)' package.json > build/package.json
- run: npm publish ./build
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/continuous-integration-workflow.yml
@@ -0,0 +1,35 @@
name: CI
on: push
jobs:
checks:
name: Linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- run: npm ci --ignore-scripts
- run: npm run prettier:check
- run: npm run lint:check
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v1
- name: Setting up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- run: npm ci --ignore-scripts
- run: npm run test:ci
- run: npm install codecov -g
- run: codecov -f ./coverage/clover.xml -t ${{ secrets.CODECOV_TOKEN }}
build:
name: Build
needs: [tests, checks]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- run: npm ci --ignore-scripts
- run: npm run build
56 changes: 51 additions & 5 deletions .gitignore
@@ -1,6 +1,52 @@
build/
node_modules/
coverage/
npm-debug.log
# Log files
logs
*.log
*.tmp
*.tmp.*
log.txt
npm-debug.log*

# Testing output
lib-cov/**
coverage/**

# Environment files
.env

# Dependency directories
node_modules

# MacOS related files
*.DS_Store
.AppleDouble
.LSOverride
._*
UserInterfaceState.xcuserstate

# Windows related files
Thumbs.db
Desktop.ini
$RECYCLE.BIN/

# IDE - Sublime
*.sublime-project
*.sublime-workspace

# IDE - VSCode
.vscode/**
!.vscode/tasks.json
!.vscode/launch.json

# IDE - IntelliJ
.idea
.vscode

# Compilation output folders
dist/
build/
tmp/
out-tsc/
temp

# Files for playing around locally
playground.ts
playground.js
8 changes: 8 additions & 0 deletions .prettierrc.yml
@@ -0,0 +1,8 @@
printWidth: 120
tabWidth: 2
useTabs: false
semi: true
singleQuote: true
trailingComma: es5
bracketSpacing: true
arrowParens: avoid
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

102 changes: 66 additions & 36 deletions CHANGELOG.md
@@ -1,14 +1,37 @@
# Changelog and release notes
# Changelog

_This changelog follows the [keep a changelog][keep-a-changelog]_ format to maintain a human readable changelog.

### 0.2.3 [BREAKING CHANGE]
### [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 oder is deterministic now (#231)
NoNameProvided marked this conversation as resolved.
Show resolved Hide resolved
- fix prototype pollution issue (#367)

NoNameProvided marked this conversation as resolved.
Show resolved Hide resolved
### [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.

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

> **NOTE:** This version is deprecated.

Expand All @@ -18,103 +41,110 @@ This version has introduced a breaking-change when this library is used with cla

- implicity type conversion between values.

### 0.2.1
### [0.2.1][v0.2.1]

> **NOTE:** This version is deprecated.

#### Added

- add option to strip unkown properties via using the `excludeExtraneousValues` option
- add option to strip unkown properties via using the `excludeExtraneousValues` option

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

#### Added

- add documentation for using `Set`s and `Map`s
- 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
- add documentation for using `Set`s and `Map`s
- 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
- fix bug when transforming `null` values as primitives

### 0.1.10

#### Fixed

- improve MetadataStorage perf by changing from Arrays to ES6 Maps by @sheiidan
- fixed getAncestor issue with unknown nested properties by @247GradLabs
- improve MetadataStorage perf by changing from Arrays to ES6 Maps by @sheiidan
- fixed getAncestor issue with unknown nested properties by @247GradLabs

### 0.1.9

#### Fixed

- objects with `null` prototype are converted properly now
- objects with unknown non primitive properties are converted properly now
- corrected a typo in the README.md
- fixed the deserialize example in the README.md
- objects with `null` prototype are converted properly now
- objects with unknown non primitive properties are converted properly now
- corrected a typo in the README.md
- fixed the deserialize example in the README.md

### 0.1.4

#### Added

- added `TransformClassToPlain` and `TransformClassToClass` decorators
- added `TransformClassToPlain` and `TransformClassToClass` decorators

### 0.1.0

#### Added

- renamed library from `constructor-utils` to `class-transformer`
- completely renamed most of names
- renamed all main methods: `plainToConstructor` now is `plainToClass` and `constructorToPlain` is `classToPlain`, etc.
- `plainToConstructorArray` method removed - now `plainToClass` handles it
- `@Skip()` decorator renamed to `@Exclude()`
- added `@Expose` decorator
- added lot of new options: groups, versioning, custom names, etc.
- methods and getters that should be exposed must be decorated with `@Expose` decorator
- added `excludedPrefix` to class transform options that allows exclude properties that start with one of the given prefix
- renamed library from `constructor-utils` to `class-transformer`
- completely renamed most of names
- renamed all main methods: `plainToConstructor` now is `plainToClass` and `constructorToPlain` is `classToPlain`, etc.
- `plainToConstructorArray` method removed - now `plainToClass` handles it
- `@Skip()` decorator renamed to `@Exclude()`
- added `@Expose` decorator
- added lot of new options: groups, versioning, custom names, etc.
- methods and getters that should be exposed must be decorated with `@Expose` decorator
- added `excludedPrefix` to class transform options that allows exclude properties that start with one of the given prefix

### 0.0.22

#### Fixed

- fixed array with primitive types being converted
- fixed array with primitive types being converted

### 0.0.18-0.0.21

#### Fixed

- fixed bugs when getters are not converted with es6 target
- fixed bugs when getters are not converted with es6 target

### 0.0.17

#### Fixed

- fixed issue #4
- added type guessing during transformation from constructor to plain object
- added sample with generics
- fixed issue #4
- added type guessing during transformation from constructor to plain object
- added sample with generics

### 0.0.16

#### Changed

- renamed `constructor-utils/constructor-utils` to `constructor-utils` package namespace
- renamed `constructor-utils/constructor-utils` to `constructor-utils` package namespace

### 0.0.15

#### Removed

- removed code mappings from package
- removed code mappings from package

### 0.0.14

#### Removed

- removed `import "reflect-metadata"` from source code. Now reflect metadata should be included like any other shims.
- removed `import "reflect-metadata"` from source code. Now reflect metadata should be included like any other shims.

### 0.0.13

#### Changed

- Library has changed its name from `serializer.ts` to `constructor-utils`.
- Added `constructor-utils` namespace.
- Library has changed its name from `serializer.ts` to `constructor-utils`.
- Added `constructor-utils` namespace.

[v0.3.1]: https://github.com/typestack/class-transformer/compare/v0.2.3...v0.3.1
[v0.2.3]: https://github.com/typestack/class-transformer/compare/v0.2.2...v0.2.3
[v0.2.2]: https://github.com/typestack/class-transformer/compare/v0.2.1...v0.2.2
[v0.2.1]: https://github.com/typestack/class-transformer/compare/v0.2.0...v0.2.1
[v0.2.0]: https://github.com/typestack/class-transformer/compare/v0.1.10...v0.2.0
[keep-a-changelog]: https://keepachangelog.com/en/1.0.0/
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2015-2016 Umed Khudoiberdiev
Copyright (c) 2015-2020 Umed Khudoiberdiev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down