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: version 11.0.0 #14177

Draft
wants to merge 187 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
8617ee9
feat(microservices): added MqttOption for passing raw output to pub
notusertelken Jan 20, 2022
b8ac795
feat(microservices): removed rawOutput and moved stringify to serializer
notusertelken Jan 20, 2022
0ba8946
feat(microservices): removed rawOutputPackets from MqttOptions interface
notusertelken Jan 20, 2022
5baba4b
feat(microservices): raw output to publish and dispatch on mqtt client
notusertelken Jan 21, 2022
5b40b2f
feat(microservices): replaced empty options object with undefined
notusertelken Jan 21, 2022
cdf2aa5
feat(microservices): fixed mqtt serializer tests
notusertelken Jan 21, 2022
d04886d
fix(core): fix type and return value of `Reflector#getAllAndMerge`
R-Zeidler Aug 16, 2023
2f22522
feat: allow for microservice options to come from the di container
jmcdo29 Oct 20, 2023
61791e5
feat(common): narrow allowed injection tokens for `@Inject()`
micalevisk Nov 13, 2023
c47be16
ci: switch to shallow cloning of 'wrk' repository
micalevisk Nov 14, 2023
0cbc154
refactor: Use TCP_DEFAULT_PORT as default instead of using a boolean …
PieterScheffers Nov 16, 2023
ed86997
fix(common): apply options to plaintoclass in classserializerinterceptor
kmw14641 Nov 16, 2023
0d7a768
fix(common): when transforming undefined numeric values
Hareloo Dec 6, 2023
fb72a8e
feat(core): introduce different module opaque key factories
kamilmysliwiec Mar 18, 2024
30110d4
Update packages/core/injector/compiler.ts
kamilmysliwiec Mar 19, 2024
094c35c
refactor: update types to better reflect dynamic metadata shape
kamilmysliwiec Mar 19, 2024
c4a905b
chore: update comment to suggest switching to a different algorithm
kamilmysliwiec Mar 19, 2024
b3f85e9
test: update module compiler test
kamilmysliwiec Mar 19, 2024
50e1d70
feat(platform-express): multer errors show 'field'
mmgroner Mar 31, 2024
1ccc7f9
Сorrection of `Reflector` types
AlexRMU Apr 2, 2024
52b2c72
Improving types
AlexRMU Apr 3, 2024
ef12d35
refactor(platform-express): modify error arg type
mmgroner Apr 8, 2024
7d5adfc
Revert "Revert "fix(microservice) Delete unnecessary call of grpcCli…
kamilmysliwiec Apr 19, 2024
3fd4220
plain to class deprectated
May 29, 2024
ba761c1
fix(fastify-adapter): middleware not executed when root path is excluded
patrickacioli Jul 17, 2024
b62b925
feat(core,common,platform-fastify): add webdav http methods support
johaven Feb 29, 2024
b90e19f
Merge branch 'nestjs:master' into feat-webdav-methods
johaven Aug 13, 2024
09cfc82
Merge branch 'nestjs:master' into feat-webdav-methods
johaven Aug 15, 2024
d20a1e5
feat(microservices): add gracefull shutdown option for nats server
Aug 28, 2024
96bf1d9
Merge branch 'nestjs:master' into feat-webdav-methods
johaven Sep 16, 2024
5f45310
feat(platform-fastify): added compatibility for fastify version 5.x
Tony133 Sep 17, 2024
bc36e3c
Merge branch 'nestjs:master' into feat-webdav-methods
johaven Sep 19, 2024
0d5ad26
Merge branch 'nestjs:master' into feat-webdav-methods
johaven Oct 8, 2024
e1c1945
fix(platform-fastify): uppercase methods
johaven Oct 8, 2024
2c8982a
fix(core): revisit dependencies w/ possibly higher distance
Oct 29, 2024
af4e1d0
Merge branch 'nestjs:master' into feat-webdav-methods
johaven Nov 1, 2024
5ccc88f
fix(core): Calculate module distance after bindGlobalScope
wenlong-chen Nov 6, 2024
9cb84e7
Update packages/microservices/server/server-tcp.ts
kamilmysliwiec Nov 6, 2024
c63717d
Merge pull request #12764 from kmw14641/kmw14641-bugfix/class-seriali…
kamilmysliwiec Nov 6, 2024
8d0a3cd
Merge pull request #12893 from Hareloo/12864-default-number-query-par…
kamilmysliwiec Nov 6, 2024
6228af1
Merge pull request #13336 from nestjs/feat/module-opaque-keys
kamilmysliwiec Nov 6, 2024
9b690d9
Merge branch '11.0.0' into master
kamilmysliwiec Nov 6, 2024
fd563c0
Merge pull request #12735 from micalevisk/feat/narrow-inject
kamilmysliwiec Nov 6, 2024
5cdea22
Merge pull request #13468 from nestjs/revert-13467-revert-13283-fix/u…
kamilmysliwiec Nov 6, 2024
0f38439
Merge pull request #12761 from PieterScheffers/tcp-use-random-port
kamilmysliwiec Nov 6, 2024
34c2cca
fix(core): Order of module destroy should be the reverse of module init
wenlong-chen Nov 6, 2024
da8ebde
fix(microservices): use instance ref to call handler #13473
kamilmysliwiec Nov 7, 2024
f273041
test: update unit tests
kamilmysliwiec Nov 7, 2024
38bfa9a
feat(core): allow overriding abort on error for select method
kamilmysliwiec Nov 7, 2024
6ea78d5
Merge pull request #13628 from tomflorentin/master
kamilmysliwiec Nov 7, 2024
5bc7f91
fix(common): drop broken support for promises on `exports` of modules
micalevisk Nov 7, 2024
3081f54
Merge pull request #14114 from micalevisk/fix-issue-13733
kamilmysliwiec Nov 7, 2024
7de7320
chore: upgrade dependencies for nest v11.x
Tony133 Nov 7, 2024
1ed9748
Merge branch 'master' into feat/upgrade-fastify-v5
Tony133 Nov 7, 2024
f13e32a
chore: update fastify view options interface
Tony133 Nov 7, 2024
790bafa
refactor(): update fastify static options interface
Tony133 Nov 7, 2024
e75eb1d
feat(common): json logger and a few other improvements
kamilmysliwiec Nov 8, 2024
03d8bcc
feat: add pid to log object
kamilmysliwiec Nov 8, 2024
84bf570
Merge pull request #14097 from clkamp/wip-distance-order
kamilmysliwiec Nov 8, 2024
f191f0f
Merge pull request #14112 from nestjs/fix/instance-method-call
kamilmysliwiec Nov 8, 2024
51a03bb
Merge pull request #14113 from nestjs/feat/context-select-options
kamilmysliwiec Nov 8, 2024
fb32ef6
Merge pull request #14116 from Tony133/chore/update-fastify-static-op…
kamilmysliwiec Nov 8, 2024
bcda8fd
Merge pull request #14115 from Tony133/chore/update-fastify-view-opti…
kamilmysliwiec Nov 8, 2024
e767bd3
feat: produce a parseable json when colors off and compact on
kamilmysliwiec Nov 8, 2024
23e602b
style: fix linter issues
kamilmysliwiec Nov 8, 2024
66c4810
style: fix linter issues
kamilmysliwiec Nov 8, 2024
cd7079b
feat(common): add parse date pipe, add tsdoc to other pipes
kamilmysliwiec Nov 8, 2024
676461f
test: add unit tests, minor updates
kamilmysliwiec Nov 8, 2024
3cdaaf0
feat(core): type narrowing valid entry module for nestjs factories
micalevisk Jul 6, 2024
e9d57dd
fix: type narrowing ctx
EeeasyCode Nov 10, 2024
de13eec
feat: introduce message preprocessor for ws adapter
CodyTseng Nov 10, 2024
2874478
fix: import to use direct file path
EeeasyCode Nov 10, 2024
e231f98
fix: rabbitmq bindings and auto-generated queues
EeeasyCode Nov 11, 2024
945d134
Merge pull request #14126 from EeeasyCode/issue-#14093
kamilmysliwiec Nov 12, 2024
3584684
feat(common): allow passing number to http error create body #12787
kamilmysliwiec Nov 12, 2024
9ae6a4c
feat(microservices): add max tcp packet buffer length
kamilmysliwiec Nov 12, 2024
2ab9973
refactor(ws): rename to message parser and move json parse logic inside
CodyTseng Nov 13, 2024
33e32d9
feat(ws): allow setting message parser in constructor
CodyTseng Nov 13, 2024
3dfc7fc
feat(microservices): add status, unwrap, on, and other features
kamilmysliwiec Nov 15, 2024
ea92f5f
Merge pull request #14134 from nestjs/feat/add-max-tcp-message-length
kamilmysliwiec Nov 15, 2024
07adf37
Merge pull request #14122 from nestjs/feat/parse-date-pipe
kamilmysliwiec Nov 15, 2024
9a48dc1
Merge pull request #14131 from nestjs/feat/number-exception-create-body
kamilmysliwiec Nov 15, 2024
f983f03
fix: update broken import paths
kamilmysliwiec Nov 15, 2024
f2b6cc0
fix: fix minor type issues, broken imports
kamilmysliwiec Nov 15, 2024
66c3ab2
sample: update grpc client options type
kamilmysliwiec Nov 15, 2024
259b5dd
fix: remove duplicated client redis message handler
kamilmysliwiec Nov 15, 2024
9ea618e
Update packages/core/nest-factory.ts
kamilmysliwiec Nov 15, 2024
feb2135
Merge pull request #14123 from micalevisk/feat/narrow-nest-factories-…
kamilmysliwiec Nov 15, 2024
e965b4a
Merge pull request #14111 from wenlong-chen/fix-module-destroy-order
kamilmysliwiec Nov 18, 2024
3ad835c
Merge pull request #14110 from wenlong-chen/fix-global-module-distance
kamilmysliwiec Nov 18, 2024
f37dafc
chore: pass error instance to logger error method
kamilmysliwiec Nov 18, 2024
9129e4f
refactor: remove redundant conditions
kamilmysliwiec Nov 18, 2024
d2ac397
Merge pull request #13388 from AlexRMU/master
kamilmysliwiec Nov 18, 2024
33ef121
chore: a few improvements
kamilmysliwiec Nov 18, 2024
09a1933
Merge branch 'ReneZeidler-fix-get-all-and-merge' into 11.0.0
kamilmysliwiec Nov 18, 2024
ca86bf6
Merge pull request #14129 from EeeasyCode/fix/issue-#13931
kamilmysliwiec Nov 18, 2024
e89bb8e
Merge pull request #14127 from CodyTseng/feat-ws-message-preprocessor
kamilmysliwiec Nov 18, 2024
47941ba
test: update outdated unit test
kamilmysliwiec Nov 18, 2024
a669981
Merge pull request #14121 from nestjs/feat/logger-additions
kamilmysliwiec Nov 18, 2024
c239f9a
refactor: replace inline as any calls with untyped vars
kamilmysliwiec Nov 18, 2024
00bb630
Merge pull request #13407 from MegaSpaceHamlet/multer-error-fieldname
kamilmysliwiec Nov 18, 2024
ad97a73
Merge branch '11.0.0' into feat-microservices/nats-gracefull-shutdown
kamilmysliwiec Nov 18, 2024
774ccbe
Merge pull request #12622 from jmcdo29/feat/async-microservce-config
kamilmysliwiec Nov 18, 2024
234d8d5
Merge pull request #13924 from alinowrouzii/feat-microservices/nats-g…
kamilmysliwiec Nov 18, 2024
3267135
chore: resolve merge conflicts
kamilmysliwiec Nov 18, 2024
fb6025e
Merge pull request #13990 from Tony133/feat/upgrade-fastify-v5
kamilmysliwiec Nov 18, 2024
bc31b5c
test: update tcp config opts type
kamilmysliwiec Nov 18, 2024
3973900
Merge pull request #13278 from johaven/feat-webdav-methods
kamilmysliwiec Nov 18, 2024
4f55f88
Update packages/microservices/server/server-nats.ts
kamilmysliwiec Nov 18, 2024
129fe79
Update packages/microservices/server/server-rmq.ts
kamilmysliwiec Nov 18, 2024
9356509
Update packages/microservices/server/server-nats.ts
kamilmysliwiec Nov 20, 2024
c66d1fb
fix: add type constraints and assertions
kamilmysliwiec Nov 20, 2024
bdc9b44
Merge pull request #14142 from nestjs/feat/microservice-client-server…
kamilmysliwiec Nov 20, 2024
212d07f
refactor(common): improve apply decorators types
kamilmysliwiec Nov 20, 2024
f99617d
feat(common): introduce intrinsic exception
kamilmysliwiec Nov 21, 2024
c5e5b90
feat(websockets): include exception cause to associate error with req
kamilmysliwiec Nov 21, 2024
03a61e9
chore: revert apply decorators signature (regression)
kamilmysliwiec Nov 21, 2024
a077ea5
Merge branch '11.0.0' into feat/intrinsic-exception
kamilmysliwiec Nov 21, 2024
24983c8
Merge branch 'feat/intrinsic-exception' into feat/include-error-cause-ws
kamilmysliwiec Nov 21, 2024
9a2b049
chore: include pattern too
kamilmysliwiec Nov 21, 2024
9020d75
chore: export error payload interface
kamilmysliwiec Nov 21, 2024
db95f20
test: add missing unit tests, update typo
kamilmysliwiec Nov 21, 2024
a3dbbec
feat: add cause factory to allow controlling the cause shape
kamilmysliwiec Nov 21, 2024
5c7724b
test: update integration test
kamilmysliwiec Nov 21, 2024
f80984f
test: update integration test
kamilmysliwiec Nov 21, 2024
b04895a
Merge pull request #14182 from nestjs/feat/intrinsic-exception
kamilmysliwiec Nov 22, 2024
43cf572
Merge pull request #14184 from nestjs/feat/include-error-cause-ws
kamilmysliwiec Nov 22, 2024
59374c9
Merge pull request #13797 from patrickacioli/fix-fastify-global-route…
kamilmysliwiec Nov 25, 2024
21279a9
feat(microservices): support nats queue per handler
kamilmysliwiec Nov 25, 2024
ab660c7
test: add unit test
kamilmysliwiec Nov 25, 2024
edf574a
Merge pull request #14200 from nestjs/feat/allow-queue-per-handler
kamilmysliwiec Nov 25, 2024
236b633
style: address integration tests lint errors
kamilmysliwiec Nov 26, 2024
8829b8d
style: address packages lint errors
kamilmysliwiec Nov 26, 2024
38367e8
style: address spec lint errors
kamilmysliwiec Nov 26, 2024
5662fc1
Merge branch '11.0.0' into chore/eslint-v9
kamilmysliwiec Nov 26, 2024
10fdf16
build: use strict null checks part 1
kamilmysliwiec Nov 26, 2024
cfe0f47
Merge branch 'chore/eslint-v9' of https://github.com/nestjs/nest into…
kamilmysliwiec Nov 26, 2024
2200897
build: use strict null checks part 2
kamilmysliwiec Nov 26, 2024
b94b0b9
build: use strict null checks part 3
kamilmysliwiec Nov 26, 2024
5b220df
build: use strict null checks part 4
kamilmysliwiec Nov 26, 2024
7d3e5c1
build: use strict null checks part 5
kamilmysliwiec Nov 26, 2024
e8bc258
chore: minore fixes
kamilmysliwiec Nov 26, 2024
2e0de4a
ci: update node versions matrix
kamilmysliwiec Nov 26, 2024
7e774b1
ci: use active node version for lint
kamilmysliwiec Nov 26, 2024
9315040
test: error messages for node above v20 (json socket)
kamilmysliwiec Nov 26, 2024
f94ef90
test: ignore floating request promises (done cb)
kamilmysliwiec Nov 27, 2024
ab79649
ci: run lint sequentially in ci
kamilmysliwiec Nov 27, 2024
4895e3b
ci: increase max old space size for lint scripts
kamilmysliwiec Nov 27, 2024
a41781a
ci: update lint integration script
kamilmysliwiec Nov 27, 2024
356469b
ci: run spec and packages lint in parallel
kamilmysliwiec Nov 27, 2024
0ca42ba
Merge pull request #14205 from nestjs/chore/eslint-v9
kamilmysliwiec Nov 27, 2024
339be46
chore: resolve conflicts
kamilmysliwiec Nov 27, 2024
d27628a
chore: resolve conflicts
kamilmysliwiec Nov 27, 2024
11f8a4a
feat(common): add error messages for file validators
mag123c Nov 27, 2024
170f2e0
Merge branch 'master' into 11.0.0
kamilmysliwiec Nov 27, 2024
e2893f9
chore: add non null assertions
kamilmysliwiec Nov 27, 2024
7478928
chore: update minimum node version
kamilmysliwiec Nov 27, 2024
74e318c
test: add not null assertion
kamilmysliwiec Nov 27, 2024
cf17e4d
chore: mqtt updates, integration test improvements
kamilmysliwiec Nov 27, 2024
ca70f07
chore(deps): update package.json
kamilmysliwiec Nov 27, 2024
d606466
Merge branch 'master' into 11.0.0
kamilmysliwiec Nov 27, 2024
ca76e69
test(microservices): fix client mqtt unit test (use endasync)
kamilmysliwiec Nov 27, 2024
6e0f891
style: address lint errors and warnings
kamilmysliwiec Nov 27, 2024
5ca5c74
ci: use node 20.18 as the maintenance version
kamilmysliwiec Nov 27, 2024
43804c7
chore: resolve conflicts
kamilmysliwiec Nov 27, 2024
95bd1ce
Merge branch 'notusertelken-feature/mqtt-raw-output' into 11.0.0
kamilmysliwiec Nov 27, 2024
6f7d470
Merge pull request #14213 from mag123c/feature/14070-add-error-messag…
kamilmysliwiec Nov 27, 2024
f9c5786
style: address lint errors
kamilmysliwiec Nov 27, 2024
4f008fa
Merge branch '11.0.0' into chore/express-v5
kamilmysliwiec Nov 27, 2024
7f142e9
feat: add legacy route converter, update tests
kamilmysliwiec Nov 28, 2024
7197cc1
feat: add normalize path to http adapter
kamilmysliwiec Nov 28, 2024
700a85d
chore: update package.json
kamilmysliwiec Nov 28, 2024
d2a45f3
chore: use optional group wrapped splat param
kamilmysliwiec Dec 3, 2024
3080787
fix(core): call shutdown hooks in reverse distance order
flovouin Dec 3, 2024
c341a02
Merge pull request #14267 from flovouin/fix-shutdown-hooks-order
kamilmysliwiec Dec 4, 2024
8bb5623
fix(core): set global modules distance to -1
kamilmysliwiec Dec 5, 2024
648b438
Merge branch '11.0.0' of https://github.com/nestjs/nest into 11.0.0
kamilmysliwiec Dec 5, 2024
121494a
Merge branch '11.0.0' into chore/express-v5
kamilmysliwiec Dec 5, 2024
6a84d6e
fix(core): set distance to max, dont override on calc
kamilmysliwiec Dec 5, 2024
3e55791
Merge branch '11.0.0' into chore/express-v5
kamilmysliwiec Dec 5, 2024
5d3c284
chore(microservices): dont reference mqtt pkg
kamilmysliwiec Dec 12, 2024
41234f6
Merge branch '11.0.0' into chore/express-v5
kamilmysliwiec Dec 12, 2024
18b1bce
chore: address todos, remove deprecated
kamilmysliwiec Dec 12, 2024
2c6bf94
style: fix eslint errors
kamilmysliwiec Dec 12, 2024
3da69f8
test: update container method name
kamilmysliwiec Dec 12, 2024
0354e5e
test: update container method name
kamilmysliwiec Dec 12, 2024
cb739ad
Merge pull request #14238 from nestjs/chore/express-v5
kamilmysliwiec Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ parameters:
default: false
legacy-node-version:
type: string
default: '14.21.3'
default: '18.20'
maintenance-node-version:
type: string
default: '16.20'
default: '20.18'
active-node-version:
type: string
default: '18.17'
default: '22.11'
current-node-version:
type: string
default: '20.5'
default: '23.3'

