Skip to content

Commit f8e00f3

Browse files
merge: release 0.9.0 (#661)
2 parents 2455688 + a9658ac commit f8e00f3

File tree

237 files changed

+26922
-15174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+26922
-15174
lines changed

.eslintrc.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
parser: '@typescript-eslint/parser'
2+
plugins:
3+
- '@typescript-eslint'
4+
parserOptions:
5+
ecmaVersion: 2018
6+
sourceType: module
7+
project:
8+
- ./tsconfig.json
9+
- ./tsconfig.spec.json
10+
extends:
11+
- 'plugin:@typescript-eslint/recommended'
12+
- 'plugin:@typescript-eslint/recommended-requiring-type-checking'
13+
- 'plugin:jest/recommended'
14+
- 'prettier'
15+
- 'prettier/@typescript-eslint'
16+
rules:
17+
'@typescript-eslint/explicit-member-accessibility': off
18+
'@typescript-eslint/no-angle-bracket-type-assertion': off
19+
'@typescript-eslint/no-parameter-properties': off
20+
'@typescript-eslint/explicit-function-return-type': off
21+
'@typescript-eslint/member-delimiter-style': off
22+
'@typescript-eslint/no-inferrable-types': off
23+
'@typescript-eslint/no-explicit-any': off
24+
'@typescript-eslint/member-ordering': 'error'
25+
'@typescript-eslint/no-unused-vars':
26+
- 'error'
27+
- args: 'none'
28+
# TODO: Remove these and fixed issues once we merged all the current PRs.
29+
'@typescript-eslint/ban-types': off
30+
'@typescript-eslint/no-unsafe-return': off
31+
'@typescript-eslint/no-unsafe-assignment': off
32+
'@typescript-eslint/no-unsafe-call': off
33+
'@typescript-eslint/no-unsafe-member-access': off
34+
'@typescript-eslint/explicit-module-boundary-types': off

.github/dependabot.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "10:00"
8+
timezone: Europe/Budapest
9+
open-pull-requests-limit: 5
10+
versioning-strategy: increase
11+
commit-message:
12+
prefix: build
13+
include: scope

.github/semantic.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
titleAndCommits: true
2+
allowMergeCommits: false
3+
scopes:
4+
- deps
5+
- deps-dev
6+
types:
7+
- feat
8+
- fix
9+
- docs
10+
- style
11+
- refactor
12+
- perf
13+
- test
14+
- build
15+
- ci
16+
- chore
17+
- revert
18+
- merge
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CD
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
name: Publish to NPM
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- uses: actions/setup-node@v1
12+
with:
13+
registry-url: https://registry.npmjs.org
14+
- run: npm ci --ignore-scripts
15+
- run: npm run prettier:check
16+
- run: npm run lint:check
17+
- run: npm run test:ci
18+
- run: npm run build:es2015
19+
- run: npm run build:cjs
20+
- run: npm run build:types
21+
- run: cp LICENSE build/LICENSE
22+
- run: cp README.md build/README.md
23+
- run: jq 'del(.devDependencies) | del(.scripts)' package.json > build/package.json
24+
- run: npm publish ./build
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
checks:
5+
name: Linters
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v1
9+
- uses: actions/setup-node@v1
10+
- run: npm ci --ignore-scripts
11+
- run: npm run prettier:check
12+
- run: npm run lint:check
13+
tests:
14+
name: Tests
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: ['10.x', '12.x', '14.x']
19+
fail-fast: false
20+
steps:
21+
- uses: actions/checkout@v1
22+
- name: Setting up Node.js (v${{ matrix.node-version }}.x)
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- run: npm ci --ignore-scripts
27+
- run: npm run test:ci
28+
- run: npm install codecov -g
29+
if: ${{ matrix.node-version == '14.x' }}
30+
- run: codecov -f ./coverage/clover.xml -t ${{ secrets.CODECOV_TOKEN }} --commit=$GITHUB_SHA --branch=${GITHUB_REF##*/}
31+
if: ${{ matrix.node-version == '14.x' }}
32+
build:
33+
name: Build
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v1
37+
- uses: actions/setup-node@v1
38+
- run: npm ci --ignore-scripts
39+
- run: npm run build:es2015
40+
- run: npm run build:cjs
41+
- run: npm run build:types
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'Lock inactive threads'
2+
on:
3+
schedule:
4+
- cron: '0 0 * * *'
5+
jobs:
6+
lock:
7+
name: Lock closed issues
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: dessant/lock-threads@v2
11+
with:
12+
github-token: ${{ github.token }}
13+
issue-lock-inactive-days: 30
14+
pr-lock-inactive-days: 30
15+
issue-lock-comment: >
16+
This issue has been automatically locked since there
17+
has not been any recent activity after it was closed.
18+
Please open a new issue for related bugs.
19+
pr-lock-comment: >
20+
This pull request has been automatically locked since there
21+
has not been any recent activity after it was closed.
22+
Please open a new issue for related bugs.

.github/workflows/nodejs.yml

-24
This file was deleted.

.gitignore

+51-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,52 @@
1+
# Log files
2+
logs
3+
*.log
4+
*.tmp
5+
*.tmp.*
6+
log.txt
7+
npm-debug.log*
8+
9+
# Testing output
10+
lib-cov/**
11+
coverage/**
12+
13+
# Environment files
14+
.env
15+
16+
# Dependency directories
17+
node_modules
18+
19+
# MacOS related files
20+
*.DS_Store
21+
.AppleDouble
22+
.LSOverride
23+
._*
24+
UserInterfaceState.xcuserstate
25+
26+
# Windows related files
27+
Thumbs.db
28+
Desktop.ini
29+
$RECYCLE.BIN/
30+
31+
# IDE - Sublime
32+
*.sublime-project
33+
*.sublime-workspace
34+
35+
# IDE - VSCode
36+
.vscode/**
37+
!.vscode/tasks.json
38+
!.vscode/launch.json
39+
40+
# IDE - IntelliJ
41+
.idea
42+
43+
# Compilation output folders
44+
dist/
145
build/
2-
node_modules/
3-
coverage/
4-
npm-debug.log
5-
.vscode/
6-
.idea/
7-
.nyc_output/
46+
tmp/
47+
out-tsc/
48+
temp
49+
50+
# Files for playing around locally
51+
playground.ts
52+
playground.js

.mocharc.json

-3
This file was deleted.

.nycrc.json

-13
This file was deleted.

.prettierrc.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
printWidth: 120
2+
tabWidth: 2
3+
useTabs: false
4+
semi: true
5+
singleQuote: true
6+
trailingComma: es5
7+
bracketSpacing: true
8+
arrowParens: avoid

.travis.yml

-8
This file was deleted.

.vscode/launch.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"address": "0.0.0.0",
9+
"type": "node",
10+
"request": "attach",
11+
"name": "Routing Controller",
12+
"restart": true,
13+
"port": 20001,
14+
"remoteRoot": "/home/nodebrick/application",
15+
"localRoot": "${workspaceFolder}",
16+
}
17+
]
18+
}

CHANGELOG.md

+32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Changelog and release notes
22

3+
### 0.9.0
4+
5+
#### Features
6+
7+
- Add support for wildcard "all" routes (ref [#536])
8+
- Controller inheritance - Added missing tests, code samples, and updated documentation (ref [#578][#301])
9+
- Added a useResponseClassTransformer global option (ref [#329])
10+
- Through [#329], it should now be possible to use classTransformer only for input (ref [#179])
11+
- Added support for controller inheritance (ref [#147])
12+
- Update all dependencies and changed it to use npm auto-update patches and minor versions (ex.: "class-validator": "^0.12.2", instead of "class-validator": "0.12.2" (ref [#550])
13+
- Updated project tooling (ref [##618])
14+
15+
#### Fixes
16+
17+
- Input-validation bypass vulnerability (ref [#518])
18+
- Fixed issue that would cause multiple route executions per request (ref [#568])
19+
- Fixed export of SessionParam at index (ref [#526])
20+
- Through [#536], it should now prevent conflicts in routes names (ref [#547])
21+
- Through [#568], it should now prevent a single request triggering multiple route executions that would cause Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client issue. (ref [#491])
22+
- Fixed order of global interceptors (ref [#543])
23+
- Fixed incorrect handling of rejected promises from Middleware.use() (ref [#438])
24+
- Through [#329], it should fix performance issue with big json result (ref [#226])
25+
- Through [#329], it should fix problem with mongoose model serialization (ref [#149])
26+
- Local ValidationOptions are not overwriting global defaults (ref [#618])
27+
28+
#### Documentation
29+
30+
- Added TypeDI service decorator to example in README (ref [#643])
31+
- Translate document to Chinese (ref [#574])
32+
- Fix typo in README (ref [#571])
33+
- Add another example for using the response directly (ref [#546])
34+
335
### 0.8.0 [BREAKING CHANGES]
436

537
- [class-transformer](https://github.com/typestack/class-transformer) and [class-validator](https://github.com/typestack/class-validator) are now peer dependencies.

LICENSE

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
MIT License
1+
The MIT License
22

3-
Copyright (c) 2018 TypeStack
3+
Copyright (c) 2015-2020 TypeStack
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
copies of the Software, and to permit persons to whom the Software is
1010
furnished to do so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)