Compare commits

...

492 Commits

Author SHA1 Message Date
Kamil Myśliwiec
44490dcad0 fix(core): global module middleware should be executed first 2025-01-23 09:19:36 +01:00
Kamil Mysliwiec
d56553af13 Merge pull request #14492 from nestjs/renovate/node-22.x
chore(deps): update dependency @types/node to v22.10.8
2025-01-23 08:28:51 +01:00
Kamil Mysliwiec
f46e015dea Merge pull request #14490 from nestjs/dependabot/npm_and_yarn/mocha-11.1.0
chore(deps-dev): bump mocha from 11.0.1 to 11.1.0
2025-01-23 08:28:20 +01:00
Kamil Mysliwiec
59e8312acc Merge pull request #14491 from nestjs/dependabot/npm_and_yarn/graphql-16.10.0
chore(deps-dev): bump graphql from 16.9.0 to 16.10.0
2025-01-23 08:28:10 +01:00
renovate[bot]
4e502cf7e7 chore(deps): update dependency @types/node to v22.10.8 2025-01-23 04:34:01 +00:00
dependabot[bot]
d3208af831 chore(deps-dev): bump graphql from 16.9.0 to 16.10.0
Bumps [graphql](https://github.com/graphql/graphql-js) from 16.9.0 to 16.10.0.
- [Release notes](https://github.com/graphql/graphql-js/releases)
- [Commits](https://github.com/graphql/graphql-js/compare/v16.9.0...v16.10.0)

---
updated-dependencies:
- dependency-name: graphql
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 00:27:32 +00:00
dependabot[bot]
3b32397d16 chore(deps-dev): bump mocha from 11.0.1 to 11.1.0
Bumps [mocha](https://github.com/mochajs/mocha) from 11.0.1 to 11.1.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v11.0.1...v11.1.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 00:27:07 +00:00
Kamil Myśliwiec
dd320fe3a0 Merge branch 'master' of https://github.com/nestjs/nest 2025-01-22 14:05:58 +01:00
Kamil Myśliwiec
44c212efd5 fix(core): pass app options to nest container when creating instance 2025-01-22 14:05:50 +01:00
Kamil Mysliwiec
c0da7d4276 Merge pull request #14483 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.0.4
2025-01-22 13:19:48 +01:00
renovate[bot]
0dc465b66d fix(deps): update nest monorepo to v11.0.4 2025-01-22 11:07:55 +00:00
Kamil Mysliwiec
c2b0a2fc6a Merge pull request #14481 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.0.4
2025-01-22 12:06:11 +01:00
renovate[bot]
c0e3d9fe50 fix(deps): update nest monorepo to v11.0.4 2025-01-22 08:47:17 +00:00
Kamil Mysliwiec
238d51dad3 Merge pull request #14480 from nestjs/dependabot/npm_and_yarn/undici-6.21.1
chore(deps-dev): bump undici from 6.21.0 to 6.21.1
2025-01-22 09:45:35 +01:00
Kamil Myśliwiec
02045b78a9 chore(@nestjs) publish v11.0.4 release 2025-01-22 09:39:20 +01:00
dependabot[bot]
ded0d2b389 chore(deps-dev): bump undici from 6.21.0 to 6.21.1
Bumps [undici](https://github.com/nodejs/undici) from 6.21.0 to 6.21.1.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.21.0...v6.21.1)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-22 08:32:06 +00:00
Kamil Mysliwiec
908d790823 Merge pull request #14479 from nestjs/renovate/nest-monorepo
chore(deps): update dependency @nestjs/cli to v11.0.2
2025-01-22 09:30:19 +01:00
Kamil Mysliwiec
3c9f2adfbf Merge pull request #14469 from kostyazgara/return-kafkajs-consumers-and-producers
feat(microservices): return all clients from kafka unwrap
2025-01-22 09:30:08 +01:00
renovate[bot]
8094b1965f chore(deps): update dependency @nestjs/cli to v11.0.2 2025-01-22 08:29:47 +00:00
Kamil Mysliwiec
377f671806 Merge pull request #14478 from nestjs/renovate/mysql-9.x
chore(deps): update mysql docker tag to v9.2.0
2025-01-22 09:27:53 +01:00
renovate[bot]
b65f2a6f8a chore(deps): update mysql docker tag to v9.2.0 2025-01-22 05:44:08 +00:00
Kamil Mysliwiec
b40649fd69 Merge pull request #14475 from nestjs/renovate/nest-graphql-monorepo
fix(deps): update nest-graphql monorepo to v13.0.2
2025-01-21 14:54:40 +01:00
Kamil Mysliwiec
3bc5dc6154 Merge pull request #14474 from nestjs/renovate/nestjs-bull-11.x
fix(deps): update dependency @nestjs/bull to v11.0.1
2025-01-21 14:54:06 +01:00
renovate[bot]
e67e308aa2 fix(deps): update nest-graphql monorepo to v13.0.2 2025-01-21 13:33:14 +00:00
renovate[bot]
f201463bcb fix(deps): update dependency @nestjs/bull to v11.0.1 2025-01-21 13:33:01 +00:00
Kostya Zgara
3d1910cd18 feat(microservices): return all clients from kafka unwrap 2025-01-21 12:54:39 +02:00
Kamil Mysliwiec
73b9232ccc Merge pull request #14468 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.21.0
2025-01-21 10:55:32 +01:00
Kamil Mysliwiec
6b8adf1773 Merge pull request #14467 from nestjs/renovate/nest-monorepo
chore(deps): update dependency @nestjs/cli to v11.0.1
2025-01-21 10:55:23 +01:00
renovate[bot]
af2f4fd3c7 chore(deps): update typescript-eslint monorepo to v8.21.0 2025-01-21 09:28:37 +00:00
renovate[bot]
0a568fd5b7 chore(deps): update dependency @nestjs/cli to v11.0.1 2025-01-21 09:27:49 +00:00
Kamil Mysliwiec
bab9ed65e8 Merge pull request #14464 from micalevisk/chore-drop-deprecated-dep
chore(sample): remove `@types/dotenv` useless dev dep
2025-01-20 19:16:12 +01:00
Micael Levi L. Cavalcante
90db20c9fb chore(sample): remove @types/dotenv useless dev dep 2025-01-20 13:03:59 -04:00
Kamil Mysliwiec
f5400b69ea Merge pull request #14462 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.0.3
2025-01-20 13:14:09 +01:00
renovate[bot]
e5cf168e2e fix(deps): update nest monorepo to v11.0.3 2025-01-20 12:06:16 +00:00
Kamil Myśliwiec
8b1affff6c chore: update package.json 2025-01-20 13:04:24 +01:00
Kamil Myśliwiec
cbebdd299d chore(@nestjs) publish v11.0.3 release 2025-01-20 12:37:19 +01:00
Kamil Myśliwiec
5eaae5f134 fix(platform): add missing path-to-regexp dependency #14461 2025-01-20 12:36:45 +01:00
Kamil Myśliwiec
d03955dfda sample: update 24-serve-static sample 2025-01-20 12:34:27 +01:00
Kamil Mysliwiec
26e70ba6af Merge pull request #14460 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.0.2
2025-01-20 09:43:07 +01:00
renovate[bot]
9528b75865 fix(deps): update nest monorepo to v11.0.2 2025-01-20 08:34:43 +00:00
Kamil Mysliwiec
b32ac6330b Merge pull request #14459 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.0.2
2025-01-20 09:32:58 +01:00
renovate[bot]
830e79adc0 fix(deps): update nest monorepo to v11.0.2 2025-01-20 08:21:05 +00:00
Kamil Mysliwiec
8f3fa2220e Merge pull request #14453 from nestjs/renovate/eslint-plugin-prettier-5.x
chore(deps): update dependency eslint-plugin-prettier to v5.2.3
2025-01-20 09:19:33 +01:00
renovate[bot]
eae0f13867 chore(deps): update dependency eslint-plugin-prettier to v5.2.3 2025-01-20 08:15:52 +00:00
Kamil Myśliwiec
7dbc4dc2ba Merge branch 'master' of https://github.com/nestjs/nest 2025-01-20 09:14:34 +01:00
Kamil Myśliwiec
fca5ebba7f chore(@nestjs) publish v11.0.2 release 2025-01-20 09:14:19 +01:00
Kamil Mysliwiec
d54f4e8475 Merge pull request #14457 from nestjs/renovate/nest-monorepo
fix(deps): update dependency @nestjs/passport to v11.0.4
2025-01-20 09:04:57 +01:00
renovate[bot]
0d45b614ab fix(deps): update dependency @nestjs/passport to v11.0.4 2025-01-20 08:04:46 +00:00
Kamil Mysliwiec
6dc8eb5ba8 Merge pull request #14448 from nestjs/renovate/nestjs-mongoose-11.x
fix(deps): update dependency @nestjs/mongoose to v11
2025-01-20 09:02:01 +01:00
renovate[bot]
5ef968a9c3 fix(deps): update dependency @nestjs/mongoose to v11 2025-01-20 07:52:07 +00:00
Kamil Mysliwiec
181625b94e Merge pull request #14451 from nestjs/renovate/nestjs-typeorm-11.x
fix(deps): update dependency @nestjs/typeorm to v11
2025-01-20 08:50:30 +01:00
Kamil Mysliwiec
4304b48dee Merge pull request #14443 from Phillip9587/express-body-parser
fix: use express body-parser reexports
2025-01-20 08:50:16 +01:00
Kamil Mysliwiec
0ecc32c9eb Merge pull request #14458 from nestjs/renovate/major-nest-monorepo
chore(deps): update dependency @nestjs/cli to v11
2025-01-20 08:49:23 +01:00
Kamil Myśliwiec
0545020952 refactor: pick only one option attribute for test module 2025-01-20 08:48:57 +01:00
Kamil Myśliwiec
65cfe0c82a refactor: pick only one option attribute for test module 2025-01-20 08:48:22 +01:00
Kamil Myśliwiec
6254af7224 Merge branch '14455' of https://github.com/rbnayax/nest into rbnayax-14455 2025-01-20 08:46:36 +01:00
Kamil Myśliwiec
0996b7d2a9 chore(deps): update graphql-subscriptions package 2025-01-20 08:46:27 +01:00
renovate[bot]
ae5fca1cee fix(deps): update dependency @nestjs/typeorm to v11 2025-01-20 07:45:53 +00:00
renovate[bot]
fee96ea30c chore(deps): update dependency @nestjs/cli to v11 2025-01-20 07:45:39 +00:00
Kamil Myśliwiec
6f04292d97 chore(deps): update graphql-subscriptions package 2025-01-20 08:44:00 +01:00
Kamil Myśliwiec
916adc28f3 test: delete removed keepconnectionalive attribute 2025-01-20 08:42:18 +01:00
Kamil Mysliwiec
3b54a8c97c Merge pull request #14438 from nestjs/renovate/fast-json-stringify-6.x
fix(deps): update dependency fast-json-stringify to v6.0.1
2025-01-20 08:39:45 +01:00
Kamil Mysliwiec
8fdb591c89 Merge pull request #14441 from nestjs/renovate/ansis-3.x
fix(deps): update dependency ansis to v3.9.0
2025-01-20 08:39:35 +01:00
Kamil Mysliwiec
f08534f9fa Merge pull request #14447 from nestjs/renovate/major-nest-graphql-monorepo
chore(deps): update nest-graphql monorepo to v13 (major)
2025-01-20 08:39:24 +01:00
Kamil Mysliwiec
082562f03a Merge pull request #14452 from micalevisk/chore/issue-type
chore: add issue types to issue templates forms
2025-01-20 08:38:56 +01:00
Regev Brody
817ede3bc6 fix: Module id generatorAlgorithm can't be controlled in test #14455 2025-01-19 23:47:13 +02:00
Kamil Mysliwiec
4ef49ce494 Merge pull request #14449 from nestjs/renovate/nestjs-sequelize-11.x
fix(deps): update dependency @nestjs/sequelize to v11
2025-01-19 11:23:36 +01:00
renovate[bot]
d86edfdfaa chore(deps): update nest-graphql monorepo to v13 2025-01-18 11:51:11 +00:00
renovate[bot]
6af1212e6b fix(deps): update dependency ansis to v3.9.0 2025-01-18 11:50:53 +00:00
renovate[bot]
a4b22be9cd fix(deps): update dependency fast-json-stringify to v6.0.1 2025-01-18 11:50:41 +00:00
renovate[bot]
d8e9e94a9e fix(deps): update dependency @nestjs/sequelize to v11 2025-01-18 11:49:32 +00:00
Kamil Mysliwiec
e63a2c1f7c Merge pull request #14445 from nestjs/renovate/nest-graphql-monorepo
fix(deps): update nest-graphql monorepo to v13.0.1
2025-01-18 12:48:13 +01:00
Kamil Mysliwiec
e518b86ec5 Merge pull request #14444 from nestjs/renovate/nestjs-swagger-11.x
fix(deps): update dependency @nestjs/swagger to v11.0.2
2025-01-18 12:48:06 +01:00
Kamil Mysliwiec
d00f31385b Merge pull request #14446 from nestjs/renovate/major-nest-monorepo
chore(deps): update dependency @nestjs/schematics to v11
2025-01-18 12:47:56 +01:00
renovate[bot]
22e48d6e34 chore(deps): update dependency @nestjs/schematics to v11 2025-01-17 20:50:29 +00:00
renovate[bot]
834377bbb3 fix(deps): update dependency @nestjs/swagger to v11.0.2 2025-01-17 19:47:12 +00:00
renovate[bot]
da15585c06 fix(deps): update nest-graphql monorepo to v13.0.1 2025-01-17 19:45:23 +00:00
Kamil Mysliwiec
a4d01405cd Merge pull request #14429 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update dependency typescript-eslint to v8.20.0
2025-01-17 15:22:46 +01:00
renovate[bot]
52a27be9f7 chore(deps): update dependency typescript-eslint to v8.20.0 2025-01-17 13:55:07 +00:00
Kamil Mysliwiec
0c1df77929 Merge pull request #14435 from nestjs/renovate/node-22.x
chore(deps): update dependency @types/node to v22.10.7
2025-01-17 14:50:58 +01:00
Kamil Mysliwiec
285d539978 Merge pull request #14440 from nestjs/renovate/lint-staged-15.x
chore(deps): update dependency lint-staged to v15.4.1
2025-01-17 14:50:48 +01:00
Kamil Mysliwiec
30a1068979 Merge pull request #14442 from nestjs/renovate/major-nest-graphql-monorepo
chore(deps): update nest-graphql monorepo to v13 (major)
2025-01-17 14:50:37 +01:00
Phillip9587
9aa2a43377 fix: use express body-parser reexports 2025-01-17 14:18:16 +01:00
renovate[bot]
67e91120ca chore(deps): update nest-graphql monorepo to v13 2025-01-17 13:05:23 +00:00
renovate[bot]
15712bf390 chore(deps): update dependency lint-staged to v15.4.1 2025-01-17 13:04:49 +00:00
renovate[bot]
028cbffcd9 chore(deps): update dependency @types/node to v22.10.7 2025-01-17 13:04:38 +00:00
Kamil Myśliwiec
379badd6f7 Merge branch 'master' of https://github.com/nestjs/nest 2025-01-17 14:02:48 +01:00
Kamil Myśliwiec
88eaf3bec1 ci: use npm install instead of ci as ci is flaky 2025-01-17 14:02:42 +01:00
Kamil Mysliwiec
a5aa126506 Merge pull request #14439 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.0.1
2025-01-17 13:54:42 +01:00
renovate[bot]
3147eb2f2e fix(deps): update nest monorepo to v11.0.1 2025-01-17 12:23:40 +00:00
Kamil Myśliwiec
5eabb800f4 chore: update esm samples 2025-01-17 12:59:06 +01:00
Kamil Myśliwiec
ac10e0b238 chore: update 26-queues sample to use the latest bull version 2025-01-17 12:56:58 +01:00
Kamil Myśliwiec
4092b68793 sample: update 27-scheduling sample deps 2025-01-17 12:20:48 +01:00
Kamil Myśliwiec
33228c813f sample: update 25, 28, 29 sample deps 2025-01-17 11:26:04 +01:00
Kamil Myśliwiec
ece3f34400 sample: update event-emitter sample 2025-01-17 11:23:52 +01:00
Kamil Myśliwiec
96cdb827c8 sample: update graphql samples 2025-01-17 11:10:58 +01:00
Kamil Myśliwiec
1b5f16863b chore: regenerate lockfile 2025-01-17 09:41:39 +01:00
Kamil Myśliwiec
0f8f64d693 sample: upgrade eslint-config-prettier 2025-01-17 09:36:06 +01:00
Kamil Myśliwiec
8ff1bbce89 sample: 20-cache deps update 2025-01-17 09:34:59 +01:00
Kamil Myśliwiec
6589278c64 Merge branch 'Tony133-fix/update-peer-dependencies-for-platform-fastify' 2025-01-17 09:27:45 +01:00
Kamil Myśliwiec
71e399e6d5 sample: revert cli upgrade 2025-01-17 09:27:33 +01:00
Kamil Myśliwiec
6dcb57f547 Merge branch 'fix/update-peer-dependencies-for-platform-fastify' of https://github.com/Tony133/nest into Tony133-fix/update-peer-dependencies-for-platform-fastify 2025-01-17 09:26:45 +01:00
Kamil Myśliwiec
d47e874c18 sample: update 19 sample deps 2025-01-17 09:25:28 +01:00
Tony133
2ee3853d46 fix: update sample 2025-01-17 09:01:28 +01:00
Tony133
94a497acfb fix: update peer dependencies for platform fastify 2025-01-16 23:01:52 +01:00
Kamil Myśliwiec
a8ae8c7786 sample: another round of sample updates 2025-01-16 14:15:13 +01:00
Kamil Myśliwiec
4123bbdeee sample: update swagger sample deps 2025-01-16 13:44:28 +01:00
Kamil Myśliwiec
0f617d4753 chore(@nestjs) publish v11.0.1 release 2025-01-16 12:53:58 +01:00
Kamil Myśliwiec
d6b9feefcb fix: normalize middle wildcards, call path-to-regexp early 2025-01-16 12:52:41 +01:00
Kamil Myśliwiec
d944fa515b sample(11-swagger): update lint configuration 2025-01-16 12:52:12 +01:00
Kamil Myśliwiec
a0648042ac sample: another round of sample updates 2025-01-16 11:27:06 +01:00
Kamil Myśliwiec
780fe91c29 sample: another round of sample updates 2025-01-16 11:26:10 +01:00
Kamil Myśliwiec
5ce8c43116 sample(01-cats-app): update sample deps 2025-01-16 11:09:02 +01:00
Kamil Myśliwiec
1299888fc2 chore: update readme 2025-01-16 11:02:09 +01:00
Kamil Myśliwiec
e19b5866a2 chore(@nestjs) publish v11.0.0 release 2025-01-16 11:01:35 +01:00
Kamil Myśliwiec
224e0dda6b chore: upgrade multer 2025-01-16 10:59:54 +01:00
Kamil Myśliwiec
95654f9778 chore: update package.json 2025-01-16 10:58:17 +01:00
Kamil Mysliwiec
9719731c11 Merge pull request #14428 from nestjs/renovate/mercurius-16.x
fix(deps): update dependency mercurius to v16.0.1
2025-01-15 11:27:37 +01:00
renovate[bot]
105db11790 fix(deps): update dependency mercurius to v16.0.1 2025-01-15 10:05:47 +00:00
Kamil Myśliwiec
408a632c9d chore: regenerate lock file 2025-01-15 10:30:27 +01:00
Kamil Mysliwiec
8a17e38d01 Merge pull request #14427 from nestjs/renovate/eslint-plugin-prettier-5.x
chore(deps): update dependency eslint-plugin-prettier to v5.2.2
2025-01-15 10:29:14 +01:00
renovate[bot]
a200a77b9d chore(deps): update dependency eslint-plugin-prettier to v5.2.2 2025-01-15 08:11:24 +00:00
Kamil Mysliwiec
81e00f09b0 Merge pull request #14424 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.9.5
2025-01-15 09:09:29 +01:00
Micael Levi L. Cavalcante
78e61c4429 chore: add issue types to issue templates forms 2025-01-14 08:24:19 -04:00
renovate[bot]
dc61009ea5 fix(deps): update dependency mongoose to v8.9.5 2025-01-14 09:13:26 +00:00
Kamil Myśliwiec
a9bbb4b10e chore: regenerate lock file 2025-01-14 10:11:47 +01:00
Kamil Mysliwiec
f97ce9182e Merge pull request #14423 from nestjs/renovate/node-22.x
chore(deps): update dependency @types/node to v22.10.6
2025-01-14 10:10:59 +01:00
renovate[bot]
fb20d462f7 chore(deps): update dependency @types/node to v22.10.6 2025-01-14 07:43:26 +00:00
Kamil Mysliwiec
ec04aea690 Merge pull request #14421 from nestjs/renovate/artillery-2.x
chore(deps): update dependency artillery to v2.0.22
2025-01-14 08:41:05 +01:00
renovate[bot]
a9aacbde81 chore(deps): update dependency artillery to v2.0.22 2025-01-13 17:26:56 +00:00
Kamil Myśliwiec
04dc341f21 chore: regenerate lock file 2025-01-13 12:18:00 +01:00
Kamil Mysliwiec
ba8649e543 Merge pull request #14419 from nestjs/renovate/ts-loader-9.x
chore(deps): update dependency ts-loader to v9.5.2
2025-01-13 11:40:01 +01:00
Kamil Mysliwiec
79060d3883 Merge pull request #14410 from nestjs/renovate/fastify-static-8.x
fix(deps): update dependency @fastify/static to v8.0.4
2025-01-13 11:39:44 +01:00
Kamil Mysliwiec
72e9eb90df Merge pull request #14402 from nestjs/renovate/fastify-middie-9.x
fix(deps): update dependency @fastify/middie to v9.0.3
2025-01-13 11:39:30 +01:00
renovate[bot]
ab47d9630e fix(deps): update dependency @fastify/static to v8.0.4 2025-01-13 10:12:37 +00:00
renovate[bot]
509daae60e fix(deps): update dependency @fastify/middie to v9.0.3 2025-01-13 10:12:08 +00:00
renovate[bot]
7371803cd7 chore(deps): update dependency ts-loader to v9.5.2 2025-01-13 10:11:40 +00:00
Kamil Mysliwiec
a4a9b52b1a Merge pull request #14417 from nestjs/renovate/ts-morph-25.x
fix(deps): update dependency ts-morph to v25
2025-01-13 11:07:15 +01:00
Kamil Mysliwiec
e114057ecd Merge pull request #14411 from nestjs/renovate/fastify-view-10.x
fix(deps): update dependency @fastify/view to v10.0.2
2025-01-13 11:06:39 +01:00
Kamil Mysliwiec
ce90f1cbed Merge pull request #14404 from nestjs/renovate/eslint-monorepo
chore(deps): update eslint monorepo to v9.18.0
2025-01-13 11:06:23 +01:00
Kamil Mysliwiec
0bdb49cfcb Merge pull request #14403 from nestjs/renovate/nats-2.x
chore(deps): update dependency nats to v2.29.1
2025-01-13 11:06:17 +01:00
Kamil Mysliwiec
3190c3433f Merge pull request #14401 from nestjs/renovate/fastify-formbody-8.x
fix(deps): update dependency @fastify/formbody to v8.0.2
2025-01-13 11:06:07 +01:00
Kamil Mysliwiec
44174e8d81 Merge pull request #14400 from nestjs/renovate/ansis-3.x
fix(deps): update dependency ansis to v3.8.1
2025-01-13 11:06:03 +01:00
Kamil Mysliwiec
cdff4c0deb Merge pull request #14399 from nestjs/renovate/nestjs-swagger-8.x
fix(deps): update dependency @nestjs/swagger to v8.1.1
2025-01-13 11:05:58 +01:00
Kamil Mysliwiec
91cd8aaa86 Merge pull request #14337 from nestjs/renovate/fastify-multipart-9.x
chore(deps): update dependency @fastify/multipart to v9.0.2
2025-01-13 11:05:51 +01:00
Kamil Mysliwiec
8658868c81 Merge pull request #14415 from nestjs/renovate/mercurius-16.x
fix(deps): update dependency mercurius to v16
2025-01-13 11:05:19 +01:00
Kamil Mysliwiec
8ce4c2a194 Merge pull request #14416 from nestjs/renovate/rimraf-6.x
fix(deps): update dependency rimraf to v6
2025-01-13 11:05:11 +01:00
renovate[bot]
bc98370002 fix(deps): update dependency @fastify/view to v10.0.2 2025-01-12 16:22:12 +00:00
renovate[bot]
816e9713b1 fix(deps): update dependency ts-morph to v25 2025-01-11 20:17:45 +00:00
renovate[bot]
4ce81f7b48 fix(deps): update dependency rimraf to v6 2025-01-11 20:17:34 +00:00
renovate[bot]
aabb59b9e4 fix(deps): update dependency mercurius to v16 2025-01-11 20:17:25 +00:00
renovate[bot]
58416e3e61 chore(deps): update eslint monorepo to v9.18.0 2025-01-11 20:15:26 +00:00
renovate[bot]
32c51b6200 chore(deps): update dependency nats to v2.29.1 2025-01-11 20:15:08 +00:00
renovate[bot]
838295ffd5 fix(deps): update dependency ansis to v3.8.1 2025-01-11 20:14:58 +00:00
renovate[bot]
467b882735 fix(deps): update dependency @nestjs/swagger to v8.1.1 2025-01-11 20:14:48 +00:00
renovate[bot]
4aa274a819 fix(deps): update dependency @fastify/formbody to v8.0.2 2025-01-11 20:14:34 +00:00
renovate[bot]
8f04d961d0 chore(deps): update dependency @fastify/multipart to v9.0.2 2025-01-11 20:14:22 +00:00
Kamil Mysliwiec
7368436fc3 Merge pull request #14396 from nestjs/renovate/supertest-7.x
chore(deps): update dependency supertest to v7
2025-01-10 09:47:06 +01:00
Kamil Mysliwiec
cc8f71bd74 Merge pull request #14397 from nestjs/renovate/webpack-cli-6.x
chore(deps): update dependency webpack-cli to v6
2025-01-10 09:46:59 +01:00
renovate[bot]
dbda94447a chore(deps): update dependency webpack-cli to v6 2025-01-10 08:11:42 +00:00
renovate[bot]
4f5691b5e5 chore(deps): update dependency supertest to v7 2025-01-10 08:11:38 +00:00
Kamil Mysliwiec
19fba18ab8 Merge pull request #14392 from nestjs/renovate/ansis-3.x
fix(deps): update dependency ansis to v3.8.0
2025-01-10 09:08:35 +01:00
Kamil Mysliwiec
49ac10f474 Merge pull request #14395 from nestjs/renovate/uuid-11.x
fix(deps): update dependency uuid to v11.0.5
2025-01-10 09:08:26 +01:00
renovate[bot]
f1d62cf0fd fix(deps): update dependency ansis to v3.8.0 2025-01-10 07:57:46 +00:00
renovate[bot]
e3ed91bf7a fix(deps): update dependency uuid to v11.0.5 2025-01-10 07:57:36 +00:00
Kamil Mysliwiec
fba96c6e50 Merge pull request #14394 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.9.4
2025-01-10 08:56:14 +01:00
renovate[bot]
e5748820c7 fix(deps): update dependency mongoose to v8.9.4 2025-01-09 22:19:30 +00:00
Kamil Mysliwiec
8f04235c41 Merge pull request #14390 from nestjs/renovate/mocha-11.x
chore(deps): update dependency mocha to v11
2025-01-09 14:53:46 +01:00
renovate[bot]
8039ed1fac chore(deps): update dependency mocha to v11 2025-01-09 13:45:49 +00:00
Kamil Myśliwiec
6791b6cbef style: address lint errors 2025-01-09 12:42:10 +01:00
Kamil Myśliwiec
20d86f3405 Merge branch 'mdorda-fix-13234' 2025-01-09 11:55:01 +01:00
Kamil Myśliwiec
db2a9b5aa3 chore: resolve conflicts 2025-01-09 11:54:46 +01:00
Kamil Mysliwiec
c42d235624 Merge pull request #14388 from nestjs/renovate/mysql2-3.x
fix(deps): update dependency mysql2 to v3.12.0
2025-01-09 11:31:04 +01:00
Kamil Mysliwiec
51f88aeb6e Merge pull request #14389 from nestjs/renovate/graphql-tools-monorepo
fix(deps): update graphql-tools monorepo
2025-01-09 11:30:57 +01:00
Kamil Myśliwiec
87d2a4eedb Merge branch 'kamilogorek-update-opencollective' 2025-01-09 11:30:39 +01:00
Kamil Myśliwiec
3d6faa8ae5 chore: resolve conflicts 2025-01-09 11:30:25 +01:00
renovate[bot]
0bc77e37f6 fix(deps): update graphql-tools monorepo 2025-01-09 10:05:27 +00:00
renovate[bot]
11a8f19d1a fix(deps): update dependency mysql2 to v3.12.0 2025-01-09 10:05:14 +00:00
Kamil Mysliwiec
2947330b9f Merge pull request #14386 from nestjs/renovate/ansis-3.x
fix(deps): update dependency ansis to v3.7.0
2025-01-09 11:03:21 +01:00
Kamil Mysliwiec
fbcae33b50 Merge pull request #14387 from nestjs/renovate/light-my-request-6.x
fix(deps): update dependency light-my-request to v6.5.1
2025-01-09 11:03:11 +01:00
renovate[bot]
30971d8ca3 fix(deps): update dependency light-my-request to v6.5.1 2025-01-09 09:54:07 +00:00
renovate[bot]
56a743b6cc fix(deps): update dependency ansis to v3.7.0 2025-01-09 09:53:55 +00:00
Kamil Mysliwiec
4f60402c23 Merge pull request #14385 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update dependency typescript-eslint to v8.19.1
2025-01-09 10:51:49 +01:00
renovate[bot]
c938ead110 chore(deps): update dependency typescript-eslint to v8.19.1 2025-01-09 09:33:35 +00:00
Kamil Mysliwiec
16776c2c3f Merge pull request #14384 from nestjs/renovate/typescript-5.x
fix(deps): update dependency typescript to v5.7.3
2025-01-09 10:31:08 +01:00
renovate[bot]
482ab803d9 fix(deps): update dependency typescript to v5.7.3 2025-01-09 07:52:52 +00:00
Kamil Mysliwiec
7eb8b82a40 Merge pull request #14381 from nestjs/renovate/lint-staged-15.x
chore(deps): update dependency lint-staged to v15.3.0
2025-01-09 08:47:48 +01:00
Kamil Mysliwiec
9404090877 Merge pull request #14378 from nestjs/renovate/core-js-3.x
chore(deps): update dependency core-js to v3.40.0
2025-01-09 08:47:39 +01:00
Kamil Mysliwiec
ebdbe82d96 Merge pull request #14379 from nestjs/renovate/globals-15.x
chore(deps): update dependency globals to v15.14.0
2025-01-09 08:47:19 +01:00
renovate[bot]
7c0d23d111 chore(deps): update dependency lint-staged to v15.3.0 2025-01-08 18:37:10 +00:00
Kamil Ogórek
a24ef96d06 chore(deps): Update opencollective to 0.4.1 under new scope 2025-01-08 17:38:33 +01:00
renovate[bot]
bd9634579a chore(deps): update dependency globals to v15.14.0 2025-01-08 14:36:16 +00:00
renovate[bot]
e4d50f1fd6 chore(deps): update dependency core-js to v3.40.0 2025-01-08 14:36:03 +00:00
Kamil Mysliwiec
b9ddc1d403 Merge pull request #14376 from nestjs/renovate/commitlint-monorepo
chore(deps): update dependency @commitlint/config-angular to v19.7.0
2025-01-08 10:03:13 +01:00
Kamil Mysliwiec
104a06e68c Merge pull request #14377 from nestjs/renovate/eslint-monorepo
chore(deps): update dependency @eslint/js to v9.17.0
2025-01-08 10:03:05 +01:00
renovate[bot]
35d01cc40e chore(deps): update dependency @eslint/js to v9.17.0 2025-01-08 09:01:18 +00:00
renovate[bot]
561f26bdf4 chore(deps): update dependency @commitlint/config-angular to v19.7.0 2025-01-08 09:01:05 +00:00
Kamil Mysliwiec
960960ec22 Merge pull request #14375 from nestjs/renovate/grpc-grpc-js-1.x-lockfile
chore(deps): update dependency @grpc/grpc-js to v1.12.5
2025-01-08 09:58:16 +01:00
renovate[bot]
e899b6c1d6 chore(deps): update dependency @grpc/grpc-js to v1.12.5 2025-01-08 08:57:55 +00:00
Kamil Mysliwiec
4acc167571 Merge pull request #14372 from nestjs/renovate/grpc-grpc-js-1.x
fix(deps): update dependency @grpc/grpc-js to v1.12.5
2025-01-08 09:55:34 +01:00
Kamil Mysliwiec
4cd1f9fcaf Merge pull request #14373 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.9.3
2025-01-08 09:55:25 +01:00
Kamil Mysliwiec
6b9ea755b0 Merge pull request #14374 from nestjs/renovate/uuid-11.x
fix(deps): update dependency uuid to v11.0.4
2025-01-08 09:55:15 +01:00
renovate[bot]
04d190236e fix(deps): update dependency uuid to v11.0.4 2025-01-08 08:51:01 +00:00
Kamil Myśliwiec
b0f2f7a107 chore: downgrade sinon-chai 2025-01-08 09:48:48 +01:00
Kamil Myśliwiec
93ce502262 chore: regenerate package lock 2025-01-08 09:15:24 +01:00
renovate[bot]
23636bce22 fix(deps): update dependency mongoose to v8.9.3 2025-01-08 07:54:39 +00:00
renovate[bot]
7da5e15ef7 fix(deps): update dependency @grpc/grpc-js to v1.12.5 2025-01-08 07:54:27 +00:00
Kamil Mysliwiec
17ddb7d8da Merge pull request #14371 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency @apollo/server to v4.11.3
2025-01-08 08:53:00 +01:00
Kamil Mysliwiec
1cbc61c81b Merge pull request #14370 from nestjs/renovate/ioredis-5.x
chore(deps): update dependency ioredis to v5.4.2
2025-01-08 08:52:51 +01:00
Kamil Myśliwiec
7bfda4c4d1 chore: sync package-lock file 2025-01-07 15:53:19 +01:00
renovate[bot]
4ed0765720 chore(deps): update dependency ioredis to v5.4.2 2025-01-07 14:50:03 +00:00
renovate[bot]
d9d779e281 fix(deps): update dependency @apollo/server to v4.11.3 2025-01-07 14:47:54 +00:00
Kamil Mysliwiec
6da1db2f59 Merge pull request #14197 from nestjs/dependabot/npm_and_yarn/fastify/static-8.0.3
chore(deps-dev): bump @fastify/static from 7.0.4 to 8.0.3
2025-01-07 15:46:47 +01:00
Kamil Mysliwiec
d55773b29e Merge pull request #14345 from nestjs/renovate/major-eslint-monorepo
chore(deps): update dependency eslint to v9
2025-01-07 15:46:35 +01:00
Kamil Mysliwiec
77c797764a Merge pull request #14368 from nestjs/renovate/node-22.x
chore(deps): update dependency @types/node to v22.10.5
2025-01-07 15:45:59 +01:00
Kamil Mysliwiec
5781527f06 Merge pull request #14369 from nestjs/renovate/concurrently-9.x
chore(deps): update dependency concurrently to v9.1.2
2025-01-07 15:45:50 +01:00
Kamil Myśliwiec
0094e0df49 test: add optional chaining to eventsource init payload 2025-01-07 15:39:00 +01:00
dependabot[bot]
8edc1a40e7 chore(deps-dev): bump @fastify/static from 7.0.4 to 8.0.3
Bumps [@fastify/static](https://github.com/fastify/fastify-static) from 7.0.4 to 8.0.3.
- [Release notes](https://github.com/fastify/fastify-static/releases)
- [Commits](https://github.com/fastify/fastify-static/compare/v7.0.4...v8.0.3)

---
updated-dependencies:
- dependency-name: "@fastify/static"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-07 14:15:20 +00:00
renovate[bot]
46bdf39bbe chore(deps): update dependency eslint to v9 2025-01-07 14:02:46 +00:00
renovate[bot]
ef4b3f4bc9 chore(deps): update dependency concurrently to v9.1.2 2025-01-07 14:02:27 +00:00
renovate[bot]
bbd9b937b6 chore(deps): update dependency @types/node to v22.10.5 2025-01-07 14:02:15 +00:00
Kamil Myśliwiec
03ad47a881 chore: resolve conflicts 2025-01-07 14:59:21 +01:00
Kamil Myśliwiec
5b091a4d4e chore(deps): upgrade to eventsource v3 2025-01-07 14:58:19 +01:00
Kamil Mysliwiec
1480d059c7 Merge pull request #14324 from nestjs/renovate/socket.io-redis-adapter-8.x
fix(deps): update dependency @socket.io/redis-adapter to v8.3.0
2025-01-07 14:54:24 +01:00
Kamil Mysliwiec
2a2ca3dfc8 Merge pull request #14363 from nestjs/dependabot/npm_and_yarn/fastify/cors-10.0.2
chore(deps): bump @fastify/cors from 9.0.1 to 10.0.2
2025-01-07 14:20:07 +01:00
Kamil Mysliwiec
3d1d53e359 Merge pull request #14354 from nestjs/dependabot/npm_and_yarn/cache-manager-6.3.2
chore(deps-dev): bump cache-manager from 5.7.6 to 6.3.2
2025-01-07 14:19:58 +01:00
Kamil Mysliwiec
621bfa0fd8 Merge pull request #14021 from nestjs/dependabot/npm_and_yarn/fastify/view-10.0.1
chore(deps-dev): bump @fastify/view from 9.1.0 to 10.0.1
2025-01-07 14:19:26 +01:00
Kamil Mysliwiec
53b7d09499 Merge pull request #14333 from nestjs/dependabot/npm_and_yarn/eslint-9.17.0
chore(deps-dev): bump eslint from 8.57.1 to 9.17.0
2025-01-07 14:19:00 +01:00
renovate[bot]
ca91d7acc3 fix(deps): update dependency @socket.io/redis-adapter to v8.3.0 2025-01-07 13:04:12 +00:00
dependabot[bot]
bb9d21a1c8 chore(deps-dev): bump @fastify/view from 9.1.0 to 10.0.1
Bumps [@fastify/view](https://github.com/fastify/point-of-view) from 9.1.0 to 10.0.1.
- [Release notes](https://github.com/fastify/point-of-view/releases)
- [Commits](https://github.com/fastify/point-of-view/compare/v9.1.0...v10.0.1)

---
updated-dependencies:
- dependency-name: "@fastify/view"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-07 12:54:41 +00:00
dependabot[bot]
acebcb70a0 chore(deps): bump @fastify/cors from 9.0.1 to 10.0.2
Bumps [@fastify/cors](https://github.com/fastify/fastify-cors) from 9.0.1 to 10.0.2.
- [Release notes](https://github.com/fastify/fastify-cors/releases)
- [Commits](https://github.com/fastify/fastify-cors/compare/v9.0.1...v10.0.2)

---
updated-dependencies:
- dependency-name: "@fastify/cors"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-07 12:53:00 +00:00
dependabot[bot]
9a76e6b929 chore(deps-dev): bump eslint from 8.57.1 to 9.17.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.57.1 to 9.17.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.1...v9.17.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-07 12:53:00 +00:00
dependabot[bot]
336eca2887 chore(deps-dev): bump cache-manager from 5.7.6 to 6.3.2
Bumps [cache-manager](https://github.com/jaredwray/cacheable/tree/HEAD/packages/cache-manager) from 5.7.6 to 6.3.2.
- [Release notes](https://github.com/jaredwray/cacheable/releases)
- [Commits](https://github.com/jaredwray/cacheable/commits/HEAD/packages/cache-manager)

---
updated-dependencies:
- dependency-name: cache-manager
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-07 12:52:56 +00:00
Kamil Mysliwiec
08bd12bb89 Merge pull request #14177 from nestjs/11.0.0
release: version 11.0.0
2025-01-07 13:51:27 +01:00
Kamil Myśliwiec
6f715d021c chore(deps): downgrade nyc 2025-01-07 13:43:28 +01:00
Kamil Myśliwiec
9e5f77c169 chore: resolve conflicts 2025-01-07 12:24:10 +01:00
Kamil Myśliwiec
8bcd1e5b81 chore: resolve conflicts 2025-01-07 12:14:37 +01:00
Kamil Mysliwiec
8c4b99d35a Merge pull request #14360 from maxktz/master
chore: update copyright years 2025
2025-01-05 12:09:36 +01:00
maxktz
9267472030 chore: update copyright years 2025 2025-01-03 22:30:41 +02:00
Kamil Mysliwiec
b6ea2a1899 Merge pull request #14350 from bestlyg/fix-lyg-md
fix: redirect the path of file to correct path
2024-12-27 10:56:32 +01:00
Kamil Mysliwiec
8950ef08b3 Merge pull request #14349 from Makkalay/master
fix: export cont REQUEST_METHOD_MAP from router-method-factory
2024-12-27 10:54:33 +01:00
bestlyg
c82c342d1b fix: redirect the path of file to correct path 2024-12-24 21:12:27 +08:00
Mak
686d8ec740 Update router-method-factory.ts
Is useful piece of code for create custom adapter
2024-12-23 12:22:04 +02:00
Kamil Mysliwiec
789288914b Merge pull request #14344 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.9.1
2024-12-18 10:15:17 +01:00
renovate[bot]
e2f24d8428 fix(deps): update dependency mongoose to v8.9.1 2024-12-18 08:27:15 +00:00
Kamil Mysliwiec
013c6e7e27 Merge pull request #14343 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.18.1
2024-12-18 09:23:35 +01:00
renovate[bot]
71142daff2 chore(deps): update typescript-eslint monorepo to v8.18.1 2024-12-17 15:43:53 +00:00
Kamil Mysliwiec
3947dfbc12 Merge pull request #14339 from nestjs/renovate/node-22.x
chore(deps): update dependency @types/node to v22.10.2
2024-12-16 13:58:44 +01:00
renovate[bot]
c6eaf24fb4 chore(deps): update dependency @types/node to v22.10.2 2024-12-16 12:18:10 +00:00
Kamil Mysliwiec
193cd52c22 Merge pull request #14336 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.9.0
2024-12-16 13:11:44 +01:00
renovate[bot]
e6ec654f55 fix(deps): update dependency mongoose to v8.9.0 2024-12-16 10:28:38 +00:00
Kamil Mysliwiec
cb739ad3fe Merge pull request #14238 from nestjs/chore/express-v5
chore(deps): upgrade to express v5, fastify v5, add legacy route path converter
2024-12-16 11:25:44 +01:00
Kamil Mysliwiec
ce13520c37 Merge pull request #14334 from nestjs/renovate/commitlint-monorepo
chore(deps): update dependency @commitlint/cli to v19.6.1
2024-12-16 11:25:29 +01:00
Kamil Mysliwiec
b1e6d1ae54 Merge pull request #14335 from nestjs/renovate/ansis-3.x
fix(deps): update dependency ansis to v3.4.0
2024-12-16 11:25:15 +01:00
renovate[bot]
4d3a135daf fix(deps): update dependency ansis to v3.4.0 2024-12-16 09:06:36 +00:00
renovate[bot]
076945a38e chore(deps): update dependency @commitlint/cli to v19.6.1 2024-12-16 09:06:18 +00:00
Kamil Mysliwiec
77dca8ead1 Merge pull request #14328 from nestjs/renovate/mysql2-3.x
fix(deps): update dependency mysql2 to v3.11.5
2024-12-16 10:03:07 +01:00
Kamil Mysliwiec
d5bc7dbd0e Merge pull request #14329 from nestjs/renovate/graphql-tools-monorepo
fix(deps): update graphql-tools monorepo
2024-12-16 10:03:00 +01:00
Kamil Mysliwiec
11190a49d5 Merge pull request #14330 from nestjs/renovate/nodemon-3.x
chore(deps): update dependency nodemon to v3.1.9
2024-12-16 10:02:54 +01:00
renovate[bot]
585f440c9f fix(deps): update graphql-tools monorepo 2024-12-14 18:38:48 +00:00
renovate[bot]
d55f51c99b chore(deps): update dependency nodemon to v3.1.9 2024-12-13 14:36:11 +00:00
renovate[bot]
1be58b1f8b fix(deps): update dependency mysql2 to v3.11.5 2024-12-13 10:19:53 +00:00
Kamil Mysliwiec
afb1026540 Merge pull request #14323 from nestjs/renovate/nestjs-swagger-8.x
fix(deps): update dependency @nestjs/swagger to v8.1.0
2024-12-13 11:16:39 +01:00
Kamil Mysliwiec
80274664aa Merge pull request #14325 from nestjs/renovate/fastify-4.x
fix(deps): update dependency fastify to v4.29.0
2024-12-13 11:16:31 +01:00
Kamil Mysliwiec
d6f43dc98e Merge pull request #14326 from nestjs/renovate/mongodb-6.x
fix(deps): update dependency mongodb to v6.12.0
2024-12-13 11:16:24 +01:00
renovate[bot]
c3a8e542ea fix(deps): update dependency mongodb to v6.12.0 2024-12-12 18:21:57 +00:00
renovate[bot]
81815bb356 fix(deps): update dependency fastify to v4.29.0 2024-12-12 18:21:51 +00:00
renovate[bot]
27f054cd4e fix(deps): update dependency @nestjs/swagger to v8.1.0 2024-12-12 13:54:21 +00:00
Kamil Myśliwiec
0354e5e946 test: update container method name 2024-12-12 10:51:28 +01:00
Kamil Mysliwiec
4d4103f9a6 Merge pull request #14321 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency @apollo/gateway to v2.9.3
2024-12-12 10:49:56 +01:00
Kamil Myśliwiec
3da69f8467 test: update container method name 2024-12-12 10:34:22 +01:00
Kamil Myśliwiec
2c6bf94a81 style: fix eslint errors 2024-12-12 10:14:28 +01:00
Kamil Mysliwiec
b4cdc97106 Merge pull request #14322 from nestjs/renovate/nestjs-schedule-4.x
fix(deps): update dependency @nestjs/schedule to v4.1.2
2024-12-12 10:12:35 +01:00
renovate[bot]
6297752c3f fix(deps): update dependency @nestjs/schedule to v4.1.2 2024-12-12 09:12:08 +00:00
renovate[bot]
f049931c13 fix(deps): update dependency @apollo/gateway to v2.9.3 2024-12-12 09:12:00 +00:00
Kamil Mysliwiec
af01bc473a Merge pull request #14320 from nestjs/renovate/nestjs-mongoose-10.x
fix(deps): update dependency @nestjs/mongoose to v10.1.0
2024-12-12 10:11:22 +01:00
Kamil Mysliwiec
898d900ddf Merge pull request #14319 from nestjs/renovate/nestjs-event-emitter-2.x
fix(deps): update dependency @nestjs/event-emitter to v2.1.1
2024-12-12 10:09:58 +01:00
Kamil Myśliwiec
18b1bcec29 chore: address todos, remove deprecated 2024-12-12 10:07:06 +01:00
renovate[bot]
f5e23dbca4 fix(deps): update dependency @nestjs/mongoose to v10.1.0 2024-12-12 08:46:03 +00:00
renovate[bot]
69f7a5ec76 fix(deps): update dependency @nestjs/event-emitter to v2.1.1 2024-12-12 08:45:57 +00:00
Kamil Mysliwiec
585deb609f Merge pull request #14078 from nestjs/renovate/npm-apollo-gateway-vulnerability
fix(deps): update dependency @apollo/gateway to v2.8.5 [security]
2024-12-12 09:45:45 +01:00
Kamil Mysliwiec
962224c0d0 Merge pull request #14313 from nestjs/renovate/node-20.x
chore(deps): update dependency @types/node to v20.17.10
2024-12-12 09:44:50 +01:00
Kamil Mysliwiec
aaddf9ddde Merge pull request #14314 from nestjs/renovate/nestjs-bull-10.x
fix(deps): update dependency @nestjs/bull to v10.2.3
2024-12-12 09:44:44 +01:00
Kamil Mysliwiec
53bd8ea7d8 Merge pull request #14315 from nestjs/renovate/nestjs-cache-manager-2.x
fix(deps): update dependency @nestjs/cache-manager to v2.3.0
2024-12-12 09:44:37 +01:00
Kamil Myśliwiec
41234f68cf Merge branch '11.0.0' into chore/express-v5 2024-12-12 09:44:09 +01:00
Kamil Myśliwiec
5d3c284b86 chore(microservices): dont reference mqtt pkg 2024-12-12 09:43:51 +01:00
renovate[bot]
0953027f8e fix(deps): update dependency @nestjs/cache-manager to v2.3.0 2024-12-11 16:12:03 +00:00
renovate[bot]
0f8da15c7c chore(deps): update dependency @types/node to v20.17.10 2024-12-11 14:42:26 +00:00
renovate[bot]
90d8e66b18 fix(deps): update dependency @nestjs/bull to v10.2.3 2024-12-11 14:40:27 +00:00
Kamil Mysliwiec
8a16709428 Merge pull request #14309 from nestjs/renovate/lint-staged-15.x
chore(deps): update dependency lint-staged to v15.2.11
2024-12-11 15:35:41 +01:00
Kamil Mysliwiec
e8d5224f7b Merge pull request #14307 from nestjs/renovate/grpc-grpc-js-1.x
fix(deps): update dependency @grpc/grpc-js to v1.12.4
2024-12-11 15:35:33 +01:00
Kamil Mysliwiec
767d70f0a6 Merge pull request #14306 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.18.0
2024-12-11 15:35:25 +01:00
renovate[bot]
74dd2257d9 chore(deps): update dependency lint-staged to v15.2.11 2024-12-10 14:21:32 +00:00
renovate[bot]
90d55f90fb chore(deps): update typescript-eslint monorepo to v8.18.0 2024-12-10 09:46:22 +00:00
renovate[bot]
13d8af65ee fix(deps): update dependency @grpc/grpc-js to v1.12.4 2024-12-10 09:40:25 +00:00
renovate[bot]
2f47aba41f fix(deps): update dependency @apollo/gateway to v2.8.5 [security] 2024-12-10 09:38:32 +00:00
Kamil Mysliwiec
9e8f7592fc Merge pull request #14300 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.97.1
2024-12-10 10:36:40 +01:00
Kamil Mysliwiec
35a339978e Merge pull request #14301 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency @apollo/gateway to v2.9.3
2024-12-10 10:36:31 +01:00
Kamil Mysliwiec
1a1118e000 Merge pull request #14302 from nestjs/dependabot/npm_and_yarn/graphql-tools-9.0.6
chore(deps-dev): bump graphql-tools from 9.0.5 to 9.0.6
2024-12-10 10:36:25 +01:00
Kamil Mysliwiec
969b866038 Merge pull request #14299 from nestjs/renovate/nest-monorepo
chore(deps): update nest monorepo
2024-12-10 10:36:18 +01:00
dependabot[bot]
a16afde94b chore(deps-dev): bump graphql-tools from 9.0.5 to 9.0.6
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 9.0.5 to 9.0.6.
- [Release notes](https://github.com/ardatan/graphql-tools/releases)
- [Changelog](https://github.com/ardatan/graphql-tools/blob/master/packages/graphql-tools/CHANGELOG.md)
- [Commits](https://github.com/ardatan/graphql-tools/commits/graphql-tools@9.0.6/packages/graphql-tools)

---
updated-dependencies:
- dependency-name: graphql-tools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-10 00:56:31 +00:00
renovate[bot]
5b055df726 fix(deps): update dependency @apollo/gateway to v2.9.3 2024-12-09 16:40:47 +00:00
renovate[bot]
3251caf25a chore(deps): update nest monorepo 2024-12-09 16:40:29 +00:00
renovate[bot]
bb02172980 chore(deps): update dependency webpack to v5.97.1 2024-12-09 12:50:09 +00:00
Kamil Mysliwiec
d7555a5eb7 Merge pull request #14295 from nestjs/renovate/redis-4.x
chore(deps): update dependency redis to v4.7.0
2024-12-09 13:43:53 +01:00
Kamil Mysliwiec
4a2c057784 Merge pull request #14297 from nestjs/renovate/ts-jest-29.x
chore(deps): update dependency ts-jest to v29.2.5
2024-12-09 13:43:45 +01:00
Kamil Mysliwiec
abc906808a Merge pull request #14298 from nestjs/renovate/typescript-5.x
chore(deps): update dependency typescript to v5.7.2
2024-12-09 13:43:36 +01:00
Kamil Myśliwiec
909001d52e fix(microservices): call cleanup function on grpc call end 2024-12-09 12:56:03 +01:00
renovate[bot]
6bb2bd20db chore(deps): update dependency ts-jest to v29.2.5 2024-12-09 11:19:58 +00:00
renovate[bot]
d486d82110 chore(deps): update dependency redis to v4.7.0 2024-12-09 11:19:44 +00:00
renovate[bot]
8f2329bee5 chore(deps): update dependency typescript to v5.7.2 2024-12-09 11:15:32 +00:00
Kamil Myśliwiec
3e55791401 Merge branch '11.0.0' into chore/express-v5 2024-12-05 14:53:03 +01:00
Kamil Myśliwiec
6a84d6e25e fix(core): set distance to max, dont override on calc 2024-12-05 14:52:08 +01:00
Kamil Myśliwiec
121494ac4e Merge branch '11.0.0' into chore/express-v5 2024-12-05 14:15:45 +01:00
Kamil Myśliwiec
648b438df1 Merge branch '11.0.0' of https://github.com/nestjs/nest into 11.0.0 2024-12-05 14:15:24 +01:00
Kamil Myśliwiec
8bb562301f fix(core): set global modules distance to -1 2024-12-05 14:13:48 +01:00
Kamil Mysliwiec
c341a02243 Merge pull request #14267 from flovouin/fix-shutdown-hooks-order
Fix shutdown hooks order
2024-12-04 10:37:49 +01:00
Flo
3080787d9b fix(core): call shutdown hooks in reverse distance order 2024-12-03 16:56:13 +01:00
Kamil Myśliwiec
d2a45f3e25 chore: use optional group wrapped splat param 2024-12-03 12:34:37 +01:00
Kamil Myśliwiec
700a85d211 chore: update package.json 2024-11-28 14:06:38 +01:00
Kamil Myśliwiec
7197cc1a8a feat: add normalize path to http adapter 2024-11-28 14:06:15 +01:00
Kamil Myśliwiec
7f142e9399 feat: add legacy route converter, update tests 2024-11-28 11:28:56 +01:00
Kamil Myśliwiec
4f008fabd2 Merge branch '11.0.0' into chore/express-v5 2024-11-27 15:10:12 +01:00
Kamil Myśliwiec
f9c578680c style: address lint errors 2024-11-27 13:34:42 +01:00
Kamil Mysliwiec
6f7d470389 Merge pull request #14213 from mag123c/feature/14070-add-error-message-file-validator
feat(common): add error messages for file validators
2024-11-27 13:32:21 +01:00
Kamil Myśliwiec
95bd1ce678 Merge branch 'notusertelken-feature/mqtt-raw-output' into 11.0.0 2024-11-27 12:52:33 +01:00
Kamil Myśliwiec
43804c7c40 chore: resolve conflicts 2024-11-27 12:52:09 +01:00
Kamil Myśliwiec
5ca5c74c24 ci: use node 20.18 as the maintenance version 2024-11-27 12:39:49 +01:00
Kamil Myśliwiec
6e0f891f48 style: address lint errors and warnings 2024-11-27 12:18:43 +01:00
Kamil Myśliwiec
ca76e698f4 test(microservices): fix client mqtt unit test (use endasync) 2024-11-27 12:18:27 +01:00
Kamil Myśliwiec
d606466b37 Merge branch 'master' into 11.0.0 2024-11-27 12:03:56 +01:00
Kamil Myśliwiec
ca70f0754c chore(deps): update package.json 2024-11-27 11:05:18 +01:00
Kamil Myśliwiec
cf17e4d521 chore: mqtt updates, integration test improvements 2024-11-27 11:04:51 +01:00
Kamil Myśliwiec
74e318c930 test: add not null assertion 2024-11-27 10:23:47 +01:00
Kamil Myśliwiec
74789282d1 chore: update minimum node version 2024-11-27 10:06:57 +01:00
Kamil Myśliwiec
e2893f951c chore: add non null assertions 2024-11-27 10:06:07 +01:00
Kamil Myśliwiec
170f2e0754 Merge branch 'master' into 11.0.0 2024-11-27 09:59:29 +01:00
mag123c
11f8a4a216 feat(common): add error messages for file validators 2024-11-27 17:58:35 +09:00
Kamil Myśliwiec
d27628aafa chore: resolve conflicts 2024-11-27 09:55:20 +01:00
Kamil Myśliwiec
339be465fe chore: resolve conflicts 2024-11-27 09:49:01 +01:00
Kamil Mysliwiec
0ca42ba500 Merge pull request #14205 from nestjs/chore/eslint-v9
chore(dev-deps): upgrade to eslint v9
2024-11-27 09:41:08 +01:00
Kamil Myśliwiec
356469bfcc ci: run spec and packages lint in parallel 2024-11-27 09:29:39 +01:00
Kamil Myśliwiec
a41781ac14 ci: update lint integration script 2024-11-27 09:06:43 +01:00
Kamil Myśliwiec
4895e3bac1 ci: increase max old space size for lint scripts 2024-11-27 08:49:25 +01:00
Kamil Myśliwiec
ab79649b91 ci: run lint sequentially in ci 2024-11-27 08:38:14 +01:00
Kamil Myśliwiec
f94ef9044f test: ignore floating request promises (done cb) 2024-11-27 08:37:58 +01:00
Kamil Myśliwiec
93150409b9 test: error messages for node above v20 (json socket) 2024-11-26 15:22:51 +01:00
Kamil Myśliwiec
7e774b12a5 ci: use active node version for lint 2024-11-26 15:12:49 +01:00
Kamil Myśliwiec
2e0de4a9e1 ci: update node versions matrix 2024-11-26 15:06:21 +01:00
Kamil Myśliwiec
e8bc2580e7 chore: minore fixes 2024-11-26 14:56:42 +01:00
Kamil Myśliwiec
7d3e5c1a38 build: use strict null checks part 5 2024-11-26 14:39:51 +01:00
Kamil Myśliwiec
5b220df118 build: use strict null checks part 4 2024-11-26 14:03:07 +01:00
Kamil Myśliwiec
b94b0b910e build: use strict null checks part 3 2024-11-26 13:49:07 +01:00
Kamil Myśliwiec
22008976ec build: use strict null checks part 2 2024-11-26 13:36:33 +01:00
Kamil Myśliwiec
cfe0f47e8a Merge branch 'chore/eslint-v9' of https://github.com/nestjs/nest into chore/eslint-v9 2024-11-26 12:47:16 +01:00
Kamil Myśliwiec
10fdf16c47 build: use strict null checks part 1 2024-11-26 12:46:59 +01:00
Kamil Mysliwiec
5662fc1ac9 Merge branch '11.0.0' into chore/eslint-v9 2024-11-26 12:00:34 +01:00
Kamil Myśliwiec
38367e8e88 style: address spec lint errors 2024-11-26 11:57:05 +01:00
Kamil Myśliwiec
8829b8d1d7 style: address packages lint errors 2024-11-26 10:38:31 +01:00
Kamil Myśliwiec
236b633a76 style: address integration tests lint errors 2024-11-26 09:39:20 +01:00
Kamil Mysliwiec
edf574a29e Merge pull request #14200 from nestjs/feat/allow-queue-per-handler
feat(microservices): support nats queue per handler
2024-11-25 14:12:02 +01:00
Kamil Myśliwiec
ab660c7edd test: add unit test 2024-11-25 13:48:54 +01:00
Kamil Myśliwiec
21279a9c49 feat(microservices): support nats queue per handler 2024-11-25 13:42:24 +01:00
Kamil Mysliwiec
59374c9b8c Merge pull request #13797 from patrickacioli/fix-fastify-global-route-prefix
fix(fastify-adapter): middleware not executed when root path is excluded
2024-11-25 13:37:55 +01:00
Kamil Mysliwiec
43cf5723a3 Merge pull request #14184 from nestjs/feat/include-error-cause-ws
feat(websockets): include exception cause to associate error with req
2024-11-22 11:33:20 +01:00
Kamil Mysliwiec
b04895aed2 Merge pull request #14182 from nestjs/feat/intrinsic-exception
feat(common): introduce intrinsic exception
2024-11-22 11:32:18 +01:00
Kamil Myśliwiec
f80984fb78 test: update integration test 2024-11-21 14:17:57 +01:00
Kamil Myśliwiec
5c7724b649 test: update integration test 2024-11-21 12:46:20 +01:00
Kamil Myśliwiec
a3dbbecd61 feat: add cause factory to allow controlling the cause shape 2024-11-21 12:42:40 +01:00
Kamil Myśliwiec
db95f2009d test: add missing unit tests, update typo 2024-11-21 12:06:35 +01:00
Kamil Myśliwiec
9020d759ca chore: export error payload interface 2024-11-21 11:35:24 +01:00
Kamil Myśliwiec
9a2b04947e chore: include pattern too 2024-11-21 11:35:02 +01:00
Kamil Myśliwiec
24983c8893 Merge branch 'feat/intrinsic-exception' into feat/include-error-cause-ws 2024-11-21 11:33:24 +01:00
Kamil Myśliwiec
a077ea51c1 Merge branch '11.0.0' into feat/intrinsic-exception 2024-11-21 10:43:36 +01:00
Kamil Myśliwiec
03a61e9728 chore: revert apply decorators signature (regression) 2024-11-21 10:41:37 +01:00
Kamil Myśliwiec
c5e5b9072c feat(websockets): include exception cause to associate error with req 2024-11-21 10:30:26 +01:00
Kamil Myśliwiec
f99617dd6b feat(common): introduce intrinsic exception 2024-11-21 10:09:43 +01:00
Kamil Myśliwiec
212d07fcbf refactor(common): improve apply decorators types 2024-11-20 12:45:29 +01:00
Kamil Mysliwiec
bdc9b4409a Merge pull request #14142 from nestjs/feat/microservice-client-server-additions
feat(microservices): add status, unwrap, on, and other features
2024-11-20 11:04:50 +01:00
Kamil Myśliwiec
c66d1fb5f7 fix: add type constraints and assertions 2024-11-20 10:41:37 +01:00
Kamil Mysliwiec
9356509274 Update packages/microservices/server/server-nats.ts
Co-authored-by: Rick Dutour Geerling <rick@trilon.io>
2024-11-20 10:22:02 +01:00
Kamil Mysliwiec
129fe79f6b Update packages/microservices/server/server-rmq.ts
Co-authored-by: Rick Dutour Geerling <rick@trilon.io>
2024-11-18 15:26:15 +01:00
Kamil Mysliwiec
4f55f88bff Update packages/microservices/server/server-nats.ts
Co-authored-by: Rick Dutour Geerling <rick@trilon.io>
2024-11-18 15:26:07 +01:00
Kamil Mysliwiec
397390083f Merge pull request #13278 from johaven/feat-webdav-methods
feat(core,common,platform-fastify): add webdav http methods support
2024-11-18 13:16:35 +01:00
Kamil Myśliwiec
bc31b5cff5 test: update tcp config opts type 2024-11-18 13:14:59 +01:00
Kamil Mysliwiec
fb6025eb76 Merge pull request #13990 from Tony133/feat/upgrade-fastify-v5
feat(platform-fastify): added support for Fastify v5
2024-11-18 12:46:08 +01:00
Kamil Myśliwiec
3267135f2d chore: resolve merge conflicts 2024-11-18 12:45:34 +01:00
Kamil Mysliwiec
234d8d5600 Merge pull request #13924 from alinowrouzii/feat-microservices/nats-gracefull-shutdown
feat(microservices): add gracefull shutdown option for nats server
2024-11-18 12:33:48 +01:00
Kamil Mysliwiec
774ccbe1b2 Merge pull request #12622 from jmcdo29/feat/async-microservce-config
feat: allow for microservice options to come from the di container
2024-11-18 12:18:57 +01:00
Kamil Mysliwiec
ad97a73ab2 Merge branch '11.0.0' into feat-microservices/nats-gracefull-shutdown 2024-11-18 12:18:16 +01:00
Kamil Mysliwiec
00bb6309c1 Merge pull request #13407 from MegaSpaceHamlet/multer-error-fieldname
Multer error fieldname
2024-11-18 12:09:40 +01:00
Kamil Myśliwiec
c239f9a037 refactor: replace inline as any calls with untyped vars 2024-11-18 10:33:51 +01:00
Kamil Mysliwiec
a669981c81 Merge pull request #14121 from nestjs/feat/logger-additions
feat(common): json logger and a few other improvements
2024-11-18 10:09:57 +01:00
Kamil Myśliwiec
47941ba4d9 test: update outdated unit test 2024-11-18 09:56:13 +01:00
Kamil Mysliwiec
e89bb8e4a2 Merge pull request #14127 from CodyTseng/feat-ws-message-preprocessor
feat(ws): introduce message parser for ws adapter
2024-11-18 09:52:52 +01:00
Kamil Mysliwiec
ca86bf6374 Merge pull request #14129 from EeeasyCode/fix/issue-#13931
fix: rabbitmq bindings and auto-generated queues
2024-11-18 09:52:00 +01:00
Kamil Myśliwiec
09a193337a Merge branch 'ReneZeidler-fix-get-all-and-merge' into 11.0.0 2024-11-18 09:51:35 +01:00
Kamil Myśliwiec
33ef121d6b chore: a few improvements 2024-11-18 09:49:48 +01:00
Kamil Mysliwiec
d2ac397115 Merge pull request #13388 from AlexRMU/master
Сorrection of `Reflector` types
2024-11-18 09:14:09 +01:00
Kamil Myśliwiec
9129e4f858 refactor: remove redundant conditions 2024-11-18 09:10:34 +01:00
Kamil Myśliwiec
f37dafc132 chore: pass error instance to logger error method 2024-11-18 09:08:47 +01:00
Kamil Mysliwiec
3ad835c05d Merge pull request #14110 from wenlong-chen/fix-global-module-distance
fix(core): calculate module distance after bindGlobalScope
2024-11-18 08:18:34 +01:00
Kamil Mysliwiec
e965b4a141 Merge pull request #14111 from wenlong-chen/fix-module-destroy-order
fix(core): Order of module destroy should be the reverse of module init
2024-11-18 08:18:16 +01:00
Kamil Mysliwiec
feb2135373 Merge pull request #14123 from micalevisk/feat/narrow-nest-factories-methods
feat(core)!: type narrowing valid entry module for nestjs factories
2024-11-15 13:29:54 +01:00
Kamil Mysliwiec
9ea618e0a8 Update packages/core/nest-factory.ts 2024-11-15 13:29:35 +01:00
Kamil Myśliwiec
259b5dd828 fix: remove duplicated client redis message handler 2024-11-15 13:27:04 +01:00
Kamil Myśliwiec
66c3ab23ee sample: update grpc client options type 2024-11-15 12:48:22 +01:00
Kamil Myśliwiec
f2b6cc0e93 fix: fix minor type issues, broken imports 2024-11-15 11:50:09 +01:00
Kamil Myśliwiec
f983f03665 fix: update broken import paths 2024-11-15 10:19:26 +01:00
Kamil Mysliwiec
9a48dc123e Merge pull request #14131 from nestjs/feat/number-exception-create-body
feat(common): allow passing number to http error createBody
2024-11-15 10:18:14 +01:00
Kamil Mysliwiec
07adf37156 Merge pull request #14122 from nestjs/feat/parse-date-pipe
feat(common): add ParseDatePipe, add tsdoc to other pipes
2024-11-15 10:17:52 +01:00
Kamil Mysliwiec
ea92f5fb3a Merge pull request #14134 from nestjs/feat/add-max-tcp-message-length
feat(microservices): add max tcp packet buffer length
2024-11-15 10:17:28 +01:00
Kamil Myśliwiec
3dfc7fc68e feat(microservices): add status, unwrap, on, and other features 2024-11-15 10:03:05 +01:00
codytseng
33e32d9d5d feat(ws): allow setting message parser in constructor 2024-11-13 09:58:32 +08:00
codytseng
2ab99739cd refactor(ws): rename to message parser and move json parse logic inside 2024-11-13 09:57:29 +08:00
Kamil Myśliwiec
9ae6a4c19f feat(microservices): add max tcp packet buffer length 2024-11-12 13:37:14 +01:00
Kamil Myśliwiec
35846843e1 feat(common): allow passing number to http error create body #12787 2024-11-12 11:12:41 +01:00
Kamil Mysliwiec
945d134b66 Merge pull request #14126 from EeeasyCode/issue-#14093
fix(common): type narrowing context parameter on createParamDecorator's callback
2024-11-12 09:36:52 +01:00
Khan / 이창민
e231f9887e fix: rabbitmq bindings and auto-generated queues 2024-11-11 15:31:19 +09:00
Khan / 이창민
2874478b95 fix: import to use direct file path 2024-11-11 00:05:24 +09:00
codytseng
de13eec632 feat: introduce message preprocessor for ws adapter 2024-11-10 16:14:07 +08:00
Khan / 이창민
e9d57dd795 fix: type narrowing ctx 2024-11-10 16:31:29 +09:00
Micael Levi L. Cavalcante
3cdaaf0bed feat(core): type narrowing valid entry module for nestjs factories 2024-11-09 06:50:47 -04:00
Kamil Myśliwiec
676461ff4e test: add unit tests, minor updates 2024-11-08 15:49:24 +01:00
Kamil Myśliwiec
cd7079bcc0 feat(common): add parse date pipe, add tsdoc to other pipes 2024-11-08 15:28:13 +01:00
Kamil Myśliwiec
66c4810b0f style: fix linter issues 2024-11-08 14:29:42 +01:00
Kamil Myśliwiec
23e602b712 style: fix linter issues 2024-11-08 14:09:58 +01:00
Kamil Myśliwiec
e767bd364e feat: produce a parseable json when colors off and compact on 2024-11-08 13:49:42 +01:00
Kamil Mysliwiec
bcda8fd791 Merge pull request #14115 from Tony133/chore/update-fastify-view-options-interface
chore(fastify): update fastify view options interface
2024-11-08 12:26:59 +01:00
Kamil Mysliwiec
fb32ef6d46 Merge pull request #14116 from Tony133/chore/update-fastify-static-options-interface
refactor(fastify): update fastify static options interface
2024-11-08 12:26:29 +01:00
Kamil Mysliwiec
51a03bbcf2 Merge pull request #14113 from nestjs/feat/context-select-options
feat(core): allow overriding abortOnError for the select method
2024-11-08 11:44:11 +01:00
Kamil Mysliwiec
f191f0f1fd Merge pull request #14112 from nestjs/fix/instance-method-call
fix(microservices): use instance refs for target handler callbacks
2024-11-08 11:43:06 +01:00
Kamil Mysliwiec
84bf5706e2 Merge pull request #14097 from clkamp/wip-distance-order
fix(core): revisit dependencies w/ possibly higher distance
2024-11-08 11:42:49 +01:00
Kamil Myśliwiec
03d8bcc21c feat: add pid to log object 2024-11-08 11:32:08 +01:00
Kamil Myśliwiec
e75eb1d14a feat(common): json logger and a few other improvements 2024-11-08 11:21:37 +01:00
Tony133
790bafa46e refactor(): update fastify static options interface 2024-11-07 21:15:39 +01:00
Tony133
f13e32ad33 chore: update fastify view options interface 2024-11-07 21:12:38 +01:00
Antonio Tripodi
1ed97489e3 Merge branch 'master' into feat/upgrade-fastify-v5 2024-11-07 18:39:10 +01:00
Tony133
7de7320550 chore: upgrade dependencies for nest v11.x 2024-11-07 18:37:41 +01:00
Kamil Mysliwiec
3081f544f4 Merge pull request #14114 from micalevisk/fix-issue-13733
fix(common)!: drop broken support for promises on `exports` of modules
2024-11-07 14:10:35 +01:00
Micael Levi L. Cavalcante
5bc7f91d90 fix(common): drop broken support for promises on exports of modules 2024-11-07 08:49:14 -04:00
Kamil Mysliwiec
6ea78d52fb Merge pull request #13628 from tomflorentin/master
chore(class-transformer): plainToClass is deprectated and replaced with plainToInstance
2024-11-07 12:38:37 +01:00
Kamil Myśliwiec
38bfa9a13a feat(core): allow overriding abort on error for select method 2024-11-07 12:18:12 +01:00
Kamil Myśliwiec
f273041594 test: update unit tests 2024-11-07 12:07:59 +01:00
Kamil Myśliwiec
da8ebded25 fix(microservices): use instance ref to call handler #13473 2024-11-07 12:01:18 +01:00
Wenlong Chen
34c2ccabe8 fix(core): Order of module destroy should be the reverse of module init 2024-11-06 21:08:35 +08:00
Kamil Mysliwiec
0f38439aa6 Merge pull request #12761 from PieterScheffers/tcp-use-random-port
Be able to use a random port for the TCP server
2024-11-06 13:22:30 +01:00
Kamil Mysliwiec
5cdea22c39 Merge pull request #13468 from nestjs/revert-13467-revert-13283-fix/unnecessary-call
fix(microservices): delete unnecessary call of grpcClient.start
2024-11-06 12:54:35 +01:00
Kamil Mysliwiec
fd563c0ae9 Merge pull request #12735 from micalevisk/feat/narrow-inject
feat(common)!: type narrowing allowed injection tokens for `@Inject()`
2024-11-06 12:53:08 +01:00
Kamil Mysliwiec
9b690d95a2 Merge branch '11.0.0' into master 2024-11-06 12:51:14 +01:00
Kamil Mysliwiec
6228af1444 Merge pull request #13336 from nestjs/feat/module-opaque-keys
feat(core): introduce different module opaque key factories
2024-11-06 12:49:55 +01:00
Kamil Mysliwiec
8d0a3cd457 Merge pull request #12893 from Hareloo/12864-default-number-query-param-bug
fix(common): when transforming undefined numeric values
2024-11-06 12:49:48 +01:00
Kamil Mysliwiec
c63717db9d Merge pull request #12764 from kmw14641/kmw14641-bugfix/class-serializer-interceptor
fix(common): apply options to plaintoclass in classserializerinterceptor
2024-11-06 12:48:37 +01:00
Kamil Mysliwiec
9cb84e78f8 Update packages/microservices/server/server-tcp.ts
Co-authored-by: Gil Tichon <gil.tichon@lemonade.com>
2024-11-06 12:47:19 +01:00
Wenlong Chen
5ccc88fe8a fix(core): Calculate module distance after bindGlobalScope 2024-11-06 19:02:17 +08:00
Johaven
af4e1d0a33 Merge branch 'nestjs:master' into feat-webdav-methods 2024-11-02 00:22:06 +01:00
Christian Lütke Stetzkamp
2c8982a2c7 fix(core): revisit dependencies w/ possibly higher distance 2024-10-29 15:33:44 +01:00
Johaven
e1c1945a45 fix(platform-fastify): uppercase methods 2024-10-08 13:49:56 +02:00
Johaven
0d5ad26268 Merge branch 'nestjs:master' into feat-webdav-methods 2024-10-08 13:42:54 +02:00
Johaven
bc36e3c32a Merge branch 'nestjs:master' into feat-webdav-methods 2024-09-19 10:12:45 +02:00
Tony133
5f45310ab6 feat(platform-fastify): added compatibility for fastify version 5.x 2024-09-17 22:58:29 +02:00
Johaven
96bf1d9bb7 Merge branch 'nestjs:master' into feat-webdav-methods 2024-09-16 14:39:48 +02:00
Ali Nowrouzi
d20a1e580f feat(microservices): add gracefull shutdown option for nats server 2024-08-28 22:30:10 +03:30
Johaven
09cfc8279f Merge branch 'nestjs:master' into feat-webdav-methods 2024-08-15 13:23:01 +02:00
Johaven
b90e19f15f Merge branch 'nestjs:master' into feat-webdav-methods 2024-08-13 15:05:28 +02:00
johaven
b62b9255cf feat(core,common,platform-fastify): add webdav http methods support 2024-08-12 11:18:40 +02:00
Patrick Acioli
ba761c1488 fix(fastify-adapter): middleware not executed when root path is excluded 2024-07-17 20:45:44 -03:00
Tom Florentin
3fd4220052 plain to class deprectated 2024-05-29 11:09:42 +02:00
Kamil Mysliwiec
7d5adfcc1f Revert "Revert "fix(microservice) Delete unnecessary call of grpcClient.start"" 2024-04-19 09:14:09 +02:00
MegaSpaceHamlet
ef12d355ff refactor(platform-express): modify error arg type
Add the possible `field` property to the `error` arg in
`transformExecption`.
2024-04-08 16:58:33 -04:00
Alex
52b2c72124 Improving types 2024-04-03 12:26:16 +05:00
Alex
1ccc7f9d91 Сorrection of Reflector types 2024-04-02 16:01:17 +05:00
MegaSpaceHamlet
50e1d705c3 feat(platform-express): multer errors show 'field'
Multer errors may include a 'field' property for certain errors. Pass it
along into the error message.
2024-03-30 22:43:51 -04:00
Kamil Myśliwiec
b3f85e9c04 test: update module compiler test 2024-03-19 10:52:31 +01:00
Kamil Myśliwiec
c4a905b996 chore: update comment to suggest switching to a different algorithm 2024-03-19 09:37:58 +01:00
Kamil Myśliwiec
094c35cf79 refactor: update types to better reflect dynamic metadata shape 2024-03-19 09:35:43 +01:00
Kamil Mysliwiec
30110d49e0 Update packages/core/injector/compiler.ts
Co-authored-by: Vinicius Lourenço <12551007+H4ad@users.noreply.github.com>
2024-03-19 09:33:04 +01:00
Kamil Myśliwiec
fb72a8ec9f feat(core): introduce different module opaque key factories 2024-03-18 10:12:56 +01:00
Marek Dorda
8af7183c30 fix: typings for fastify enableCors method
Fastify adapter uses typings from `@fastify/cors` package for `enableCors` method

Fix nestjs/nest#13234
2024-02-22 07:34:33 +01:00
Hareloo
0d7a768b89 fix(common): when transforming undefined numeric values
Transforming numeric values in validationpipe is incorrect when value is undefined

closes #12864
2023-12-06 20:52:48 +02:00
kmw14641
ed8699769d fix(common): apply options to plaintoclass in classserializerinterceptor
fixed issue that with type option which is not already converted,
any other option cannot be applied to plainToClass

Closes #12763
2023-11-17 00:59:04 +09:00
Pieter Scheffers
0cbc15405d refactor: Use TCP_DEFAULT_PORT as default instead of using a boolean check 2023-11-16 11:26:44 +01:00
Micael Levi L. Cavalcante
c47be164f3 ci: switch to shallow cloning of 'wrk' repository 2023-11-14 15:46:35 -04:00
Micael Levi L. Cavalcante
61791e5115 feat(common): narrow allowed injection tokens for @Inject() 2023-11-14 15:46:32 -04:00
Jay McDoniel
2f2252264b feat: allow for microservice options to come from the di container
Microservices are now able to be created by getting their options
from within the DI container itself. This has been a long requested
feature of developers and I finally had some time to work through how
we could possibly let this happen.
2023-10-20 17:08:35 -07:00
René Zeidler
d04886d816 fix(core): fix type and return value of Reflector#getAllAndMerge
When only a single metadata value is present in the list of targets for
`Reflector#getAllAndMerge`, that value gets wrapped in an array if it is
not already an array or an object.
Previously, single values were returned as is, so the method could
actually return any value. Now the method always returns an array or an
object as indicated by its return type.
This also fixes the return type of both `getAll` and `getAllAndMerge`
when using the strongly typed `ReflectableDecorator<T>`.

Fixes #12231
2023-08-21 10:44:28 +02:00
Manuel Herrera
cdf2aa5b06 feat(microservices): fixed mqtt serializer tests 2022-01-21 19:20:52 -03:00
Manuel Herrera
5b40b2fe81 feat(microservices): replaced empty options object with undefined 2022-01-21 19:09:34 -03:00
Manuel Herrera
5baba4b3e2 feat(microservices): raw output to publish and dispatch on mqtt client 2022-01-21 18:58:23 -03:00
Manuel Herrera
0ba8946bcd feat(microservices): removed rawOutputPackets from MqttOptions interface 2022-01-20 13:54:56 -03:00
Manuel Herrera
b8ac795804 feat(microservices): removed rawOutput and moved stringify to serializer 2022-01-20 10:24:16 -03:00
Manuel Herrera
8617ee9952 feat(microservices): added MqttOption for passing raw output to pub 2022-01-19 22:30:22 -03:00
627 changed files with 36473 additions and 20530 deletions

View File

@@ -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
@@ -29,7 +29,7 @@ aliases:
- &install-deps
run:
name: Install dependencies
command: npm ci --legacy-peer-deps
command: npm install --legacy-peer-deps
- &build-packages
run:
name: Build
@@ -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

View File

@@ -1,3 +0,0 @@
**/node_modules/**
*.d.ts
*.js

View File

@@ -1,47 +0,0 @@
module.exports = {
root: true,
env: {
node: true,
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'prettier',
],
overrides: [
{
files: ['**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
},
},
{
files: ['**/*.spec.ts', 'integration/**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.spec.json',
sourceType: 'module',
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
},
}
]
};

View File

@@ -1,6 +1,7 @@
name: "\U0001F41B Bug Report"
description: "If something isn't working as expected \U0001F914"
labels: ["needs triage"]
type: bug
body:
- type: markdown
attributes:

View File

@@ -1,6 +1,7 @@
name: "\U0001F680 Feature Request"
description: "I have a suggestion \U0001F63B!"
labels: ["type: enhancement :wolf:", "needs triage"]
type: feature
body:
- type: markdown
attributes:

View File

@@ -1,6 +1,7 @@
name: "\U0001F4A5 Regression"
description: "Report an unexpected while upgrading your Nest application!"
labels: ["type: bug :sob:", "needs triage"]
type: bug
body:
- type: markdown
attributes:

View File

@@ -2,6 +2,7 @@ title: "perf: "
name: "\U0001F525 Suggestion for Improving Performance"
description: "I have a suggestion that might improve the performance of Nest \U00002728"
labels: ["type: enhancement :wolf:", "needs triage"]
type: task
body:
- type: checkboxes
attributes:

View File

@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2017-2024 Kamil Mysliwiec <https://kamilmysliwiec.com>
Copyright (c) 2017-2025 Kamil Mysliwiec <https://kamilmysliwiec.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

55
eslint.config.mjs Normal file
View File

@@ -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',
},
},
);

View File

@@ -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;

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],
@@ -32,7 +33,8 @@
},
"include": [
"src/**/*",
"e2e/**/*"
"e2e/**/*",
"test/**/*"
],
"exclude": [
"node_modules",

View File

@@ -38,10 +38,12 @@ describe.skip('Fastify Cors', () => {
);
let requestId = 0;
const configDelegation = function (req, cb) {
const config = configs[requestId];
requestId++;
cb(null, config);
const configDelegation = {
delegator: function (req, cb) {
const config = configs[requestId];
requestId++;
cb(null, config);
},
};
app.enableCors(configDelegation);

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -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,

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -25,8 +25,9 @@ services:
- "9001:9001"
restart: always
mysql:
image: mysql:9.1.0
image: mysql:9.2.0
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
ports:

View File

@@ -7,4 +7,4 @@ async function bootstrap() {
app.useGlobalPipes(new ValidationPipe());
await app.listen(3000);
}
bootstrap();
void bootstrap();

View File

@@ -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;
}
@@ -46,6 +46,6 @@ export class RecipesResolver {
@Subscription(returns => Recipe)
recipeAdded() {
return pubSub.asyncIterator('recipeAdded');
return pubSub.asyncIterableIterator('recipeAdded');
}
}

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -42,7 +42,7 @@ describe('GraphQL request scoped', () => {
],
},
})
.end((err, res) => {
.end(err => {
if (err) return end(err);
end();
});

View File

@@ -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)!;
}
}

View File

@@ -27,13 +27,13 @@ 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;
}
@Subscription('catCreated')
catCreated() {
return pubSub.asyncIterator('catCreated');
return pubSub.asyncIterableIterator('catCreated');
}
}

View File

@@ -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)!;
}
}

View File

@@ -5,4 +5,4 @@ async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
}
bootstrap();
void bootstrap();

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -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;
@@ -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('*');
}
}
@@ -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();
});

View File

@@ -41,6 +41,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;
@@ -60,12 +70,19 @@ class TestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.send(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,
},
)
.exclude('multiple/exclude')
.forRoutes('*');
.forRoutes('*path');
}
}
@@ -116,6 +133,18 @@ describe('Exclude middleware', () => {
.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);
});
it(`should exclude "/multiple/exclude" endpoint`, () => {
return request(app.getHttpServer())
.get('/multiple/exclude')

View File

@@ -3,10 +3,11 @@ import { ExpressAdapter } from '@nestjs/platform-express';
import { Test } from '@nestjs/testing';
import * as express from 'express';
import * as request from 'supertest';
import { App } from 'supertest/types';
import { AppModule } from '../src/app.module';
describe('Hello world (express instance)', () => {
let server;
let server: App;
let app: INestApplication;
beforeEach(async () => {

View File

@@ -48,7 +48,7 @@ export class HeaderInterceptor {
const ctx = context.switchToHttp();
const res = ctx.getResponse();
for (const key in this.headers) {
if (this.headers.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(this.headers, key)) {
res.header(key, this.headers[key]);
}
}

View File

@@ -8,9 +8,9 @@ import {
RequestMethod,
} from '@nestjs/common';
import { Test } from '@nestjs/testing';
import { Response } from 'express';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
import { Response } from 'express';
const INCLUDED_VALUE = 'test_included';
const RETURN_VALUE = 'test';

View File

@@ -1,20 +1,46 @@
import { INestApplication, MiddlewareConsumer, Module } from '@nestjs/common';
import {
Global,
INestApplication,
MiddlewareConsumer,
Module,
} from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
const RETURN_VALUE_A = 'test_A';
const RETURN_VALUE_B = 'test_B';
const RETURN_VALUE_X = 'test_X';
const RETURN_VALUE_GLOBAL = 'test_GLOBAL';
@Module({
imports: [],
})
@Global()
@Module({})
class GlobalModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.send(RETURN_VALUE_GLOBAL))
.forRoutes('ping');
}
}
@Module({ imports: [GlobalModule] })
class ModuleX {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.send(RETURN_VALUE_X))
.forRoutes('hello')
.apply((req, res, next) => res.send(RETURN_VALUE_X))
.forRoutes('ping');
}
}
@Module({ imports: [ModuleX] })
class ModuleA {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => {
res.send(RETURN_VALUE_A);
})
.forRoutes('hello');
.apply((req, res, next) => res.send(RETURN_VALUE_A))
.forRoutes('hello')
.apply((req, res, next) => res.send(RETURN_VALUE_A))
.forRoutes('ping');
}
}
@@ -24,10 +50,10 @@ class ModuleA {
class ModuleB {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => {
res.send(RETURN_VALUE_B);
})
.forRoutes('hello');
.apply((req, res, next) => res.send(RETURN_VALUE_B))
.forRoutes('hello')
.apply((req, res, next) => res.send(RETURN_VALUE_B))
.forRoutes('ping');
}
}
@@ -55,6 +81,12 @@ describe('Middleware (execution order)', () => {
.expect(200, RETURN_VALUE_B);
});
it('should execute global middleware first', () => {
return request(app.getHttpServer())
.get('/ping')
.expect(200, RETURN_VALUE_GLOBAL);
});
afterEach(async () => {
await app.close();
});

View File

@@ -15,6 +15,8 @@ import {
} from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import { FastifyRequest } from 'fastify';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
describe('Middleware (FastifyAdapter)', () => {
@@ -35,6 +37,11 @@ describe('Middleware (FastifyAdapter)', () => {
return RETURN_VALUE;
}
@Get('legacy_style_wildcard/wildcard_nested')
legacy_style_wildcard() {
return RETURN_VALUE;
}
@Get('test')
test() {
return RETURN_VALUE;
@@ -74,9 +81,13 @@ describe('Middleware (FastifyAdapter)', () => {
.apply((req, res, next) => res.end(INCLUDED_VALUE))
.forRoutes({ path: 'tests/included', method: RequestMethod.POST })
.apply((req, res, next) => res.end(REQ_URL_VALUE))
.forRoutes('req/url/(.*)')
.forRoutes('req/url/*')
.apply((req, res, next) => res.end(WILDCARD_VALUE))
.forRoutes('express_style_wildcard/*', 'tests/(.*)')
.forRoutes(
'express_style_wildcard/*',
'tests/*path',
'legacy_style_wildcard/(.*)',
)
.apply((req, res, next) => res.end(QUERY_VALUE))
.forRoutes('query')
.apply((req, res, next) => next())
@@ -85,7 +96,7 @@ describe('Middleware (FastifyAdapter)', () => {
.forRoutes(TestController)
.apply((req, res, next) => res.end(RETURN_VALUE))
.exclude({ path: QUERY_VALUE, method: -1 as any })
.forRoutes('(.*)');
.forRoutes('*');
}
}
@@ -99,7 +110,7 @@ describe('Middleware (FastifyAdapter)', () => {
await app.init();
});
it(`forRoutes((.*))`, () => {
it(`forRoutes(*)`, () => {
return app
.inject({
method: 'GET',
@@ -141,7 +152,7 @@ describe('Middleware (FastifyAdapter)', () => {
.then(({ payload }) => expect(payload).to.be.eql(QUERY_VALUE));
});
it(`forRoutes(tests/(.*))`, () => {
it(`forRoutes(tests/*path)`, () => {
return app
.inject({
method: 'GET',
@@ -159,6 +170,15 @@ describe('Middleware (FastifyAdapter)', () => {
.then(({ payload }) => expect(payload).to.be.eql(WILDCARD_VALUE));
});
it(`forRoutes(legacy_style_wildcard/*)`, () => {
return app
.inject({
method: 'GET',
url: '/legacy_style_wildcard/wildcard_nested',
})
.then(({ payload }) => expect(payload).to.be.eql(WILDCARD_VALUE));
});
it(`forRoutes(req/url/)`, () => {
const reqUrl = '/test';
return app
@@ -398,4 +418,133 @@ describe('Middleware (FastifyAdapter)', () => {
await app.close();
});
});
describe('should have data attached in middleware', () => {
@Controller()
class DataController {
@Get('data')
async data(@Req() req: FastifyRequest['raw']) {
return {
success: true,
extras: req?.['raw']?.extras,
pong: req?.['raw']?.headers?.ping,
};
}
@Get('pong')
async pong(@Req() req: FastifyRequest['raw']) {
return { success: true, pong: req?.['raw']?.headers?.ping };
}
@Get('')
async rootPath(@Req() req: FastifyRequest['raw']) {
return { success: true, root: true };
}
}
@Module({
controllers: [DataController],
})
class DataModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => {
req.extras = { data: 'Data attached in middleware' };
req.headers['ping'] = 'pong';
next();
})
.forRoutes('*');
}
}
beforeEach(async () => {
app = (
await Test.createTestingModule({
imports: [DataModule],
}).compile()
).createNestApplication<NestFastifyApplication>(new FastifyAdapter());
});
it(`GET forRoutes('*') with global prefix`, async () => {
app.setGlobalPrefix('/api');
await app.init();
await app.getHttpAdapter().getInstance().ready();
return app
.inject({
method: 'GET',
url: '/api/pong',
})
.then(({ payload }) =>
expect(payload).to.be.eql(
JSON.stringify({
success: true,
pong: 'pong',
}),
),
);
});
it(`GET forRoutes('*') without prefix config`, async () => {
await app.init();
await app.getHttpAdapter().getInstance().ready();
return app
.inject({
method: 'GET',
url: '/pong',
})
.then(({ payload }) =>
expect(payload).to.be.eql(
JSON.stringify({
success: true,
pong: 'pong',
}),
),
);
});
it(`GET forRoutes('*') with global prefix and exclude patterns`, async () => {
app.setGlobalPrefix('/api', { exclude: ['/'] });
await app.init();
await app.getHttpAdapter().getInstance().ready();
await request(app.getHttpServer())
.get('/')
.expect(200, { success: true, root: true });
});
it(`GET forRoutes('*') with global prefix and global prefix options`, async () => {
app.setGlobalPrefix('/api', { exclude: ['/'] });
await app.init();
await app.getHttpAdapter().getInstance().ready();
await request(app.getHttpServer())
.get('/api/data')
.expect(200, {
success: true,
extras: { data: 'Data attached in middleware' },
pong: 'pong',
});
await request(app.getHttpServer())
.get('/')
.expect(200, { success: true, root: true });
});
it(`GET forRoutes('*') with global prefix that not starts with /`, async () => {
app.setGlobalPrefix('api');
await app.init();
await app.getHttpAdapter().getInstance().ready();
await request(app.getHttpServer())
.get('/api/data')
.expect(200, {
success: true,
extras: { data: 'Data attached in middleware' },
pong: 'pong',
});
await request(app.getHttpServer()).get('/').expect(404);
});
afterEach(async () => {
await app.close();
});
});
});

View File

@@ -26,6 +26,11 @@ class TestController {
return RETURN_VALUE;
}
@Get('legacy-wildcard/overview')
legacyWildcard() {
return RETURN_VALUE;
}
@Get('exclude')
exclude() {
return EXCLUDE_VALUE;
@@ -40,7 +45,7 @@ class TestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.send(WILDCARD_VALUE))
.forRoutes('tests/*')
.forRoutes('tests/*path', 'legacy-wildcard/*')
.apply((req, res, next) => res.send(SCOPED_VALUE))
.exclude('exclude')
.forRoutes(TestController)
@@ -86,6 +91,13 @@ describe('Middleware', () => {
.expect(200, WILDCARD_VALUE);
});
it(`forRoutes(legacy-wildcard/*)`, async () => {
app = await createApp();
return request(app.getHttpServer())
.get('/legacy-wildcard/overview')
.expect(200, WILDCARD_VALUE);
});
afterEach(async () => {
await app.close();
});

View File

@@ -18,7 +18,7 @@ export class HostArrayController {
@Get('async')
async asyncGreeting(@HostParam('tenant') tenant: string): Promise<string> {
return `${await this.hostService.greeting()} tenant=${tenant}`;
return `${this.hostService.greeting()} tenant=${tenant}`;
}
@Get('stream')

View File

@@ -18,7 +18,7 @@ export class HostController {
@Get('async')
async asyncGreeting(@HostParam('tenant') tenant: string): Promise<string> {
return `${await this.hostService.greeting()} tenant=${tenant}`;
return `${this.hostService.greeting()} tenant=${tenant}`;
}
@Get('stream')

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -23,10 +23,7 @@ describe('BeforeApplicationShutdown', () => {
it('should sort modules by distance (topological sort) - DESC order', async () => {
@Injectable()
class BB implements BeforeApplicationShutdown {
public field: string;
async beforeApplicationShutdown() {
this.field = 'b-field';
}
beforeApplicationShutdown = Sinon.spy();
}
@Module({
@@ -37,12 +34,8 @@ describe('BeforeApplicationShutdown', () => {
@Injectable()
class AA implements BeforeApplicationShutdown {
public field: string;
constructor(private bb: BB) {}
async beforeApplicationShutdown() {
this.field = this.bb.field + '_a-field';
}
beforeApplicationShutdown = Sinon.spy();
}
@Module({
imports: [B],
@@ -58,7 +51,11 @@ describe('BeforeApplicationShutdown', () => {
await app.init();
await app.close();
const instance = module.get(AA);
expect(instance.field).to.equal('b-field_a-field');
const aa = module.get(AA);
const bb = module.get(BB);
Sinon.assert.callOrder(
aa.beforeApplicationShutdown,
bb.beforeApplicationShutdown,
);
});
});

View File

@@ -23,10 +23,7 @@ describe('OnApplicationShutdown', () => {
it('should sort modules by distance (topological sort) - DESC order', async () => {
@Injectable()
class BB implements OnApplicationShutdown {
public field: string;
async onApplicationShutdown() {
this.field = 'b-field';
}
onApplicationShutdown = Sinon.spy();
}
@Module({
@@ -37,12 +34,8 @@ describe('OnApplicationShutdown', () => {
@Injectable()
class AA implements OnApplicationShutdown {
public field: string;
constructor(private bb: BB) {}
async onApplicationShutdown() {
this.field = this.bb.field + '_a-field';
}
onApplicationShutdown = Sinon.spy();
}
@Module({
imports: [B],
@@ -58,7 +51,8 @@ describe('OnApplicationShutdown', () => {
await app.init();
await app.close();
const instance = module.get(AA);
expect(instance.field).to.equal('b-field_a-field');
const aa = module.get(AA);
const bb = module.get(BB);
Sinon.assert.callOrder(aa.onApplicationShutdown, bb.onApplicationShutdown);
});
});

View File

@@ -43,10 +43,7 @@ describe('OnModuleDestroy', () => {
it('should sort modules by distance (topological sort) - DESC order', async () => {
@Injectable()
class BB implements OnModuleDestroy {
public field: string;
async onModuleDestroy() {
this.field = 'b-field';
}
onModuleDestroy = Sinon.spy();
}
@Module({
@@ -57,13 +54,10 @@ describe('OnModuleDestroy', () => {
@Injectable()
class AA implements OnModuleDestroy {
public field: string;
constructor(private bb: BB) {}
async onModuleDestroy() {
this.field = this.bb.field + '_a-field';
}
onModuleDestroy = Sinon.spy();
}
@Module({
imports: [B],
providers: [AA],
@@ -78,7 +72,8 @@ describe('OnModuleDestroy', () => {
await app.init();
await app.close();
const instance = module.get(AA);
expect(instance.field).to.equal('b-field_a-field');
const aa = module.get(AA);
const bb = module.get(BB);
Sinon.assert.callOrder(aa.onModuleDestroy, bb.onModuleDestroy);
});
});

View File

@@ -39,11 +39,39 @@ describe('OnModuleInit', () => {
});
it('should sort modules by distance (topological sort) - DESC order', async () => {
@Injectable()
class CC implements OnModuleInit {
public field: string;
async onModuleInit() {
this.field = 'c-field';
}
}
@Module({})
class C {
static forRoot() {
return {
module: C,
global: true,
providers: [
{
provide: CC,
useValue: new CC(),
},
],
exports: [CC],
};
}
}
@Injectable()
class BB implements OnModuleInit {
public field: string;
constructor(private cc: CC) {}
async onModuleInit() {
this.field = 'b-field';
this.field = this.cc.field + '_b-field';
}
}
@@ -68,14 +96,19 @@ describe('OnModuleInit', () => {
})
class A {}
@Module({
imports: [A, C.forRoot()],
})
class AppModule {}
const module = await Test.createTestingModule({
imports: [A],
imports: [AppModule],
}).compile();
const app = module.createNestApplication();
await app.init();
const instance = module.get(AA);
expect(instance.field).to.equal('b-field_a-field');
expect(instance.field).to.equal('c-field_b-field_a-field');
});
});

View File

@@ -39,4 +39,4 @@ async function bootstrap() {
process.kill(process.pid, SIGNAL);
}
bootstrap();
void bootstrap();

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -6,7 +6,7 @@ export class CircularModule {
const a = {
module: CircularModule,
providers: [InputService],
b: null,
b: null as any,
};
a.b = a;
return a;

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -2,12 +2,11 @@ import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as chai from 'chai';
import { expect } from 'chai';
import chaiAsPromised = require('chai-as-promised');
import { AppModule } from '../src/app.module';
import chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
describe('Lazy imports', () => {
let server;
let app: INestApplication;
beforeEach(async () => {
@@ -16,7 +15,6 @@ describe('Lazy imports', () => {
}).compile();
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
});
it(`should allow imports of global modules`, async () => {

View File

@@ -5,4 +5,4 @@ async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
}
bootstrap();
void bootstrap();

View File

@@ -0,0 +1,41 @@
{
"compilerOptions": {
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],
"@nestjs/common/*": ["../../packages/common/*"],
"@nestjs/core": ["../../packages/core"],
"@nestjs/core/*": ["../../packages/core/*"],
"@nestjs/microservices": ["../../packages/microservices"],
"@nestjs/microservices/*": ["../../packages/microservices/*"],
"@nestjs/websockets": ["../../packages/websockets"],
"@nestjs/websockets/*": ["../../packages/websockets/*"],
"@nestjs/testing": ["../../packages/testing"],
"@nestjs/testing/*": ["../../packages/testing/*"],
"@nestjs/platform-express": ["../../packages/platform-express"],
"@nestjs/platform-express/*": ["../../packages/platform-express/*"],
"@nestjs/platform-socket.io": ["../../packages/platform-socket.io"],
"@nestjs/platform-socket.io/*": ["../../packages/platform-socket.io/*"],
"@nestjs/platform-ws": ["../../packages/platform-ws"],
"@nestjs/platform-ws/*": ["../../packages/platform-ws/*"]
}
},
"include": [
"src/**/*",
"e2e/**/*"
],
"exclude": [
"node_modules",
]
}

View File

@@ -100,7 +100,7 @@ describe.skip('Kafka concurrent', function () {
}
}
if (topicMetadata && topicMetadata.topics.length > 0) {
if (topicMetadata! && topicMetadata.topics.length > 0) {
// we have topics, how many partitions do they have?
for (const topic of topicMetadata.topics) {
if (topic.partitions.length < numbersOfServers) {

View File

@@ -2,10 +2,11 @@ import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { App } from 'supertest/types';
import { DisconnectedClientController } from '../src/disconnected.controller';
describe('Disconnected client', () => {
let server;
let server: App;
let app: INestApplication;
beforeEach(async () => {

View File

@@ -180,7 +180,7 @@ describe('GRPC transport', () => {
stream.on('error', err => {
if (err.code !== GRPC.status.CANCELLED) {
reject(err);
reject(err as Error);
}
});

View File

@@ -91,7 +91,7 @@ describe.skip('Kafka transport', function () {
});
it(`/POST (async event notification)`, done => {
request(server)
void request(server)
.post('/notify')
.send()
.end(() => {
@@ -123,7 +123,7 @@ describe.skip('Kafka transport', function () {
});
it(`/POST (sync command create user) Concurrency Test`, async () => {
const promises = [];
const promises = [] as Array<Promise<any>>;
for (let concurrencyKey = 0; concurrencyKey < 100; concurrencyKey++) {
const innerUserDto = JSON.parse(JSON.stringify(userDto));
innerUserDto.name += `+${concurrencyKey}`;

View File

@@ -75,7 +75,7 @@ describe('MQTT transport', () => {
}).timeout(5000);
it(`/POST (event notification)`, done => {
request(server)
void request(server)
.post('/notify')
.send([1, 2, 3, 4, 5])
.end(() => {
@@ -87,7 +87,7 @@ describe('MQTT transport', () => {
});
it(`/POST (wildcard EVENT #)`, done => {
request(server)
void request(server)
.post('/wildcard-event')
.send([1, 2, 3, 4, 5])
.end(() => {
@@ -106,7 +106,7 @@ describe('MQTT transport', () => {
});
it(`/POST (wildcard EVENT +)`, done => {
request(server)
void request(server)
.post('/wildcard-event2')
.send([1, 2, 3, 4, 5])
.end(() => {
@@ -125,7 +125,7 @@ describe('MQTT transport', () => {
});
it(`/POST (shared wildcard EVENT #)`, done => {
request(server)
void request(server)
.post('/shared-wildcard-event')
.send([1, 2, 3, 4, 5])
.end(() => {
@@ -144,7 +144,7 @@ describe('MQTT transport', () => {
});
it(`/POST (shared wildcard EVENT +)`, done => {
request(server)
void request(server)
.post('/shared-wildcard-event2')
.send([1, 2, 3, 4, 5])
.end(() => {

View File

@@ -84,7 +84,7 @@ describe('NATS transport', () => {
});
it(`/POST (event notification)`, done => {
request(server)
void request(server)
.post('/notify')
.send([1, 2, 3, 4, 5])
.end(() => {

View File

@@ -78,7 +78,7 @@ describe('REDIS transport', () => {
});
it(`/POST (event notification)`, done => {
request(server)
void request(server)
.post('/notify')
.send([1, 2, 3, 4, 5])
.end(() => {

View File

@@ -85,7 +85,7 @@ describe('RabbitMQ transport', () => {
}).timeout(10000);
it(`/POST (event notification)`, done => {
request(server)
void request(server)
.post('/notify')
.send([1, 2, 3, 4, 5])
.end(() => {

View File

@@ -0,0 +1,98 @@
import {
Controller,
INestMicroservice,
Injectable,
Module,
} from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import {
AsyncOptions,
ClientTCP,
ClientsModule,
MessagePattern,
MicroserviceOptions,
Payload,
TcpOptions,
Transport,
} from '@nestjs/microservices';
import { expect } from 'chai';
let port: number;
do {
port = Math.round(Math.random() * 10000);
} while (port < 1000);
@Injectable()
class RpcOptionsProvider {
getOptions(): TcpOptions {
return {
transport: Transport.TCP,
options: {
port,
host: '0.0.0.0',
},
};
}
}
@Controller()
class RpcController {
@MessagePattern({ cmd: 'sum' })
sumPayload(@Payload() payload: number[]) {
return payload.reduce((a, b) => a + b, 0);
}
}
@Module({
imports: [
ClientsModule.register([
{
name: 'RPC_CLIENT',
transport: Transport.TCP,
options: {
port,
host: '0.0.0.0',
},
},
]),
],
controllers: [RpcController],
providers: [RpcOptionsProvider],
})
class RpcModule {}
describe('RPC Async transport', () => {
let app: INestMicroservice;
let client: ClientTCP;
beforeEach(async () => {
app = await NestFactory.createMicroservice<
AsyncOptions<MicroserviceOptions>
>(RpcModule, {
logger: false,
inject: [RpcOptionsProvider],
useFactory: (optionsProvider: RpcOptionsProvider) =>
optionsProvider.getOptions(),
});
await app.listen();
client = app.get('RPC_CLIENT', { strict: false });
});
it(`/POST`, done => {
let retData = 0;
client.send({ cmd: 'sum' }, [1, 2, 3, 4, 5]).subscribe({
next: val => (retData += val),
error: done,
complete: () => {
expect(retData).to.eq(15);
done();
},
});
});
afterEach(async () => {
await app.close();
});
});

View File

@@ -2,11 +2,11 @@ import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as fs from 'fs';
import * as path from 'path';
import * as request from 'supertest';
import { AppController } from '../src/tcp-tls/app.controller';
import { ApplicationModule } from '../src/tcp-tls/app.module';
import * as fs from 'fs';
import * as path from 'path';
describe('RPC TLS transport', () => {
let server;
@@ -109,7 +109,7 @@ describe('RPC TLS transport', () => {
});
it(`/POST (event notification)`, done => {
request(server)
void request(server)
.post('/notify')
.send([1, 2, 3, 4, 5])
.end(() => {

View File

@@ -94,7 +94,7 @@ describe('RPC transport', () => {
});
it(`/POST (event notification)`, done => {
request(server)
void request(server)
.post('/notify')
.send([1, 2, 3, 4, 5])
.end(() => {

View File

@@ -7,7 +7,7 @@ import {
} from '@nestjs/common';
import { ClientProxyFactory } from '@nestjs/microservices';
import { Observable, throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { catchError, tap } from 'rxjs/operators';
@Controller()
export class DisconnectedClientController {
@@ -31,6 +31,9 @@ export class DisconnectedClientController {
: new InternalServerErrorException(),
);
}),
tap({
error: () => client.close(),
}),
);
}
}

View File

@@ -2,15 +2,15 @@ import { Body, Controller, HttpCode, Post, Query } from '@nestjs/common';
import {
Client,
ClientGrpc,
ClientGrpcProxy,
GrpcMethod,
GrpcStreamCall,
GrpcStreamMethod,
Transport,
ClientGrpcProxy,
RpcException,
Transport,
} from '@nestjs/microservices';
import { join } from 'path';
import { Observable, of, catchError, from, mergeMap } from 'rxjs';
import { catchError, from, mergeMap, Observable, of } from 'rxjs';
class ErrorHandlingProxy extends ClientGrpcProxy {
serializeError(err) {
@@ -81,7 +81,7 @@ export class GrpcController {
});
},
error: err => {
reject(err);
reject(err as Error);
},
});
});

View File

@@ -17,7 +17,7 @@ import { SumDto } from './dto/sum.dto';
*/
const explicitPartitioner = () => {
return ({ message }: PartitionerArgs) => {
return parseFloat(message.headers.toPartition.toString());
return parseFloat(message.headers!.toPartition!.toString());
};
};

View File

@@ -5,4 +5,4 @@ async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
await app.listen(3000);
}
bootstrap();
void bootstrap();

View File

@@ -138,7 +138,7 @@ export class MqttController {
}
@MessagePattern('wildcard-message/#')
wildcardMessageHandler(data: number[]): number {
wildcardMessageHandler(data: number[]): number | undefined {
if ((data as any).response) {
return;
}
@@ -186,7 +186,7 @@ export class MqttController {
}
@MessagePattern('$share/test-group/shared-wildcard-message/#')
sharedWildcardMessageHandler(data: number[]): number {
sharedWildcardMessageHandler(data: number[]): number | undefined {
if ((data as any).response) {
return;
}

View File

@@ -1,13 +1,13 @@
import { Module, Injectable } from '@nestjs/common';
import { AppController } from './app.controller';
import { Injectable, Module } from '@nestjs/common';
import {
ClientsModule,
Transport,
ClientsModuleOptionsFactory,
ClientOptions,
ClientsModule,
ClientsModuleOptionsFactory,
ClientTCP,
RpcException,
Transport,
} from '@nestjs/microservices';
import { AppController } from './app.controller';
import * as fs from 'fs';
import * as path from 'path';

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],
@@ -32,7 +33,8 @@
},
"include": [
"src/**/*",
"e2e/**/*"
"e2e/**/*",
"test/**/*"
],
"exclude": [
"node_modules",

View File

@@ -5,4 +5,4 @@ async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
await app.listen(3001);
}
bootstrap();
void bootstrap();

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -11,6 +11,7 @@
"sourceMap": true,
"allowJs": true,
"outDir": "./dist",
"strictNullChecks": true,
"paths": {
"@nestjs/common": ["../../../packages/common"],
"@nestjs/common/*": ["../../../packages/common/*"],
@@ -20,8 +21,8 @@
"@nestjs/microservices/*": ["../../../packages/microservices/*"],
"@nestjs/websockets": ["../../../packages/websockets"],
"@nestjs/websockets/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/websockets"],
"@nestjs/testing/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/testing"],
"@nestjs/testing/*": ["../../../packages/testing/*"],
"@nestjs/platform-express": ["../../../packages/platform-express"],
"@nestjs/platform-express/*": ["../../../packages/platform-express/*"],
"@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"],

View File

@@ -11,6 +11,7 @@
"sourceMap": true,
"allowJs": true,
"outDir": "./dist",
"strictNullChecks": true,
"paths": {
"@nestjs/common": ["../../../packages/common"],
"@nestjs/common/*": ["../../../packages/common/*"],
@@ -20,8 +21,8 @@
"@nestjs/microservices/*": ["../../../packages/microservices/*"],
"@nestjs/websockets": ["../../../packages/websockets"],
"@nestjs/websockets/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/websockets"],
"@nestjs/testing/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/testing"],
"@nestjs/testing/*": ["../../../packages/testing/*"],
"@nestjs/platform-express": ["../../../packages/platform-express"],
"@nestjs/platform-express/*": ["../../../packages/platform-express/*"],
"@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"],

View File

@@ -127,7 +127,7 @@ describe('Global prefix', () => {
await request(server)
.get('/api/test/params')
.expect(200, { '0': 'params', tenantId: 'test' });
.expect(200, { tenantId: 'test', path: ['params'] });
});
it(`should execute middleware only once`, async () => {

View File

@@ -16,24 +16,30 @@ export class AppModule {
.apply((req, res, next) => res.status(201).end(MIDDLEWARE_VALUE))
.forRoutes({ path: MIDDLEWARE_VALUE, method: RequestMethod.POST })
.apply((req, res, next) => res.end(MIDDLEWARE_PARAM_VALUE))
.forRoutes({ path: MIDDLEWARE_VALUE + '/*', method: RequestMethod.GET })
.forRoutes({
path: MIDDLEWARE_VALUE + '/*path',
method: RequestMethod.GET,
})
.apply((req, res, next) => res.status(201).end(MIDDLEWARE_PARAM_VALUE))
.forRoutes({ path: MIDDLEWARE_VALUE + '/*', method: RequestMethod.POST })
.forRoutes({
path: MIDDLEWARE_VALUE + '/*path',
method: RequestMethod.POST,
})
.apply((req, res, next) => {
req.extras = { data: 'Data attached in middleware' };
next();
})
.forRoutes({ path: '*', method: RequestMethod.GET })
.forRoutes({ path: '*path', method: RequestMethod.GET })
.apply((req, res, next) => {
req.middlewareParams = req.params;
next();
})
.forRoutes({ path: '*', method: RequestMethod.GET })
.forRoutes({ path: '*path', method: RequestMethod.GET })
.apply((req, res, next) => {
this.count += 1;
req.count = this.count;
next();
})
.forRoutes('*');
.forRoutes('*path');
}
}

View File

@@ -11,6 +11,7 @@
"sourceMap": true,
"allowJs": true,
"outDir": "./dist",
"strictNullChecks": true,
"paths": {
"@nestjs/common": ["../../../packages/common"],
"@nestjs/common/*": ["../../../packages/common/*"],
@@ -20,8 +21,8 @@
"@nestjs/microservices/*": ["../../../packages/microservices/*"],
"@nestjs/websockets": ["../../../packages/websockets"],
"@nestjs/websockets/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/websockets"],
"@nestjs/testing/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/testing"],
"@nestjs/testing/*": ["../../../packages/testing/*"],
"@nestjs/platform-express": ["../../../packages/platform-express"],
"@nestjs/platform-express/*": ["../../../packages/platform-express/*"],
"@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"],

View File

@@ -1,9 +1,9 @@
import { INestApplication } from '@nestjs/common';
import { ExpressAdapter } from '@nestjs/platform-express';
import { Test, TestingModule } from '@nestjs/testing';
import { expect } from 'chai';
import * as express from 'express';
import { AppModule } from '../src/app.module';
import { INestApplication } from '@nestjs/common';
describe('Listen (Express Application)', () => {
let testModule: TestingModule;
@@ -17,7 +17,7 @@ describe('Listen (Express Application)', () => {
});
afterEach(async () => {
app.close();
await app.close();
});
it('should resolve with httpServer on success', async () => {

View File

@@ -16,7 +16,7 @@ describe('Listen (Fastify Application)', () => {
});
afterEach(async () => {
app.close();
await app.close();
});
it('should resolve with httpServer on success', async () => {

View File

@@ -0,0 +1,41 @@
{
"compilerOptions": {
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"outDir": "./dist",
"strictNullChecks": true,
"paths": {
"@nestjs/common": ["../../../packages/common"],
"@nestjs/common/*": ["../../../packages/common/*"],
"@nestjs/core": ["../../../packages/core"],
"@nestjs/core/*": ["../../../packages/core/*"],
"@nestjs/microservices": ["../../../packages/microservices"],
"@nestjs/microservices/*": ["../../../packages/microservices/*"],
"@nestjs/websockets": ["../../../packages/websockets"],
"@nestjs/websockets/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/testing"],
"@nestjs/testing/*": ["../../../packages/testing/*"],
"@nestjs/platform-express": ["../../../packages/platform-express"],
"@nestjs/platform-express/*": ["../../../packages/platform-express/*"],
"@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"],
"@nestjs/platform-socket.io/*": ["../../../packages/platform-socket.io/*"],
"@nestjs/platform-ws": ["../../../packages/platform-ws"],
"@nestjs/platform-ws/*": ["../../../packages/platform-ws/*"]
}
},
"include": [
"src/**/*",
"e2e/**/*"
],
"exclude": [
"node_modules",
]
}

View File

@@ -7,7 +7,7 @@ export class ExpressController {
getRawBody(@Req() req: RawBodyRequest<Request>) {
return {
parsed: req.body,
raw: req.rawBody.toString(),
raw: req.rawBody!.toString(),
};
}
}

View File

@@ -7,7 +7,7 @@ export class FastifyController {
getRawBody(@Req() req: RawBodyRequest<FastifyRequest>) {
return {
parsed: req.body,
raw: req.rawBody.toString(),
raw: req.rawBody!.toString(),
};
}
}

View File

@@ -11,6 +11,7 @@
"sourceMap": true,
"allowJs": true,
"outDir": "./dist",
"strictNullChecks": true,
"paths": {
"@nestjs/common": ["../../../packages/common"],
"@nestjs/common/*": ["../../../packages/common/*"],
@@ -20,8 +21,8 @@
"@nestjs/microservices/*": ["../../../packages/microservices/*"],
"@nestjs/websockets": ["../../../packages/websockets"],
"@nestjs/websockets/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/websockets"],
"@nestjs/testing/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/testing"],
"@nestjs/testing/*": ["../../../packages/testing/*"],
"@nestjs/platform-express": ["../../../packages/platform-express"],
"@nestjs/platform-express/*": ["../../../packages/platform-express/*"],
"@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"],

View File

@@ -1,7 +1,7 @@
import { NestExpressApplication } from '@nestjs/platform-express';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as EventSource from 'eventsource';
import { EventSource } from 'eventsource';
import { AppModule } from '../src/app.module';
describe('Sse (Express Application)', () => {
@@ -20,7 +20,14 @@ describe('Sse (Express Application)', () => {
const url = await app.getUrl();
eventSource = new EventSource(url + '/sse', {
headers: { connection: 'keep-alive' },
fetch: (input, init) =>
fetch(input, {
...init,
headers: {
...init?.headers,
connection: 'keep-alive',
},
}),
});
});
@@ -57,7 +64,14 @@ describe('Sse (Express Application)', () => {
const url = await app.getUrl();
eventSource = new EventSource(url + '/sse', {
headers: { connection: 'keep-alive' },
fetch: (input, init) =>
fetch(input, {
...init,
headers: {
...init?.headers,
connection: 'keep-alive',
},
}),
});
});

View File

@@ -4,7 +4,7 @@ import {
} from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as EventSource from 'eventsource';
import { EventSource } from 'eventsource';
import { AppModule } from '../src/app.module';
describe('Sse (Fastify Application)', () => {
@@ -25,7 +25,14 @@ describe('Sse (Fastify Application)', () => {
const url = await app.getUrl();
eventSource = new EventSource(url + '/sse', {
headers: { connection: 'keep-alive' },
fetch: (input, init) =>
fetch(input, {
...init,
headers: {
...init?.headers,
connection: 'keep-alive',
},
}),
});
});
@@ -64,7 +71,14 @@ describe('Sse (Fastify Application)', () => {
const url = await app.getUrl();
eventSource = new EventSource(url + '/sse', {
headers: { connection: 'keep-alive' },
fetch: (input, init) =>
fetch(input, {
...init,
headers: {
...init?.headers,
connection: 'keep-alive',
},
}),
});
});

View File

@@ -6,7 +6,7 @@ export class AppController {
@Sse('sse')
sse(): Observable<MessageEvent> {
return interval(1000).pipe(
map(_ => ({ data: { hello: 'world' } }) as MessageEvent),
map(() => ({ data: { hello: 'world' } }) as MessageEvent),
);
}
}

View File

@@ -21,8 +21,8 @@
"@nestjs/microservices/*": ["../../../packages/microservices/*"],
"@nestjs/websockets": ["../../../packages/websockets"],
"@nestjs/websockets/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/websockets"],
"@nestjs/testing/*": ["../../../packages/websockets/*"],
"@nestjs/testing": ["../../../packages/testing"],
"@nestjs/testing/*": ["../../../packages/testing/*"],
"@nestjs/platform-express": ["../../../packages/platform-express"],
"@nestjs/platform-express/*": ["../../../packages/platform-express/*"],
"@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"],

View File

@@ -1,14 +1,14 @@
import { clc } from '@nestjs/common/utils/cli-colors.util';
import { repl } from '@nestjs/core';
import { ReplContext } from '@nestjs/core/repl/repl-context';
import {
HelpReplFn,
DebugReplFn,
GetReplFn,
HelpReplFn,
MethodsReplFn,
ResolveReplFn,
SelectReplFn,
DebugReplFn,
MethodsReplFn,
} from '@nestjs/core/repl/native-functions';
import { ReplContext } from '@nestjs/core/repl/repl-context';
import { expect } from 'chai';
import * as sinon from 'sinon';
import { AppModule } from '../src/app.module';
@@ -34,7 +34,7 @@ describe('REPL', () => {
server.context;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
outputText += text as string;
return true;
});
server.emit('line', 'get(UsersService)');
@@ -63,7 +63,7 @@ ${PROMPT}`);
server.context;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
outputText += text as string;
return true;
});
server.emit('line', '$(UsersService)');
@@ -92,7 +92,7 @@ ${PROMPT}`);
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
outputText += text as string;
return true;
});
server.emit('line', 'debug(UsersModule)');
@@ -115,7 +115,7 @@ ${PROMPT}`,
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
outputText += text as string;
return true;
});
server.emit('line', 'methods("UsersRepository")');
@@ -153,7 +153,7 @@ ${PROMPT}`,
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
outputText += text as string;
return true;
});
@@ -172,7 +172,7 @@ ${PROMPT}`);
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
outputText += text as string;
return true;
});
@@ -191,7 +191,7 @@ ${PROMPT}`);
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
outputText += text as string;
return true;
});
@@ -210,7 +210,7 @@ ${PROMPT}`);
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
outputText += text as string;
return true;
});
@@ -229,7 +229,7 @@ ${PROMPT}`);
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
outputText += text as string;
return true;
});
@@ -248,7 +248,7 @@ ${PROMPT}`);
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
outputText += text as string;
return true;
});

View File

@@ -10,6 +10,7 @@
"target": "ES2021",
"sourceMap": true,
"allowJs": true,
"strictNullChecks": true,
"outDir": "./dist",
"paths": {
"@nestjs/common": ["../../packages/common"],

View File

@@ -48,19 +48,19 @@ describe('Circular request scope', () => {
await new Promise(resolve => performHttpCall(resolve));
});
it(`should create controller for each request`, async () => {
it(`should create controller for each request`, () => {
expect(HelloController.COUNTER).to.be.eql(3);
});
it(`should create service for each request`, async () => {
it(`should create service for each request`, () => {
expect(UsersService.COUNTER).to.be.eql(3);
});
it(`should create service for each request`, async () => {
it(`should create service for each request`, () => {
expect(HelloService.COUNTER).to.be.eql(3);
});
it(`should create provider for each inquirer`, async () => {
it(`should create provider for each inquirer`, () => {
expect(Meta.COUNTER).to.be.eql(3);
});
});

View File

@@ -39,7 +39,7 @@ describe('Circular transient scope', () => {
const performHttpCall = end =>
request(server)
.get('/hello')
.end((err, res) => {
.end(err => {
if (err) return end(err);
end();
});

View File

@@ -107,7 +107,7 @@ describe('Durable providers', () => {
nonDurableService: '2',
});
});
it(`should not cache durable providers that throw errors`, async () => {
let result: request.Response;

View File

@@ -47,29 +47,29 @@ describe('Request scope (microservices)', () => {
if (err) return end(err);
end();
});
await new Promise(resolve => performHttpCall(resolve));
await new Promise(resolve => performHttpCall(resolve));
await new Promise(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
});
it(`should create controller for each request`, async () => {
it(`should create controller for each request`, () => {
expect(HelloController.COUNTER).to.be.eql(3);
});
it(`should create service for each request`, async () => {
it(`should create service for each request`, () => {
expect(UsersService.COUNTER).to.be.eql(3);
});
it(`should share static provider across requests`, async () => {
it(`should share static provider across requests`, () => {
expect(Meta.COUNTER).to.be.eql(1);
});
it(`should create request scoped interceptor for each request`, async () => {
it(`should create request scoped interceptor for each request`, () => {
expect(Interceptor.COUNTER).to.be.eql(3);
expect(Interceptor.REQUEST_SCOPED_DATA).to.deep.equal([1, 1, 1]);
});
it(`should create request scoped guard for each request`, async () => {
it(`should create request scoped guard for each request`, () => {
expect(Guard.COUNTER).to.be.eql(3);
expect(Guard.REQUEST_SCOPED_DATA).to.deep.equal([1, 1, 1]);
});

View File

@@ -24,16 +24,16 @@ describe('Request scope (modules propagation)', () => {
const performHttpCall = end =>
request(server)
.get('/hello')
.end((err, res) => {
.end(err => {
if (err) return end(err);
end();
});
await new Promise(resolve => performHttpCall(resolve));
await new Promise(resolve => performHttpCall(resolve));
await new Promise(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
});
it(`should not fail`, async () => {
it(`should not fail`, () => {
expect(RequestChainService.COUNTER).to.be.eql(3);
});
});

View File

@@ -40,38 +40,38 @@ describe('Request scope', () => {
const performHttpCall = end =>
request(server)
.get('/hello')
.end((err, res) => {
.end(err => {
if (err) return end(err);
end();
});
await new Promise(resolve => performHttpCall(resolve));
await new Promise(resolve => performHttpCall(resolve));
await new Promise(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
});
it(`should create controller for each request`, async () => {
it(`should create controller for each request`, () => {
expect(HelloController.COUNTER).to.be.eql(3);
});
it(`should create service for each request`, async () => {
it(`should create service for each request`, () => {
expect(UsersService.COUNTER).to.be.eql(3);
});
it(`should share static provider across requests`, async () => {
it(`should share static provider across requests`, () => {
expect(Meta.COUNTER).to.be.eql(1);
});
it(`should create request scoped pipe for each request`, async () => {
it(`should create request scoped pipe for each request`, () => {
expect(UserByIdPipe.COUNTER).to.be.eql(3);
expect(UserByIdPipe.REQUEST_SCOPED_DATA).to.deep.equal([1, 1, 1]);
});
it(`should create request scoped interceptor for each request`, async () => {
it(`should create request scoped interceptor for each request`, () => {
expect(Interceptor.COUNTER).to.be.eql(3);
expect(Interceptor.REQUEST_SCOPED_DATA).to.deep.equal([1, 1, 1]);
});
it(`should create request scoped guard for each request`, async () => {
it(`should create request scoped guard for each request`, () => {
expect(Guard.COUNTER).to.be.eql(3);
expect(Guard.REQUEST_SCOPED_DATA).to.deep.equal([1, 1, 1]);
});

View File

@@ -41,36 +41,36 @@ describe('Transient scope', () => {
const performHttpCall = end =>
request(server)
.get('/hello')
.end((err, res) => {
.end(err => {
if (err) return end(err);
end();
});
await new Promise(resolve => performHttpCall(resolve));
await new Promise(resolve => performHttpCall(resolve));
await new Promise(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
await new Promise<any>(resolve => performHttpCall(resolve));
});
it(`should create controller for each request`, async () => {
it(`should create controller for each request`, () => {
expect(HelloController.COUNTER).to.be.eql(3);
});
it(`should create service for each request`, async () => {
it(`should create service for each request`, () => {
expect(UsersService.COUNTER).to.be.eql(3);
});
it(`should create provider for each inquirer`, async () => {
it(`should create provider for each inquirer`, () => {
expect(Meta.COUNTER).to.be.eql(7);
});
it(`should create transient pipe for each controller (3 requests, 1 static)`, async () => {
it(`should create transient pipe for each controller (3 requests, 1 static)`, () => {
expect(UserByIdPipe.COUNTER).to.be.eql(4);
});
it(`should create transient interceptor for each controller (3 requests, 1 static)`, async () => {
it(`should create transient interceptor for each controller (3 requests, 1 static)`, () => {
expect(Interceptor.COUNTER).to.be.eql(4);
});
it(`should create transient guard for each controller (3 requests, 1 static)`, async () => {
it(`should create transient guard for each controller (3 requests, 1 static)`, () => {
expect(Guard.COUNTER).to.be.eql(4);
});
});

View File

@@ -16,7 +16,7 @@ export class DurableContextIdStrategy implements ContextIdStrategy {
let tenantSubTreeId: ContextId;
if (tenants.has(tenantId)) {
tenantSubTreeId = tenants.get(tenantId);
tenantSubTreeId = tenants.get(tenantId)!;
} else {
tenantSubTreeId = { id: +tenantId } as ContextId;
tenants.set(tenantId, tenantSubTreeId);

View File

@@ -11,9 +11,7 @@ import { TenantContext } from './durable-context-id.strategy';
export class DurableService {
public instanceCounter = 0;
constructor(
@Inject(REQUEST) private readonly requestPayload: TenantContext,
) {
constructor(@Inject(REQUEST) private readonly requestPayload: TenantContext) {
if (requestPayload.forceError) {
throw new PreconditionFailedException('Forced error');
}

View File

@@ -10,7 +10,7 @@ import { Observable } from 'rxjs';
@Injectable({ scope: Scope.REQUEST })
export class Guard implements CanActivate {
static COUNTER = 0;
static REQUEST_SCOPED_DATA = [];
static REQUEST_SCOPED_DATA = [] as number[];
constructor(@Inject('REQUEST_ID') private readonly requestId: number) {
Guard.COUNTER++;

View File

@@ -11,7 +11,7 @@ import { Observable } from 'rxjs';
@Injectable({ scope: Scope.REQUEST })
export class Interceptor implements NestInterceptor {
static COUNTER = 0;
static REQUEST_SCOPED_DATA = [];
static REQUEST_SCOPED_DATA = [] as number[];
constructor(@Inject('REQUEST_ID') private readonly requestId: number) {
Interceptor.COUNTER++;

View File

@@ -9,7 +9,7 @@ import { UsersService } from './users.service';
@Injectable()
export class UserByIdPipe implements PipeTransform<string> {
static COUNTER = 0;
static REQUEST_SCOPED_DATA = [];
static REQUEST_SCOPED_DATA = [] as number[];
constructor(
@Inject('REQUEST_ID') private readonly requestId: number,

View File

@@ -5,4 +5,4 @@ async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
await app.listen(3000);
}
bootstrap();
void bootstrap();

View File

@@ -10,7 +10,7 @@ import { Observable } from 'rxjs';
@Injectable({ scope: Scope.REQUEST })
export class Guard implements CanActivate {
static COUNTER = 0;
static REQUEST_SCOPED_DATA = [];
static REQUEST_SCOPED_DATA = [] as number[];
constructor(@Inject('REQUEST_ID') private readonly requestId: number) {
Guard.COUNTER++;

Some files were not shown because too many files have changed in this diff Show More