aliases:
- &restore-cache
Expand Down Expand Up @@ -121,14 +121,14 @@ jobs:
lint:
working_directory: ~/nest
docker:
- image: cimg/node:<< pipeline.parameters.current-node-version >>
- image: cimg/node:<< pipeline.parameters.active-node-version >>
steps:
- checkout
- *restore-cache
- *install-deps
- run:
name: Lint
command: npm run lint
command: npm run lint:ci

integration_tests:
working_directory: ~/nest
Expand Down
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

47 changes: 0 additions & 47 deletions .eslintrc.js

This file was deleted.

55 changes: 55 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// @ts-check
import eslint from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{
ignores: ['node_modules', '**/node_modules/**', '**/*.js', '**/*.d.ts'],
},
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
ecmaVersion: 5,
sourceType: 'module',
parserOptions: {
project: ['tsconfig.json', 'tsconfig.spec.json'],
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": false,
"checksConditionals": false
}
],
"@typescript-eslint/require-await": "off",
'@typescript-eslint/prefer-promise-reject-errors': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/only-throw-error': 'off',
},
},
);
1 change: 1 addition & 0 deletions integration/auto-mock/test/bar.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as chaiAsPromised from 'chai-as-promised';
import * as sinon from 'sinon';
import { BarService } from '../src/bar.service';
import { FooService } from '../src/foo.service';

