Skip to content

Commit

Permalink
merge: release 0.3.1 (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoNameProvided authored Jul 29, 2020
2 parents 15d6bdb + ba88a60 commit 7020a72
Show file tree
Hide file tree
Showing 62 changed files with 10,971 additions and 9,001 deletions.
32 changes: 0 additions & 32 deletions .eslintrc.js

This file was deleted.

31 changes: 31 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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)
- fix prototype pollution issue (#367)

### [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
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 7020a72

Please sign in to comment.