chai.use(chaiAsPromised);
const { expect } = chai;

Expand Down
4 changes: 3 additions & 1 deletion integration/auto-mock/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],
Expand All @@ -32,7 +33,8 @@
},
"include": [
"src/**/*",
"e2e/**/*"
"e2e/**/*",
"test/**/*"
],
"exclude": [
"node_modules",
Expand Down
1 change: 1 addition & 0 deletions integration/cors/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],
Expand Down
6 changes: 3 additions & 3 deletions integration/discovery/src/webhooks.explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ export class WebhooksExplorer {
const { name } = this.discoveryService.getMetadataByDecorator(
Webhook,
wrapper,
);
)!;
return {
name,
handlers: this.metadataScanner
.getAllMethodNames(wrapper.metatype.prototype)
.getAllMethodNames(wrapper.metatype!.prototype)
.map(methodName => {
const { event } = this.discoveryService.getMetadataByDecorator(
WebhookHandler,
wrapper,
methodName,
);
)!;
return {
methodName,
event,
Expand Down
1 change: 1 addition & 0 deletions integration/discovery/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],
Expand Down
1 change: 1 addition & 0 deletions integration/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ services:
mysql:
image: mysql:8.4.3
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
ports:
Expand Down
2 changes: 1 addition & 1 deletion integration/graphql-code-first/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ async function bootstrap() {
app.useGlobalPipes(new ValidationPipe());
await app.listen(3000);
}
bootstrap();
void bootstrap();
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class RecipesResolver {
@Args('newRecipeData') newRecipeData: NewRecipeInput,
): Promise<Recipe> {
const recipe = await this.recipesService.create(newRecipeData);
pubSub.publish('recipeAdded', { recipeAdded: recipe });
void pubSub.publish('recipeAdded', { recipeAdded: recipe });
return recipe;
}

Expand Down
1 change: 1 addition & 0 deletions integration/graphql-code-first/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('GraphQL request scoped', () => {
],
},
})
.end((err, res) => {
.end(err => {
if (err) return end(err);
end();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export class CatsRequestScopedService {
}

findOneById(id: number): Cat {
return this.cats.find(cat => cat.id === id);
return this.cats.find(cat => cat.id === id)!;
}
}
4 changes: 2 additions & 2 deletions integration/graphql-schema-first/src/cats/cats.resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export class CatsResolvers {

@Mutation('createCat')
async create(@Args() args: Cat): Promise<Cat> {
const createdCat = await this.catsService.create(args);
pubSub.publish('catCreated', { catCreated: createdCat });
const createdCat = this.catsService.create(args);
void pubSub.publish('catCreated', { catCreated: createdCat });
return createdCat;
}

Expand Down
2 changes: 1 addition & 1 deletion integration/graphql-schema-first/src/cats/cats.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export class CatsService {
}

findOneById(id: number): Cat {
return this.cats.find(cat => cat.id === id);
return this.cats.find(cat => cat.id === id)!;
}
}
2 changes: 1 addition & 1 deletion integration/graphql-schema-first/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
}
bootstrap();
void bootstrap();
1 change: 1 addition & 0 deletions integration/graphql-schema-first/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],
Expand Down
37 changes: 33 additions & 4 deletions integration/hello-world/e2e/exclude-middleware-fastify.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ class TestController {
return RETURN_VALUE;
}

@Get('legacy-wildcard/overview')
testLegacyWildcard() {
return RETURN_VALUE;
}

@Get('splat-wildcard/overview')
testSplatWildcard() {
return RETURN_VALUE;
}

@Get('overview/:id')
overviewById() {
return RETURN_VALUE;
Expand All @@ -64,10 +74,17 @@ class TestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.end(MIDDLEWARE_VALUE))
.exclude('test', 'overview/:id', 'wildcard/(.*)', {
path: 'middleware',
method: RequestMethod.POST,
})
.exclude(
'test',
'overview/:id',
'wildcard/*',
'legacy-wildcard/(.*)',
'splat-wildcard/*splat',
{
path: 'middleware',
method: RequestMethod.POST,
},
)
.forRoutes('*');
}
}
Expand Down Expand Up @@ -126,6 +143,18 @@ describe('Exclude middleware (fastify)', () => {
.expect(200, RETURN_VALUE);
});

it(`should exclude "/legacy-wildcard/overview" endpoint (by wildcard, legacy syntax)`, () => {
return request(app.getHttpServer())
.get('/legacy-wildcard/overview')
.expect(200, RETURN_VALUE);
});

it(`should exclude "/splat-wildcard/overview" endpoint (by wildcard, new syntax)`, () => {
return request(app.getHttpServer())
.get('/splat-wildcard/overview')
.expect(200, RETURN_VALUE);
});

afterEach(async () => {
await app.close();
});
Expand Down
Loading