Compare commits

...

771 Commits

Author SHA1 Message Date
Kamil Myśliwiec
e099625a33 fix(microservices): introuduce max pattern depth and object complexity 2026-02-20 10:48:05 +01:00
Kamil Myśliwiec
5d31df7eb6 chore(release): publish v11.1.14 release 2026-02-17 17:24:39 +01:00
Kamil Mysliwiec
fd8d073e0e Merge pull request #16384 from nestjs/fix/fastify-middleware-vulnerability
fix(fastify): fastify middleware bypass cve
2026-02-17 17:23:24 +01:00
Kamil Myśliwiec
d74e9a8c5f fix(fastify): fastify middleware bypass cve 2026-02-17 17:22:01 +01:00
Kamil Mysliwiec
dd90f57f40 Merge pull request #16379 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.56.0
2026-02-17 09:48:57 +01:00
Kamil Mysliwiec
aad5c23ca0 Merge pull request #16378 from nestjs/renovate/mysql2-3.x
fix(deps): update dependency mysql2 to v3.17.2
2026-02-17 09:48:49 +01:00
Kamil Mysliwiec
4a097a56ed Merge pull request #16383 from nestjs/dependabot/npm_and_yarn/typescript-eslint-8.56.0
chore(deps-dev): bump typescript-eslint from 8.55.0 to 8.56.0
2026-02-17 09:48:38 +01:00
Kamil Mysliwiec
dd6bc27254 Merge pull request #16382 from nestjs/dependabot/npm_and_yarn/mysql2-3.17.2
chore(deps-dev): bump mysql2 from 3.17.1 to 3.17.2
2026-02-17 09:48:30 +01:00
dependabot[bot]
7d3149286e chore(deps-dev): bump typescript-eslint from 8.55.0 to 8.56.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.55.0 to 8.56.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.56.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.56.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-17 01:14:16 +00:00
dependabot[bot]
a10feddb7e chore(deps-dev): bump mysql2 from 3.17.1 to 3.17.2
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.17.1 to 3.17.2.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.17.1...v3.17.2)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-version: 3.17.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-17 01:13:51 +00:00
renovate[bot]
3f8c907938 chore(deps): update typescript-eslint monorepo to v8.56.0 2026-02-16 19:24:17 +00:00
renovate[bot]
e3f94668c6 fix(deps): update dependency mysql2 to v3.17.2 2026-02-16 19:23:59 +00:00
Kamil Mysliwiec
2b12a7821e Merge pull request #16377 from nestjs/renovate/redis-5.x
chore(deps): update dependency redis to v5.11.0
2026-02-16 20:21:19 +01:00
renovate[bot]
6dde3f7521 chore(deps): update dependency redis to v5.11.0 2026-02-16 16:51:37 +00:00
Kamil Mysliwiec
a260c30a7b Merge pull request #16375 from nestjs/renovate/rimraf-6.x
fix(deps): update dependency rimraf to v6.1.3
2026-02-16 10:37:14 +01:00
renovate[bot]
8c4a0fbd03 fix(deps): update dependency rimraf to v6.1.3 2026-02-16 02:37:58 +00:00
Kamil Mysliwiec
0f7c7169a6 Merge pull request #16356 from nestjs/renovate/dotenv-17.x
fix(deps): update dependency dotenv to v17.3.1
2026-02-13 11:38:49 +01:00
Kamil Mysliwiec
4fb359a334 Merge pull request #16358 from nestjs/renovate/mysql2-3.x
fix(deps): update dependency mysql2 to v3.17.1
2026-02-13 11:36:00 +01:00
Kamil Mysliwiec
0bf1ab1f67 Merge pull request #16355 from nestjs/dependabot/npm_and_yarn/tools/benchmarks/qs-6.14.2
chore(deps): bump qs from 6.14.1 to 6.14.2 in /tools/benchmarks
2026-02-13 11:35:49 +01:00
renovate[bot]
01cf3a8250 fix(deps): update dependency dotenv to v17.3.1 2026-02-13 01:15:45 +00:00
renovate[bot]
f1d1f25426 fix(deps): update dependency mysql2 to v3.17.1 2026-02-13 01:15:40 +00:00
dependabot[bot]
a51c86be3b chore(deps): bump qs from 6.14.1 to 6.14.2 in /tools/benchmarks
Bumps [qs](https://github.com/ljharb/qs) from 6.14.1 to 6.14.2.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.14.1...v6.14.2)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-12 19:27:35 +00:00
Kamil Mysliwiec
cf35ce6500 Merge pull request #16354 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.105.2
2026-02-12 20:26:37 +01:00
Kamil Mysliwiec
4bbd3565f5 Merge pull request #16353 from nestjs/renovate/ioredis-5.x
chore(deps): update dependency ioredis to v5.9.3
2026-02-12 20:26:30 +01:00
renovate[bot]
28917eac81 chore(deps): update dependency webpack to v5.105.2 2026-02-12 19:02:03 +00:00
renovate[bot]
ca93bfed9f chore(deps): update dependency ioredis to v5.9.3 2026-02-12 19:01:56 +00:00
Kamil Mysliwiec
3307b135ec Merge pull request #16352 from nestjs/renovate/prisma-monorepo
fix(deps): update prisma monorepo to v7.4.0
2026-02-11 19:46:03 +01:00
Kamil Mysliwiec
4c4298dff1 Merge pull request #16351 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.2.1
2026-02-11 19:45:52 +01:00
renovate[bot]
9b8c737317 fix(deps): update prisma monorepo to v7.4.0 2026-02-11 18:03:33 +00:00
renovate[bot]
6260224b33 fix(deps): update dependency mongoose to v9.2.1 2026-02-11 18:03:27 +00:00
Kamil Mysliwiec
58fd32d125 Merge pull request #16339 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.105.1
2026-02-11 14:53:40 +01:00
Kamil Mysliwiec
baba12654c Merge pull request #16347 from nestjs/renovate/mysql2-3.x
fix(deps): update dependency mysql2 to v3.17.0
2026-02-11 14:53:31 +01:00
renovate[bot]
e739251315 chore(deps): update dependency webpack to v5.105.1 2026-02-11 12:11:39 +00:00
renovate[bot]
1f64f2fd9b fix(deps): update dependency mysql2 to v3.17.0 2026-02-11 12:09:36 +00:00
Kamil Mysliwiec
d37f45e8c3 Merge pull request #16337 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.13
2026-02-11 13:07:48 +01:00
Kamil Mysliwiec
99c2054b8f Merge pull request #16338 from nestjs/renovate/node-25.x
chore(deps): update dependency @types/node to v25.2.3
2026-02-11 13:07:39 +01:00
Kamil Mysliwiec
f6f4c84160 Merge pull request #16331 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.2.0
2026-02-11 13:06:40 +01:00
Kamil Mysliwiec
84035537c5 Merge pull request #16341 from nestjs/renovate/lerna-monorepo
chore(deps): update dependency lerna to v9.0.4
2026-02-11 13:06:23 +01:00
Kamil Mysliwiec
c87defa837 Merge pull request #16343 from nestjs/dependabot/npm_and_yarn/mysql2-3.17.0
chore(deps-dev): bump mysql2 from 3.16.3 to 3.17.0
2026-02-11 13:06:16 +01:00
Kamil Mysliwiec
6cf8465a38 Merge pull request #16344 from nestjs/dependabot/npm_and_yarn/types/node-25.2.3
chore(deps-dev): bump @types/node from 25.2.2 to 25.2.3
2026-02-11 13:06:10 +01:00
Kamil Mysliwiec
4b40496f51 Merge pull request #16330 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.55.0
2026-02-11 13:06:03 +01:00
dependabot[bot]
a417bb757d chore(deps-dev): bump @types/node from 25.2.2 to 25.2.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.2.2 to 25.2.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.2.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-11 01:15:20 +00:00
dependabot[bot]
4754956f44 chore(deps-dev): bump mysql2 from 3.16.3 to 3.17.0
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.16.3 to 3.17.0.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.16.3...v3.17.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-11 01:15:04 +00:00
renovate[bot]
748708b4bb chore(deps): update dependency lerna to v9.0.4 2026-02-10 22:06:25 +00:00
renovate[bot]
edd6fb757e chore(deps): update dependency @types/node to v25.2.3 2026-02-10 14:58:03 +00:00
renovate[bot]
9708691177 chore(deps): update dependency @types/node to v24.10.13 2026-02-10 14:57:46 +00:00
renovate[bot]
ef1ebf924e fix(deps): update dependency mongoose to v9.2.0 2026-02-10 02:07:37 +00:00
renovate[bot]
3078bb539a chore(deps): update typescript-eslint monorepo to v8.55.0 2026-02-09 18:39:50 +00:00
Kamil Mysliwiec
9f55de66ed Merge pull request #16326 from suuuuuuminnnnnn/test/kafka-run-options-forwarding
test(microservices): verify kafka run options forwarding
2026-02-09 13:57:15 +01:00
suuuuuuminnnnnn
e0c40e4a1b test(microservices): verify kafka run options forwarding 2026-02-09 00:35:06 +09:00
Kamil Mysliwiec
f2c2a3ecdc Merge pull request #16324 from nestjs/renovate/node-25.x
chore(deps): update dependency @types/node to v25.2.2
2026-02-08 11:35:20 +01:00
Kamil Mysliwiec
a35a5ce768 Merge pull request #16323 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.12
2026-02-08 11:35:00 +01:00
renovate[bot]
c0ae174694 chore(deps): update dependency @types/node to v25.2.2 2026-02-08 04:04:19 +00:00
renovate[bot]
6572cf5f8a chore(deps): update dependency @types/node to v24.10.12 2026-02-08 04:04:01 +00:00
Kamil Mysliwiec
1c324622de Merge pull request #16318 from nestjs/renovate/dotenv-17.x
fix(deps): update dependency dotenv to v17.2.4
2026-02-06 12:11:02 +01:00
Kamil Mysliwiec
88a2c1c8bf Merge pull request #16319 from nestjs/renovate/fast-json-stringify-6.x
fix(deps): update dependency fast-json-stringify to v6.3.0
2026-02-06 12:10:54 +01:00
Kamil Mysliwiec
829d326727 Merge pull request #16314 from SpencerKaiser/bugfix/cors-types
fix(common): change requestOrigin type
2026-02-06 12:06:34 +01:00
Kamil Mysliwiec
f854f9cbe6 Merge pull request #16316 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.11
2026-02-06 12:06:13 +01:00
renovate[bot]
af9b46513b fix(deps): update dependency fast-json-stringify to v6.3.0 2026-02-06 05:00:59 +00:00
renovate[bot]
b290fbc85f fix(deps): update dependency dotenv to v17.2.4 2026-02-05 22:14:36 +00:00
renovate[bot]
3c00b44771 chore(deps): update dependency @types/node to v24.10.11 2026-02-05 18:09:10 +00:00
Kamil Mysliwiec
fcaa117e22 Merge pull request #16317 from nestjs/renovate/node-25.x
chore(deps): update dependency @types/node to v25.2.1
2026-02-05 19:04:36 +01:00
renovate[bot]
35a1ec1adb chore(deps): update dependency @types/node to v25.2.1 2026-02-05 16:31:05 +00:00
Kamil Mysliwiec
d35b3a8fe8 Merge pull request #16303 from nestjs/renovate/nest-graphql-monorepo
fix(deps): update nest-graphql monorepo to v13.2.4
2026-02-05 12:48:52 +01:00
renovate[bot]
7b9f885262 fix(deps): update nest-graphql monorepo to v13.2.4 2026-02-05 11:44:04 +00:00
Kamil Mysliwiec
e50e3e79fb Merge pull request #16300 from nestjs/renovate/nestjs-schedule-6.x
fix(deps): update dependency @nestjs/schedule to v6.1.1
2026-02-05 12:40:52 +01:00
Kamil Mysliwiec
7cbebba3d8 Merge pull request #16301 from nestjs/renovate/nestjs-swagger-11.x
fix(deps): update dependency @nestjs/swagger to v11.2.6
2026-02-05 12:40:41 +01:00
Kamil Mysliwiec
770c7ca4af Merge pull request #16304 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency @apollo/server to v5.4.0
2026-02-05 12:40:26 +01:00
Kamil Mysliwiec
8b616d2e27 Merge pull request #16310 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-13.2.4
chore(deps-dev): bump @nestjs/graphql from 13.2.3 to 13.2.4
2026-02-05 12:40:18 +01:00
Kamil Mysliwiec
a2db2bc673 Merge pull request #16311 from nestjs/dependabot/npm_and_yarn/apollo/server-5.4.0
chore(deps-dev): bump @apollo/server from 5.3.0 to 5.4.0
2026-02-05 12:40:13 +01:00
Kamil Mysliwiec
e7d186d605 Merge pull request #16307 from Recursyve/fix/console-logger-error-context
fix: logger print invalid context when no stack trace provided
2026-02-05 12:39:56 +01:00
dependabot[bot]
ecd34f65c1 chore(deps-dev): bump @apollo/server from 5.3.0 to 5.4.0
Bumps [@apollo/server](https://github.com/apollographql/apollo-server/tree/HEAD/packages/server) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/packages/server/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/@apollo/server@5.4.0/packages/server)

---
updated-dependencies:
- dependency-name: "@apollo/server"
  dependency-version: 5.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-05 11:39:52 +00:00
Kamil Mysliwiec
af11a1cdcf Merge pull request #16308 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.1.6
2026-02-05 12:38:34 +01:00
Kamil Mysliwiec
0fe64923ab Merge pull request #16312 from nestjs/dependabot/npm_and_yarn/mongoose-9.1.6
chore(deps-dev): bump mongoose from 9.1.5 to 9.1.6
2026-02-05 12:38:22 +01:00
Spencer Kaiser
5058600ae3 fix(common): change requestOrigin type
fix(common): change requestOrigin type
2026-02-04 20:48:36 -06:00
dependabot[bot]
be35bb7dac chore(deps-dev): bump mongoose from 9.1.5 to 9.1.6
Bumps [mongoose](https://github.com/Automattic/mongoose) from 9.1.5 to 9.1.6.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/9.1.5...9.1.6)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-version: 9.1.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-05 00:54:11 +00:00
dependabot[bot]
ca64b40164 chore(deps-dev): bump @nestjs/graphql from 13.2.3 to 13.2.4
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 13.2.3 to 13.2.4.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v13.2.3...v13.2.4)

---
updated-dependencies:
- dependency-name: "@nestjs/graphql"
  dependency-version: 13.2.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-05 00:53:05 +00:00
renovate[bot]
fa9baa8eb0 fix(deps): update dependency @apollo/server to v5.4.0 2026-02-04 22:40:10 +00:00
renovate[bot]
31c34340c6 fix(deps): update dependency mongoose to v9.1.6 2026-02-04 22:39:56 +00:00
JulienDuf
91212b20d3 fix: return type error 2026-02-04 16:01:55 -05:00
JulienDuf
804d27bbe4 fix: invalid context when no stack trace is provided 2026-02-04 14:20:21 -05:00
renovate[bot]
f66414667f fix(deps): update dependency @nestjs/swagger to v11.2.6 2026-02-04 14:17:10 +00:00
renovate[bot]
b813820611 fix(deps): update dependency @nestjs/schedule to v6.1.1 2026-02-04 14:17:05 +00:00
Kamil Mysliwiec
bec4329be4 Merge pull request #16298 from nestjs/dependabot/npm_and_yarn/tools/benchmarks/multi-b4698b0d36
chore(deps): bump fastify and @nestjs/platform-fastify in /tools/benchmarks
2026-02-04 11:42:43 +01:00
Kamil Mysliwiec
5a42e7cf23 Merge pull request #16299 from nestjs/renovate/nest-monorepo
chore(deps): update nest monorepo to v11.1.13
2026-02-04 11:42:33 +01:00
Kamil Mysliwiec
deb4c250a5 Merge pull request #16294 from nestjs/renovate/mysql2-3.x
fix(deps): update dependency mysql2 to v3.16.3
2026-02-04 11:42:22 +01:00
renovate[bot]
379f9f9030 fix(deps): update dependency mysql2 to v3.16.3 2026-02-04 10:27:59 +00:00
renovate[bot]
ce86b45d7d chore(deps): update nest monorepo to v11.1.13 2026-02-04 10:25:45 +00:00
Kamil Mysliwiec
2e75afa512 Merge pull request #16296 from nestjs/renovate/mongodb-7.x
fix(deps): update dependency mongodb to v7.1.0
2026-02-04 11:24:38 +01:00
dependabot[bot]
2bec40a801 chore(deps): bump fastify and @nestjs/platform-fastify
Bumps [fastify](https://github.com/fastify/fastify) to 5.7.4 and updates ancestor dependency [@nestjs/platform-fastify](https://github.com/nestjs/nest/tree/HEAD/packages/platform-fastify). These dependencies need to be updated together.


Updates `fastify` from 5.6.2 to 5.7.4
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v5.6.2...v5.7.4)

Updates `@nestjs/platform-fastify` from 11.1.12 to 11.1.13
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/commits/v11.1.13/packages/platform-fastify)

---
updated-dependencies:
- dependency-name: fastify
  dependency-version: 5.7.4
  dependency-type: indirect
- dependency-name: "@nestjs/platform-fastify"
  dependency-version: 11.1.13
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-04 10:24:10 +00:00
Kamil Mysliwiec
8a8833d678 Merge pull request #16271 from mixator/feat/replace-benchmarks
build: replace benchmarks
2026-02-04 11:23:03 +01:00
renovate[bot]
b0f5509f53 fix(deps): update dependency mongodb to v7.1.0 2026-02-04 04:31:01 +00:00
Mykhailo Skrypskyi
72be027d16 Merge branch 'master' into feat/replace-benchmarks 2026-02-03 21:23:19 +02:00
Kamil Mysliwiec
72283cc7a9 Merge pull request #16293 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.105.0
2026-02-03 19:51:22 +01:00
Kamil Mysliwiec
bb8cf85bc9 Merge pull request #16292 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.1.13
2026-02-03 19:51:15 +01:00
renovate[bot]
d0f4d7545b chore(deps): update dependency webpack to v5.105.0 2026-02-03 16:31:17 +00:00
renovate[bot]
1b60fd317f fix(deps): update nest monorepo to v11.1.13 2026-02-03 16:31:06 +00:00
Kamil Myśliwiec
8d1c16c1ca chore: update readme 2026-02-03 14:07:38 +01:00
Kamil Myśliwiec
e3a958ac3e chore(release): publish v11.1.13 release 2026-02-03 13:47:36 +01:00
Kamil Mysliwiec
db90c3fb67 Merge pull request #16286 from suuuuuuminnnnnn/feat/microservices-mqtt-per-handler-qos
feat(microservices): support per-handler qos in mqtt
2026-02-03 13:42:33 +01:00
Kamil Mysliwiec
9a0ea3360c Merge pull request #16290 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.10
2026-02-03 13:35:42 +01:00
Kamil Mysliwiec
7bdca191c5 Merge pull request #16283 from nestjs/renovate/mqtt-5.x
chore(deps): update dependency mqtt to v5.15.0
2026-02-03 13:35:32 +01:00
Kamil Mysliwiec
401d81b1c4 Merge pull request #16282 from nestjs/renovate/fastify-5.x
fix(deps): update dependency fastify to v5.7.4
2026-02-03 13:34:57 +01:00
Kamil Mysliwiec
87cb6f92a5 Merge pull request #16288 from nestjs/dependabot/npm_and_yarn/mqtt-5.15.0
chore(deps-dev): bump mqtt from 5.14.1 to 5.15.0
2026-02-03 13:34:43 +01:00
renovate[bot]
a92bb399f9 chore(deps): update dependency @types/node to v24.10.10 2026-02-03 10:47:25 +00:00
Mykhailo Skrypskyi
3de4d8a8ef chore: merge changes from master 2026-02-03 11:31:16 +02:00
dependabot[bot]
e9869ed2fa chore(deps-dev): bump mqtt from 5.14.1 to 5.15.0
Bumps [mqtt](https://github.com/mqttjs/MQTT.js) from 5.14.1 to 5.15.0.
- [Release notes](https://github.com/mqttjs/MQTT.js/releases)
- [Changelog](https://github.com/mqttjs/MQTT.js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mqttjs/MQTT.js/compare/v5.14.1...v5.15.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-03 05:12:48 +00:00
suuuuuuminnnnnn
f5148709ff feat(microservices): support per-handler qos in mqtt 2026-02-03 10:41:51 +09:00
Mykhailo Skrypskyi
fad09363aa fix: apply chages from review 2026-02-02 23:02:54 +02:00
renovate[bot]
b885673aa8 chore(deps): update dependency mqtt to v5.15.0 2026-02-02 19:31:16 +00:00
renovate[bot]
fba0de79f2 fix(deps): update dependency fastify to v5.7.4 2026-02-02 19:31:05 +00:00
Kamil Mysliwiec
346c954312 Merge pull request #16262 from jobnow/feat/microservices-configurable-max-buffer-size
Feat/microservices configurable max buffer size
2026-02-02 14:20:43 +01:00
Kamil Mysliwiec
4081c1f5e0 Merge pull request #16281 from nestjs/renovate/commitlint-monorepo
chore(deps): update dependency @commitlint/config-angular to v20.4.1
2026-02-02 14:20:08 +01:00
Kamil Mysliwiec
1b11d01840 Update Readme.md 2026-02-02 14:19:47 +01:00
renovate[bot]
fcb774c8ed chore(deps): update dependency @commitlint/config-angular to v20.4.1 2026-02-02 13:09:27 +00:00
Kamil Mysliwiec
49cf11a063 Merge pull request #16276 from nestjs/dependabot/npm_and_yarn/commitlint/cli-20.4.0
chore(deps-dev): bump @commitlint/cli from 20.3.1 to 20.4.0
2026-02-02 14:06:51 +01:00
dependabot[bot]
bfa0ecb176 chore(deps-dev): bump @commitlint/cli from 20.3.1 to 20.4.0
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 20.3.1 to 20.4.0.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v20.4.0/@commitlint/cli)

---
updated-dependencies:
- dependency-name: "@commitlint/cli"
  dependency-version: 20.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-02 12:58:38 +00:00
Kamil Mysliwiec
e5003a1a01 Merge pull request #16265 from nestjs/dependabot/npm_and_yarn/artillery-2.0.29
chore(deps-dev): bump artillery from 2.0.28 to 2.0.29
2026-02-02 13:57:21 +01:00
Kamil Mysliwiec
e4a19bbdeb Merge pull request #16266 from nestjs/renovate/commitlint-monorepo
chore(deps): update commitlint monorepo to v20.4.0
2026-02-02 13:57:07 +01:00
Kamil Mysliwiec
e846bcd0e7 Merge pull request #16269 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo to v7.29.0
2026-02-02 13:56:58 +01:00
Kamil Mysliwiec
12e70a4bf4 Merge pull request #16270 from nestjs/renovate/globals-17.x
chore(deps): update dependency globals to v17.3.0
2026-02-02 13:56:44 +01:00
Kamil Mysliwiec
8a0e32c616 Merge pull request #16273 from nestjs/renovate/node-25.x
chore(deps): update dependency @types/node to v25.2.0
2026-02-02 13:56:36 +01:00
Kamil Mysliwiec
007a9bdbe9 Merge pull request #16264 from nestjs/renovate/artillery-2.x
chore(deps): update dependency artillery to v2.0.29
2026-02-02 13:56:26 +01:00
renovate[bot]
c96bb2a849 chore(deps): update dependency @types/node to v25.2.0 2026-02-01 17:14:19 +00:00
Mykhailo Skrypskyi
e49e92102a fix: update dependencies 2026-02-01 11:47:08 +02:00
Mykhailo Skrypskyi
3cb3c2d6ad feat: update benchmarks 2026-02-01 11:42:27 +02:00
renovate[bot]
048da85025 chore(deps): update dependency globals to v17.3.0 2026-02-01 01:04:48 +00:00
renovate[bot]
3c7b75b00c chore(deps): update babel monorepo to v7.29.0 2026-01-31 21:47:25 +00:00
renovate[bot]
2e8c645bc1 chore(deps): update commitlint monorepo to v20.4.0 2026-01-30 14:45:32 +00:00
dependabot[bot]
978256d75d chore(deps-dev): bump artillery from 2.0.28 to 2.0.29
Bumps [artillery](https://github.com/artilleryio/artillery) from 2.0.28 to 2.0.29.
- [Release notes](https://github.com/artilleryio/artillery/releases)
- [Commits](https://github.com/artilleryio/artillery/compare/artillery-2.0.28...artillery-2.0.29)

---
updated-dependencies:
- dependency-name: artillery
  dependency-version: 2.0.29
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 00:53:37 +00:00
renovate[bot]
d17dff12d4 chore(deps): update dependency artillery to v2.0.29 2026-01-29 18:05:20 +00:00
Ricardo
a5be2710ee refactor(microservices): Use options object for JsonSocket constructor
- Replace maxBufferSize parameter with JsonSocketOptions object
- Add JsonSocketOptions interface for better extensibility
- Update ClientTCP and ServerTCP to pass options object
- Update all tests to use new options format

Addresses review feedback from @kamilmysliwiec
2026-01-28 17:12:46 -03:00
Kamil Mysliwiec
782e0715f0 Merge pull request #16253 from nestjs/dependabot/npm_and_yarn/fastify-5.7.2
chore(deps): bump fastify from 5.7.1 to 5.7.2
2026-01-28 20:48:43 +01:00
Kamil Mysliwiec
91a9655d23 Merge pull request #16254 from nestjs/dependabot/npm_and_yarn/mysql2-3.16.2
chore(deps-dev): bump mysql2 from 3.16.1 to 3.16.2
2026-01-28 20:48:37 +01:00
Kamil Mysliwiec
3a2b180ddb Merge pull request #16247 from nestjs/renovate/fastify-5.x
fix(deps): update dependency fastify to v5.7.2
2026-01-28 20:48:29 +01:00
Kamil Mysliwiec
0d5b566789 Merge pull request #16249 from nestjs/renovate/mysql2-3.x
fix(deps): update dependency mysql2 to v3.16.2
2026-01-28 20:48:18 +01:00
Kamil Mysliwiec
6e8d083eed Merge pull request #16259 from nestjs/renovate/globals-17.x
chore(deps): update dependency globals to v17.2.0
2026-01-28 20:48:07 +01:00
Kamil Mysliwiec
30ccfd75bd Merge pull request #16261 from nestjs/renovate/node-25.x
chore(deps): update dependency @types/node to v25.1.0
2026-01-28 20:48:01 +01:00
Kamil Mysliwiec
bd83c3f5eb Merge pull request #16255 from devizi0/master
perf(core): use set instead of array for module registry lookup
2026-01-28 20:47:52 +01:00
Kamil Mysliwiec
7d8a4428a8 Merge pull request #16248 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.54.0
2026-01-28 20:47:21 +01:00
Ricardo
5dd0a9ab8c test(microservices): Fix maxBufferSize tests
- Use valid JSON strings in test data
- Account for packet header length in buffer size calculations
- Fix chunked data test to properly accumulate buffer
2026-01-28 15:22:39 -03:00
Ricardo
2c62817436 feat(microservices): Add configurable maxBufferSize option
- Add maxBufferSize option to TcpOptions and TcpClientOptions interfaces
- Modify JsonSocket to accept maxBufferSize as constructor parameter
- Update ClientTCP and ServerTCP to pass maxBufferSize to JsonSocket
- Add comprehensive tests for maxBufferSize functionality
- Maintain backward compatibility with default value (128MB in characters)

Closes #16256
2026-01-28 15:21:04 -03:00
renovate[bot]
c818015862 chore(deps): update dependency @types/node to v25.1.0 2026-01-28 17:15:39 +00:00
renovate[bot]
321cf7dca2 chore(deps): update dependency globals to v17.2.0 2026-01-27 16:09:48 +00:00
Lee Donghyun
db9494a2ad perf(core): use set instead of array for module registry lookup 2026-01-27 12:08:57 +09:00
dependabot[bot]
c875f6fb18 chore(deps-dev): bump mysql2 from 3.16.1 to 3.16.2
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.16.1 to 3.16.2.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.16.1...v3.16.2)

---
updated-dependencies:
- dependency-name: mysql2
  dependency-version: 3.16.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-27 01:21:50 +00:00
dependabot[bot]
2748f48bfa chore(deps): bump fastify from 5.7.1 to 5.7.2
Bumps [fastify](https://github.com/fastify/fastify) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: fastify
  dependency-version: 5.7.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-27 01:21:28 +00:00
renovate[bot]
ae495f7e82 fix(deps): update dependency mysql2 to v3.16.2 2026-01-26 21:49:10 +00:00
renovate[bot]
4029607103 chore(deps): update typescript-eslint monorepo to v8.54.0 2026-01-26 17:45:33 +00:00
renovate[bot]
e2ef54b02b fix(deps): update dependency fastify to v5.7.2 2026-01-26 13:39:29 +00:00
Kamil Mysliwiec
b4324b8968 Merge pull request #16246 from 0xC0FFE2/test/add-unit-tests-discovery-and-serializer
test: add unit tests for DiscoveryService and ClassSerializerInterceptor
2026-01-25 18:48:54 +01:00
Lee Donghyun
d88856c3fa test(common): add unit tests for class serializer interceptor
Add comprehensive unit tests for ClassSerializerInterceptor which
previously had no test coverage despite being a public API.

Test coverage includes:
- constructor with custom transformer package injection
- intercept() with RxJS pipe and context options merging
- serialize() for arrays, objects, and StreamableFile handling
- transformToPlain() with type conversion and instanceOf checks
- getContextOptions() with metadata precedence (handler > class)
- Edge cases: null/undefined, mixed arrays, Date objects, primitives

Total: 25+ test cases covering all public methods and edge cases.
2026-01-26 00:38:25 +09:00
Lee Donghyun
909b504d2d test(core): add unit tests for discovery service
Add comprehensive unit tests for DiscoveryService which previously
had no test coverage despite being a public API.

Test coverage includes:
- createDecorator() static method with unique key generation
- getProviders() with metadataKey and include options filtering
- getControllers() with module-based filtering
- getMetadataByDecorator() with method and class metadata
- getModules() protected method with include filtering
- Edge cases: empty modules, undefined instances, null checks

Total: 30+ test cases covering all public methods and edge cases.
2026-01-26 00:38:14 +09:00
Kamil Mysliwiec
747de7149a Merge pull request #16245 from nestjs/renovate/artillery-2.x
chore(deps): update dependency artillery to v2.0.28
2026-01-25 12:56:14 +01:00
renovate[bot]
84968c4dd8 chore(deps): update dependency artillery to v2.0.28 2026-01-24 10:41:59 +00:00
Kamil Mysliwiec
a1f6162971 Merge pull request #16202 from som14062005/fix/issue-16195
fix(common): exclude built-in primitives from strip proto keys
2026-01-23 09:44:35 +01:00
Kamil Mysliwiec
69892e4f95 Merge pull request #16241 from nestjs/renovate/cors-2.x
fix(deps): update dependency cors to v2.8.6
2026-01-23 09:42:09 +01:00
Kamil Mysliwiec
faba27b355 Merge pull request #16243 from nestjs/renovate/globals-17.x
chore(deps): update dependency globals to v17.1.0
2026-01-23 09:42:03 +01:00
renovate[bot]
ce37a4de1c chore(deps): update dependency globals to v17.1.0 2026-01-23 05:10:53 +00:00
renovate[bot]
58c761a10c fix(deps): update dependency cors to v2.8.6 2026-01-22 17:56:13 +00:00
Kamil Myśliwiec
ed8370697d chore: add type cast in nats emitter 2026-01-22 09:34:45 +01:00
Kamil Mysliwiec
a97228848c Merge pull request #16237 from nestjs/dependabot/npm_and_yarn/types/node-25.0.10
chore(deps-dev): bump @types/node from 24.10.9 to 25.0.10
2026-01-22 09:21:19 +01:00
dependabot[bot]
c5d8988f0e chore(deps-dev): bump @types/node from 24.10.9 to 25.0.10
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.10.9 to 25.0.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.0.10
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 08:19:16 +00:00
Kamil Mysliwiec
fd9607fd65 Merge pull request #16232 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency @apollo/server to v5.3.0
2026-01-22 09:18:50 +01:00
Kamil Mysliwiec
f6eb7317e2 Merge pull request #16233 from nestjs/renovate/prisma-monorepo
fix(deps): update prisma monorepo to v7.3.0
2026-01-22 09:17:56 +01:00
Kamil Mysliwiec
1c1b017d9c Merge pull request #16234 from nestjs/renovate/prettier-3.x
chore(deps): update dependency prettier to v3.8.1
2026-01-22 09:17:50 +01:00
Kamil Mysliwiec
69138113c5 Merge pull request #16235 from nestjs/dependabot/npm_and_yarn/prettier-3.8.1
chore(deps-dev): bump prettier from 3.8.0 to 3.8.1
2026-01-22 09:17:44 +01:00
Kamil Mysliwiec
7f70c1f992 Merge pull request #16236 from nestjs/dependabot/npm_and_yarn/apollo/server-5.3.0
chore(deps-dev): bump @apollo/server from 5.2.0 to 5.3.0
2026-01-22 09:17:38 +01:00
Kamil Mysliwiec
db4779464a Merge pull request #16238 from nestjs/renovate/mysql-9.x
chore(deps): update mysql docker tag to v9.6.0
2026-01-22 09:17:33 +01:00
renovate[bot]
46a9190770 chore(deps): update mysql docker tag to v9.6.0 2026-01-22 05:47:22 +00:00
dependabot[bot]
7ca537ad6d chore(deps-dev): bump @apollo/server from 5.2.0 to 5.3.0
Bumps [@apollo/server](https://github.com/apollographql/apollo-server/tree/HEAD/packages/server) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/packages/server/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/@apollo/server@5.3.0/packages/server)

---
updated-dependencies:
- dependency-name: "@apollo/server"
  dependency-version: 5.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 00:53:29 +00:00
dependabot[bot]
f507228dc7 chore(deps-dev): bump prettier from 3.8.0 to 3.8.1
Bumps [prettier](https://github.com/prettier/prettier) from 3.8.0 to 3.8.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.0...3.8.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 00:53:01 +00:00
renovate[bot]
d4e0c6fb40 chore(deps): update dependency prettier to v3.8.1 2026-01-21 21:48:51 +00:00
renovate[bot]
3f8b278d53 fix(deps): update prisma monorepo to v7.3.0 2026-01-21 17:41:12 +00:00
som14062005
82226347fd refactor: move built-in types to module-level constant 2026-01-21 19:42:22 +05:30
renovate[bot]
57129361dc fix(deps): update dependency @apollo/server to v5.3.0 2026-01-21 12:45:16 +00:00
Kamil Mysliwiec
c2944be1cf Merge pull request #16224 from mixator/remove-unused-deps
build: remove unused dependencies
2026-01-21 11:08:24 +01:00
Mykhailo Skrypskyi
77b4b8a763 fix: update package-lock.json 2026-01-21 11:48:24 +02:00
Mykhailo Skrypskyi
36e52495e0 fix: update package-lock.json 2026-01-21 11:22:44 +02:00
Mykhailo Skrypskyi
9a97cbf0a4 Merge remote-tracking branch 'origin/remove-unused-deps' into remove-unused-deps 2026-01-21 11:01:58 +02:00
Mykhailo Skrypskyi
8d528452ee chore: merge changes from master 2026-01-21 11:00:15 +02:00
Mykhailo Skrypskyi
3551745a48 refactor(common): replace eslint and prettier with oxc toolchain 2026-01-21 10:55:09 +02:00
Kamil Mysliwiec
3d1b44c0ca Merge pull request #16230 from chojs23/fix/console-logger-option
fix(common): Fix skipping maxArrayLength and maxStringLength option
2026-01-21 08:51:41 +01:00
Kamil Mysliwiec
e94951f86b Merge pull request #16227 from nestjs/renovate/apollo-graphql-packages
fix(deps): update apollo graphql packages to v2.13.0
2026-01-21 08:51:23 +01:00
Kamil Mysliwiec
76b4fbed34 Merge pull request #16226 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.1.5
2026-01-21 08:51:15 +01:00
neo
979a8e2f04 fix(common): Fix skipping maxArrayLength and maxStringLength option
Fixes #16229
2026-01-21 16:00:28 +09:00
renovate[bot]
5535146f65 fix(deps): update apollo graphql packages to v2.13.0 2026-01-21 00:35:32 +00:00
renovate[bot]
2fa655bbbf fix(deps): update dependency mongoose to v9.1.5 2026-01-20 16:46:06 +00:00
Mykhailo Skrypskyi
46ee1074f1 build: remove unused dependencies 2026-01-20 10:43:51 +02:00
Kamil Mysliwiec
07022aff11 Merge pull request #16220 from nestjs/dependabot/npm_and_yarn/fastify/multipart-9.4.0
chore(deps-dev): bump @fastify/multipart from 9.3.0 to 9.4.0
2026-01-20 09:18:22 +01:00
Kamil Mysliwiec
3459e9b595 Merge pull request #16215 from nestjs/renovate/mercurius-16.x
fix(deps): update dependency mercurius to v16.7.0
2026-01-20 09:06:06 +01:00
Kamil Mysliwiec
e42362edb1 Merge pull request #16217 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.53.1
2026-01-20 09:00:52 +01:00
dependabot[bot]
c78b7a1d67 chore(deps-dev): bump @fastify/multipart from 9.3.0 to 9.4.0
Bumps [@fastify/multipart](https://github.com/fastify/fastify-multipart) from 9.3.0 to 9.4.0.
- [Release notes](https://github.com/fastify/fastify-multipart/releases)
- [Commits](https://github.com/fastify/fastify-multipart/compare/v9.3.0...v9.4.0)

---
updated-dependencies:
- dependency-name: "@fastify/multipart"
  dependency-version: 9.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-20 00:54:53 +00:00
renovate[bot]
9dd5d650d7 chore(deps): update typescript-eslint monorepo to v8.53.1 2026-01-19 17:49:42 +00:00
renovate[bot]
aca0658100 fix(deps): update dependency mercurius to v16.7.0 2026-01-19 15:55:30 +00:00
Kamil Mysliwiec
c93c247474 Merge pull request #16201 from nestjs/renovate/fastify-5.x
fix(deps): update dependency fastify to v5.7.1
2026-01-18 10:48:13 +01:00
renovate[bot]
4fa9409366 fix(deps): update dependency fastify to v5.7.1 2026-01-16 09:17:26 +00:00
Kamil Mysliwiec
2ab7ba377f Merge pull request #16210 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.1.4
2026-01-16 10:15:44 +01:00
renovate[bot]
8ccb55bddc fix(deps): update dependency mongoose to v9.1.4 2026-01-16 09:14:01 +00:00
Kamil Mysliwiec
b94858b4b1 Merge pull request #16211 from nestjs/renovate/mysql2-3.x
fix(deps): update dependency mysql2 to v3.16.1
2026-01-16 10:11:51 +01:00
renovate[bot]
2c95e3a159 fix(deps): update dependency mysql2 to v3.16.1 2026-01-16 08:55:48 +00:00
Kamil Mysliwiec
fc682e4117 Merge pull request #16203 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.9
2026-01-16 09:53:04 +01:00
renovate[bot]
611bfc46cc chore(deps): update dependency @types/node to v24.10.9 2026-01-16 08:34:33 +00:00
Kamil Mysliwiec
c149138dc0 Merge pull request #16197 from nestjs/dependabot/npm_and_yarn/prettier-3.8.0
chore(deps-dev): bump prettier from 3.7.4 to 3.8.0
2026-01-16 09:32:37 +01:00
Kamil Mysliwiec
184757fbe3 Merge pull request #16200 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo
2026-01-16 09:17:06 +01:00
dependabot[bot]
36c064c255 chore(deps-dev): bump prettier from 3.7.4 to 3.8.0
Bumps [prettier](https://github.com/prettier/prettier) from 3.7.4 to 3.8.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.7.4...3.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-16 08:14:02 +00:00
Kamil Mysliwiec
9f2a48de3c Merge pull request #16199 from nestjs/renovate/prettier-3.x
chore(deps): update dependency prettier to v3.8.0
2026-01-16 09:12:58 +01:00
Kamil Mysliwiec
b9e56c3978 Merge pull request #16206 from nestjs/dependabot/npm_and_yarn/ioredis-5.9.2
chore(deps-dev): bump ioredis from 5.9.1 to 5.9.2
2026-01-16 09:12:39 +01:00
Kamil Mysliwiec
b73328be85 Merge pull request #16208 from nestjs/dependabot/npm_and_yarn/fastify-5.7.0
chore(deps): bump fastify from 5.6.2 to 5.7.0
2026-01-16 09:12:25 +01:00
Kamil Mysliwiec
b145994021 Merge pull request #16207 from nestjs/dependabot/npm_and_yarn/fast-json-stringify-6.2.0
chore(deps): bump fast-json-stringify from 6.1.1 to 6.2.0
2026-01-16 09:11:47 +01:00
dependabot[bot]
ffddbfe71e chore(deps): bump fastify from 5.6.2 to 5.7.0
Bumps [fastify](https://github.com/fastify/fastify) from 5.6.2 to 5.7.0.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v5.6.2...v5.7.0)

---
updated-dependencies:
- dependency-name: fastify
  dependency-version: 5.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-16 00:53:51 +00:00
dependabot[bot]
60df323ce0 chore(deps): bump fast-json-stringify from 6.1.1 to 6.2.0
Bumps [fast-json-stringify](https://github.com/fastify/fast-json-stringify) from 6.1.1 to 6.2.0.
- [Release notes](https://github.com/fastify/fast-json-stringify/releases)
- [Commits](https://github.com/fastify/fast-json-stringify/compare/v6.1.1...v6.2.0)

---
updated-dependencies:
- dependency-name: fast-json-stringify
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-16 00:53:26 +00:00
dependabot[bot]
df1f3af2cc chore(deps-dev): bump ioredis from 5.9.1 to 5.9.2
Bumps [ioredis](https://github.com/luin/ioredis) from 5.9.1 to 5.9.2.
- [Release notes](https://github.com/luin/ioredis/releases)
- [Changelog](https://github.com/redis/ioredis/blob/main/CHANGELOG.md)
- [Commits](https://github.com/luin/ioredis/compare/v5.9.1...v5.9.2)

---
updated-dependencies:
- dependency-name: ioredis
  dependency-version: 5.9.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-16 00:53:00 +00:00
som14062005
8fb17f517c fix(common): exclude built-in primitives from strip proto keys
Skip constructor deletion for Date, RegExp, Error, Map, Set, WeakMap, and WeakSet to fix Jest useFakeTimers compatibility. Maintains prototype pollution protection for regular objects.

Fixes #16195
2026-01-16 02:00:15 +05:30
renovate[bot]
939559cd28 fix(deps): update nest monorepo 2026-01-15 20:27:53 +00:00
som14062005
16296b9ce8 fix(common): exclude built-in primitives from strip proto keys
Skip constructor deletion for Date, RegExp, Error, Map, Set, WeakMap, and WeakSet to fix Jest useFakeTimers compatibility. Maintains prototype pollution protection for regular objects.

Fixes #16195
2026-01-15 21:30:09 +05:30
renovate[bot]
64ad1e263e chore(deps): update dependency prettier to v3.8.0 2026-01-15 08:32:56 +00:00
Kamil Myśliwiec
96932ad073 chore(release): publish v11.1.12 release 2026-01-15 09:29:44 +01:00
Kamil Mysliwiec
09e96bdee7 Merge pull request #16187 from iamkanguk97/fix/file-type-under-window-os
fix(common): regression in loading file-type under Windows OS
2026-01-15 09:27:08 +01:00
Kamil Myśliwiec
4fdeb0b504 style: address lint issues 2026-01-15 09:25:17 +01:00
Kamil Mysliwiec
6620c431ea Merge pull request #16192 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.8
2026-01-14 19:59:32 +01:00
Kamil Mysliwiec
294506171f Merge pull request #16194 from nestjs/renovate/nestjs-swagger-11.x
fix(deps): update dependency @nestjs/swagger to v11.2.5
2026-01-14 19:58:50 +01:00
Kamil Mysliwiec
31fc72a90b Merge pull request #16196 from nestjs/renovate/eslint-plugin-prettier-5.x
chore(deps): update dependency eslint-plugin-prettier to v5.5.5
2026-01-14 19:58:40 +01:00
Kamil Myśliwiec
e5616c2b92 feat: apply instance decorator to all enhancers 2026-01-14 19:58:10 +01:00
renovate[bot]
5237c886d1 chore(deps): update dependency eslint-plugin-prettier to v5.5.5 2026-01-14 14:05:40 +00:00
renovate[bot]
881bc371d6 fix(deps): update dependency @nestjs/swagger to v11.2.5 2026-01-14 09:01:48 +00:00
renovate[bot]
2304a68250 chore(deps): update dependency @types/node to v24.10.8 2026-01-13 16:55:16 +00:00
Kamil Mysliwiec
defe683829 Merge pull request #16186 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.1.3
2026-01-12 20:08:21 +01:00
Kamil Mysliwiec
d9f1fea585 Merge pull request #16189 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo to v7.28.6
2026-01-12 20:08:14 +01:00
Kamil Mysliwiec
b79d89dd29 Merge pull request #16190 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.53.0
2026-01-12 20:08:09 +01:00
renovate[bot]
0c9e713f66 chore(deps): update typescript-eslint monorepo to v8.53.0 2026-01-12 18:16:59 +00:00
renovate[bot]
0aeab872c9 chore(deps): update babel monorepo to v7.28.6 2026-01-12 18:16:24 +00:00
renovate[bot]
91ca1f913c fix(deps): update dependency mongoose to v9.1.3 2026-01-12 00:57:03 +00:00
iamkanguk97
52bb09abbf ci: remove custom workflow 2026-01-12 00:31:36 +09:00
iamkanguk97
b41dd24259 ci: disable fail-fast to ensure all platforms are tested 2026-01-12 00:18:38 +09:00
iamkanguk97
a52e60820e fix(common): convert absolute paths to urls for esm loading
Uses pathToFileURL to convert file system paths to proper URLs
before passing to the ESM loader, ensuring cross-platform compatibility.

Fixes #16179
2026-01-12 00:05:45 +09:00
iamkanguk97
c9de047945 ci: add cross-platform testing to prevent platform-specific regressions
This adds GitHub Actions workflow to test on Ubuntu, Windows, and macOS.
This is optional and can be removed if the maintainers prefer.

Related to #16179
2026-01-12 00:02:16 +09:00
Kamil Mysliwiec
caf8487b76 Merge pull request #16183 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.7
2026-01-11 11:28:47 +01:00
renovate[bot]
8501bb2c0b chore(deps): update dependency @types/node to v24.10.7 2026-01-10 20:35:38 +00:00
Kamil Mysliwiec
a830cedab9 Merge pull request #16182 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.6
2026-01-10 16:44:03 +01:00
Kamil Mysliwiec
841f150675 Merge pull request #16181 from nestjs/renovate/cache-manager-7.x
fix(deps): update dependency cache-manager to v7.2.8
2026-01-10 16:42:58 +01:00
renovate[bot]
d3761bdb32 chore(deps): update dependency @types/node to v24.10.6 2026-01-10 04:34:24 +00:00
renovate[bot]
6f4da5c41e fix(deps): update dependency cache-manager to v7.2.8 2026-01-09 21:47:47 +00:00
Kamil Mysliwiec
5f431b9f38 Merge pull request #16180 from Tony133/chore/update-license
chore: update license
2026-01-09 19:56:55 +01:00
Tony133
2526ec1f1a chore: update license 2026-01-09 17:16:50 +01:00
Kamil Mysliwiec
55b09b8387 Merge pull request #16174 from nestjs/renovate/commitlint-monorepo
chore(deps): update dependency @commitlint/config-angular to v20.3.1
2026-01-09 13:48:49 +01:00
Kamil Mysliwiec
29228ed9f4 Merge pull request #16176 from nestjs/dependabot/npm_and_yarn/commitlint/config-angular-20.3.1
chore(deps-dev): bump @commitlint/config-angular from 20.3.0 to 20.3.1
2026-01-09 13:48:41 +01:00
renovate[bot]
85030eca5c chore(deps): update dependency @commitlint/config-angular to v20.3.1 2026-01-09 09:49:39 +00:00
dependabot[bot]
15d1e4b103 chore(deps-dev): bump @commitlint/config-angular from 20.3.0 to 20.3.1
Bumps [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular) from 20.3.0 to 20.3.1.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-angular/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v20.3.1/@commitlint/config-angular)

---
updated-dependencies:
- dependency-name: "@commitlint/config-angular"
  dependency-version: 20.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-09 09:48:34 +00:00
Kamil Mysliwiec
373b78cfbb Merge pull request #16172 from nestjs/renovate/ioredis-5.x
chore(deps): update dependency ioredis to v5.9.1
2026-01-09 10:47:52 +01:00
Kamil Mysliwiec
eea5c5899c Merge pull request #16175 from nestjs/dependabot/npm_and_yarn/ioredis-5.9.1
chore(deps-dev): bump ioredis from 5.9.0 to 5.9.1
2026-01-09 10:47:34 +01:00
Kamil Mysliwiec
87df305640 Merge pull request #16177 from nestjs/dependabot/npm_and_yarn/commitlint/cli-20.3.1
chore(deps-dev): bump @commitlint/cli from 20.3.0 to 20.3.1
2026-01-09 10:47:18 +01:00
dependabot[bot]
975e6099c2 chore(deps-dev): bump @commitlint/cli from 20.3.0 to 20.3.1
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 20.3.0 to 20.3.1.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v20.3.1/@commitlint/cli)

---
updated-dependencies:
- dependency-name: "@commitlint/cli"
  dependency-version: 20.3.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-09 01:04:38 +00:00
dependabot[bot]
014369029f chore(deps-dev): bump ioredis from 5.9.0 to 5.9.1
Bumps [ioredis](https://github.com/luin/ioredis) from 5.9.0 to 5.9.1.
- [Release notes](https://github.com/luin/ioredis/releases)
- [Changelog](https://github.com/redis/ioredis/blob/main/CHANGELOG.md)
- [Commits](https://github.com/luin/ioredis/compare/v5.9.0...v5.9.1)

---
updated-dependencies:
- dependency-name: ioredis
  dependency-version: 5.9.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-09 01:03:40 +00:00
renovate[bot]
0ae760071d chore(deps): update dependency ioredis to v5.9.1 2026-01-08 13:53:03 +00:00
Kamil Mysliwiec
31de8a1d2d Merge pull request #16170 from nestjs/renovate/body-parser-2.x
chore(deps): update dependency body-parser to v2.2.2
2026-01-07 14:54:42 +01:00
renovate[bot]
4576270535 chore(deps): update dependency body-parser to v2.2.2 2026-01-07 13:51:58 +00:00
Kamil Mysliwiec
16a4d4d6a2 Merge pull request #16162 from nestjs/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-8.52.0
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.51.0 to 8.52.0
2026-01-07 09:13:23 +01:00
Kamil Mysliwiec
34d2103468 Merge pull request #16167 from nestjs/renovate/nestjs-swagger-11.x
fix(deps): update dependency @nestjs/swagger to v11.2.4
2026-01-07 09:13:15 +01:00
Kamil Mysliwiec
991d07267e Merge pull request #16168 from nestjs/renovate/graphql-tools-monorepo
fix(deps): update dependency graphql-tools to v9.0.26
2026-01-07 09:13:08 +01:00
Kamil Mysliwiec
a0cd0d543a Merge pull request #16169 from nestjs/renovate/major-graphql-tools-monorepo
fix(deps): update dependency @graphql-tools/utils to v11
2026-01-07 09:13:01 +01:00
Kamil Mysliwiec
a25170d8d6 Merge pull request #16160 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.52.0
2026-01-07 09:12:50 +01:00
renovate[bot]
af10902bcf fix(deps): update dependency @graphql-tools/utils to v11 2026-01-07 02:04:46 +00:00
renovate[bot]
30670319a8 fix(deps): update dependency graphql-tools to v9.0.26 2026-01-07 02:04:33 +00:00
renovate[bot]
8e6d6b7dfb fix(deps): update dependency @nestjs/swagger to v11.2.4 2026-01-06 20:56:33 +00:00
renovate[bot]
9bcf7049c5 chore(deps): update typescript-eslint monorepo to v8.52.0 2026-01-06 17:35:58 +00:00
dependabot[bot]
92a2ec2402 chore(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.51.0 to 8.52.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.52.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.52.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-06 17:34:32 +00:00
Kamil Mysliwiec
9415f659bd Merge pull request #16165 from nestjs/dependabot/npm_and_yarn/typescript-eslint/parser-8.52.0
chore(deps-dev): bump @typescript-eslint/parser from 8.51.0 to 8.52.0
2026-01-06 18:32:56 +01:00
dependabot[bot]
afefa9050e chore(deps-dev): bump @typescript-eslint/parser from 8.51.0 to 8.52.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.51.0 to 8.52.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.52.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.52.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-06 17:31:53 +00:00
Kamil Mysliwiec
88af6c5428 Merge pull request #16161 from nestjs/dependabot/npm_and_yarn/ws-8.19.0
chore(deps): bump ws from 8.18.3 to 8.19.0
2026-01-06 18:30:57 +01:00
Kamil Mysliwiec
72eec8964e Merge pull request #16164 from nestjs/dependabot/npm_and_yarn/mongoose-9.1.2
chore(deps-dev): bump mongoose from 9.1.1 to 9.1.2
2026-01-06 18:30:43 +01:00
Kamil Mysliwiec
22a5121d9c Merge pull request #16159 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.1.2
2026-01-06 18:30:30 +01:00
Kamil Mysliwiec
d2f3a2f7d6 Merge pull request #16166 from nestjs/renovate/supertest-7.x
chore(deps): update dependency supertest to v7.2.2
2026-01-06 18:30:21 +01:00
Kamil Mysliwiec
6de4864790 Merge pull request #16163 from nestjs/dependabot/npm_and_yarn/typescript-eslint-8.52.0
chore(deps-dev): bump typescript-eslint from 8.51.0 to 8.52.0
2026-01-06 18:30:04 +01:00
renovate[bot]
02d2749b04 chore(deps): update dependency supertest to v7.2.2 2026-01-06 09:58:10 +00:00
dependabot[bot]
a9952edff0 chore(deps-dev): bump mongoose from 9.1.1 to 9.1.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 9.1.1 to 9.1.2.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/9.1.1...9.1.2)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-version: 9.1.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-06 00:03:27 +00:00
dependabot[bot]
23e13fb7c7 chore(deps-dev): bump typescript-eslint from 8.51.0 to 8.52.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.51.0 to 8.52.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.52.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.52.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-06 00:03:05 +00:00
dependabot[bot]
eac120336f chore(deps): bump ws from 8.18.3 to 8.19.0
Bumps [ws](https://github.com/websockets/ws) from 8.18.3 to 8.19.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.18.3...8.19.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-version: 8.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-06 00:01:48 +00:00
renovate[bot]
45da564b8b fix(deps): update dependency mongoose to v9.1.2 2026-01-05 17:36:07 +00:00
Kamil Mysliwiec
3df5a1836c Merge pull request #16158 from nestjs/renovate/ioredis-5.x
chore(deps): update dependency ioredis to v5.9.0
2026-01-05 18:33:51 +01:00
renovate[bot]
fb292791cf chore(deps): update dependency ioredis to v5.9.0 2026-01-05 14:43:21 +00:00
Kamil Mysliwiec
33911ead25 Merge pull request #16155 from nestjs/renovate/file-type-21.x
fix(deps): update dependency file-type to v21.3.0
2026-01-04 19:16:54 +01:00
renovate[bot]
8a5be22e94 fix(deps): update dependency file-type to v21.3.0 2026-01-04 01:44:43 +00:00
Kamil Mysliwiec
4500f04525 Merge pull request #16154 from nestjs/renovate/find-my-way-9.x
fix(deps): update dependency find-my-way to v9.4.0
2026-01-03 17:51:30 +01:00
Kamil Mysliwiec
b1edd0872f Merge pull request #16153 from nestjs/renovate/fastify-middie-9.x
chore(deps): update dependency @fastify/middie to v9.1.0
2026-01-03 17:51:25 +01:00
renovate[bot]
73f71c45e8 fix(deps): update dependency find-my-way to v9.4.0 2026-01-03 13:53:40 +00:00
renovate[bot]
936173ddff chore(deps): update dependency @fastify/middie to v9.1.0 2026-01-03 13:53:23 +00:00
Kamil Mysliwiec
295bbe27f0 Merge pull request #16151 from nestjs/renovate/globals-17.x
chore(deps): update dependency globals to v17
2026-01-02 15:19:35 +01:00
renovate[bot]
242e4cef4f chore(deps): update dependency globals to v17 2026-01-01 21:03:51 +00:00
Kamil Mysliwiec
01a14d46d1 Merge pull request #16145 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.1.1
2026-01-01 16:32:53 +01:00
Kamil Mysliwiec
fdfa52a2a7 Merge pull request #16149 from nestjs/renovate/commitlint-monorepo
chore(deps): update commitlint monorepo to v20.3.0
2026-01-01 16:31:59 +01:00
Kamil Mysliwiec
f7d8e025d9 Merge pull request #16138 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.51.0
2026-01-01 16:31:29 +01:00
renovate[bot]
00f6e87586 chore(deps): update commitlint monorepo to v20.3.0 2026-01-01 13:39:30 +00:00
renovate[bot]
112167837e fix(deps): update dependency mongoose to v9.1.1 2025-12-31 14:16:45 +00:00
renovate[bot]
da59d1c39c chore(deps): update typescript-eslint monorepo to v8.51.0 2025-12-31 10:47:44 +00:00
Kamil Mysliwiec
182f97d604 Merge pull request #16146 from miso-kyoungminkim/resolve-dependency
chore: Resolve dependencies
2025-12-31 11:43:37 +01:00
Kamil Mysliwiec
4869827aa0 Merge pull request #16144 from nestjs/dependabot/npm_and_yarn/mongoose-9.1.1
chore(deps-dev): bump mongoose from 9.1.0 to 9.1.1
2025-12-31 11:42:56 +01:00
kyoungminkim
8ead13d4f6 chore: Downgrade sinon-chai version 2025-12-31 13:49:18 +09:00
kyoungminkim
d021321624 chore: Update dependencies 2025-12-31 11:00:00 +09:00
dependabot[bot]
66d5059b80 chore(deps-dev): bump mongoose from 9.1.0 to 9.1.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 9.1.0 to 9.1.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/9.1.0...9.1.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-version: 9.1.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-31 00:01:35 +00:00
Kamil Mysliwiec
7a3f5b568f Merge pull request #16141 from nestjs/dependabot/npm_and_yarn/typescript-eslint/parser-8.51.0
chore(deps-dev): bump @typescript-eslint/parser from 8.50.1 to 8.51.0
2025-12-30 10:14:42 +01:00
Kamil Mysliwiec
60355c44e0 Merge pull request #16142 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.1.0
2025-12-30 10:14:33 +01:00
renovate[bot]
38e4a826dc fix(deps): update dependency mongoose to v9.1.0 2025-12-30 08:35:04 +00:00
dependabot[bot]
f40895423a chore(deps-dev): bump @typescript-eslint/parser from 8.50.1 to 8.51.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.50.1 to 8.51.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.51.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.51.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-30 08:34:04 +00:00
Kamil Mysliwiec
ce83c9a6de Merge pull request #16143 from nestjs/dependabot/npm_and_yarn/typescript-eslint-8.51.0
chore(deps-dev): bump typescript-eslint from 8.50.1 to 8.51.0
2025-12-30 09:32:49 +01:00
Kamil Mysliwiec
b0aa22d030 Merge pull request #16140 from nestjs/dependabot/npm_and_yarn/mongoose-9.1.0
chore(deps-dev): bump mongoose from 9.0.2 to 9.1.0
2025-12-30 09:32:40 +01:00
dependabot[bot]
2052855d3f chore(deps-dev): bump typescript-eslint from 8.50.1 to 8.51.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.50.1 to 8.51.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.51.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.51.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-30 00:03:53 +00:00
dependabot[bot]
d858df5dda chore(deps-dev): bump mongoose from 9.0.2 to 9.1.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 9.0.2 to 9.1.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/9.0.2...9.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-30 00:02:36 +00:00
Kamil Mysliwiec
91b97edfda Merge pull request #16137 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.1.11
2025-12-29 18:05:09 +01:00
renovate[bot]
00790a06ff fix(deps): update nest monorepo to v11.1.11 2025-12-29 16:51:16 +00:00
Kamil Mysliwiec
1bbd3ec178 Merge pull request #16136 from nestjs/renovate/nest-monorepo
fix(deps): update dependency @nestjs/platform-ws to v11.1.11
2025-12-29 17:48:48 +01:00
renovate[bot]
1818032838 fix(deps): update dependency @nestjs/platform-ws to v11.1.11 2025-12-29 13:32:37 +00:00
Kamil Myśliwiec
20529c07e3 chore(release): publish v11.1.11 release 2025-12-29 14:31:01 +01:00
Kamil Myśliwiec
585f55f0e4 chore: revert lerna version 2025-12-29 14:30:25 +01:00
Kamil Myśliwiec
bcb4747f75 chore(release): publish v11.1.11 release 2025-12-29 14:29:38 +01:00
Kamil Myśliwiec
3f5cfaa61b chore: revert lerna version 2025-12-29 14:29:14 +01:00
Kamil Myśliwiec
817e8c9923 chore(release): publish v11.1.11 release 2025-12-29 14:28:27 +01:00
Kamil Myśliwiec
d86eb37fb1 chore: revert lerna version 2025-12-29 14:27:45 +01:00
Kamil Myśliwiec
fef323b2c9 chore(release): publish v11.1.11 release 2025-12-29 14:26:08 +01:00
Kamil Myśliwiec
d1e55d082f style: disable linter for fastify middie external 2025-12-29 14:19:57 +01:00
Kamil Mysliwiec
149ed5cede Merge pull request #16135 from nestjs/fix/middie-bypass
fix(platform-fastify): middie bypassing through decoded chars
2025-12-29 13:45:26 +01:00
Kamil Myśliwiec
c4cedda15a fix(platform-fastify): middie bypassing through decoded chars 2025-12-29 13:44:26 +01:00
Kamil Mysliwiec
ad88fa8a1d Merge pull request #16133 from coti-z/fix/injector-unhandled-promise-rejection
fix(core): add missing catch handler for forward-ref provider resolution
2025-12-29 09:30:11 +01:00
Kamil Mysliwiec
b00a159c7d Merge pull request #16134 from manureja64/test/request-scope-bubbling
test(core): add regression test for request scope bubbling
2025-12-29 09:29:48 +01:00
Himanshu Gupta
6f1eddb601 test(core): add regression test for request scope bubbling
This adds an integration test to ensure that a Singleton service injected with a Request-Scoped dependency is correctly downgraded to Request-Scoped. This prevents future regressions in scope bubbling behavior.
2025-12-28 20:46:04 +05:30
coti-z
15198c650d fix(core): add missing catch handler for forward-ref provider resolution
When forwardRef provider fails to load in a non-static context
(REQUEST/TRANSIENT scope, the error was silently swallowed because the
promise was fire-and-forget without catch handler

This fix add catch handler that propagate the error through
ettlementSignal, ensuring proper error handling and preventing unhandled
promise rejection
2025-12-28 18:47:47 +09:00
Kamil Mysliwiec
3624d55aa1 Merge pull request #16122 from nestjs/dependabot/npm_and_yarn/socket.io-4.8.3
chore(deps): bump socket.io from 4.8.2 to 4.8.3
2025-12-26 13:40:31 +01:00
Kamil Mysliwiec
b45a9cd6d8 Merge pull request #16117 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.50.1
2025-12-26 13:38:54 +01:00
dependabot[bot]
ec3d6ad9fb chore(deps): bump socket.io from 4.8.2 to 4.8.3
Bumps [socket.io](https://github.com/socketio/socket.io) from 4.8.2 to 4.8.3.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/socket.io@4.8.2...socket.io@4.8.3)

---
updated-dependencies:
- dependency-name: socket.io
  dependency-version: 4.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-26 12:38:43 +00:00
Kamil Mysliwiec
beb852aba6 Merge pull request #16125 from nestjs/renovate/socket.io-packages
fix(deps): update socket.io packages to v4.8.3
2025-12-26 13:38:42 +01:00
Kamil Mysliwiec
0ad1409115 Merge pull request #16128 from nestjs/dependabot/npm_and_yarn/fastify/static-9.0.0
chore(deps-dev): bump @fastify/static from 8.3.0 to 9.0.0
2025-12-26 13:38:34 +01:00
Kamil Mysliwiec
6bfe25e05e Merge pull request #16129 from nestjs/renovate/file-type-21.x
fix(deps): update dependency file-type to v21.2.0
2025-12-26 13:38:25 +01:00
Kamil Mysliwiec
990b1d4b92 Merge pull request #16130 from nestjs/renovate/fastify-static-9.x
fix(deps): update dependency @fastify/static to v9
2025-12-26 13:38:14 +01:00
Kamil Mysliwiec
9b1f239db1 Merge pull request #16121 from nestjs/dependabot/npm_and_yarn/socket.io-client-4.8.3
chore(deps-dev): bump socket.io-client from 4.8.2 to 4.8.3
2025-12-26 13:37:42 +01:00
Kamil Mysliwiec
68f7e858dd Merge pull request #16126 from nestjs/renovate/nestjs-cache-manager-3.x
fix(deps): update dependency @nestjs/cache-manager to v3.1.0
2025-12-26 13:37:35 +01:00
Kamil Mysliwiec
0eb6e6e462 Merge pull request #16127 from nestjs/dependabot/npm_and_yarn/file-type-21.2.0
chore(deps): bump file-type from 21.1.1 to 21.2.0
2025-12-26 13:37:29 +01:00
Kamil Mysliwiec
76d1720d76 Merge pull request #16124 from nestjs/dependabot/npm_and_yarn/engine.io-client-6.6.4
chore(deps-dev): bump engine.io-client from 6.6.3 to 6.6.4
2025-12-26 13:37:24 +01:00
renovate[bot]
9b09e38e7d fix(deps): update dependency @fastify/static to v9 2025-12-26 00:03:19 +00:00
renovate[bot]
0d846b500f fix(deps): update dependency file-type to v21.2.0 2025-12-26 00:03:11 +00:00
dependabot[bot]
063b050cb6 chore(deps-dev): bump @fastify/static from 8.3.0 to 9.0.0
Bumps [@fastify/static](https://github.com/fastify/fastify-static) from 8.3.0 to 9.0.0.
- [Release notes](https://github.com/fastify/fastify-static/releases)
- [Commits](https://github.com/fastify/fastify-static/compare/v8.3.0...v9.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-26 00:02:27 +00:00
dependabot[bot]
a4a50d4fc4 chore(deps): bump file-type from 21.1.1 to 21.2.0
Bumps [file-type](https://github.com/sindresorhus/file-type) from 21.1.1 to 21.2.0.
- [Release notes](https://github.com/sindresorhus/file-type/releases)
- [Commits](https://github.com/sindresorhus/file-type/compare/v21.1.1...v21.2.0)

---
updated-dependencies:
- dependency-name: file-type
  dependency-version: 21.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-26 00:01:55 +00:00
renovate[bot]
fb78273218 fix(deps): update dependency @nestjs/cache-manager to v3.1.0 2025-12-24 01:33:49 +00:00
renovate[bot]
462d02d803 fix(deps): update socket.io packages to v4.8.3 2025-12-24 00:03:15 +00:00
renovate[bot]
ba950c7da4 chore(deps): update typescript-eslint monorepo to v8.50.1 2025-12-24 00:03:05 +00:00
dependabot[bot]
f2a3e5bd4e chore(deps-dev): bump engine.io-client from 6.6.3 to 6.6.4
Bumps [engine.io-client](https://github.com/socketio/socket.io) from 6.6.3 to 6.6.4.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/engine.io-client@6.6.3...engine.io-client@6.6.4)

---
updated-dependencies:
- dependency-name: engine.io-client
  dependency-version: 6.6.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-24 00:03:02 +00:00
dependabot[bot]
45dbba3773 chore(deps-dev): bump socket.io-client from 4.8.2 to 4.8.3
Bumps [socket.io-client](https://github.com/socketio/socket.io) from 4.8.2 to 4.8.3.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/socket.io-client@4.8.2...socket.io-client@4.8.3)

---
updated-dependencies:
- dependency-name: socket.io-client
  dependency-version: 4.8.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-24 00:01:41 +00:00
Kamil Mysliwiec
92cefc4041 Merge pull request #16113 from nestjs/dependabot/npm_and_yarn/typescript-eslint-8.50.1
chore(deps-dev): bump typescript-eslint from 8.50.0 to 8.50.1
2025-12-23 12:21:17 +01:00
Kamil Mysliwiec
bfc0b6bb96 Merge pull request #16112 from nestjs/dependabot/npm_and_yarn/socket.io-client-4.8.2
chore(deps-dev): bump socket.io-client from 4.8.1 to 4.8.2
2025-12-23 12:21:11 +01:00
dependabot[bot]
78c5b300c9 chore(deps-dev): bump socket.io-client from 4.8.1 to 4.8.2
Bumps [socket.io-client](https://github.com/socketio/socket.io) from 4.8.1 to 4.8.2.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/socket.io-client@4.8.1...socket.io-client@4.8.2)

---
updated-dependencies:
- dependency-name: socket.io-client
  dependency-version: 4.8.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-23 09:18:59 +00:00
dependabot[bot]
a263cd62e8 chore(deps-dev): bump typescript-eslint from 8.50.0 to 8.50.1
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.50.0 to 8.50.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.50.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-23 09:18:11 +00:00
Kamil Mysliwiec
2d9f543329 Merge pull request #16118 from nestjs/renovate/socket.io-packages
fix(deps): update socket.io packages to v4.8.2
2025-12-23 10:17:30 +01:00
Kamil Mysliwiec
3282fbf98f Merge pull request #16114 from nestjs/dependabot/npm_and_yarn/socket.io-4.8.2
chore(deps): bump socket.io from 4.8.1 to 4.8.2
2025-12-23 10:17:02 +01:00
Kamil Mysliwiec
7bfcf6fa5f Merge pull request #16115 from nestjs/dependabot/npm_and_yarn/typescript-eslint/parser-8.50.1
chore(deps-dev): bump @typescript-eslint/parser from 8.50.0 to 8.50.1
2025-12-23 10:16:58 +01:00
dependabot[bot]
9674ae343a chore(deps-dev): bump @typescript-eslint/parser from 8.50.0 to 8.50.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.50.0 to 8.50.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.50.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-23 09:14:36 +00:00
Kamil Mysliwiec
67f9bdf091 Merge pull request #16116 from nestjs/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-8.50.1
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.50.0 to 8.50.1
2025-12-23 10:13:11 +01:00
renovate[bot]
ab186ebdc8 fix(deps): update socket.io packages to v4.8.2 2025-12-23 00:04:19 +00:00
dependabot[bot]
373685df1c chore(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.50.0 to 8.50.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.50.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-23 00:03:58 +00:00
dependabot[bot]
d6da0401e7 chore(deps): bump socket.io from 4.8.1 to 4.8.2
Bumps [socket.io](https://github.com/socketio/socket.io) from 4.8.1 to 4.8.2.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/socket.io@4.8.1...socket.io@4.8.2)

---
updated-dependencies:
- dependency-name: socket.io
  dependency-version: 4.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-23 00:03:08 +00:00
Kamil Mysliwiec
38b0eca9b2 Merge pull request #16107 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.104.1
2025-12-22 19:39:53 +01:00
Kamil Mysliwiec
a3449fb720 Merge pull request #16109 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.1.10
2025-12-22 19:39:44 +01:00
renovate[bot]
0206279da5 fix(deps): update nest monorepo to v11.1.10 2025-12-22 14:44:38 +00:00
Kamil Myśliwiec
5864ff7612 chore: bump package.json version 2025-12-22 09:56:27 +01:00
Kamil Myśliwiec
8ea5aaef56 chore(release): publish v11.1.10 release 2025-12-22 09:55:06 +01:00
Kamil Myśliwiec
84739e02e2 chore: update release commit message 2025-12-22 09:54:39 +01:00
Kamil Myśliwiec
2b7ab5ef3b chore: remove access flag 2025-12-22 09:51:35 +01:00
Kamil Myśliwiec
5186601cd8 chore: update lerna to the latest version 2025-12-22 09:47:43 +01:00
Kamil Myśliwiec
0a79b7249f chore(@nestjs) publish v11.1.10 release 2025-12-22 09:43:57 +01:00
Kamil Myśliwiec
b7c36b51a5 chore: reverse lerna version 2025-12-22 09:43:09 +01:00
Kamil Myśliwiec
54432bd917 chore(@nestjs) publish v11.1.10 release 2025-12-22 09:39:49 +01:00
Kamil Myśliwiec
6395241b62 chore: reverse lerna version 2025-12-22 09:38:40 +01:00
Kamil Myśliwiec
173c24331e chore(@nestjs) publish v11.1.10 release 2025-12-22 09:38:18 +01:00
Kamil Myśliwiec
00253fa201 chore: reverse lerna version 2025-12-22 09:37:56 +01:00
Kamil Myśliwiec
1500555f7e chore(@nestjs) publish v11.1.10 release 2025-12-22 09:36:47 +01:00
Kamil Myśliwiec
17ac5e00d4 chore: reverse lerna version 2025-12-22 09:36:25 +01:00
Kamil Myśliwiec
de5e0262d2 chore(@nestjs) publish v11.1.10 release 2025-12-22 09:31:35 +01:00
renovate[bot]
f4ce374199 chore(deps): update dependency webpack to v5.104.1 2025-12-22 08:26:02 +00:00
Kamil Mysliwiec
d4c18df5ca Merge pull request #16106 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update dependency typescript-eslint to v8.50.0
2025-12-22 09:24:18 +01:00
Kamil Mysliwiec
62455a6977 Merge pull request #16108 from nestjs/dependabot/npm_and_yarn/sinon-21.0.1
chore(deps-dev): bump sinon from 21.0.0 to 21.0.1
2025-12-22 09:24:04 +01:00
Kamil Mysliwiec
4d15b38305 Merge pull request #16105 from nestjs/renovate/run-script-webpack-plugin-0.x
chore(deps): update dependency run-script-webpack-plugin to v0.2.3
2025-12-22 09:23:59 +01:00
dependabot[bot]
117f03a386 chore(deps-dev): bump sinon from 21.0.0 to 21.0.1
Bumps [sinon](https://github.com/sinonjs/sinon) from 21.0.0 to 21.0.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v21.0.0...v21.0.1)

---
updated-dependencies:
- dependency-name: sinon
  dependency-version: 21.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 00:02:06 +00:00
renovate[bot]
cf414108a0 chore(deps): update dependency typescript-eslint to v8.50.0 2025-12-21 18:27:46 +00:00
renovate[bot]
0672f38ec1 chore(deps): update dependency run-script-webpack-plugin to v0.2.3 2025-12-21 18:27:34 +00:00
Kamil Mysliwiec
548b43859b Merge pull request #16103 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.4
2025-12-21 19:26:03 +01:00
Kamil Mysliwiec
07124887af Merge pull request #16104 from nestjs/renovate/webpack-env-1.x
chore(deps): update dependency @types/webpack-env to v1.18.8
2025-12-21 19:25:53 +01:00
Kamil Mysliwiec
f58d86dcc4 Merge pull request #16100 from malkovitc/fix/file-type-validator-esm-error
fix(common): improve error handling in FileTypeValidator
2025-12-21 19:25:46 +01:00
renovate[bot]
1e438bc635 chore(deps): update dependency @types/webpack-env to v1.18.8 2025-12-21 17:24:12 +00:00
renovate[bot]
69fe953960 chore(deps): update dependency @types/node to v24.10.4 2025-12-21 17:24:08 +00:00
Kamil Mysliwiec
fd46a65dc8 Merge branch 'master' into fix/file-type-validator-esm-error 2025-12-21 18:24:01 +01:00
Kamil Mysliwiec
4da3e2ce0f Update packages/common/pipes/file/file-type.validator.ts 2025-12-21 18:23:23 +01:00
Kamil Mysliwiec
00bbb82903 Merge pull request #16078 from shash-hq/fix/hmr-esm-support
feat(sample): add hmr with esm example
2025-12-21 18:22:07 +01:00
Kamil Mysliwiec
cc2659aba1 Merge pull request #16060 from Jo-Minseok/feat/filevalidator-custom-message
feat(common): add message property to file type validator
2025-12-21 18:21:45 +01:00
Kamil Mysliwiec
2620db61b4 Merge pull request #16098 from mag123c/fix/static-nested-transient-instantiation
fix(core): instantiate nested transient providers in static context
2025-12-21 14:27:15 +01:00
mag123c
2c5221dac0 refactor(core): improve is-static method readability 2025-12-21 11:08:34 +09:00
Kamil Mysliwiec
7f1df6dc53 Merge pull request #16099 from nestjs/renovate/sinon-21.x
chore(deps): update dependency sinon to v21.0.1
2025-12-20 11:11:32 +01:00
mag123c
a4959fa5a7 test(core): nested transient chain instantiation 2025-12-20 16:16:18 +09:00
renovate[bot]
755978abee chore(deps): update dependency sinon to v21.0.1 2025-12-19 18:14:33 +00:00
mag123c
351f977b3d fix(core): instantiate nested transient providers in static context 2025-12-19 17:14:00 +09:00
Kamil Mysliwiec
8d4d0443b0 Merge pull request #16096 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.104.1
2025-12-19 09:04:49 +01:00
Kamil Mysliwiec
fb7173b10c Merge pull request #16093 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.0.2
2025-12-19 09:04:29 +01:00
renovate[bot]
878bbfdf30 chore(deps): update dependency webpack to v5.104.1 2025-12-18 14:59:40 +00:00
renovate[bot]
37a896c937 fix(deps): update dependency mongoose to v9.0.2 2025-12-18 12:18:15 +00:00
Kamil Mysliwiec
c1b498c14f Merge pull request #16092 from nestjs/renovate/prisma-monorepo
fix(deps): update prisma monorepo to v7.2.0
2025-12-18 13:16:55 +01:00
Kamil Mysliwiec
0de67810a6 Merge pull request #16094 from nestjs/dependabot/npm_and_yarn/mongoose-9.0.2
chore(deps-dev): bump mongoose from 9.0.1 to 9.0.2
2025-12-18 13:16:45 +01:00
Kamil Mysliwiec
a01807681d Merge pull request #16091 from som14062005/fix/sample-26-queues-flaky-test
Fixes flaky E2E test in sample 26-queues that occasionally fails with `ECONNRESET` error.
2025-12-18 13:16:37 +01:00
dependabot[bot]
56e35dfa85 chore(deps-dev): bump mongoose from 9.0.1 to 9.0.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 9.0.1 to 9.0.2.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/9.0.1...9.0.2)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-version: 9.0.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-18 00:01:50 +00:00
renovate[bot]
43fee9f875 fix(deps): update prisma monorepo to v7.2.0 2025-12-17 18:38:21 +00:00
som14062005
59edda49c9 fix: correct indentation 2025-12-17 19:21:34 +05:30
som14062005
91fc8a1d35 fix(sample): reduce concurrent requests in 26-queues E2E test 2025-12-17 19:01:06 +05:30
Kamil Mysliwiec
0df3f43466 Merge pull request #16089 from nestjs/renovate/mysql2-3.x
fix(deps): update dependency mysql2 to v3.16.0
2025-12-17 10:45:27 +01:00
Kamil Mysliwiec
c1af9663b4 Merge pull request #16086 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.104.0
2025-12-17 10:45:16 +01:00
Kamil Mysliwiec
0bb63559c3 Merge pull request #16087 from nestjs/dependabot/npm_and_yarn/mysql2-3.16.0
chore(deps-dev): bump mysql2 from 3.15.3 to 3.16.0
2025-12-17 10:45:04 +01:00
evgeniy.chernomortsev
c97b2ce4fe fix(common): improve error handling in FileTypeValidator
Add warning logs when file-type package fails to load due to ESM
import issues. This helps users debug issues when running tests
with Jest without --experimental-vm-modules flag.

When loading fails and fallbackToMimetype is enabled, the validator
now correctly falls back to mimetype comparison instead of silently
returning false.

Closes #15055
2025-12-17 13:40:37 +04:00
renovate[bot]
c0130ab899 fix(deps): update dependency mysql2 to v3.16.0 2025-12-17 00:03:46 +00:00
dependabot[bot]
4d3a079486 chore(deps-dev): bump mysql2 from 3.15.3 to 3.16.0
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.15.3 to 3.16.0.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.15.3...v3.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-17 00:01:38 +00:00
renovate[bot]
54aa85626d chore(deps): update dependency webpack to v5.104.0 2025-12-16 16:31:56 +00:00
Kamil Mysliwiec
da792d7c2b Merge pull request #16084 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.50.0
2025-12-16 09:50:26 +01:00
Kamil Mysliwiec
22c18fcd24 Merge pull request #16083 from nestjs/dependabot/npm_and_yarn/typescript-eslint/parser-8.50.0
chore(deps-dev): bump @typescript-eslint/parser from 8.49.0 to 8.50.0
2025-12-16 09:50:16 +01:00
renovate[bot]
eda2bbec2b chore(deps): update typescript-eslint monorepo to v8.50.0 2025-12-16 08:31:29 +00:00
dependabot[bot]
d44d76964a chore(deps-dev): bump @typescript-eslint/parser from 8.49.0 to 8.50.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.49.0 to 8.50.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.50.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-16 08:30:32 +00:00
Kamil Mysliwiec
17e38681e3 Merge pull request #16081 from nestjs/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-8.50.0
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.49.0 to 8.50.0
2025-12-16 09:29:01 +01:00
dependabot[bot]
f0d0adfdc5 chore(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.49.0 to 8.50.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.50.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-16 08:08:42 +00:00
Kamil Mysliwiec
347516b668 Merge pull request #16082 from nestjs/dependabot/npm_and_yarn/typescript-eslint-8.50.0
chore(deps-dev): bump typescript-eslint from 8.49.0 to 8.50.0
2025-12-16 09:07:18 +01:00
dependabot[bot]
82f4f5f858 chore(deps-dev): bump typescript-eslint from 8.49.0 to 8.50.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.49.0 to 8.50.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.50.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-16 00:02:35 +00:00
J_Coder
b6aa4a2311 test(common): add tests for dynamic custom error message 2025-12-16 02:56:38 +09:00
J_Coder
6c2f2bf254 feat(common): add error message factory function and shared context type 2025-12-16 02:53:59 +09:00
Kamil Mysliwiec
f3fb0c2c44 Merge pull request #16079 from liu-jin-yi/fix/issue-16050
fix: enhance ValidationPipe to prevent prototype pollution
2025-12-15 11:40:26 +01:00
Kamil Mysliwiec
43cde25ad0 Merge pull request #16080 from nestjs/renovate/redis-8.x
chore(deps): update redis docker tag to v8
2025-12-15 10:39:49 +01:00
Kamil Myśliwiec
61d728bfd6 style: address linter errors 2025-12-15 10:37:27 +01:00
renovate[bot]
3a5792b865 chore(deps): update redis docker tag to v8 2025-12-15 09:13:56 +00:00
Kamil Mysliwiec
a0d79d8528 Merge pull request #15721 from pythonjsgo/feat/sse-promise-support
feat(core): add Promise<Observable> support for SSE handlers
2025-12-15 10:12:00 +01:00
Kamil Mysliwiec
adff255d89 Merge pull request #16005 from malkovitc/fix/resolve-each-multiple-providers
fix(core): resolve all providers when using resolve() with each option
2025-12-15 10:11:24 +01:00
Kamil Mysliwiec
ae9cc02131 Merge pull request #16070 from som14062005/test/sample-26-queues
test(sample): add comprehensive tests for 26-queues sample
2025-12-15 10:09:58 +01:00
Kamil Mysliwiec
842be73825 Merge pull request #16068 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.4
2025-12-15 10:07:09 +01:00
Kamil Mysliwiec
4d57c214d5 Merge pull request #16072 from shash-hq/fix/grpc-observable-return
fix(microservices): fix grpc stream method return type
2025-12-15 10:06:51 +01:00
Kamil Mysliwiec
983668b202 Merge pull request #16077 from shash-hq/fix/file-type-validator-version
fix(common): resolve file-type path explicitly
2025-12-15 10:06:13 +01:00
renovate[bot]
170cecb837 chore(deps): update dependency @types/node to v24.10.4 2025-12-15 09:06:02 +00:00
Kamil Mysliwiec
10c603c7a6 Merge pull request #16073 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-13.2.3
chore(deps-dev): bump @nestjs/apollo from 13.2.1 to 13.2.3
2025-12-15 10:03:21 +01:00
liujinyi
c995f70f02 fix: enhance ValidationPipe to prevent prototype pollution by stripping 'constructor' and 'prototype' properties 2025-12-15 16:48:53 +08:00
shash-hq
def58e0581 fix(common): handle legacy node version in file validator 2025-12-15 11:11:04 +05:30
shash-hq
6a2636925d feat(sample): add hmr with esm example #14331 2025-12-15 10:29:58 +05:30
shash-hq
bd36c2832d fix(common): resolve file-type path explicitly #15270 2025-12-15 09:08:27 +05:30
dependabot[bot]
9ab2d71976 chore(deps-dev): bump @nestjs/apollo from 13.2.1 to 13.2.3
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 13.2.1 to 13.2.3.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v13.2.1...v13.2.3)

---
updated-dependencies:
- dependency-name: "@nestjs/apollo"
  dependency-version: 13.2.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 00:01:42 +00:00
shash-hq
541ef2ffef fix(microservices): fix grpc stream method return type
Ensure GrpcStreamMethod returns Observable directly instead of wrapping it in a Promise when called locally.

Closes #15953
2025-12-14 21:49:58 +05:30
som14062005
a189883ec8 refactor: add Redis service to CircleCI for E2E tests
- Added Redis container to samples job in CircleCI config
- Removed all mocking from E2E tests to use real Bull queue
- Updated app.module.ts to support environment-based Redis config
- Fixed test routes to match controller (POST /audio/transcode)
- Updated jest-e2e.json with proper timeout and exit settings
- Tests now perform true integration testing with real Redis
2025-12-14 18:13:27 +05:30
Kamil Mysliwiec
8c77a1955e Merge pull request #16069 from KAPUIST/test/core/silent-logger
test(core): Add tests for SilentLogger utility
2025-12-14 11:58:15 +01:00
som14062005
270f0a710f fix: correct E2E test structure and expectations 2025-12-14 13:01:13 +05:30
som14062005
4ca69c488e test: mock BullModule in E2E tests to avoid Redis dependency 2025-12-14 12:42:24 +05:30
som14062005
275ae436c0 fix: increase E2E test timeouts for CI environment 2025-12-14 12:19:08 +05:30
som14062005
dbaee717cb test(sample): add comprehensive tests for 26-queues sample
- Add unit tests for AudioController with 6 test cases
- Add unit tests for AudioProcessor with 8 test cases
- Add E2E tests for audio transcoding endpoint with 9 test cases
- Add Jest configuration for unit and E2E tests
- Update package.json test scripts
- Total: 23 passing tests

Relates to #1539
2025-12-14 10:55:29 +05:30
taegwon son
3cbf2818de test(core): Add tests for SilentLogger utility
- Verify SilentLogger extends Logger
- Test all logging methods (log, error, warn, debug, verbose, fatal)
- Test setLogLevels method
- All methods return undefined without side effects

Coverage: 30% → 100%
2025-12-14 11:31:36 +09:00
Kamil Mysliwiec
a989c6f136 Merge pull request #16066 from nestjs/renovate/nest-graphql-monorepo
fix(deps): update nest-graphql monorepo to v13.2.3
2025-12-13 21:08:33 +01:00
J_Coder
af671a15ed test(common): add tests for custom error message and deprecated message 2025-12-14 04:10:01 +09:00
J_Coder
f9b6026b12 refactor(common): deprecate message option and prefer error message 2025-12-14 04:04:32 +09:00
J_Coder
abe4efea62 refactor(common): rename message property to error message 2025-12-14 03:21:38 +09:00
renovate[bot]
32bbe2564a fix(deps): update nest-graphql monorepo to v13.2.3 2025-12-13 17:02:42 +00:00
Kamil Mysliwiec
d90e8dd004 Merge pull request #16062 from nestjs/renovate/eslint-monorepo
chore(deps): update eslint monorepo to v9.39.2
2025-12-13 18:00:28 +01:00
Kamil Mysliwiec
4e28b37286 Merge pull request #16061 from giorgikakauridze/refactor/log-level-evaluation
refactor(logging): optimize isLogLevelEnabled by replacing sort with single-pass max
2025-12-13 18:00:18 +01:00
giorgikakauridze
7dd7737c07 style(logging): apply prettier formatting 2025-12-13 15:22:07 +04:00
giorgikakauridze
5d089abe46 style(logging): apply prettier formatting 2025-12-13 15:07:54 +04:00
renovate[bot]
6398fa9525 chore(deps): update eslint monorepo to v9.39.2 2025-12-13 10:50:40 +00:00
Kamil Mysliwiec
a1df1c87ae Merge pull request #16063 from KAPUIST/test/express/get-body-parser-options
test(express): Add tests for getBodyParserOptions utility
2025-12-13 11:46:51 +01:00
Kamil Mysliwiec
b09718a24e Merge pull request #16064 from KAPUIST/test/common/streamable-file-full-coverage
test(common): Add missing tests for StreamableFile
2025-12-13 11:46:36 +01:00
Kamil Mysliwiec
17fcaf619c Merge pull request #16065 from KAPUIST/test/core/discoverable-meta-host-collection
test(core): Add tests for DiscoverableMetaHostCollection
2025-12-13 11:46:24 +01:00
Kamil Mysliwiec
f3aadbf5c2 Merge pull request #16055 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.14.3
chore(deps-dev): bump @grpc/grpc-js from 1.14.2 to 1.14.3
2025-12-13 11:46:06 +01:00
taegwon son
5ea3988a80 test(core): Add tests for DiscoverableMetaHostCollection
Improve test coverage for discoverable-meta-host-collection.ts
from 38.46% to 100% by adding comprehensive unit tests for:
- addClassMetaHostLink
- insertByMetaKey
- getProvidersByMetaKey / getControllersByMetaKey
- inspectProvider / inspectController
- useValue and useFactory provider scenarios
2025-12-13 16:57:31 +09:00
taegwon son
af7289e4f5 test(common): Add missing tests for StreamableFile
Add tests for:
- Default error logger behavior (logger.error invocation)
- Edge case when input is neither Uint8Array nor has pipe method

Coverage: 97.06% -> 100%
2025-12-13 16:33:27 +09:00
taegwon son
8f0840ad70 test(express): Add tests for getBodyParserOptions utility
Add comprehensive unit tests for the getBodyParserOptions utility function
including rawBodyParser verify callback coverage.

Coverage: 55.56% -> 100%
2025-12-13 16:16:30 +09:00
giorgikakauridze
e6d34f06b9 refactor(logging): optimize isLogLevelEnabled by replacing sort with single-pass max 2025-12-12 23:34:39 +04:00
J_Coder
2f26b30fd9 test(common): add unit tests for file type validator 2025-12-13 02:36:34 +09:00
J_Coder
8309ddc859 feat(common): add message property to file type validator 2025-12-13 01:52:20 +09:00
J_Coder
52d30f276f docs(common): add tsdoc to max file size validator properties 2025-12-13 01:52:07 +09:00
dependabot[bot]
e1b0993475 chore(deps-dev): bump @grpc/grpc-js from 1.14.2 to 1.14.3
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.14.2 to 1.14.3.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.14.2...@grpc/grpc-js@1.14.3)

---
updated-dependencies:
- dependency-name: "@grpc/grpc-js"
  dependency-version: 1.14.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-12 08:23:35 +00:00
Kamil Mysliwiec
845993d22a Merge pull request #16054 from nestjs/renovate/grpc-grpc-js-1.x
fix(deps): update dependency @grpc/grpc-js to v1.14.3
2025-12-12 09:22:11 +01:00
renovate[bot]
396ca69f10 fix(deps): update dependency @grpc/grpc-js to v1.14.3 2025-12-11 19:04:33 +00:00
Kamil Mysliwiec
b47ea7ee3c Merge pull request #16048 from KAPUIST/test/tree-node-coverage
test(core): Add comprehensive tests for TreeNode class
2025-12-11 13:01:47 +01:00
Kamil Mysliwiec
3817c50fd6 Merge pull request #16045 from nestjs/dependabot/npm_and_yarn/nestjs/mongoose-11.0.4
chore(deps-dev): bump @nestjs/mongoose from 11.0.3 to 11.0.4
2025-12-11 13:01:21 +01:00
taegwon son
e8df30cceb test(core): Add comprehensive tests for TreeNode class 2025-12-11 18:10:57 +09:00
dependabot[bot]
dea0651125 chore(deps-dev): bump @nestjs/mongoose from 11.0.3 to 11.0.4
Bumps [@nestjs/mongoose](https://github.com/nestjs/mongoose) from 11.0.3 to 11.0.4.
- [Release notes](https://github.com/nestjs/mongoose/releases)
- [Commits](https://github.com/nestjs/mongoose/compare/11.0.3...11.0.4)

---
updated-dependencies:
- dependency-name: "@nestjs/mongoose"
  dependency-version: 11.0.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-11 08:24:34 +00:00
Kamil Mysliwiec
ed0f6763da Merge pull request #16039 from nestjs/dependabot/npm_and_yarn/cache-manager-7.2.7
chore(deps-dev): bump cache-manager from 7.2.6 to 7.2.7
2025-12-11 09:23:09 +01:00
Kamil Mysliwiec
b37e896ade Merge pull request #16038 from nestjs/dependabot/npm_and_yarn/fastify/cors-11.2.0
chore(deps): bump @fastify/cors from 11.1.0 to 11.2.0
2025-12-11 09:23:01 +01:00
Kamil Mysliwiec
176e7256fa Merge pull request #16046 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.3
2025-12-11 09:22:53 +01:00
Kamil Mysliwiec
50609b7f3d Merge pull request #16043 from nestjs/renovate/nestjs-mongoose-11.x
fix(deps): update dependency @nestjs/mongoose to v11.0.4
2025-12-11 09:22:37 +01:00
Kamil Mysliwiec
ddd30e90ab Merge pull request #16047 from KAPUIST/test/streamable-file-coverage
test(common): Add missing tests for StreamableFile error handling
2025-12-11 09:22:31 +01:00
taegwon son
d4b527f9e7 test(common): Add missing tests for StreamableFile error handling 2025-12-11 14:48:02 +09:00
renovate[bot]
6f4cd7850a chore(deps): update dependency @types/node to v24.10.3 2025-12-11 00:03:52 +00:00
renovate[bot]
3aecb74e5a fix(deps): update dependency @nestjs/mongoose to v11.0.4 2025-12-10 15:57:05 +00:00
dependabot[bot]
077bc3ca78 chore(deps): bump @fastify/cors from 11.1.0 to 11.2.0
Bumps [@fastify/cors](https://github.com/fastify/fastify-cors) from 11.1.0 to 11.2.0.
- [Release notes](https://github.com/fastify/fastify-cors/releases)
- [Commits](https://github.com/fastify/fastify-cors/compare/v11.1.0...v11.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-10 09:38:02 +00:00
dependabot[bot]
ae7c7f5fb2 chore(deps-dev): bump cache-manager from 7.2.6 to 7.2.7
Bumps [cache-manager](https://github.com/jaredwray/cacheable/tree/HEAD/packages/cache-manager) from 7.2.6 to 7.2.7.
- [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-version: 7.2.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-10 09:37:59 +00:00
Kamil Mysliwiec
41b3041478 Merge pull request #16041 from nestjs/renovate/fastify-cors-11.x
fix(deps): update dependency @fastify/cors to v11.2.0
2025-12-10 10:36:39 +01:00
Kamil Mysliwiec
4b3213fa4d Merge pull request #16040 from nestjs/renovate/cache-manager-7.x
fix(deps): update dependency cache-manager to v7.2.7
2025-12-10 10:36:31 +01:00
renovate[bot]
d3b95ab42b fix(deps): update dependency @fastify/cors to v11.2.0 2025-12-10 00:03:42 +00:00
renovate[bot]
4389b69789 fix(deps): update dependency cache-manager to v7.2.7 2025-12-10 00:03:30 +00:00
evgeniy.chernomortsev
0b1a40df23 test(core): add integration test for resolve() with each option on default-scoped providers 2025-12-09 18:36:45 +04:00
Kamil Mysliwiec
350ccd9872 Merge pull request #16037 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.49.0
2025-12-09 14:26:48 +01:00
renovate[bot]
ebc0ddcba3 chore(deps): update typescript-eslint monorepo to v8.49.0 2025-12-09 12:02:14 +00:00
Kamil Mysliwiec
1ab4f479ff Merge pull request #16035 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.2
2025-12-09 12:58:03 +01:00
Kamil Mysliwiec
67b3db0d16 Merge pull request #16036 from nestjs/renovate/apollo-graphql-packages
fix(deps): update apollo graphql packages to v2.12.2
2025-12-09 12:57:58 +01:00
Kamil Mysliwiec
becc023160 Merge pull request #16031 from nestjs/dependabot/npm_and_yarn/typescript-eslint/parser-8.49.0
chore(deps-dev): bump @typescript-eslint/parser from 8.48.1 to 8.49.0
2025-12-09 12:57:22 +01:00
renovate[bot]
dff7c86470 fix(deps): update apollo graphql packages to v2.12.2 2025-12-09 08:10:24 +00:00
renovate[bot]
69bcef9481 chore(deps): update dependency @types/node to v24.10.2 2025-12-09 08:10:18 +00:00
dependabot[bot]
7f468c79df chore(deps-dev): bump @typescript-eslint/parser from 8.48.1 to 8.49.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.48.1 to 8.49.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.49.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.49.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-09 08:09:04 +00:00
Kamil Mysliwiec
309056e22a Merge pull request #16032 from nestjs/dependabot/npm_and_yarn/typescript-eslint-8.49.0
chore(deps-dev): bump typescript-eslint from 8.48.1 to 8.49.0
2025-12-09 09:07:32 +01:00
dependabot[bot]
07ab918a82 chore(deps-dev): bump typescript-eslint from 8.48.1 to 8.49.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.48.1 to 8.49.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.49.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.49.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-09 08:04:44 +00:00
Kamil Mysliwiec
b17893e80c Merge pull request #16033 from nestjs/dependabot/npm_and_yarn/types/node-24.10.2
chore(deps-dev): bump @types/node from 24.10.1 to 24.10.2
2025-12-09 09:03:28 +01:00
Kamil Mysliwiec
781ee34444 Merge pull request #16034 from nestjs/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-8.49.0
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.48.1 to 8.49.0
2025-12-09 09:03:18 +01:00
Kamil Mysliwiec
c607a25996 Merge pull request #16028 from nestjs/renovate/cache-manager-7.x
fix(deps): update dependency cache-manager to v7.2.6
2025-12-09 09:03:10 +01:00
dependabot[bot]
628f942153 chore(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.48.1 to 8.49.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.49.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.49.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-09 00:03:19 +00:00
dependabot[bot]
7835df84b3 chore(deps-dev): bump @types/node from 24.10.1 to 24.10.2
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.10.1 to 24.10.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.10.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-09 00:02:55 +00:00
Kamil Mysliwiec
296822c0d3 Merge pull request #16030 from nestjs/renovate/nestjs-schedule-6.x
fix(deps): update dependency @nestjs/schedule to v6.1.0
2025-12-08 13:06:32 +01:00
renovate[bot]
134b6bbc64 fix(deps): update dependency @nestjs/schedule to v6.1.0 2025-12-08 11:52:58 +00:00
renovate[bot]
a4477c3369 fix(deps): update dependency cache-manager to v7.2.6 2025-12-08 11:52:53 +00:00
Kamil Mysliwiec
f18114e450 Merge pull request #16025 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9.0.1
2025-12-08 12:51:15 +01:00
Kamil Mysliwiec
3cdf2e5e3f Merge pull request #16027 from nestjs/dependabot/npm_and_yarn/cache-manager-7.2.6
chore(deps-dev): bump cache-manager from 7.2.5 to 7.2.6
2025-12-08 12:51:08 +01:00
renovate[bot]
17f1854e5d fix(deps): update dependency mongoose to v9.0.1 2025-12-08 08:45:07 +00:00
dependabot[bot]
1e4c623104 chore(deps-dev): bump cache-manager from 7.2.5 to 7.2.6
Bumps [cache-manager](https://github.com/jaredwray/cacheable/tree/HEAD/packages/cache-manager) from 7.2.5 to 7.2.6.
- [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-version: 7.2.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 08:44:40 +00:00
Kamil Mysliwiec
60a6f9311e Merge pull request #16026 from nestjs/dependabot/npm_and_yarn/mongoose-9.0.1
chore(deps-dev): bump mongoose from 9.0.0 to 9.0.1
2025-12-08 09:43:22 +01:00
dependabot[bot]
04b3e7669d chore(deps-dev): bump mongoose from 9.0.0 to 9.0.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 9.0.0 to 9.0.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/9.0.0...9.0.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-version: 9.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 00:01:35 +00:00
Kamil Mysliwiec
8f80fed53f Merge pull request #15983 from nestjs/renovate/prettier-3.x
chore(deps): update dependency prettier to v3.7.4
2025-12-05 14:20:49 +01:00
renovate[bot]
a764a46f11 chore(deps): update dependency prettier to v3.7.4 2025-12-05 13:08:32 +00:00
Kamil Mysliwiec
e2fd92394c Merge pull request #15903 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.48.1
2025-12-05 14:04:08 +01:00
renovate[bot]
d0f3f9ba8b chore(deps): update typescript-eslint monorepo to v8.48.1 2025-12-05 12:37:45 +00:00
Kamil Myśliwiec
0c93692bc9 chore: update prettier 2025-12-05 13:35:27 +01:00
Kamil Myśliwiec
0430f3f190 chore: resolve conflicts 2025-12-05 13:31:11 +01:00
Kamil Myśliwiec
5045fea937 chore: update eslint monorepo 2025-12-05 13:29:23 +01:00
Kamil Mysliwiec
e33be81c60 Merge pull request #15975 from OlegStrokan/feat/keepalive-server-support
feat(microservices): add keepalive support for server side
2025-12-05 13:01:42 +01:00
Kamil Mysliwiec
3723412508 Merge pull request #15986 from mag123c/fix/shutdown-hooks-process-exit
feat(core): add option for async logger compatibility
2025-12-05 13:00:52 +01:00
Kamil Mysliwiec
7769180e92 Merge pull request #16013 from chenjieya/alvis-refactor-filetypevalidator-pipe
fix(common): Support fallbackToMimetype without buffer
2025-12-05 12:58:30 +01:00
Kamil Mysliwiec
46183524c8 Merge pull request #16023 from nestjs/renovate/nestjs-jwt-11.x
fix(deps): update dependency @nestjs/jwt to v11.0.2
2025-12-05 12:57:15 +01:00
renovate[bot]
ed4656c954 fix(deps): update dependency @nestjs/jwt to v11.0.2 2025-12-05 10:43:01 +00:00
Kamil Mysliwiec
c6fc175ee6 Merge pull request #16022 from nestjs/renovate/commitlint-monorepo
chore(deps): update commitlint monorepo to v20.2.0
2025-12-05 11:38:23 +01:00
renovate[bot]
f9e174bcc3 chore(deps): update commitlint monorepo to v20.2.0 2025-12-05 07:10:50 +00:00
Kamil Mysliwiec
2eb669f5c8 Merge pull request #16021 from nestjs/dependabot/npm_and_yarn/jws-3.2.3
chore(deps-dev): bump jws from 3.2.2 to 3.2.3
2025-12-04 21:13:40 +01:00
dependabot[bot]
c35f04ebba chore(deps-dev): bump jws from 3.2.2 to 3.2.3
Bumps [jws](https://github.com/brianloveswords/node-jws) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](https://github.com/brianloveswords/node-jws/compare/v3.2.2...v3.2.3)

---
updated-dependencies:
- dependency-name: jws
  dependency-version: 3.2.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-04 16:57:19 +00:00
Kamil Mysliwiec
2d7551cc1e Merge pull request #16018 from nestjs/renovate/confluentinc-cp-kafka-8.x
chore(deps): update confluentinc/cp-kafka docker tag to v8.1.1
2025-12-04 10:40:57 +01:00
Kamil Mysliwiec
67c1c98336 Merge pull request #16020 from nestjs/dependabot/npm_and_yarn/typeorm-0.3.28
chore(deps-dev): bump typeorm from 0.3.27 to 0.3.28
2025-12-04 10:40:52 +01:00
dependabot[bot]
44a81bb658 chore(deps-dev): bump typeorm from 0.3.27 to 0.3.28
Bumps [typeorm](https://github.com/typeorm/typeorm) from 0.3.27 to 0.3.28.
- [Release notes](https://github.com/typeorm/typeorm/releases)
- [Changelog](https://github.com/typeorm/typeorm/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typeorm/typeorm/compare/0.3.27...0.3.28)

---
updated-dependencies:
- dependency-name: typeorm
  dependency-version: 0.3.28
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-04 00:02:39 +00:00
renovate[bot]
1ddcd1cc5c chore(deps): update confluentinc/cp-kafka docker tag to v8.1.1 2025-12-03 15:35:58 +00:00
Kamil Mysliwiec
c719fd2b00 Merge pull request #16015 from nestjs/renovate/prisma-monorepo
fix(deps): update prisma monorepo to v7.1.0
2025-12-03 16:33:44 +01:00
Kamil Mysliwiec
7b4131f051 Merge pull request #16014 from nestjs/renovate/typeorm-0.x
fix(deps): update dependency typeorm to v0.3.28
2025-12-03 16:33:34 +01:00
Kamil Mysliwiec
64e8b06cac Merge pull request #16003 from nestjs/renovate/grpc-grpc-js-1.x
fix(deps): update dependency @grpc/grpc-js to v1.14.2
2025-12-03 15:01:52 +01:00
renovate[bot]
7a9e1fec2c fix(deps): update prisma monorepo to v7.1.0 2025-12-03 13:56:20 +00:00
renovate[bot]
62b2e34892 fix(deps): update dependency typeorm to v0.3.28 2025-12-03 13:55:28 +00:00
Kamil Mysliwiec
59dc7d645d Merge pull request #16004 from nestjs/dependabot/npm_and_yarn/validator-13.15.23
chore(deps): bump validator from 13.15.20 to 13.15.23
2025-12-03 14:52:44 +01:00
Alvis
a4590016c3 fix(common): Support fallbackToMimetype without buffer
Allow FileTypeValidator to validate files saved on disk where no buffer is available.
Use mimetype as a fallback when fallbackToMimetype=true and buffer is missing.
Preserves existing behavior when fallbackToMimetype is not enabled.
2025-12-03 21:23:21 +08:00
renovate[bot]
f0bdd6ca0d fix(deps): update dependency @grpc/grpc-js to v1.14.2 2025-12-03 08:18:29 +00:00
dependabot[bot]
8d495ae153 chore(deps): bump validator from 13.15.20 to 13.15.23
Bumps [validator](https://github.com/validatorjs/validator.js) from 13.15.20 to 13.15.23.
- [Release notes](https://github.com/validatorjs/validator.js/releases)
- [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/validatorjs/validator.js/compare/13.15.20...13.15.23)

---
updated-dependencies:
- dependency-name: validator
  dependency-version: 13.15.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-03 08:18:18 +00:00
Kamil Mysliwiec
6ec7e3be90 Merge pull request #16009 from nestjs/dependabot/npm_and_yarn/express-5.2.1
chore(deps): bump express from 5.2.0 to 5.2.1
2025-12-03 09:16:49 +01:00
Kamil Mysliwiec
7360a9a0a2 Merge pull request #16010 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.14.2
chore(deps-dev): bump @grpc/grpc-js from 1.14.1 to 1.14.2
2025-12-03 09:16:43 +01:00
dependabot[bot]
d07b048202 chore(deps-dev): bump @grpc/grpc-js from 1.14.1 to 1.14.2
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.14.1 to 1.14.2.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.14.1...@grpc/grpc-js@1.14.2)

---
updated-dependencies:
- dependency-name: "@grpc/grpc-js"
  dependency-version: 1.14.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-03 00:02:16 +00:00
dependabot[bot]
9b229a71c5 chore(deps): bump express from 5.2.0 to 5.2.1
Bumps [express](https://github.com/expressjs/express) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/v5.2.0...v5.2.1)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 5.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-03 00:01:35 +00:00
evgeniy.chernomortsev
acb1ae56d4 fix(core): resolve all providers when using resolve() with each option
When resolving multiple default-scoped providers registered under the same
token using `moduleRef.resolve(token, undefined, { each: true })`, the method
was returning the same instance repeated N times instead of all distinct
provider instances.

The issue was in `resolvePerContext` where for static dependency trees it
called `this.get()` which always returned the last registered provider,
ignoring the specific `instanceLink` being processed. Now it returns
`wrapperRef.instance` directly from each instance link.

Closes #15979
2025-12-03 01:40:33 +04:00
Kamil Mysliwiec
6b3c41aa49 Merge pull request #16002 from nestjs/renovate/express-5.x
fix(deps): update dependency express to v5.2.1
2025-12-02 12:04:20 +01:00
Kamil Mysliwiec
b6efef72c6 Merge pull request #15999 from nestjs/dependabot/npm_and_yarn/express-5.2.1
chore(deps): bump express from 5.1.0 to 5.2.1
2025-12-02 12:04:09 +01:00
renovate[bot]
cacc3e77f8 fix(deps): update dependency express to v5.2.1 2025-12-02 08:41:14 +00:00
dependabot[bot]
8913204d18 chore(deps): bump express from 5.1.0 to 5.2.1
Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.1.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.1)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 5.2.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 08:39:03 +00:00
Kamil Mysliwiec
d4b44e358c Merge pull request #15998 from nestjs/renovate/express-5.x
chore(deps): update dependency @types/express to v5.0.6
2025-12-02 09:37:31 +01:00
Kamil Mysliwiec
7eb04485f9 Merge pull request #16000 from nestjs/renovate/npm-express-vulnerability
fix(deps): update dependency express to v5.2.0 [security]
2025-12-02 09:36:46 +01:00
Kamil Mysliwiec
e8965fde23 Merge pull request #15997 from nestjs/renovate/ts-jest-29.x
chore(deps): update dependency ts-jest to v29.4.6
2025-12-02 09:36:35 +01:00
Kamil Mysliwiec
5a6846990f Merge pull request #16001 from nestjs/dependabot/npm_and_yarn/packages/platform-express/express-5.2.0
chore(deps): bump express from 5.1.0 to 5.2.0 in /packages/platform-express
2025-12-02 09:36:13 +01:00
dependabot[bot]
2703aadaa5 chore(deps): bump express in /packages/platform-express
Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 5.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 21:55:01 +00:00
renovate[bot]
729443674c chore(deps): update dependency @types/express to v5.0.6 2025-12-01 21:06:09 +00:00
renovate[bot]
5679c8d981 fix(deps): update dependency express to v5.2.0 [security] 2025-12-01 21:05:54 +00:00
renovate[bot]
64676895ad chore(deps): update dependency ts-jest to v29.4.6 2025-12-01 18:59:04 +00:00
Kamil Mysliwiec
37b310208e Merge pull request #15992 from nestjs/renovate/eslint-eslintrc-3.x
chore(deps): update dependency @eslint/eslintrc to v3.3.3
2025-12-01 09:18:57 +01:00
Kamil Mysliwiec
c840a7284f Merge pull request #15994 from nestjs/dependabot/npm_and_yarn/eslint/eslintrc-3.3.3
chore(deps-dev): bump @eslint/eslintrc from 3.3.1 to 3.3.3
2025-12-01 09:18:44 +01:00
Kamil Mysliwiec
979e97358c Merge pull request #15995 from nestjs/dependabot/npm_and_yarn/graphql-tools-9.0.25
chore(deps-dev): bump graphql-tools from 9.0.24 to 9.0.25
2025-12-01 09:18:19 +01:00
dependabot[bot]
a9d047ecf4 chore(deps-dev): bump graphql-tools from 9.0.24 to 9.0.25
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 9.0.24 to 9.0.25.
- [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.25/packages/graphql-tools)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 00:02:49 +00:00
dependabot[bot]
79cced8186 chore(deps-dev): bump @eslint/eslintrc from 3.3.1 to 3.3.3
Bumps [@eslint/eslintrc](https://github.com/eslint/eslintrc) from 3.3.1 to 3.3.3.
- [Release notes](https://github.com/eslint/eslintrc/releases)
- [Changelog](https://github.com/eslint/eslintrc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslintrc/compare/v3.3.1...eslintrc-v3.3.3)

---
updated-dependencies:
- dependency-name: "@eslint/eslintrc"
  dependency-version: 3.3.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 00:02:22 +00:00
renovate[bot]
125adff8e7 chore(deps): update dependency @eslint/eslintrc to v3.3.3 2025-11-30 10:46:32 +00:00
Kamil Mysliwiec
390c2b0335 Merge pull request #15987 from nestjs/renovate/graphql-tools-monorepo
fix(deps): update graphql-tools monorepo
2025-11-30 11:44:01 +01:00
Kamil Mysliwiec
9f6284b1be Merge pull request #15989 from nestjs/renovate/confluentinc-cp-zookeeper-7.x
chore(deps): update confluentinc/cp-zookeeper docker tag to v7.9.5
2025-11-30 11:41:49 +01:00
renovate[bot]
917818e30d chore(deps): update confluentinc/cp-zookeeper docker tag to v7.9.5 2025-11-28 17:03:47 +00:00
renovate[bot]
df8c379610 fix(deps): update graphql-tools monorepo 2025-11-28 14:40:23 +00:00
Kamil Mysliwiec
03eaea5fc6 Merge pull request #15985 from nestjs/renovate/nest-monorepo
chore(deps): update dependency @nestjs/cli to v11.0.14
2025-11-28 15:38:03 +01:00
mag123c
b64aef5d69 fix(core): add option for async logger compatibility 2025-11-28 22:52:38 +09:00
renovate[bot]
3a4969c456 chore(deps): update dependency @nestjs/cli to v11.0.14 2025-11-28 08:58:31 +00:00
Kamil Mysliwiec
d76e9b446a Merge pull request #15982 from nestjs/renovate/nest-monorepo
chore(deps): update dependency @nestjs/cli to v11.0.13
2025-11-28 09:07:36 +01:00
Kamil Mysliwiec
9df4ac38ec Merge pull request #15984 from mag123c/fix/sample-22-prisma7-compatibility
sample(sample/22): fix Prisma 7 compatibility
2025-11-28 09:07:24 +01:00
mag123c
218075e4b6 sample(sample/22): fix Prisma 7 compatibility 2025-11-28 09:43:23 +09:00
renovate[bot]
9e0c706dd9 chore(deps): update dependency @nestjs/cli to v11.0.13 2025-11-28 00:03:47 +00:00
Kamil Mysliwiec
3a5b5e1f0a Merge pull request #15973 from nestjs/renovate/npm-body-parser-vulnerability
chore(deps): update dependency body-parser to v2.2.1 [security]
2025-11-27 10:32:26 +01:00
Kamil Mysliwiec
1fea63cf6c Merge pull request #15963 from nestjs/renovate/mongoose-9.x
fix(deps): update dependency mongoose to v9
2025-11-27 10:32:06 +01:00
Kamil Mysliwiec
7aad0f4a4d Merge pull request #15968 from nestjs/renovate/class-validator-0.x
fix(deps): update dependency class-validator to v0.14.3
2025-11-27 10:31:56 +01:00
Kamil Mysliwiec
142963efb7 Merge pull request #15964 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency @apollo/server to v5.2.0
2025-11-27 10:31:22 +01:00
Kamil Mysliwiec
ef5a8b7c63 Merge pull request #15970 from nestjs/dependabot/npm_and_yarn/body-parser-2.2.1
chore(deps-dev): bump body-parser from 2.2.0 to 2.2.1
2025-11-27 10:31:15 +01:00
Kamil Mysliwiec
74d89a092a Merge pull request #15972 from nestjs/dependabot/npm_and_yarn/class-validator-0.14.3
chore(deps): bump class-validator from 0.14.2 to 0.14.3
2025-11-27 10:31:07 +01:00
Kamil Mysliwiec
b6dd43fe73 Merge pull request #15974 from nestjs/renovate/prisma-monorepo
fix(deps): update dependency @prisma/client to v7.0.1
2025-11-27 10:31:02 +01:00
Oleh Strokan
62242bcab9 feat(microservices): add keepalive support for server side 2025-11-25 20:04:36 +01:00
renovate[bot]
e56b9157de fix(deps): update dependency @prisma/client to v7.0.1 2025-11-25 18:43:50 +00:00
renovate[bot]
b5db102875 chore(deps): update dependency body-parser to v2.2.1 [security] 2025-11-25 18:43:43 +00:00
dependabot[bot]
74f6b71daf chore(deps): bump class-validator from 0.14.2 to 0.14.3
Bumps [class-validator](https://github.com/typestack/class-validator) from 0.14.2 to 0.14.3.
- [Release notes](https://github.com/typestack/class-validator/releases)
- [Changelog](https://github.com/typestack/class-validator/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/typestack/class-validator/compare/v0.14.2...v0.14.3)

---
updated-dependencies:
- dependency-name: class-validator
  dependency-version: 0.14.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-25 00:13:56 +00:00
dependabot[bot]
1f93504c18 chore(deps-dev): bump body-parser from 2.2.0 to 2.2.1
Bumps [body-parser](https://github.com/expressjs/body-parser) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-version: 2.2.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-25 00:12:21 +00:00
renovate[bot]
9b1e97153a fix(deps): update dependency class-validator to v0.14.3 2025-11-24 13:14:35 +00:00
renovate[bot]
f3db5c769b fix(deps): update dependency mongoose to v9 2025-11-24 09:33:25 +00:00
renovate[bot]
c84115754f fix(deps): update dependency @apollo/server to v5.2.0 2025-11-24 09:33:20 +00:00
Kamil Mysliwiec
ebe6c9549b Merge pull request #15966 from nestjs/dependabot/npm_and_yarn/mongoose-9.0.0
chore(deps-dev): bump mongoose from 8.20.1 to 9.0.0
2025-11-24 10:31:10 +01:00
Kamil Mysliwiec
49d9ac8f3a Merge pull request #15967 from nestjs/dependabot/npm_and_yarn/apollo/server-5.2.0
chore(deps-dev): bump @apollo/server from 5.1.0 to 5.2.0
2025-11-24 10:31:01 +01:00
dependabot[bot]
9d56bc91d3 chore(deps-dev): bump @apollo/server from 5.1.0 to 5.2.0
Bumps [@apollo/server](https://github.com/apollographql/apollo-server/tree/HEAD/packages/server) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/packages/server/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/@apollo/server@5.2.0/packages/server)

---
updated-dependencies:
- dependency-name: "@apollo/server"
  dependency-version: 5.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 00:02:43 +00:00
dependabot[bot]
c5dd73bd90 chore(deps-dev): bump mongoose from 8.20.1 to 9.0.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.20.1 to 9.0.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.20.1...9.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 00:02:11 +00:00
Kamil Mysliwiec
8f3d51f8d5 Merge pull request #15959 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.20.1
2025-11-21 08:37:01 +01:00
Kamil Mysliwiec
432dfb37d8 Merge pull request #15954 from nestjs/renovate/redis-5.x
chore(deps): update dependency redis to v5.10.0
2025-11-21 08:36:51 +01:00
Kamil Mysliwiec
6177fe5c8c Merge pull request #15957 from nestjs/dependabot/npm_and_yarn/mongoose-8.20.1
chore(deps-dev): bump mongoose from 8.20.0 to 8.20.1
2025-11-21 08:36:43 +01:00
Kamil Mysliwiec
27a970a70a Merge pull request #15955 from nestjs/renovate/actions-checkout-6.x
chore(deps): update actions/checkout action to v6
2025-11-21 08:36:35 +01:00
Kamil Mysliwiec
5d71b02811 Merge pull request #15958 from nestjs/dependabot/npm_and_yarn/http-errors-2.0.1
chore(deps-dev): bump http-errors from 2.0.0 to 2.0.1
2025-11-21 08:36:25 +01:00
renovate[bot]
4838d857dc fix(deps): update dependency mongoose to v8.20.1 2025-11-21 00:02:52 +00:00
dependabot[bot]
307333fcae chore(deps-dev): bump http-errors from 2.0.0 to 2.0.1
Bumps [http-errors](https://github.com/jshttp/http-errors) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/jshttp/http-errors/releases)
- [Changelog](https://github.com/jshttp/http-errors/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/http-errors/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: http-errors
  dependency-version: 2.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-21 00:02:04 +00:00
dependabot[bot]
ed2d6c7930 chore(deps-dev): bump mongoose from 8.20.0 to 8.20.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.20.0 to 8.20.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.20.0...8.20.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-version: 8.20.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-21 00:01:43 +00:00
renovate[bot]
6a5fe199e2 chore(deps): update dependency redis to v5.10.0 2025-11-20 19:02:58 +00:00
renovate[bot]
3590b7074a chore(deps): update actions/checkout action to v6 2025-11-20 19:00:41 +00:00
Kamil Mysliwiec
34956f1ff9 Merge pull request #15952 from nestjs/renovate/eventsource-4.x
chore(deps): update dependency eventsource to v4.1.0
2025-11-20 19:59:34 +01:00
Kamil Mysliwiec
c66213038d Merge pull request #15951 from nestjs/dependabot/npm_and_yarn/lint-staged-16.2.7
chore(deps-dev): bump lint-staged from 16.2.6 to 16.2.7
2025-11-20 19:59:25 +01:00
Kamil Mysliwiec
cd52be8da7 Merge pull request #15946 from nestjs/renovate/lint-staged-16.x
chore(deps): update dependency lint-staged to v16.2.7
2025-11-20 19:59:09 +01:00
Kamil Mysliwiec
c023903b4b Merge pull request #15944 from nestjs/renovate/major-prisma-monorepo
fix(deps): update prisma monorepo to v7 (major)
2025-11-20 19:59:00 +01:00
Kamil Mysliwiec
bca902f7f2 Merge pull request #15945 from nestjs/renovate/rimraf-6.x
fix(deps): update dependency rimraf to v6.1.2
2025-11-20 19:58:49 +01:00
Kamil Mysliwiec
07028359fa Merge pull request #15947 from nestjs/renovate/file-type-21.x
fix(deps): update dependency file-type to v21.1.1
2025-11-20 19:58:40 +01:00
Kamil Mysliwiec
f57d338b98 Merge pull request #15948 from nestjs/dependabot/npm_and_yarn/file-type-21.1.1
chore(deps): bump file-type from 21.1.0 to 21.1.1
2025-11-20 19:58:20 +01:00
Kamil Mysliwiec
4750253015 Merge pull request #15949 from nestjs/dependabot/npm_and_yarn/eventsource-4.1.0
chore(deps-dev): bump eventsource from 4.0.0 to 4.1.0
2025-11-20 19:58:16 +01:00
Kamil Mysliwiec
58c4ab55ad Merge pull request #15950 from nestjs/dependabot/npm_and_yarn/redis-5.10.0
chore(deps-dev): bump redis from 5.9.0 to 5.10.0
2025-11-20 19:58:09 +01:00
Kamil Mysliwiec
58be7c0b5f Merge pull request #15941 from nestjs/renovate/nest-monorepo
chore(deps): update dependency @nestjs/cli to v11.0.12
2025-11-20 19:58:02 +01:00
renovate[bot]
47efdda454 chore(deps): update dependency eventsource to v4.1.0 2025-11-20 11:37:47 +00:00
dependabot[bot]
24c776b1e9 chore(deps-dev): bump lint-staged from 16.2.6 to 16.2.7
Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 16.2.6 to 16.2.7.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v16.2.6...v16.2.7)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-version: 16.2.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-20 00:03:15 +00:00
dependabot[bot]
4eaa532f0d chore(deps-dev): bump redis from 5.9.0 to 5.10.0
Bumps [redis](https://github.com/redis/node-redis) from 5.9.0 to 5.10.0.
- [Release notes](https://github.com/redis/node-redis/releases)
- [Changelog](https://github.com/redis/node-redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/node-redis/compare/redis@5.9.0...redis@5.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-20 00:02:49 +00:00
dependabot[bot]
0d5c88ea84 chore(deps-dev): bump eventsource from 4.0.0 to 4.1.0
Bumps [eventsource](https://github.com/EventSource/eventsource) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/main/CHANGELOG.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v4.0.0...v4.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-20 00:02:07 +00:00
dependabot[bot]
ada33a1578 chore(deps): bump file-type from 21.1.0 to 21.1.1
Bumps [file-type](https://github.com/sindresorhus/file-type) from 21.1.0 to 21.1.1.
- [Release notes](https://github.com/sindresorhus/file-type/releases)
- [Commits](https://github.com/sindresorhus/file-type/compare/v21.1.0...v21.1.1)

---
updated-dependencies:
- dependency-name: file-type
  dependency-version: 21.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-20 00:01:36 +00:00
renovate[bot]
9732ea35ac fix(deps): update dependency file-type to v21.1.1 2025-11-19 21:42:19 +00:00
renovate[bot]
566c510c78 chore(deps): update dependency lint-staged to v16.2.7 2025-11-19 21:42:07 +00:00
renovate[bot]
413d58e5b1 fix(deps): update dependency rimraf to v6.1.2 2025-11-19 16:42:49 +00:00
renovate[bot]
46f34f9f22 fix(deps): update prisma monorepo to v7 2025-11-19 12:47:31 +00:00
renovate[bot]
2874455ba7 chore(deps): update dependency @nestjs/cli to v11.0.12 2025-11-19 12:47:26 +00:00
Kamil Mysliwiec
65ce61ddd0 Merge pull request #15942 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.103.0
2025-11-19 09:52:16 +01:00
Kamil Mysliwiec
5c3c50754e Merge pull request #15940 from nestjs/dependabot/npm_and_yarn/core-js-3.47.0
chore(deps-dev): bump core-js from 3.46.0 to 3.47.0
2025-11-19 09:52:04 +01:00
renovate[bot]
2c1217a2cf chore(deps): update dependency webpack to v5.103.0 2025-11-19 08:50:33 +00:00
Kamil Mysliwiec
dda4c4c334 Merge pull request #15939 from nestjs/dependabot/npm_and_yarn/artillery-2.0.27
chore(deps-dev): bump artillery from 2.0.26 to 2.0.27
2025-11-19 09:49:09 +01:00
dependabot[bot]
9bc0564ca8 chore(deps-dev): bump core-js from 3.46.0 to 3.47.0
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.46.0 to 3.47.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.47.0/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-version: 3.47.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-19 00:02:16 +00:00
dependabot[bot]
e88aa1adba chore(deps-dev): bump artillery from 2.0.26 to 2.0.27
Bumps [artillery](https://github.com/artilleryio/artillery) from 2.0.26 to 2.0.27.
- [Release notes](https://github.com/artilleryio/artillery/releases)
- [Commits](https://github.com/artilleryio/artillery/compare/artillery-2.0.26...artillery-2.0.27)

---
updated-dependencies:
- dependency-name: artillery
  dependency-version: 2.0.27
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-19 00:01:46 +00:00
Kamil Mysliwiec
b9060c9f71 Merge pull request #15932 from nestjs/dependabot/npm_and_yarn/multi-75e6bc5210
chore(deps): bump js-yaml
2025-11-18 18:24:42 +01:00
Kamil Mysliwiec
caaf66f273 Merge pull request #15933 from nestjs/renovate/nestjs-swagger-11.x
fix(deps): update dependency @nestjs/swagger to v11.2.3
2025-11-18 11:08:00 +01:00
renovate[bot]
386c1b1a82 fix(deps): update dependency @nestjs/swagger to v11.2.3 2025-11-18 10:01:00 +00:00
dependabot[bot]
de6eace57a chore(deps): bump js-yaml
Bumps  and [js-yaml](https://github.com/nodeca/js-yaml). These dependencies needed to be updated together.

Updates `js-yaml` from 3.14.1 to 3.14.2
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...3.14.2)

Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-18 10:00:21 +00:00
Kamil Mysliwiec
d7199f4abe Merge pull request #15927 from nestjs/dependabot/npm_and_yarn/types/sinon-21.0.0
chore(deps-dev): bump @types/sinon from 20.0.0 to 21.0.0
2025-11-18 10:59:45 +01:00
Kamil Mysliwiec
d7e856b60a Merge pull request #15930 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.20.0
2025-11-18 10:59:29 +01:00
Kamil Mysliwiec
a08e1a762c Merge pull request #15931 from nestjs/renovate/sinon-21.x
chore(deps): update dependency @types/sinon to v21
2025-11-18 10:59:18 +01:00
Kamil Mysliwiec
69ae8d1ac1 Merge pull request #15929 from nestjs/dependabot/npm_and_yarn/mongoose-8.20.0
chore(deps-dev): bump mongoose from 8.19.4 to 8.20.0
2025-11-18 10:59:07 +01:00
Kamil Mysliwiec
9457ce029e Merge pull request #15922 from nestjs/renovate/cache-manager-7.x
fix(deps): update dependency cache-manager to v7.2.5
2025-11-18 10:58:57 +01:00
renovate[bot]
dd34b6744b chore(deps): update dependency @types/sinon to v21 2025-11-18 00:04:42 +00:00
renovate[bot]
2b551108c3 fix(deps): update dependency mongoose to v8.20.0 2025-11-18 00:04:30 +00:00
dependabot[bot]
dd2385976e chore(deps-dev): bump mongoose from 8.19.4 to 8.20.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.19.4 to 8.20.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.19.4...8.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-18 00:02:47 +00:00
dependabot[bot]
71c8fbe2ef chore(deps-dev): bump @types/sinon from 20.0.0 to 21.0.0
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 20.0.0 to 21.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

---
updated-dependencies:
- dependency-name: "@types/sinon"
  dependency-version: 21.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-18 00:01:48 +00:00
renovate[bot]
599dc58918 fix(deps): update dependency cache-manager to v7.2.5 2025-11-17 08:42:36 +00:00
Kamil Mysliwiec
56588bcfab Merge pull request #15924 from nestjs/dependabot/npm_and_yarn/mongoose-8.19.4
chore(deps-dev): bump mongoose from 8.19.3 to 8.19.4
2025-11-17 09:40:29 +01:00
Kamil Mysliwiec
cdb53246e3 Merge pull request #15925 from nestjs/dependabot/npm_and_yarn/cache-manager-7.2.5
chore(deps-dev): bump cache-manager from 7.2.4 to 7.2.5
2025-11-17 09:40:12 +01:00
Kamil Mysliwiec
f7749bdd3e Merge pull request #15921 from nestjs/renovate/nestjs-swagger-11.x
fix(deps): update dependency @nestjs/swagger to v11.2.2
2025-11-17 09:39:53 +01:00
dependabot[bot]
a61419db2f chore(deps-dev): bump cache-manager from 7.2.4 to 7.2.5
Bumps [cache-manager](https://github.com/jaredwray/cacheable/tree/HEAD/packages/cache-manager) from 7.2.4 to 7.2.5.
- [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-version: 7.2.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 00:03:04 +00:00
dependabot[bot]
6083893543 chore(deps-dev): bump mongoose from 8.19.3 to 8.19.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.19.3 to 8.19.4.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.19.3...8.19.4)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-version: 8.19.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 00:02:47 +00:00
renovate[bot]
02a6f2b661 fix(deps): update dependency @nestjs/swagger to v11.2.2 2025-11-16 16:49:33 +00:00
Kamil Mysliwiec
88b3ce7d71 Merge pull request #15920 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.19.4
2025-11-16 17:46:59 +01:00
renovate[bot]
b180c89ec7 fix(deps): update dependency mongoose to v8.19.4 2025-11-16 14:49:37 +00:00
Kamil Mysliwiec
202c16ce01 Merge pull request #15918 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.1.9
2025-11-16 15:46:44 +01:00
renovate[bot]
cf76d42803 fix(deps): update nest monorepo to v11.1.9 2025-11-14 20:16:41 +00:00
Kamil Myśliwiec
64c85527f5 chore(@nestjs) publish v11.1.9 release 2025-11-14 11:18:00 +01:00
Kamil Mysliwiec
5170e60a20 Merge pull request #15865 from JoeNutt/fix/core-implicit-request-scope-get-throws
fix(core): make get() throw for implicitly request-scoped trees
2025-11-14 11:17:15 +01:00
Kamil Mysliwiec
26f8f5a5e0 Merge pull request #15863 from TomerSteinberg/TomerSteinberg-feat/sse-method-options
feat(common): add method options to @sse decorator
2025-11-14 11:16:43 +01:00
Kamil Mysliwiec
3c156f2c53 Merge pull request #15916 from nestjs/renovate/apollo-graphql-packages
fix(deps): update apollo graphql packages to v2.12.1
2025-11-13 20:48:01 +01:00
Kamil Mysliwiec
03f521581d Merge pull request #15917 from nestjs/renovate/mercurius-16.x
fix(deps): update dependency mercurius to v16.6.0
2025-11-13 20:47:50 +01:00
renovate[bot]
62d221bc3b fix(deps): update dependency mercurius to v16.6.0 2025-11-13 18:49:02 +00:00
renovate[bot]
9a5d67e277 fix(deps): update apollo graphql packages to v2.12.1 2025-11-13 18:48:54 +00:00
Kamil Mysliwiec
44ccfd5219 Merge pull request #15911 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.1
2025-11-13 09:25:36 +01:00
Kamil Mysliwiec
fdac37d975 Merge pull request #15915 from nestjs/dependabot/npm_and_yarn/types/sinon-20.0.0
chore(deps-dev): bump @types/sinon from 17.0.4 to 20.0.0
2025-11-13 09:23:11 +01:00
dependabot[bot]
63ca3d42df chore(deps-dev): bump @types/sinon from 17.0.4 to 20.0.0
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 17.0.4 to 20.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

---
updated-dependencies:
- dependency-name: "@types/sinon"
  dependency-version: 20.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-13 00:02:33 +00:00
renovate[bot]
191d91b2d8 chore(deps): update dependency @types/node to v24.10.1 2025-11-12 17:03:29 +00:00
Kamil Mysliwiec
668b7adac9 Merge pull request #15912 from nestjs/renovate/graphql-tools-monorepo
fix(deps): update graphql-tools monorepo
2025-11-12 18:01:33 +01:00
Kamil Mysliwiec
5c1b93b137 Merge pull request #15891 from nestjs/renovate/grpc-grpc-js-1.x
fix(deps): update dependency @grpc/grpc-js to v1.14.1
2025-11-12 18:01:22 +01:00
Kamil Mysliwiec
7298f56cb1 Merge pull request #15905 from nestjs/renovate/nodemon-3.x
chore(deps): update dependency nodemon to v3.1.11
2025-11-12 18:01:11 +01:00
renovate[bot]
7afb53f899 fix(deps): update dependency @grpc/grpc-js to v1.14.1 2025-11-12 12:38:29 +00:00
renovate[bot]
04621d8480 chore(deps): update dependency nodemon to v3.1.11 2025-11-12 12:37:57 +00:00
renovate[bot]
542ba807c8 fix(deps): update graphql-tools monorepo 2025-11-12 12:35:38 +00:00
Kamil Mysliwiec
aa31a88e3e Merge pull request #15904 from nestjs/renovate/file-type-21.x
fix(deps): update dependency file-type to v21.1.0
2025-11-12 13:34:22 +01:00
Kamil Mysliwiec
0aced6f5c4 Merge pull request #15899 from nestjs/dependabot/npm_and_yarn/fastify-5.6.2
chore(deps): bump fastify from 5.6.1 to 5.6.2
2025-11-12 13:34:15 +01:00
Kamil Mysliwiec
cfec76cb7b Merge pull request #15898 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.14.1
chore(deps-dev): bump @grpc/grpc-js from 1.14.0 to 1.14.1
2025-11-12 13:34:07 +01:00
Kamil Mysliwiec
3009d21be1 Merge pull request #15901 from nestjs/dependabot/npm_and_yarn/file-type-21.1.0
chore(deps): bump file-type from 21.0.0 to 21.1.0
2025-11-12 13:33:47 +01:00
Kamil Mysliwiec
da9c3181a7 Merge pull request #15907 from nestjs/dependabot/npm_and_yarn/graphql-tools-9.0.23
chore(deps-dev): bump graphql-tools from 9.0.22 to 9.0.23
2025-11-12 13:33:41 +01:00
Kamil Mysliwiec
96332c7cd0 Merge pull request #15908 from nestjs/dependabot/npm_and_yarn/types/node-24.10.1
chore(deps-dev): bump @types/node from 24.10.0 to 24.10.1
2025-11-12 13:33:34 +01:00
Kamil Mysliwiec
94f95ae03b Merge pull request #15909 from nestjs/dependabot/npm_and_yarn/nodemon-3.1.11
chore(deps-dev): bump nodemon from 3.1.10 to 3.1.11
2025-11-12 13:32:59 +01:00
dependabot[bot]
49b4b86b02 chore(deps-dev): bump nodemon from 3.1.10 to 3.1.11
Bumps [nodemon](https://github.com/remy/nodemon) from 3.1.10 to 3.1.11.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](https://github.com/remy/nodemon/compare/v3.1.10...v3.1.11)

---
updated-dependencies:
- dependency-name: nodemon
  dependency-version: 3.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-12 00:03:12 +00:00
dependabot[bot]
4b61917926 chore(deps-dev): bump @types/node from 24.10.0 to 24.10.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.10.0 to 24.10.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.10.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-12 00:02:54 +00:00
dependabot[bot]
3741ee3baf chore(deps-dev): bump graphql-tools from 9.0.22 to 9.0.23
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 9.0.22 to 9.0.23.
- [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.23/packages/graphql-tools)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-12 00:01:48 +00:00
renovate[bot]
4e94250485 fix(deps): update dependency file-type to v21.1.0 2025-11-11 00:13:51 +00:00
dependabot[bot]
4c268d75f1 chore(deps): bump file-type from 21.0.0 to 21.1.0
Bumps [file-type](https://github.com/sindresorhus/file-type) from 21.0.0 to 21.1.0.
- [Release notes](https://github.com/sindresorhus/file-type/releases)
- [Commits](https://github.com/sindresorhus/file-type/compare/v21.0.0...v21.1.0)

---
updated-dependencies:
- dependency-name: file-type
  dependency-version: 21.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-11 00:10:43 +00:00
dependabot[bot]
276bd7c1e5 chore(deps): bump fastify from 5.6.1 to 5.6.2
Bumps [fastify](https://github.com/fastify/fastify) from 5.6.1 to 5.6.2.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v5.6.1...v5.6.2)

---
updated-dependencies:
- dependency-name: fastify
  dependency-version: 5.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 00:02:10 +00:00
dependabot[bot]
e8ce855cec chore(deps-dev): bump @grpc/grpc-js from 1.14.0 to 1.14.1
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.14.0 to 1.14.1.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.14.0...@grpc/grpc-js@1.14.1)

---
updated-dependencies:
- dependency-name: "@grpc/grpc-js"
  dependency-version: 1.14.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 00:01:49 +00:00
Kamil Mysliwiec
dbdf0dc27f Merge pull request #15893 from dev-rhynel/patch-2
Update target attribute for Nest logo link
2025-11-09 13:37:30 +01:00
Rhynel Algopera
d64cef2598 Update target attribute for Nest logo link 2025-11-09 02:54:21 +08:00
Kamil Mysliwiec
7b5a8cc2e6 Merge pull request #15889 from WuMingDao/patch-1
Fix: grammar issue in readme.md
2025-11-07 09:41:48 +01:00
WuMingDao
45952ef7c4 Fix: grammar issue in readme.md 2025-11-07 16:11:33 +08:00
Kamil Mysliwiec
fcb92faac8 Merge pull request #15888 from nestjs/renovate/mongodb-7.x
fix(deps): update dependency mongodb to v7
2025-11-06 21:53:53 +01:00
renovate[bot]
3bd0ea8979 fix(deps): update dependency mongodb to v7 2025-11-06 17:54:07 +00:00
Kamil Mysliwiec
24bcf18d3f Add new sponsor logo for Pandektes 2025-11-06 10:00:33 +01:00
Kamil Mysliwiec
da603dffdf Update Readme.md 2025-11-06 09:59:32 +01:00
Kamil Mysliwiec
db2d283eb7 Merge pull request #15885 from nestjs/dependabot/npm_and_yarn/graphql-tools-9.0.22
chore(deps-dev): bump graphql-tools from 9.0.21 to 9.0.22
2025-11-06 09:51:02 +01:00
Kamil Mysliwiec
79436a22a9 Merge pull request #15886 from nestjs/dependabot/npm_and_yarn/mocha-11.7.5
chore(deps-dev): bump mocha from 11.7.4 to 11.7.5
2025-11-06 09:50:44 +01:00
Kamil Mysliwiec
e2989ccce8 Merge pull request #15887 from nestjs/dependabot/npm_and_yarn/mongoose-8.19.3
chore(deps-dev): bump mongoose from 8.19.2 to 8.19.3
2025-11-06 09:50:35 +01:00
Kamil Mysliwiec
265332812d Merge pull request #15884 from nestjs/renovate/prisma-monorepo
fix(deps): update dependency @prisma/client to v6.19.0
2025-11-06 09:49:52 +01:00
dependabot[bot]
dd36e474f7 chore(deps-dev): bump mongoose from 8.19.2 to 8.19.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.19.2 to 8.19.3.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.19.2...8.19.3)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-version: 8.19.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-06 00:04:08 +00:00
dependabot[bot]
d03978e402 chore(deps-dev): bump mocha from 11.7.4 to 11.7.5
Bumps [mocha](https://github.com/mochajs/mocha) from 11.7.4 to 11.7.5.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/v11.7.5/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v11.7.4...v11.7.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-06 00:03:13 +00:00
dependabot[bot]
fc0cfa567c chore(deps-dev): bump graphql-tools from 9.0.21 to 9.0.22
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 9.0.21 to 9.0.22.
- [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.22/packages/graphql-tools)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-06 00:02:52 +00:00
renovate[bot]
930c30520e fix(deps): update dependency @prisma/client to v6.19.0 2025-11-05 17:44:05 +00:00
Kamil Mysliwiec
85c967c6ac Merge pull request #15879 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.19.3
2025-11-05 11:52:12 +01:00
Kamil Mysliwiec
616c04ddfb Merge pull request #15867 from nestjs/renovate/eslint-monorepo
chore(deps): update eslint monorepo to v9.39.1
2025-11-05 11:52:02 +01:00
renovate[bot]
c597248026 chore(deps): update eslint monorepo to v9.39.1 2025-11-05 09:14:10 +00:00
renovate[bot]
6fbcc1c0a4 fix(deps): update dependency mongoose to v8.19.3 2025-11-05 09:13:52 +00:00
Kamil Mysliwiec
4e4c488612 Merge pull request #15880 from nestjs/renovate/graphql-tools-monorepo
fix(deps): update graphql-tools monorepo
2025-11-05 10:11:47 +01:00
Kamil Mysliwiec
42ec514ad8 Merge pull request #15882 from nestjs/renovate/mocha-11.x
chore(deps): update dependency mocha to v11.7.5
2025-11-05 10:11:28 +01:00
renovate[bot]
4fc991ac80 chore(deps): update dependency mocha to v11.7.5 2025-11-05 08:21:47 +00:00
Kamil Mysliwiec
e24b5542e2 Merge pull request #15877 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8.46.3
2025-11-05 09:19:54 +01:00
Kamil Mysliwiec
c1cae543b0 Merge pull request #15881 from nestjs/renovate/apollo-graphql-packages
fix(deps): update apollo graphql packages to v2.12.0
2025-11-05 09:19:48 +01:00
renovate[bot]
8b25e59447 fix(deps): update apollo graphql packages to v2.12.0 2025-11-04 21:26:15 +00:00
renovate[bot]
1b116d2caf fix(deps): update graphql-tools monorepo 2025-11-04 18:11:46 +00:00
renovate[bot]
9854350acd chore(deps): update typescript-eslint monorepo to v8.46.3 2025-11-04 08:34:09 +00:00
Kamil Mysliwiec
2aea174baa Merge pull request #15876 from nestjs/dependabot/npm_and_yarn/eslint-9.39.1
chore(deps-dev): bump eslint from 9.39.0 to 9.39.1
2025-11-04 09:32:44 +01:00
Kamil Mysliwiec
88990040df Merge pull request #15875 from nestjs/dependabot/npm_and_yarn/types/node-24.10.0
chore(deps-dev): bump @types/node from 24.9.2 to 24.10.0
2025-11-04 09:32:38 +01:00
Kamil Mysliwiec
048a99be5c Merge pull request #15874 from nestjs/dependabot/npm_and_yarn/typescript-eslint-8.46.3
chore(deps-dev): bump typescript-eslint from 8.46.2 to 8.46.3
2025-11-04 09:32:29 +01:00
Kamil Mysliwiec
d48f662087 Merge pull request #15866 from nestjs/renovate/globals-16.x
chore(deps): update dependency globals to v16.5.0
2025-11-04 09:32:23 +01:00
dependabot[bot]
3910a69251 chore(deps-dev): bump eslint from 9.39.0 to 9.39.1
Bumps [eslint](https://github.com/eslint/eslint) from 9.39.0 to 9.39.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.39.0...v9.39.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 00:02:57 +00:00
dependabot[bot]
867cd78644 chore(deps-dev): bump @types/node from 24.9.2 to 24.10.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.9.2 to 24.10.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.10.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 00:02:12 +00:00
dependabot[bot]
e96025612c chore(deps-dev): bump typescript-eslint from 8.46.2 to 8.46.3
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.46.2 to 8.46.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.46.3/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.46.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-04 00:01:45 +00:00
renovate[bot]
ae727cd36f chore(deps): update dependency globals to v16.5.0 2025-11-03 10:19:48 +00:00
Kamil Mysliwiec
c0dc1ece22 Merge pull request #15872 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.10.0
2025-11-03 11:17:34 +01:00
Kamil Mysliwiec
0f29963001 Merge pull request #15870 from nestjs/dependabot/npm_and_yarn/globals-16.5.0
chore(deps-dev): bump globals from 16.4.0 to 16.5.0
2025-11-03 11:17:26 +01:00
dependabot[bot]
a4b02a3c0e chore(deps-dev): bump globals from 16.4.0 to 16.5.0
Bumps [globals](https://github.com/sindresorhus/globals) from 16.4.0 to 16.5.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.4.0...v16.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 08:51:39 +00:00
renovate[bot]
608bd5ca64 chore(deps): update dependency @types/node to v24.10.0 2025-11-03 08:44:48 +00:00
Kamil Mysliwiec
1186255903 Merge pull request #15868 from nestjs/renovate/delay-7.x
fix(deps): update dependency delay to v7
2025-11-03 09:34:26 +01:00
Kamil Mysliwiec
05da181551 Merge pull request #15869 from nestjs/dependabot/npm_and_yarn/eslint-9.39.0
chore(deps-dev): bump eslint from 9.38.0 to 9.39.0
2025-11-03 09:34:06 +01:00
Kamil Mysliwiec
08f1997667 Merge pull request #15871 from nestjs/dependabot/npm_and_yarn/graphql-16.12.0
chore(deps-dev): bump graphql from 16.11.0 to 16.12.0
2025-11-03 09:33:28 +01:00
dependabot[bot]
c0358517be chore(deps-dev): bump graphql from 16.11.0 to 16.12.0
Bumps [graphql](https://github.com/graphql/graphql-js) from 16.11.0 to 16.12.0.
- [Release notes](https://github.com/graphql/graphql-js/releases)
- [Commits](https://github.com/graphql/graphql-js/compare/v16.11.0...v16.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 00:03:08 +00:00
dependabot[bot]
252d45e1a7 chore(deps-dev): bump eslint from 9.38.0 to 9.39.0
Bumps [eslint](https://github.com/eslint/eslint) from 9.38.0 to 9.39.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.38.0...v9.39.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 00:02:16 +00:00
renovate[bot]
b1fdf33987 fix(deps): update dependency delay to v7 2025-11-02 14:37:42 +00:00
Joseph Nutt
cc50925c04 fix(core): make get() throw for implicitly request-scoped trees
Treat non-static dependency trees as scoped in get(); instruct consumers to use resolve().\n\nAdds focused tests under NestApplicationContext spec to cover implicit request scope via enhancers.\n\nCloses #15836.
2025-11-01 13:07:31 +00:00
Tomer Steinberg
fcfea5ed2a feat(common): add method options to @sse decorator 2025-10-31 17:31:02 +02:00
Kamil Mysliwiec
ba1647821b Merge pull request #15858 from nestjs/renovate/graphql-tools-monorepo
fix(deps): update graphql-tools monorepo
2025-10-31 10:07:32 +01:00
renovate[bot]
ad324968e5 fix(deps): update graphql-tools monorepo 2025-10-31 08:23:24 +00:00
Kamil Mysliwiec
a4c6a041b0 Merge pull request #15861 from nestjs/renovate/rimraf-6.x
fix(deps): update dependency rimraf to v6.1.0
2025-10-31 09:22:16 +01:00
Kamil Mysliwiec
c461d7fb3e Merge pull request #15862 from nestjs/dependabot/npm_and_yarn/graphql-tools-9.0.21
chore(deps-dev): bump graphql-tools from 9.0.20 to 9.0.21
2025-10-31 09:22:11 +01:00
dependabot[bot]
ce66af53d7 chore(deps-dev): bump graphql-tools from 9.0.20 to 9.0.21
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 9.0.20 to 9.0.21.
- [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.21/packages/graphql-tools)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-31 00:01:46 +00:00
renovate[bot]
376f25384f fix(deps): update dependency rimraf to v6.1.0 2025-10-30 23:23:52 +00:00
Kamil Mysliwiec
086dbe2160 Merge pull request #15857 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency @apollo/server to v5.1.0
2025-10-29 10:58:54 +01:00
Kamil Mysliwiec
e620668039 Merge pull request #15853 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24.9.2
2025-10-29 10:58:45 +01:00
renovate[bot]
09819fa920 fix(deps): update dependency @apollo/server to v5.1.0 2025-10-29 09:32:58 +00:00
renovate[bot]
9098353d2b chore(deps): update dependency @types/node to v24.9.2 2025-10-29 09:32:53 +00:00
Kamil Mysliwiec
92a95ece38 Merge pull request #15855 from nestjs/dependabot/npm_and_yarn/apollo/server-5.1.0
chore(deps-dev): bump @apollo/server from 5.0.0 to 5.1.0
2025-10-29 10:30:41 +01:00
Kamil Mysliwiec
b83a3b224e Merge pull request #15856 from nestjs/dependabot/npm_and_yarn/types/node-24.9.2
chore(deps-dev): bump @types/node from 24.9.1 to 24.9.2
2025-10-29 10:29:32 +01:00
Kamil Mysliwiec
2aec115954 Merge pull request #15854 from nestjs/renovate/mongo-8.x
chore(deps): update mongo docker tag to v8.2
2025-10-29 10:29:22 +01:00
dependabot[bot]
49669694a3 chore(deps-dev): bump @types/node from 24.9.1 to 24.9.2
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.9.1 to 24.9.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.9.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-29 00:02:15 +00:00
dependabot[bot]
8892e91d1a chore(deps-dev): bump @apollo/server from 5.0.0 to 5.1.0
Bumps [@apollo/server](https://github.com/apollographql/apollo-server/tree/HEAD/packages/server) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/packages/server/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/@apollo/server@5.1.0/packages/server)

---
updated-dependencies:
- dependency-name: "@apollo/server"
  dependency-version: 5.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-29 00:01:50 +00:00
renovate[bot]
7ae529b31c chore(deps): update mongo docker tag to v8.2 2025-10-28 20:00:28 +00:00
Kamil Mysliwiec
dabf31f514 Merge pull request #15849 from nestjs/renovate/express-5.x
chore(deps): update dependency @types/express to v5.0.5
2025-10-28 10:53:31 +01:00
renovate[bot]
27c0c417b2 chore(deps): update dependency @types/express to v5.0.5 2025-10-28 08:29:32 +00:00
Kamil Mysliwiec
cd7ad9f4cd Merge pull request #15848 from nestjs/dependabot/npm_and_yarn/types/express-5.0.5
chore(deps-dev): bump @types/express from 5.0.4 to 5.0.5
2025-10-28 09:27:59 +01:00
Kamil Mysliwiec
d5835eb8d5 Merge pull request #15850 from nestjs/renovate/node-24.x
chore(deps): update dependency @types/node to v24
2025-10-28 09:27:54 +01:00
Kamil Mysliwiec
469c21ffbb Merge pull request #15851 from nestjs/dependabot/npm_and_yarn/validator-13.15.20
chore(deps): bump validator from 13.12.0 to 13.15.20
2025-10-28 09:27:47 +01:00
dependabot[bot]
394e7b9adb chore(deps): bump validator from 13.12.0 to 13.15.20
Bumps [validator](https://github.com/validatorjs/validator.js) from 13.12.0 to 13.15.20.
- [Release notes](https://github.com/validatorjs/validator.js/releases)
- [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/validatorjs/validator.js/compare/13.12.0...13.15.20)

---
updated-dependencies:
- dependency-name: validator
  dependency-version: 13.15.20
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-28 02:44:28 +00:00
renovate[bot]
c22589895b chore(deps): update dependency @types/node to v24 2025-10-28 01:32:05 +00:00
dependabot[bot]
ee00778480 chore(deps-dev): bump @types/express from 5.0.4 to 5.0.5
Bumps [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express) from 5.0.4 to 5.0.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express)

---
updated-dependencies:
- dependency-name: "@types/express"
  dependency-version: 5.0.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-28 01:29:39 +00:00
Alexander Suvorov
17358676da chore: trigger ci build 2025-10-28 01:49:43 +03:00
Kamil Mysliwiec
04fb2ee24e Merge pull request #15846 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.1.8
2025-10-27 11:31:30 +01:00
renovate[bot]
1ff2dd11af fix(deps): update nest monorepo to v11.1.8 2025-10-27 09:23:51 +00:00
Kamil Mysliwiec
eaf1e9770e Merge pull request #15845 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v11.1.8
2025-10-27 10:22:14 +01:00
Kamil Mysliwiec
23c90e4de2 Merge pull request #15822 from nestjs/renovate/prisma-monorepo
fix(deps): update dependency @prisma/client to v6.18.0
2025-10-27 10:22:06 +01:00
renovate[bot]
a9bd4ddac9 fix(deps): update nest monorepo to v11.1.8 2025-10-27 09:04:17 +00:00
renovate[bot]
ec29bb36d6 fix(deps): update dependency @prisma/client to v6.18.0 2025-10-27 09:02:07 +00:00
Kamil Mysliwiec
884e8a2296 Update packages/core/router/router-response-controller.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 10:45:20 +02:00
Alexander Suvorov
258428a0a6 feat(core): add Promise<Observable> support for SSE handlers
Adds support for returning Promise<Observable<MessageEvent>> from SSE
handlers, enabling async validation before sending HTTP headers.

This allows developers to:
- Perform async validation before establishing SSE connection
- Return custom HTTP status codes (404, 401, etc.)
- Set headers based on async data
- Implement proper resource validation patterns

Implementation details:
- RouterResponseController.sse() now accepts Promise<Observable>
- Custom status codes extracted from response.statusCode
- SseStream.pipe() accepts optional statusCode parameter
- Full backward compatibility maintained

Fixes #12260
2025-10-02 13:31:56 +03:00
227 changed files with 16176 additions and 21803 deletions

View File

@@ -169,8 +169,12 @@ jobs:
working_directory: ~/nest
docker:
- image: cimg/node:<< pipeline.parameters.maintenance-node-version >>
- image: redis:8-alpine
name: redis
environment:
DISABLE_OPENCOLLECTIVE: 'true'
REDIS_HOST: redis
REDIS_PORT: 6379
steps:
- checkout
- *restore-cache
@@ -179,6 +183,7 @@ jobs:
name: Build all samples
command: npm run build:samples
workflows:
build-and-test:
jobs:
@@ -204,3 +209,4 @@ workflows:
- samples:
requires:
- build

View File

@@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")"
# based on https://medium.com/@felipedutratine/intelligent-benchmark-with-wrk-163986c1587f
cd /tmp/
sudo apt-get install build-essential libssl-dev git -y
git clone --depth=1 https://github.com/wg/wrk.git wrk
cd wrk
sudo make
# move the executable to somewhere in your PATH, ex:
sudo cp wrk /usr/local/bin

View File

@@ -37,7 +37,8 @@
"socket.io",
"ws",
"testing",
"websockets"
"websockets",
"release"
]
]
}

View File

@@ -21,7 +21,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.

1
.gitignore vendored
View File

@@ -34,6 +34,7 @@ yarn-error.log
/packages/**/.npmignore
/packages/**/LICENSE
*.tsbuildinfo
/.nx/workspace-data
# example
/quick-start

View File

@@ -1,3 +1,5 @@
packages/**/*.d.ts
packages/**/*.js
.nyc_output
/.nx/workspace-data

View File

@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2017-2025 Kamil Mysliwiec <https://kamilmysliwiec.com>
Copyright (c) 2017-present 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

View File

@@ -1,5 +1,5 @@
<p align="center">
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="_blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
@@ -49,7 +49,7 @@ Please make sure to read the [Issue Reporting Checklist](https://github.com/nest
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
With official support, you can get expert help straight from the Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
## Support
@@ -63,6 +63,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td><a href="https://microsoft.com/" target="_blank"><img src="https://nestjs.com/img/logos/microsoft-logo.png" width="180" valign="middle" /></a></td>
<td><a href="https://mojam.co" target="_blank"><img src="https://nestjs.com/img/logos/mojam-logo.png" width="80" valign="middle" /></a></td>
<td><a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
<td><a href="https://serpapi.com/" target="_blank"><img src="https://nestjs.com/img/logos/serpapi-logo.png" width="150" valign="middle" /></a></td>
</tr>
</table>
@@ -92,6 +93,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://www.itflashcards.com/" target="_blank"><img src="https://nestjs.com/img/logos/it_flashcards-logo.png" width="170" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://arcjet.com/?ref=nestjs" target="_blank"><img src="https://nestjs.com/img/logos/arcjet-logo.svg" width="170" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://crawljobs.com" target="_blank"><img src="https://nestjs.com/img/logos/crawljobs-logo.svg" width="130" valign="middle" /></a></td>
</tr><tr>
<td align="center" valign="middle"><a href="https://pandektes.com" target="_blank"><img src="https://nestjs.com/img/logos/pandektes-logo.png" width="65" valign="middle" /></a></td>
</tr>
</table>

View File

@@ -1,88 +0,0 @@
-----------------------
express
-----------------------
Running 10s test @ http://localhost:3000
1024 connections
┌─────────┬───────┬───────┬───────┬────────┬──────────┬──────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼────────┼──────────┼──────────┼────────┤
│ Latency │ 55 ms │ 58 ms │ 91 ms │ 138 ms │ 61.88 ms │ 23.95 ms │ 747 ms │
└─────────┴───────┴───────┴───────┴────────┴──────────┴──────────┴────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Req/Sec │ 8407 │ 8407 │ 17407 │ 17743 │ 16454.41 │ 2716.94 │ 8402 │
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
│ Bytes/Sec │ 1.81 MB │ 1.81 MB │ 3.74 MB │ 3.81 MB │ 3.54 MB │ 584 kB │ 1.81 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
165k requests in 10.17s, 35.4 MB read
-----------------------
nest (with "@nestjs/platform-express")
-----------------------
Running 10s test @ http://localhost:3000
1024 connections
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
│ Latency │ 61 ms │ 64 ms │ 71 ms │ 94 ms │ 65.44 ms │ 17.35 ms │ 325 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Req/Sec │ 14183 │ 14183 │ 15767 │ 15991 │ 15640 │ 501.13 │ 14182 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
│ Bytes/Sec │ 3.06 MB │ 3.06 MB │ 3.41 MB │ 3.45 MB │ 3.38 MB │ 108 kB │ 3.06 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
Req/Bytes counts sampled once per second.
156k requests in 10.24s, 33.8 MB read
-----------------------
fastify
-----------------------
Running 10s test @ http://localhost:3000
1024 connections
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬─────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼─────────┤
│ Latency │ 27 ms │ 30 ms │ 39 ms │ 78 ms │ 31.62 ms │ 26.59 ms │ 1232 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴─────────┘
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 19935 │ 19935 │ 33247 │ 34111 │ 32030.4 │ 4103.84 │ 19931 │
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 3.03 MB │ 3.03 MB │ 5.05 MB │ 5.19 MB │ 4.87 MB │ 624 kB │ 3.03 MB │
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
320k requests in 10.18s, 48.7 MB read
-----------------------
nest (with "@nestjs/platform-fastify")
-----------------------
Running 10s test @ http://localhost:3000
1024 connections
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
│ Latency │ 31 ms │ 33 ms │ 38 ms │ 52 ms │ 34.41 ms │ 11.73 ms │ 245 ms │
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
┌───────────┬─────────┬─────────┬────────┬─────────┬─────────┬─────────┬─────────┐
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
├───────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┼─────────┤
│ Req/Sec │ 24911 │ 24911 │ 30031 │ 30335 │ 29470.4 │ 1564.48 │ 24907 │
├───────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┼─────────┤
│ Bytes/Sec │ 3.81 MB │ 3.81 MB │ 4.6 MB │ 4.64 MB │ 4.51 MB │ 239 kB │ 3.81 MB │
└───────────┴─────────┴─────────┴────────┴─────────┴─────────┴─────────┴─────────┘
Req/Bytes counts sampled once per second.
295k requests in 10.17s, 45.1 MB read

View File

@@ -1,7 +0,0 @@
'use strict';
const express = require('express');
const app = express();
app.get('/', async (req, res) => res.send('Hello world'));
app.listen(3000);

View File

@@ -1,7 +0,0 @@
'use strict';
const fastify = require('fastify')();
fastify.get('/', async (req, reply) => reply.send('Hello world'));
fastify.listen({
port: 3000
});

View File

@@ -1,14 +0,0 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const core_1 = require('@nestjs/core');
const fastify_platform_1 = require('@nestjs/platform-fastify');
const app_module_1 = require('./nest/app.module');
core_1.NestFactory.create(
app_module_1.AppModule,
new fastify_platform_1.FastifyAdapter(),
{
logger: false,
bodyParser: false,
},
).then(app => app.listen(3000));
//# sourceMappingURL=main.js.map

View File

@@ -1,9 +0,0 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const core_1 = require('@nestjs/core');
const app_module_1 = require('./nest/app.module');
core_1.NestFactory.create(app_module_1.AppModule, {
logger: false,
bodyParser: false,
}).then(app => app.listen(3000));
//# sourceMappingURL=main.js.map

View File

@@ -1,3 +0,0 @@
export declare class AppController {
root(): string;
}

View File

@@ -1,47 +0,0 @@
'use strict';
var __decorate =
(this && this.__decorate) ||
function(decorators, target, key, desc) {
var c = arguments.length,
r =
c < 3
? target
: desc === null
? (desc = Object.getOwnPropertyDescriptor(target, key))
: desc,
d;
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function')
r = Reflect.decorate(decorators, target, key, desc);
else
for (var i = decorators.length - 1; i >= 0; i--)
if ((d = decorators[i]))
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata =
(this && this.__metadata) ||
function(k, v) {
if (typeof Reflect === 'object' && typeof Reflect.metadata === 'function')
return Reflect.metadata(k, v);
};
Object.defineProperty(exports, '__esModule', { value: true });
const common_1 = require('@nestjs/common');
let AppController = class AppController {
root() {
return 'Hello world!';
}
};
__decorate(
[
common_1.Get(),
__metadata('design:type', Function),
__metadata('design:paramtypes', []),
__metadata('design:returntype', String),
],
AppController.prototype,
'root',
null,
);
AppController = __decorate([common_1.Controller()], AppController);
exports.AppController = AppController;
//# sourceMappingURL=app.controller.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2CAAiD;AAGjD,IAAa,aAAa,GAA1B,MAAa,aAAa;IAExB,IAAI;QACF,OAAO,cAAc,CAAA;IACvB,CAAC;CACF,CAAA;AAHC;IADC,YAAG,EAAE;;;;yCAGL;AAJU,aAAa;IADzB,mBAAU,EAAE;GACA,aAAa,CAKzB;AALY,sCAAa"}

View File

@@ -1 +0,0 @@
export declare class AppModule {}

View File

@@ -1,20 +0,0 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const common_1 = require("@nestjs/common");
const app_controller_1 = require("./app.controller");
let AppModule = class AppModule {
};
AppModule = __decorate([
common_1.Module({
imports: [],
controllers: [app_controller_1.AppController],
})
], AppModule);
exports.AppModule = AppModule;
//# sourceMappingURL=app.module.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AAMjD,IAAa,SAAS,GAAtB,MAAa,SAAS;CAAG,CAAA;AAAZ,SAAS;IAJrB,eAAM,CAAC;QACN,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,CAAC,8BAAa,CAAC;KAC7B,CAAC;GACW,SAAS,CAAG;AAAZ,8BAAS"}

View File

@@ -1 +0,0 @@
export {};

View File

@@ -1 +0,0 @@
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,6CAAyC;AAEzC,KAAK,UAAU,SAAS;IACtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,sBAAS,CAAC,CAAC;IAChD,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AACD,SAAS,EAAE,CAAC"}

View File

@@ -20,7 +20,6 @@ export default tseslint.config(
ecmaVersion: 5,
sourceType: 'module',
parserOptions: {
project: ['tsconfig.json', 'tsconfig.spec.json'],
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
@@ -39,18 +38,18 @@ export default tseslint.config(
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',
"@typescript-eslint/no-misused-promises": [
"error",
'@typescript-eslint/no-misused-promises': [
'error',
{
"checksVoidReturn": false,
"checksConditionals": false
}
checksVoidReturn: false,
checksConditionals: false,
},
],
"@typescript-eslint/require-await": "off",
'@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

@@ -25,7 +25,7 @@ services:
- "9001:9001"
restart: always
mysql:
image: mysql:9.5.0
image: mysql:9.6.0
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: root
@@ -51,7 +51,7 @@ services:
zookeeper:
container_name: test-zookeeper
hostname: zookeeper
image: confluentinc/cp-zookeeper:7.9.4
image: confluentinc/cp-zookeeper:7.9.5
ports:
- "2181:2181"
environment:
@@ -60,7 +60,7 @@ services:
kafka:
container_name: test-kafka
hostname: kafka
image: confluentinc/cp-kafka:8.1.0
image: confluentinc/cp-kafka:8.1.1
depends_on:
- zookeeper
ports:

View File

@@ -208,6 +208,15 @@ describe('Middleware (FastifyAdapter)', () => {
.then(({ payload }) => expect(payload).to.be.eql(INCLUDED_VALUE));
});
it(`GET forRoutes(POST /tests/%69ncluded) - ensure middleware is executed correctly with encoded characters`, () => {
return app
.inject({
method: 'POST',
url: '/tests/%69ncluded', // 'i' character is encoded
})
.then(({ payload }) => expect(payload).to.be.eql(INCLUDED_VALUE));
});
afterEach(async () => {
await app.close();
});
@@ -603,4 +612,158 @@ describe('Middleware (FastifyAdapter)', () => {
await app.close();
});
});
describe('should respect fastify routing options', () => {
const MIDDLEWARE_RETURN_VALUE = 'middleware_return';
@Controller()
class TestController {
@Get('abc/def')
included() {
return 'whatnot';
}
}
@Module({
imports: [AppModule],
controllers: [TestController],
})
class TestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.end(MIDDLEWARE_RETURN_VALUE))
.forRoutes({ path: 'abc/def', method: RequestMethod.GET });
}
}
describe('[ignoreTrailingSlash] attribute', () => {
beforeEach(async () => {
app = (
await Test.createTestingModule({
imports: [TestModule],
}).compile()
).createNestApplication<NestFastifyApplication>(
new FastifyAdapter({
ignoreTrailingSlash: true,
// routerOptions: {
// ignoreTrailingSlash: true,
// },
}),
);
await app.init();
});
it(`GET forRoutes(GET /abc/def/)`, () => {
return app
.inject({
method: 'GET',
url: '/abc/def/', // trailing slash
})
.then(({ payload }) =>
expect(payload).to.be.eql(MIDDLEWARE_RETURN_VALUE),
);
});
afterEach(async () => {
await app.close();
});
});
describe('[ignoreDuplicateSlashes] attribute', () => {
beforeEach(async () => {
app = (
await Test.createTestingModule({
imports: [TestModule],
}).compile()
).createNestApplication<NestFastifyApplication>(
new FastifyAdapter({
routerOptions: {
ignoreDuplicateSlashes: true,
},
}),
);
await app.init();
});
it(`GET forRoutes(GET /abc//def)`, () => {
return app
.inject({
method: 'GET',
url: '/abc//def', // duplicate slashes
})
.then(({ payload }) =>
expect(payload).to.be.eql(MIDDLEWARE_RETURN_VALUE),
);
});
afterEach(async () => {
await app.close();
});
});
describe('[caseSensitive] attribute', () => {
beforeEach(async () => {
app = (
await Test.createTestingModule({
imports: [TestModule],
}).compile()
).createNestApplication<NestFastifyApplication>(
new FastifyAdapter({
routerOptions: {
caseSensitive: true,
},
}),
);
await app.init();
});
it(`GET forRoutes(GET /ABC/DEF)`, () => {
return app
.inject({
method: 'GET',
url: '/ABC/DEF', // different case
})
.then(({ payload }) =>
expect(payload).to.be.eql(MIDDLEWARE_RETURN_VALUE),
);
});
afterEach(async () => {
await app.close();
});
});
describe('[useSemicolonDelimiter] attribute', () => {
beforeEach(async () => {
app = (
await Test.createTestingModule({
imports: [TestModule],
}).compile()
).createNestApplication<NestFastifyApplication>(
new FastifyAdapter({
routerOptions: { useSemicolonDelimiter: true } as any,
}),
);
await app.init();
});
it(`GET forRoutes(GET /abc/def;foo=bar)`, () => {
return app
.inject({
method: 'GET',
url: '/abc/def;foo=bar', // semicolon delimiter
})
.then(({ payload }) =>
expect(payload).to.be.eql(MIDDLEWARE_RETURN_VALUE),
);
});
afterEach(async () => {
await app.close();
});
});
});
});

View File

@@ -51,4 +51,21 @@ describe('enableShutdownHooks', () => {
expect(result.stdout.toString().trim()).to.be.eq('');
done();
}).timeout(10000);
it('should call the correct hooks with useProcessExit option', done => {
const result = spawnSync('ts-node', [
join(__dirname, '../src/enable-shutdown-hooks-main.ts'),
'SIGHUP',
'SIGHUP',
'graceful',
]);
const calls = result.stdout
.toString()
.split('\n')
.map((call: string) => call.trim());
expect(calls[0]).to.equal('beforeApplicationShutdown SIGHUP');
expect(calls[1]).to.equal('onApplicationShutdown SIGHUP');
expect(result.status).to.equal(0);
done();
}).timeout(10000);
});

View File

@@ -7,6 +7,7 @@ import {
import { NestFactory } from '@nestjs/core';
const SIGNAL = process.argv[2];
const SIGNAL_TO_LISTEN = process.argv[3];
const USE_GRACEFUL_EXIT = process.argv[4] === 'graceful';
@Injectable()
class TestInjectable
@@ -29,10 +30,12 @@ class AppModule {}
async function bootstrap() {
const app = await NestFactory.create(AppModule, { logger: false });
const shutdownOptions = USE_GRACEFUL_EXIT ? { useProcessExit: true } : {};
if (SIGNAL_TO_LISTEN && SIGNAL_TO_LISTEN !== 'NONE') {
app.enableShutdownHooks([SIGNAL_TO_LISTEN]);
app.enableShutdownHooks([SIGNAL_TO_LISTEN], shutdownOptions);
} else if (SIGNAL_TO_LISTEN !== 'NONE') {
app.enableShutdownHooks();
app.enableShutdownHooks([], shutdownOptions);
}
await app.listen(1800);

View File

@@ -24,7 +24,7 @@ describe('Multiple providers under the same token ("each" feature)', () => {
});
});
describe('resolve()', () => {
it('should return an array of providers', async () => {
it('should return an array of request-scoped providers', async () => {
const builder = Test.createTestingModule({
imports: [MultipleProvidersModule],
});
@@ -43,5 +43,25 @@ describe('Multiple providers under the same token ("each" feature)', () => {
expect(multiProviderInstances).to.be.eql(['A', 'B', 'C']);
});
it('should return an array of default-scoped providers', async () => {
const builder = Test.createTestingModule({
imports: [MultipleProvidersModule],
});
const testingModule = await builder.compile();
const multiProviderInstances = await testingModule.resolve<string>(
'MULTI_PROVIDER',
undefined,
{
each: true,
},
);
// @ts-expect-error: make sure "multiProviderInstances" is string[] not string
multiProviderInstances.charAt;
expect(multiProviderInstances).to.be.eql(['A', 'B', 'C']);
});
});
});

View File

@@ -0,0 +1,48 @@
import { Injectable, Scope, Module } from '@nestjs/common';
import { Test, TestingModule } from '@nestjs/testing';
import { ContextIdFactory, REQUEST } from '@nestjs/core';
import { expect } from 'chai';
describe('Request Scope Bubbling', () => {
// 1. Define the "Poison" (Request Scoped Service)
@Injectable({ scope: Scope.REQUEST })
class ChildService {
// A random ID to verify uniqueness
public readonly id = Math.random();
}
// 2. Define the "Victim" (Singleton that depends on Request Scoped)
@Injectable()
class ParentService {
constructor(public readonly child: ChildService) {}
}
@Module({
providers: [ChildService, ParentService],
})
class TestModule {}
it('should downgrade a Singleton to Request-Scoped if it depends on a Request-Scoped provider', async () => {
// 3. Bootstrap the Module (using Test.createTestingModule instead of NestFactory)
const moduleRef: TestingModule = await Test.createTestingModule({
imports: [TestModule],
}).compile();
// 4. Simulate Request 1
const contextId1 = ContextIdFactory.create();
const parent1 = await moduleRef.resolve(ParentService, contextId1);
// 5. Simulate Request 2
const contextId2 = ContextIdFactory.create();
const parent2 = await moduleRef.resolve(ParentService, contextId2);
// 6. Assertions (The "Moment of Truth")
// The Child IDs should be different (Proof of Request Scope)
expect(parent1.child.id).to.not.equal(parent2.child.id);
// The Parent instances should ALSO be different (Proof of Bubbling)
// If Parent was a true Singleton, these would be equal.
expect(parent1).to.not.equal(parent2);
});
});

View File

@@ -12,9 +12,10 @@ export interface Response<T> {
}
@Injectable()
export class TransformInterceptor<T>
implements NestInterceptor<T, Response<T>>
{
export class TransformInterceptor<T> implements NestInterceptor<
T,
Response<T>
> {
intercept(
context: ExecutionContext,
next: CallHandler<T>,

View File

@@ -141,6 +141,51 @@ describe('Transient scope', () => {
});
});
describe('when DEFAULT scoped provider has deeply nested TRANSIENT chain', () => {
let app: INestApplication;
@Injectable({ scope: Scope.TRANSIENT })
class DeepNestedTransient {
public static constructorCalled = false;
constructor() {
DeepNestedTransient.constructorCalled = true;
}
}
@Injectable({ scope: Scope.TRANSIENT })
class MiddleTransient {
constructor(public readonly nested: DeepNestedTransient) {}
}
@Injectable()
class RootService {
constructor(public readonly middle: MiddleTransient) {}
}
before(async () => {
DeepNestedTransient.constructorCalled = false;
const module = await Test.createTestingModule({
providers: [RootService, MiddleTransient, DeepNestedTransient],
}).compile();
app = module.createNestApplication();
await app.init();
});
it('should call constructor of deeply nested TRANSIENT provider', () => {
const rootService = app.get(RootService);
expect(DeepNestedTransient.constructorCalled).to.be.true;
expect(rootService.middle.nested).to.be.instanceOf(DeepNestedTransient);
});
after(async () => {
await app.close();
});
});
describe('when nested transient providers are used in request scope', () => {
let server: any;
let app: INestApplication;

View File

@@ -1,7 +1,5 @@
{
"lerna": "2.4.0",
"packages": [
"packages/*"
],
"version": "11.1.8"
"packages": ["packages/*"],
"version": "11.1.14",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}

27182
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "11.1.6",
"version": "11.1.10",
"description": "Modern, fast, powerful node.js web framework",
"homepage": "https://nestjs.com",
"repository": {
@@ -42,12 +42,12 @@
"lint:spec": "node --max-old-space-size=4096 ./node_modules/.bin/eslint 'packages/**/**.spec.ts'",
"lint:ci": "concurrently 'npm run lint:packages' 'npm run lint:spec'",
"prerelease": "gulp copy-misc",
"publish": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --force-publish --access public --exact -m \"chore(@nestjs) publish %s release\"",
"publish": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --force-publish --exact -m \"chore(release): publish %s release\"",
"prepublishOnly": "npm run changelog | pbcopy",
"publish:beta": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=beta --access public -m \"chore(@nestjs) publish %s release\"",
"publish:next": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=next --access public --skip-git -m \"chore(@nestjs) publish %s release\"",
"publish:rc": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=rc --access public -m \"chore(@nestjs) publish %s release\"",
"publish:test": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --force-publish --access public --npm-tag=test --skip-git -m \"chore(@nestjs) publish %s release\"",
"publish:beta": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=beta -m \"chore(release): publish %s release\"",
"publish:next": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=next --skip-git -m \"chore(release): publish %s release\"",
"publish:rc": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=rc -m \"chore(release): publish %s release\"",
"publish:test": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --force-publish --npm-tag=test --skip-git -m \"chore(release): publish %s release\"",
"prepare": "husky"
},
"lint-staged": {
@@ -62,124 +62,114 @@
"@nuxt/opencollective": "0.4.1",
"ansis": "4.2.0",
"class-transformer": "0.5.1",
"class-validator": "0.14.2",
"cors": "2.8.5",
"express": "5.1.0",
"fast-json-stringify": "6.1.1",
"class-validator": "0.14.3",
"cors": "2.8.6",
"express": "5.2.1",
"fast-json-stringify": "6.3.0",
"fast-safe-stringify": "2.1.1",
"file-type": "21.0.0",
"file-type": "21.3.0",
"iterare": "1.2.1",
"load-esm": "1.0.3",
"object-hash": "3.0.0",
"path-to-regexp": "8.3.0",
"reflect-metadata": "0.2.2",
"rxjs": "7.8.2",
"socket.io": "4.8.1",
"socket.io": "4.8.3",
"tslib": "2.8.1",
"uid": "2.0.2",
"uuid": "13.0.0"
},
"devDependencies": {
"@apollo/server": "5.0.0",
"@apollo/server": "5.4.0",
"@as-integrations/express5": "1.1.2",
"@codechecks/client": "0.1.12",
"@commitlint/cli": "20.1.0",
"@commitlint/config-angular": "20.0.0",
"@eslint/eslintrc": "3.3.1",
"@eslint/js": "9.38.0",
"@fastify/cors": "11.1.0",
"@commitlint/cli": "20.4.1",
"@commitlint/config-angular": "20.4.1",
"@eslint/eslintrc": "3.3.3",
"@eslint/js": "9.39.2",
"@fastify/cors": "11.2.0",
"@fastify/formbody": "8.0.2",
"@fastify/middie": "9.0.3",
"@fastify/multipart": "9.3.0",
"@fastify/static": "8.3.0",
"@fastify/middie": "9.1.0",
"@fastify/multipart": "9.4.0",
"@fastify/static": "9.0.0",
"@fastify/view": "11.1.1",
"@grpc/grpc-js": "1.14.0",
"@grpc/grpc-js": "1.14.3",
"@grpc/proto-loader": "0.8.0",
"@nestjs/apollo": "13.2.1",
"@nestjs/graphql": "13.2.0",
"@nestjs/mongoose": "11.0.3",
"@nestjs/apollo": "13.2.4",
"@nestjs/graphql": "13.2.4",
"@nestjs/mongoose": "11.0.4",
"@nestjs/typeorm": "11.0.0",
"@types/amqplib": "0.10.8",
"@types/bytes": "3.1.5",
"@types/chai": "4.3.20",
"@types/chai-as-promised": "7.1.8",
"@types/cors": "2.8.19",
"@types/eslint__js": "8.42.3",
"@types/express": "5.0.4",
"@types/express": "5.0.6",
"@types/gulp": "4.0.18",
"@types/http-errors": "2.0.5",
"@types/mocha": "10.0.10",
"@types/node": "24.9.1",
"@types/sinon": "17.0.4",
"@types/node": "25.2.3",
"@types/sinon": "21.0.0",
"@types/supertest": "6.0.3",
"@types/ws": "8.18.1",
"@typescript-eslint/eslint-plugin": "8.56.0",
"@typescript-eslint/parser": "8.56.0",
"amqp-connection-manager": "5.0.0",
"amqplib": "0.10.9",
"artillery": "2.0.26",
"body-parser": "2.2.0",
"bytes": "3.1.2",
"cache-manager": "7.2.4",
"cache-manager-redis-store": "3.0.1",
"body-parser": "2.2.2",
"cache-manager": "7.2.8",
"chai": "4.5.0",
"chai-as-promised": "7.1.2",
"clang-format": "1.8.0",
"concurrently": "9.2.1",
"conventional-changelog": "7.1.1",
"core-js": "3.46.0",
"coveralls": "3.1.1",
"delete-empty": "3.0.0",
"engine.io-client": "6.6.3",
"eslint": "9.38.0",
"eslint": "9.39.2",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-prettier": "5.5.4",
"eventsource": "4.0.0",
"eslint-plugin-prettier": "5.5.5",
"eventsource": "4.1.0",
"fancy-log": "2.0.0",
"fastify": "5.6.1",
"globals": "16.4.0",
"graphql": "16.11.0",
"fastify": "5.7.4",
"fastify-plugin": "5.1.0",
"find-my-way": "9.4.0",
"globals": "17.3.0",
"graphql": "16.12.0",
"graphql-subscriptions": "3.0.0",
"graphql-tools": "9.0.20",
"gulp": "5.0.1",
"gulp-clang-format": "1.0.27",
"gulp-clean": "0.4.0",
"gulp-sourcemaps": "3.0.0",
"gulp-typescript": "5.0.1",
"gulp-watch": "5.0.1",
"http-errors": "2.0.0",
"http-errors": "2.0.1",
"husky": "9.1.7",
"imports-loader": "5.0.0",
"ioredis": "5.8.2",
"json-loader": "0.5.7",
"ioredis": "5.9.3",
"kafkajs": "2.2.4",
"lerna": "2.11.0",
"lerna": "9.0.4",
"lerna-changelog": "2.2.0",
"light-my-request": "6.6.0",
"lint-staged": "16.2.6",
"lint-staged": "16.2.7",
"markdown-table": "2.0.0",
"mocha": "11.7.4",
"mongoose": "8.19.2",
"mqtt": "5.14.1",
"mocha": "11.7.5",
"mongoose": "9.2.1",
"mqtt": "5.15.0",
"multer": "2.0.2",
"mysql2": "3.15.3",
"mysql2": "3.17.2",
"nats": "2.29.3",
"nodemon": "3.1.10",
"nyc": "14.1.1",
"prettier": "3.6.2",
"redis": "5.9.0",
"prettier": "^3.7.4",
"redis": "5.11.0",
"reusify": "1.1.0",
"rxjs-compat": "6.6.7",
"sinon": "21.0.0",
"sinon-chai": "4.0.1",
"socket.io-client": "4.8.1",
"subscriptions-transport-ws": "0.11.0",
"supertest": "7.1.4",
"sinon": "21.0.1",
"sinon-chai": "3.7.0",
"socket.io-client": "4.8.3",
"supertest": "7.2.2",
"ts-morph": "27.0.2",
"ts-node": "10.9.2",
"typeorm": "0.3.27",
"typeorm": "0.3.28",
"typescript": "5.9.3",
"typescript-eslint": "8.46.2",
"wrk": "1.2.1",
"ws": "8.18.3"
"typescript-eslint": "8.56.0",
"ws": "8.19.0"
},
"engines": {
"node": ">= 20"

View File

@@ -1,5 +1,5 @@
<p align="center">
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="_blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
@@ -49,7 +49,7 @@ Please make sure to read the [Issue Reporting Checklist](https://github.com/nest
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
With official support, you can get expert help straight from the Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
## Support
@@ -63,6 +63,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td><a href="https://microsoft.com/" target="_blank"><img src="https://nestjs.com/img/logos/microsoft-logo.png" width="180" valign="middle" /></a></td>
<td><a href="https://mojam.co" target="_blank"><img src="https://nestjs.com/img/logos/mojam-logo.png" width="80" valign="middle" /></a></td>
<td><a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
<td><a href="https://serpapi.com/" target="_blank"><img src="https://nestjs.com/img/logos/serpapi-logo.png" width="150" valign="middle" /></a></td>
</tr>
</table>
@@ -92,6 +93,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://www.itflashcards.com/" target="_blank"><img src="https://nestjs.com/img/logos/it_flashcards-logo.png" width="170" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://arcjet.com/?ref=nestjs" target="_blank"><img src="https://nestjs.com/img/logos/arcjet-logo.svg" width="170" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://crawljobs.com" target="_blank"><img src="https://nestjs.com/img/logos/crawljobs-logo.svg" width="130" valign="middle" /></a></td>
</tr><tr>
<td align="center" valign="middle"><a href="https://pandektes.com" target="_blank"><img src="https://nestjs.com/img/logos/pandektes-logo.png" width="65" valign="middle" /></a></td>
</tr>
</table>

View File

@@ -6,7 +6,12 @@ import { RequestMethod } from '../../enums/request-method.enum';
*
* @publicApi
*/
export function Sse(path?: string): MethodDecorator {
export function Sse(
path?: string,
options: { [METHOD_METADATA]?: RequestMethod } = {
[METHOD_METADATA]: RequestMethod.GET,
},
): MethodDecorator {
return (
target: object,
key: string | symbol,
@@ -17,7 +22,7 @@ export function Sse(path?: string): MethodDecorator {
Reflect.defineMetadata(PATH_METADATA, path, descriptor.value);
Reflect.defineMetadata(
METHOD_METADATA,
RequestMethod.GET,
options[METHOD_METADATA],
descriptor.value,
);
Reflect.defineMetadata(SSE_METADATA, true, descriptor.value);

View File

@@ -10,7 +10,7 @@ type StaticOrigin = boolean | string | RegExp | (string | RegExp)[];
* @publicApi
*/
export type CustomOrigin = (
requestOrigin: string,
requestOrigin: string | undefined,
callback: (err: Error | null, origin?: StaticOrigin) => void,
) => void;

View File

@@ -24,6 +24,7 @@ export * from './nest-application-options.interface';
export * from './nest-application.interface';
export * from './nest-microservice.interface';
export * from './scope-options.interface';
export * from './shutdown-hooks-options.interface';
export * from './type.interface';
export * from './version-options.interface';
export * from './websockets/web-socket-adapter.interface';

View File

@@ -2,6 +2,7 @@ import { ShutdownSignal } from '../enums/shutdown-signal.enum';
import { LoggerService, LogLevel } from '../services/logger.service';
import { DynamicModule } from './modules';
import { NestApplicationContextOptions } from './nest-application-context-options.interface';
import { ShutdownHooksOptions } from './shutdown-hooks-options.interface';
import { Type } from './type.interface';
export type SelectOptions = Pick<NestApplicationContextOptions, 'abortOnError'>;
@@ -143,9 +144,15 @@ export interface INestApplicationContext {
* `onApplicationShutdown` function of a provider if the
* process receives a shutdown signal.
*
* @param {ShutdownSignal[] | string[]} [signals] The system signals to listen to
* @param {ShutdownHooksOptions} [options] Options for configuring shutdown hooks behavior
*
* @returns {this} The Nest application context instance
*/
enableShutdownHooks(signals?: ShutdownSignal[] | string[]): this;
enableShutdownHooks(
signals?: ShutdownSignal[] | string[],
options?: ShutdownHooksOptions,
): this;
/**
* Initializes the Nest application.

View File

@@ -17,8 +17,9 @@ import { WebSocketAdapter } from './websockets/web-socket-adapter.interface';
*
* @publicApi
*/
export interface INestApplication<TServer = any>
extends INestApplicationContext {
export interface INestApplication<
TServer = any,
> extends INestApplicationContext {
/**
* A wrapper function around HTTP adapter method: `adapter.use()`.
* Example `app.use(cors())`

View File

@@ -0,0 +1,21 @@
/**
* Options for configuring shutdown hooks behavior.
*
* @publicApi
*/
export interface ShutdownHooksOptions {
/**
* If true, uses `process.exit()` instead of `process.kill(process.pid, signal)`
* after shutdown hooks complete. This ensures the 'exit' event is properly
* triggered, which is required for async loggers (like Pino with transports)
* to flush their buffers before the process terminates.
*
* Note: Using `process.exit()` will:
* - Change the exit code (e.g., SIGTERM: 143 → 0)
* - May not trigger other signal handlers from third-party libraries
* - May affect orchestrator (Kubernetes, Docker) behavior
*
* @default false
*/
useProcessExit?: boolean;
}

View File

@@ -53,8 +53,8 @@ export interface ConfigurableModuleBuilderOptions {
export class ConfigurableModuleBuilder<
ModuleOptions,
StaticMethodKey extends string = typeof DEFAULT_METHOD_KEY,
FactoryClassMethodKey extends
string = typeof DEFAULT_FACTORY_CLASS_METHOD_KEY,
FactoryClassMethodKey extends string =
typeof DEFAULT_FACTORY_CLASS_METHOD_KEY,
ExtraModuleDefinitionOptions = {},
> {
protected staticMethodKey: StaticMethodKey;

View File

@@ -28,8 +28,8 @@ export type ConfigurableModuleOptionsFactory<
*/
export interface ConfigurableModuleAsyncOptions<
ModuleOptions,
FactoryClassMethodKey extends
string = typeof DEFAULT_FACTORY_CLASS_METHOD_KEY,
FactoryClassMethodKey extends string =
typeof DEFAULT_FACTORY_CLASS_METHOD_KEY,
> extends Pick<ModuleMetadata, 'imports'> {
/**
* Injection token resolving to an existing provider. The provider must implement

View File

@@ -16,8 +16,8 @@ import { ConfigurableModuleAsyncOptions } from './configurable-module-async-opti
export type ConfigurableModuleCls<
ModuleOptions,
MethodKey extends string = typeof DEFAULT_METHOD_KEY,
FactoryClassMethodKey extends
string = typeof DEFAULT_FACTORY_CLASS_METHOD_KEY,
FactoryClassMethodKey extends string =
typeof DEFAULT_FACTORY_CLASS_METHOD_KEY,
ExtraModuleDefinitionOptions = {},
> = {
new (): any;

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/common",
"version": "11.1.8",
"version": "11.1.14",
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
"author": "Kamil Mysliwiec",
"homepage": "https://nestjs.com",
@@ -18,7 +18,7 @@
},
"license": "MIT",
"dependencies": {
"file-type": "21.0.0",
"file-type": "21.3.0",
"iterare": "1.2.1",
"load-esm": "1.0.3",
"tslib": "2.8.1",
@@ -37,5 +37,6 @@
"class-transformer": {
"optional": true
}
}
},
"gitHead": "bcb4747f7598a9d2655c8184a6d729ebefa07fbd"
}

View File

@@ -13,9 +13,10 @@ import { isNil, isNumber } from '../utils/shared.utils';
* @publicApi
*/
@Injectable()
export class DefaultValuePipe<T = any, R = any>
implements PipeTransform<T, T | R>
{
export class DefaultValuePipe<T = any, R = any> implements PipeTransform<
T,
T | R
> {
constructor(protected readonly defaultValue: R) {}
transform(value?: T, _metadata?: ArgumentMetadata): T | R {

View File

@@ -1,10 +1,49 @@
import { pathToFileURL } from 'url';
import { Logger } from '../../services/logger.service';
import { FileValidatorContext } from './file-validator-context.interface';
import { FileValidator } from './file-validator.interface';
import { IFile } from './interfaces';
import { loadEsm } from 'load-esm';
const logger = new Logger('FileTypeValidator');
type FileTypeValidatorContext = FileValidatorContext<
Omit<FileTypeValidatorOptions, 'errorMessage'>
>;
export type FileTypeValidatorOptions = {
/**
* Expected file type(s) for validation. Can be a string (MIME type)
* or a regular expression to match multiple types.
*
* @example
* // Match a single MIME type
* fileType: 'image/png'
*
* @example
* // Match multiple types using RegExp
* fileType: /^image\/(png|jpeg)$/
*/
fileType: string | RegExp;
/**
* Custom error message displayed when file type validation fails
* Can be provided as a static string, or as a factory function
* that receives the validation context (file and validator configuration)
* and returns a dynamic error message.
*
* @example
* // Static message
* new FileTypeValidator({ fileType: 'image/png', errorMessage: 'Only PNG allowed' })
*
* @example
* // Dynamic message based on file object and validator configuration
* new FileTypeValidator({
* fileType: 'image/png',
* errorMessage: ctx => `Received file type '${ctx.file?.mimetype}', but expected '${ctx.config.fileType}'`
* })
*/
errorMessage?: string | ((ctx: FileTypeValidatorContext) => string);
/**
* If `true`, the validator will skip the magic numbers validation.
* This can be useful when you can't identify some files as there are no common magic numbers available for some file types.
@@ -33,10 +72,16 @@ export class FileTypeValidator extends FileValidator<
IFile
> {
buildErrorMessage(file?: IFile): string {
const expected = this.validationOptions.fileType;
const { errorMessage, ...config } = this.validationOptions;
if (errorMessage) {
return typeof errorMessage === 'function'
? errorMessage({ file, config })
: errorMessage;
}
if (file?.mimetype) {
const baseMessage = `Validation failed (current file type is ${file.mimetype}, expected type is ${expected})`;
const baseMessage = `Validation failed (current file type is ${file.mimetype}, expected type is ${this.validationOptions.fileType})`;
/**
* If fallbackToMimetype is enabled, this means the validator failed to detect the file type
@@ -52,7 +97,7 @@ export class FileTypeValidator extends FileValidator<
return baseMessage;
}
return `Validation failed (expected type is ${expected})`;
return `Validation failed (expected type is ${this.validationOptions.fileType})`;
}
async isValid(file?: IFile): Promise<boolean> {
@@ -69,11 +114,25 @@ export class FileTypeValidator extends FileValidator<
);
}
if (!isFileValid || !file.buffer) return false;
if (!isFileValid) return false;
if (!file.buffer) {
if (this.validationOptions.fallbackToMimetype) {
return !!file.mimetype.match(this.validationOptions.fileType);
}
return false;
}
try {
let fileTypeModule: string;
try {
const resolvedPath = require.resolve('file-type');
fileTypeModule = pathToFileURL(resolvedPath).href;
} catch {
fileTypeModule = 'file-type';
}
const { fileTypeFromBuffer } =
await loadEsm<typeof import('file-type')>('file-type');
await loadEsm<typeof import('file-type')>(fileTypeModule);
const fileType = await fileTypeFromBuffer(file.buffer);
if (fileType) {
@@ -90,7 +149,27 @@ export class FileTypeValidator extends FileValidator<
return !!file.mimetype.match(this.validationOptions.fileType);
}
return false;
} catch {
} catch (error) {
const errorMessage =
error instanceof Error ? error.message : String(error);
// Check for common ESM loading issues
if (
errorMessage.includes('ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING') ||
errorMessage.includes('Cannot find module') ||
errorMessage.includes('ERR_MODULE_NOT_FOUND')
) {
logger.warn(
`Failed to load the "file-type" package for magic number validation. ` +
`If you are using Jest, run it with NODE_OPTIONS="--experimental-vm-modules". ` +
`Error: ${errorMessage}`,
);
}
// Fallback to mimetype if enabled
if (this.validationOptions.fallbackToMimetype) {
return !!file.mimetype.match(this.validationOptions.fileType);
}
return false;
}
}

View File

@@ -0,0 +1,6 @@
import { IFile } from './interfaces';
export type FileValidatorContext<TConfig> = {
file?: IFile;
config: TConfig;
};

View File

@@ -1,9 +1,40 @@
import { FileValidatorContext } from './file-validator-context.interface';
import { FileValidator } from './file-validator.interface';
import { IFile } from './interfaces';
type MaxFileSizeValidatorContext = FileValidatorContext<
Omit<MaxFileSizeValidatorOptions, 'errorMessage' | 'message'>
>;
export type MaxFileSizeValidatorOptions = {
/**
* Maximum allowed file size in bytes.
*/
maxSize: number;
/**
* @deprecated Use `errorMessage` instead.
*/
message?: string | ((maxSize: number) => string);
/**
* Custom error message returned when file size validation fails.
* Can be provided as a static string, or as a factory function
* that receives the validation context (file and validator configuration)
* and returns a dynamic error message.
*
* @example
* // Static message
* new MaxFileSizeValidator({ maxSize: 1000, errorMessage: 'File size exceeds the limit' })
*
* @example
* // Dynamic message based on file object and validator configuration
* new MaxFileSizeValidator({
* maxSize: 1000,
* errorMessage: ctx => `Received file size is ${ctx.file?.size}, but it must be smaller than ${ctx.config.maxSize}.`
* })
*/
errorMessage?: string | ((ctx: MaxFileSizeValidatorContext) => string);
};
/**
@@ -18,12 +49,18 @@ export class MaxFileSizeValidator extends FileValidator<
IFile
> {
buildErrorMessage(file?: IFile): string {
if ('message' in this.validationOptions) {
if (typeof this.validationOptions.message === 'function') {
return this.validationOptions.message(this.validationOptions.maxSize);
}
const { errorMessage, message, ...config } = this.validationOptions;
return this.validationOptions.message!;
if (errorMessage) {
return typeof errorMessage === 'function'
? errorMessage({ file, config })
: errorMessage;
}
if (message) {
return typeof message === 'function'
? message(this.validationOptions.maxSize)
: message;
}
if (file?.size) {

View File

@@ -16,11 +16,10 @@ const DEFAULT_ARRAY_SEPARATOR = ',';
/**
* @publicApi
*/
export interface ParseArrayOptions
extends Omit<
ValidationPipeOptions,
'transform' | 'validateCustomDecorators' | 'exceptionFactory'
> {
export interface ParseArrayOptions extends Omit<
ValidationPipeOptions,
'transform' | 'validateCustomDecorators' | 'exceptionFactory'
> {
/**
* Type for items to be converted into
*/

View File

@@ -41,9 +41,10 @@ export interface ParseBoolPipeOptions {
* @publicApi
*/
@Injectable()
export class ParseBoolPipe
implements PipeTransform<string | boolean, Promise<boolean>>
{
export class ParseBoolPipe implements PipeTransform<
string | boolean,
Promise<boolean>
> {
protected exceptionFactory: (error: string) => any;
constructor(@Optional() protected readonly options?: ParseBoolPipeOptions) {

View File

@@ -31,9 +31,9 @@ export interface ParseDatePipeOptions {
}
@Injectable()
export class ParseDatePipe
implements PipeTransform<string | number | undefined | null>
{
export class ParseDatePipe implements PipeTransform<
string | number | undefined | null
> {
protected exceptionFactory: (error: string) => any;
constructor(private readonly options: ParseDatePipeOptions = {}) {

View File

@@ -38,6 +38,12 @@ export interface ValidationPipeOptions extends ValidatorOptions {
let classValidator: ValidatorPackage = {} as any;
let classTransformer: TransformerPackage = {} as any;
/**
* Built-in JavaScript types that should be excluded from prototype stripping
* to avoid conflicts with test frameworks like Jest's useFakeTimers
*/
const BUILT_IN_TYPES = [Date, RegExp, Error, Map, Set, WeakMap, WeakSet];
/**
* @see [Validation](https://docs.nestjs.com/techniques/validation)
*
@@ -66,7 +72,7 @@ export class ValidationPipe implements PipeTransform<any> {
...validatorOptions
} = options;
// @see https://github.com/nestjs/nest/issues/10683#issuecomment-1413690508
// @see [https://github.com/nestjs/nest/issues/10683#issuecomment-1413690508](https://github.com/nestjs/nest/issues/10683#issuecomment-1413690508)
this.validatorOptions = { forbidUnknownValues: false, ...validatorOptions };
this.isTransformEnabled = !!transform;
@@ -147,7 +153,7 @@ export class ValidationPipe implements PipeTransform<any> {
if (originalValue === undefined && originalEntity === '') {
// Since SWC requires empty string for validation (to avoid an error),
// a fallback is needed to revert to the original value (when undefined).
// @see https://github.com/nestjs/nest/issues/14430
// @see [https://github.com/nestjs/nest/issues/14430](https://github.com/nestjs/nest/issues/14430)
return originalValue;
}
if (isPrimitive) {
@@ -241,7 +247,7 @@ export class ValidationPipe implements PipeTransform<any> {
// SWC requires empty string to be returned instead of an empty object
// when the value is nil and the metatype is not a class instance, but a plain object (enum, for example).
// Otherwise, the error will be thrown.
// @see https://github.com/nestjs/nest/issues/12680
// @see [https://github.com/nestjs/nest/issues/12680](https://github.com/nestjs/nest/issues/12680)
return '';
}
@@ -253,13 +259,29 @@ export class ValidationPipe implements PipeTransform<any> {
) {
return;
}
// Skip built-in JavaScript primitives to avoid Jest useFakeTimers conflicts
if (BUILT_IN_TYPES.some(type => value instanceof type)) {
return;
}
if (Array.isArray(value)) {
for (const v of value) {
this.stripProtoKeys(v);
}
return;
}
// Delete dangerous prototype pollution keys
delete value.__proto__;
delete value.prototype;
// Only delete constructor if it's NOT a built-in type
const constructorType = value?.constructor;
if (constructorType && !BUILT_IN_TYPES.includes(constructorType)) {
delete value.constructor;
}
for (const key in value) {
this.stripProtoKeys(value[key]);
}

View File

@@ -24,8 +24,7 @@ const REFLECTOR = 'Reflector';
/**
* @publicApi
*/
export interface ClassSerializerInterceptorOptions
extends ClassTransformOptions {
export interface ClassSerializerInterceptorOptions extends ClassTransformOptions {
transformerPackage?: TransformerPackage;
}

View File

@@ -522,10 +522,10 @@ export class ConsoleLogger implements LoggerService {
breakLength,
};
if (this.options.maxArrayLength) {
if (typeof this.options.maxArrayLength !== 'undefined') {
inspectOptions.maxArrayLength = this.options.maxArrayLength;
}
if (this.options.maxStringLength) {
if (typeof this.options.maxStringLength !== 'undefined') {
inspectOptions.maxStringLength = this.options.maxStringLength;
}
@@ -574,10 +574,7 @@ export class ConsoleLogger implements LoggerService {
stack: args[1] as string,
context: this.context,
}
: {
messages: [args[0]],
context: args[1] as string,
};
: { ...this.getContextAndMessagesToPrint(args) };
}
const { messages, context } = this.getContextAndMessagesToPrint(args);

View File

@@ -24,9 +24,12 @@ export function isLogLevelEnabled(
if (logLevels.includes(targetLevel)) {
return true;
}
const highestLogLevelValue = logLevels
.map(level => LOG_LEVEL_VALUES[level])
.sort((a, b) => b - a)?.[0];
let highestLogLevelValue = -Infinity;
for (const level of logLevels) {
const v = LOG_LEVEL_VALUES[level];
if (v > highestLogLevelValue) highestLogLevelValue = v;
}
const targetLevelValue = LOG_LEVEL_VALUES[targetLevel];
return targetLevelValue >= highestLogLevelValue;

View File

@@ -8,6 +8,9 @@ describe('@Sse', () => {
class Test {
@Sse(prefix)
public static test() {}
@Sse(prefix, { method: RequestMethod.POST })
public static testUsingOptions() {}
}
it('should enhance method with expected http status code', () => {
@@ -20,4 +23,14 @@ describe('@Sse', () => {
const metadata = Reflect.getMetadata(SSE_METADATA, Test.test);
expect(metadata).to.be.eql(true);
});
it('should enhance method with expected http status code and method from options', () => {
const path = Reflect.getMetadata(PATH_METADATA, Test.testUsingOptions);
expect(path).to.be.eql('/prefix');
const method = Reflect.getMetadata(METHOD_METADATA, Test.testUsingOptions);
expect(method).to.be.eql(RequestMethod.POST);
const metadata = Reflect.getMetadata(SSE_METADATA, Test.testUsingOptions);
expect(metadata).to.be.eql(true);
});
});

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions */
import { expect } from 'chai';
import { Type } from '../../../common';
import {

View File

@@ -1,6 +1,8 @@
import { expect } from 'chai';
import * as sinon from 'sinon';
import { Readable } from 'stream';
import { StreamableFile } from '../../file-stream';
import { HttpStatus } from '../../enums';
describe('StreamableFile', () => {
describe('when input is a readable stream', () => {
@@ -17,6 +19,13 @@ describe('StreamableFile', () => {
expect(streamableFile.getStream()).to.equal(stream);
});
});
describe('when input is neither Uint8Array nor has pipe method', () => {
it('should not set stream property', () => {
const invalidInput = { notPipe: true };
const streamableFile = new StreamableFile(invalidInput as any);
expect(streamableFile.getStream()).to.be.undefined;
});
});
describe('when options is empty', () => {
it('should return application/octet-stream for type and undefined for others', () => {
const stream = new Readable();
@@ -61,4 +70,135 @@ describe('StreamableFile', () => {
});
});
});
describe('errorHandler', () => {
it('should return the default error handler', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
expect(streamableFile.errorHandler).to.be.a('function');
});
describe('default error handler behavior', () => {
it('should do nothing when response is destroyed', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
const res = {
destroyed: true,
headersSent: false,
statusCode: 200,
end: sinon.spy(),
send: sinon.spy(),
};
streamableFile.errorHandler(new Error('test error'), res as any);
expect(res.end.called).to.be.false;
expect(res.send.called).to.be.false;
});
it('should call res.end() when headers are already sent', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
const res = {
destroyed: false,
headersSent: true,
statusCode: 200,
end: sinon.spy(),
send: sinon.spy(),
};
streamableFile.errorHandler(new Error('test error'), res as any);
expect(res.end.calledOnce).to.be.true;
expect(res.send.called).to.be.false;
});
it('should set status code to BAD_REQUEST and send error message', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
const res = {
destroyed: false,
headersSent: false,
statusCode: 200,
end: sinon.spy(),
send: sinon.spy(),
};
const error = new Error('test error message');
streamableFile.errorHandler(error, res as any);
expect(res.statusCode).to.equal(HttpStatus.BAD_REQUEST);
expect(res.send.calledOnceWith('test error message')).to.be.true;
});
});
});
describe('setErrorHandler', () => {
it('should set a custom error handler', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
const customHandler = sinon.spy();
streamableFile.setErrorHandler(customHandler);
expect(streamableFile.errorHandler).to.equal(customHandler);
});
it('should return the instance for chaining', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
const customHandler = sinon.spy();
const result = streamableFile.setErrorHandler(customHandler);
expect(result).to.equal(streamableFile);
});
});
describe('errorLogger', () => {
it('should return the default error logger', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
expect(streamableFile.errorLogger).to.be.a('function');
});
describe('default error logger behavior', () => {
it('should call logger.error with the error', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
const loggerErrorStub = sinon.stub(
(streamableFile as any).logger,
'error',
);
const error = new Error('test error');
streamableFile.errorLogger(error);
expect(loggerErrorStub.calledOnceWith(error)).to.be.true;
loggerErrorStub.restore();
});
});
});
describe('setErrorLogger', () => {
it('should set a custom error logger', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
const customLogger = sinon.spy();
streamableFile.setErrorLogger(customLogger);
expect(streamableFile.errorLogger).to.equal(customLogger);
});
it('should return the instance for chaining', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
const customLogger = sinon.spy();
const result = streamableFile.setErrorLogger(customLogger);
expect(result).to.equal(streamableFile);
});
});
});

View File

@@ -233,6 +233,32 @@ describe('FileTypeValidator', () => {
expect(await fileTypeValidator.isValid(requestFile)).to.equal(false);
});
it('should return true when no buffer is provided but fallbackToMimetype is enabled and mimetype matches', async () => {
const fileTypeValidator = new FileTypeValidator({
fileType: 'image/jpeg',
fallbackToMimetype: true,
});
const requestFile = {
mimetype: 'image/jpeg', // matches
} as IFile;
expect(await fileTypeValidator.isValid(requestFile)).to.equal(true);
});
it('should return false when no buffer is provided and fallbackToMimetype is enabled but mimetype does not match', async () => {
const fileTypeValidator = new FileTypeValidator({
fileType: 'image/jpeg',
fallbackToMimetype: true,
});
const requestFile = {
mimetype: 'image/png',
} as IFile;
expect(await fileTypeValidator.isValid(requestFile)).to.equal(false);
});
});
describe('buildErrorMessage', () => {
@@ -311,5 +337,36 @@ describe('FileTypeValidator', () => {
expect(await fileTypeValidator.isValid(requestFile)).to.equal(false);
});
it('should return a static custom error message when the file type does not match', async () => {
const expectedFileType = 'image/png';
const actualFileType = 'text/csv';
const fileTypeValidator = new FileTypeValidator({
fileType: expectedFileType,
errorMessage: 'invalid type',
});
const requestFile = { mimetype: actualFileType } as IFile;
expect(fileTypeValidator.buildErrorMessage(requestFile)).to.equal(
'invalid type',
);
});
it('should return a dynamic custom error message based on context when the file type does not match', async () => {
const expectedFileType = 'image/png';
const actualFileType = 'text/csv';
const fileTypeValidator = new FileTypeValidator({
fileType: expectedFileType,
errorMessage: ctx =>
`Received file type '${ctx.file?.mimetype}', but expected '${ctx.config.fileType}'.`,
});
const requestFile = { mimetype: actualFileType } as IFile;
expect(fileTypeValidator.buildErrorMessage(requestFile)).to.equal(
`Received file type '${actualFileType}', but expected '${expectedFileType}'.`,
);
});
});
});

View File

@@ -1,5 +1,6 @@
import { expect } from 'chai';
import { MaxFileSizeValidator } from '../../../pipes';
import { IFile } from '@nestjs/common/pipes/file/interfaces';
describe('MaxFileSizeValidator', () => {
const oneKb = 1024;
@@ -73,5 +74,45 @@ describe('MaxFileSizeValidator', () => {
`Validation failed (current file size is ${currentFileSize}, expected size is less than ${oneKb})`,
);
});
it('should support deprecated message option', async () => {
const currentFileSize = oneKb + 1;
const maxFileSizeValidator = new MaxFileSizeValidator({
maxSize: oneKb,
message: 'File size exceeds the limit',
});
const requestFile = { size: currentFileSize } as IFile;
expect(maxFileSizeValidator.buildErrorMessage(requestFile)).to.equal(
'File size exceeds the limit',
);
});
it('should return a static custom error message when the file size exceeds the limit', async () => {
const currentFileSize = oneKb + 1;
const maxFileSizeValidator = new MaxFileSizeValidator({
maxSize: oneKb,
errorMessage: 'File size exceeds the limit',
});
const requestFile = { size: currentFileSize } as IFile;
expect(maxFileSizeValidator.buildErrorMessage(requestFile)).to.equal(
'File size exceeds the limit',
);
});
it('should return a dynamic custom error message based on context when the file size exceeds the limit', async () => {
const currentFileSize = oneKb + 1;
const maxFileSizeValidator = new MaxFileSizeValidator({
maxSize: oneKb,
errorMessage: ctx =>
`Received file size is ${ctx.file?.size}, but it must be smaller than ${ctx.config.maxSize}.`,
});
const requestFile = { size: currentFileSize } as IFile;
expect(maxFileSizeValidator.buildErrorMessage(requestFile)).to.equal(
`Received file size is ${currentFileSize}, but it must be smaller than ${oneKb}.`,
);
});
});
});

View File

@@ -609,4 +609,133 @@ describe('ValidationPipe', () => {
expect(await target.transform(testObj, m)).to.deep.equal(testObj);
});
});
describe('stripProtoKeys', () => {
beforeEach(() => {
target = new ValidationPipe();
});
describe('with built-in JavaScript primitives', () => {
it('should not throw error when processing Date objects', () => {
const value = { date: new Date() };
expect(() => target['stripProtoKeys'](value)).to.not.throw();
});
it('should not throw error when processing RegExp objects', () => {
const value = { regex: /test/i };
expect(() => target['stripProtoKeys'](value)).to.not.throw();
});
it('should not throw error when processing Error objects', () => {
const value = { error: new Error('test') };
expect(() => target['stripProtoKeys'](value)).to.not.throw();
});
it('should not throw error when processing Map objects', () => {
const value = { map: new Map() };
expect(() => target['stripProtoKeys'](value)).to.not.throw();
});
it('should not throw error when processing Set objects', () => {
const value = { set: new Set() };
expect(() => target['stripProtoKeys'](value)).to.not.throw();
});
it('should preserve Date object properties', () => {
const date = new Date();
const value = { date };
target['stripProtoKeys'](value);
expect(value.date).to.equal(date);
expect(value.date.constructor).to.equal(Date);
});
});
describe('with plain objects', () => {
it('should still strip constructor from regular objects', () => {
const value = { nested: { constructor: 'malicious' } };
target['stripProtoKeys'](value);
// Check if 'constructor' is NOT an own property
expect(value.nested).to.not.have.ownProperty('constructor');
});
it('should strip __proto__ from objects', () => {
const value = { __proto__: { malicious: 'code' } };
target['stripProtoKeys'](value);
expect(value).to.not.have.ownProperty('__proto__');
});
it('should strip prototype from objects', () => {
const value = { prototype: { malicious: 'code' } };
target['stripProtoKeys'](value);
expect(value).to.not.have.ownProperty('prototype');
});
it('should recursively strip nested objects', () => {
const value = {
level1: {
constructor: 'malicious',
level2: {
constructor: 'alsoMalicious',
},
},
};
target['stripProtoKeys'](value);
expect(value.level1).to.not.have.ownProperty('constructor');
expect(value.level1.level2).to.not.have.ownProperty('constructor');
});
});
describe('with arrays', () => {
it('should process arrays recursively', () => {
const value = {
items: [
{ constructor: 'malicious' },
{ constructor: 'alsoMalicious' },
],
};
target['stripProtoKeys'](value);
expect(value.items[0]).to.not.have.ownProperty('constructor');
expect(value.items[1]).to.not.have.ownProperty('constructor');
});
it('should not throw error when array contains Date objects', () => {
const value = { dates: [new Date(), new Date()] };
expect(() => target['stripProtoKeys'](value)).to.not.throw();
});
});
describe('Issue #16195: Jest useFakeTimers compatibility', () => {
beforeEach(() => {
target = new ValidationPipe();
});
it('should handle Date objects with non-configurable constructor', () => {
const value = { date: new Date() };
// Make constructor non-configurable like Jest does
Object.defineProperty(value.date, 'constructor', {
value: Date,
writable: false,
enumerable: false,
configurable: false,
});
// This should NOT throw "Cannot delete property 'constructor'"
expect(() => target['stripProtoKeys'](value)).to.not.throw();
});
it('should not attempt to delete constructor from built-in types', () => {
const testCases = [
{ date: new Date() },
{ regex: /test/i },
{ error: new Error('test') },
{ map: new Map() },
{ set: new Set() },
];
testCases.forEach(testCase => {
expect(() => target['stripProtoKeys'](testCase)).to.not.throw();
});
});
});
});
});

View File

@@ -0,0 +1,468 @@
import { expect } from 'chai';
import * as sinon from 'sinon';
import { of, throwError } from 'rxjs';
import { ClassSerializerInterceptor } from '../../serializer/class-serializer.interceptor';
import { ExecutionContext, CallHandler } from '../../interfaces';
import { StreamableFile } from '../../file-stream';
describe('ClassSerializerInterceptor', () => {
let interceptor: ClassSerializerInterceptor;
let mockReflector: any;
let mockTransformerPackage: any;
let sandbox: sinon.SinonSandbox;
beforeEach(() => {
sandbox = sinon.createSandbox();
mockReflector = {
getAllAndOverride: sandbox.stub(),
};
mockTransformerPackage = {
classToPlain: sandbox.stub(),
plainToInstance: sandbox.stub(),
};
});
afterEach(() => {
sandbox.restore();
});
describe('constructor', () => {
it('should create interceptor with default transformer package', () => {
// This would normally load 'class-transformer' package
// For testing, we pass a mock transformer package
const options = {
transformerPackage: mockTransformerPackage,
};
interceptor = new ClassSerializerInterceptor(mockReflector, options);
expect(interceptor).to.be.instanceOf(ClassSerializerInterceptor);
});
it('should use provided transformer package from options', () => {
const customTransformer = {
classToPlain: sandbox.stub(),
plainToInstance: sandbox.stub(),
};
const options = {
transformerPackage: customTransformer,
};
interceptor = new ClassSerializerInterceptor(mockReflector, options);
expect(interceptor).to.be.instanceOf(ClassSerializerInterceptor);
});
});
describe('intercept', () => {
let mockExecutionContext: ExecutionContext;
let mockCallHandler: CallHandler;
beforeEach(() => {
interceptor = new ClassSerializerInterceptor(mockReflector, {
transformerPackage: mockTransformerPackage,
});
mockExecutionContext = {
getHandler: sandbox.stub(),
getClass: sandbox.stub(),
} as any;
mockCallHandler = {
handle: sandbox.stub(),
} as any;
});
it('should transform plain object response', done => {
const response = { id: 1, name: 'Test' };
const transformedResponse = { id: 1, name: 'Test' };
mockReflector.getAllAndOverride.returns(undefined);
mockTransformerPackage.classToPlain.returns(transformedResponse);
(mockCallHandler.handle as sinon.SinonStub).returns(of(response));
interceptor
.intercept(mockExecutionContext, mockCallHandler)
.subscribe(result => {
expect(result).to.equal(transformedResponse);
done();
});
});
it('should transform array of objects', done => {
const response = [
{ id: 1, name: 'Test1' },
{ id: 2, name: 'Test2' },
];
const transformedItem1 = { id: 1, name: 'Test1' };
const transformedItem2 = { id: 2, name: 'Test2' };
mockReflector.getAllAndOverride.returns(undefined);
mockTransformerPackage.classToPlain
.onFirstCall()
.returns(transformedItem1);
mockTransformerPackage.classToPlain
.onSecondCall()
.returns(transformedItem2);
(mockCallHandler.handle as sinon.SinonStub).returns(of(response));
interceptor
.intercept(mockExecutionContext, mockCallHandler)
.subscribe(result => {
expect(result).to.be.an('array').with.lengthOf(2);
expect(result[0]).to.equal(transformedItem1);
expect(result[1]).to.equal(transformedItem2);
done();
});
});
it('should merge context options with default options', done => {
const response = { id: 1, name: 'Test' };
const defaultOptions = { excludeExtraneousValues: true };
const contextOptions = { groups: ['user'] };
const transformedResponse = { id: 1 };
interceptor = new ClassSerializerInterceptor(mockReflector, {
transformerPackage: mockTransformerPackage,
...defaultOptions,
});
mockReflector.getAllAndOverride.returns(contextOptions);
mockTransformerPackage.classToPlain.returns(transformedResponse);
(mockCallHandler.handle as sinon.SinonStub).returns(of(response));
interceptor
.intercept(mockExecutionContext, mockCallHandler)
.subscribe(result => {
const callArgs = mockTransformerPackage.classToPlain.getCall(0).args;
expect(callArgs[1]).to.deep.include(defaultOptions);
expect(callArgs[1]).to.deep.include(contextOptions);
done();
});
});
it('should call reflector with handler and class', done => {
const response = { id: 1 };
const mockHandler = {};
const mockClass = {};
(mockExecutionContext.getHandler as sinon.SinonStub).returns(mockHandler);
(mockExecutionContext.getClass as sinon.SinonStub).returns(mockClass);
mockReflector.getAllAndOverride.returns(undefined);
mockTransformerPackage.classToPlain.returns(response);
(mockCallHandler.handle as sinon.SinonStub).returns(of(response));
interceptor
.intercept(mockExecutionContext, mockCallHandler)
.subscribe(() => {
expect(mockReflector.getAllAndOverride.calledOnce).to.be.true;
const args = mockReflector.getAllAndOverride.getCall(0).args;
expect(args[1]).to.deep.equal([mockHandler, mockClass]);
done();
});
});
});
describe('serialize', () => {
beforeEach(() => {
interceptor = new ClassSerializerInterceptor(mockReflector, {
transformerPackage: mockTransformerPackage,
});
});
it('should return primitive values unchanged', () => {
expect(interceptor.serialize('string' as any, {})).to.equal('string');
expect(interceptor.serialize(123 as any, {})).to.equal(123);
expect(interceptor.serialize(true as any, {})).to.equal(true);
});
it('should return null unchanged', () => {
expect(interceptor.serialize(null as any, {})).to.be.null;
});
it('should return undefined unchanged', () => {
expect(interceptor.serialize(undefined as any, {})).to.be.undefined;
});
it('should return StreamableFile unchanged', () => {
const streamableFile = new StreamableFile(Buffer.from('test'));
const result = interceptor.serialize(streamableFile as any, {});
expect(result).to.equal(streamableFile);
expect(mockTransformerPackage.classToPlain.called).to.be.false;
});
it('should transform plain object', () => {
const input = { id: 1, name: 'Test' };
const output = { id: 1 };
mockTransformerPackage.classToPlain.returns(output);
const result = interceptor.serialize(input, {});
expect(result).to.equal(output);
expect(mockTransformerPackage.classToPlain.calledOnce).to.be.true;
});
it('should transform array of objects', () => {
const input = [{ id: 1 }, { id: 2 }];
const output1 = { id: 1 };
const output2 = { id: 2 };
mockTransformerPackage.classToPlain.onFirstCall().returns(output1);
mockTransformerPackage.classToPlain.onSecondCall().returns(output2);
const result = interceptor.serialize(input, {});
expect(result).to.be.an('array').with.lengthOf(2);
expect(result[0]).to.equal(output1);
expect(result[1]).to.equal(output2);
expect(mockTransformerPackage.classToPlain.calledTwice).to.be.true;
});
it('should handle empty array', () => {
const input: any[] = [];
const result = interceptor.serialize(input, {});
expect(result).to.be.an('array').that.is.empty;
expect(mockTransformerPackage.classToPlain.called).to.be.false;
});
});
describe('transformToPlain', () => {
beforeEach(() => {
interceptor = new ClassSerializerInterceptor(mockReflector, {
transformerPackage: mockTransformerPackage,
});
});
it('should return falsy values unchanged', () => {
expect(interceptor.transformToPlain(null, {})).to.be.null;
expect(interceptor.transformToPlain(undefined, {})).to.be.undefined;
expect(interceptor.transformToPlain(0 as any, {})).to.equal(0);
expect(interceptor.transformToPlain(false as any, {})).to.be.false;
expect(interceptor.transformToPlain('' as any, {})).to.equal('');
});
it('should use classToPlain when no type option provided', () => {
const input = { id: 1, name: 'Test' };
const output = { id: 1 };
mockTransformerPackage.classToPlain.returns(output);
const result = interceptor.transformToPlain(input, {});
expect(result).to.equal(output);
expect(mockTransformerPackage.classToPlain.calledOnceWith(input, {})).to
.be.true;
expect(mockTransformerPackage.plainToInstance.called).to.be.false;
});
it('should use classToPlain when input is instance of options.type', () => {
class UserDto {
id: number;
name: string;
}
const input = new UserDto();
input.id = 1;
input.name = 'Test';
const output = { id: 1 };
const options = { type: UserDto };
mockTransformerPackage.classToPlain.returns(output);
const result = interceptor.transformToPlain(input, options);
expect(result).to.equal(output);
expect(mockTransformerPackage.classToPlain.calledOnce).to.be.true;
expect(mockTransformerPackage.plainToInstance.called).to.be.false;
});
it('should convert plain to instance then to plain when type provided but not matching', () => {
class UserDto {
id: number;
}
const plainInput = { id: 1, name: 'Test', password: 'secret' };
const instanceOutput = new UserDto();
instanceOutput.id = 1;
const finalOutput = { id: 1 };
const options = { type: UserDto };
mockTransformerPackage.plainToInstance.returns(instanceOutput);
mockTransformerPackage.classToPlain.returns(finalOutput);
const result = interceptor.transformToPlain(plainInput, options);
expect(result).to.equal(finalOutput);
expect(
mockTransformerPackage.plainToInstance.calledOnceWith(
UserDto,
plainInput,
options,
),
).to.be.true;
expect(
mockTransformerPackage.classToPlain.calledOnceWith(
instanceOutput,
options,
),
).to.be.true;
});
it('should handle complex nested objects', () => {
const input = {
user: { id: 1, name: 'Test' },
posts: [{ id: 1, title: 'Post 1' }],
};
const output = {
user: { id: 1 },
posts: [{ id: 1 }],
};
mockTransformerPackage.classToPlain.returns(output);
const result = interceptor.transformToPlain(input, {});
expect(result).to.equal(output);
});
});
describe('getContextOptions', () => {
beforeEach(() => {
interceptor = new ClassSerializerInterceptor(mockReflector, {
transformerPackage: mockTransformerPackage,
});
});
it('should call reflector getAllAndOverride with correct arguments', () => {
const mockHandler = {};
const mockClass = {};
const mockContext = {
getHandler: sandbox.stub().returns(mockHandler),
getClass: sandbox.stub().returns(mockClass),
} as any;
const expectedOptions = { groups: ['admin'] };
mockReflector.getAllAndOverride.returns(expectedOptions);
const result = (interceptor as any).getContextOptions(mockContext);
expect(mockReflector.getAllAndOverride.calledOnce).to.be.true;
const callArgs = mockReflector.getAllAndOverride.getCall(0).args;
expect(callArgs[1]).to.deep.equal([mockHandler, mockClass]);
expect(result).to.equal(expectedOptions);
});
it('should return undefined when no metadata exists', () => {
const mockContext = {
getHandler: sandbox.stub().returns({}),
getClass: sandbox.stub().returns({}),
} as any;
mockReflector.getAllAndOverride.returns(undefined);
const result = (interceptor as any).getContextOptions(mockContext);
expect(result).to.be.undefined;
});
it('should respect handler metadata over class metadata', () => {
const mockHandler = {};
const mockClass = {};
const mockContext = {
getHandler: sandbox.stub().returns(mockHandler),
getClass: sandbox.stub().returns(mockClass),
} as any;
// getAllAndOverride should merge with handler taking precedence
const handlerOptions = {
groups: ['user'],
excludeExtraneousValues: true,
};
mockReflector.getAllAndOverride.returns(handlerOptions);
const result = (interceptor as any).getContextOptions(mockContext);
expect(result).to.deep.equal(handlerOptions);
// Verify it's checking handler first, then class
const callArgs = mockReflector.getAllAndOverride.getCall(0).args;
expect(callArgs[1][0]).to.equal(mockHandler);
expect(callArgs[1][1]).to.equal(mockClass);
});
});
describe('edge cases and error handling', () => {
beforeEach(() => {
interceptor = new ClassSerializerInterceptor(mockReflector, {
transformerPackage: mockTransformerPackage,
});
});
it('should handle array with mixed types', () => {
const input = [
{ id: 1, name: 'Test' },
null,
undefined,
{ id: 2, name: 'Test2' },
];
mockTransformerPackage.classToPlain
.onCall(0)
.returns({ id: 1, name: 'Test' });
mockTransformerPackage.classToPlain.onCall(1).returns(null);
mockTransformerPackage.classToPlain.onCall(2).returns(undefined);
mockTransformerPackage.classToPlain
.onCall(3)
.returns({ id: 2, name: 'Test2' });
const result = interceptor.serialize(input, {});
expect(result).to.be.an('array').with.lengthOf(4);
expect(result[1]).to.be.null;
expect(result[2]).to.be.undefined;
});
it('should not transform when response is not an object', () => {
const input = 'plain string';
const result = interceptor.serialize(input as any, {});
expect(result).to.equal(input);
expect(mockTransformerPackage.classToPlain.called).to.be.false;
});
it('should handle Date objects', () => {
const date = new Date();
const output = { date: date.toISOString() };
mockTransformerPackage.classToPlain.returns(output);
const result = interceptor.serialize({ date } as any, {});
expect(mockTransformerPackage.classToPlain.calledOnce).to.be.true;
});
it('should pass through options to transformer', () => {
const input = { id: 1, name: 'Test', password: 'secret' };
const options = {
excludeExtraneousValues: true,
groups: ['public'],
strategy: 'excludeAll',
};
mockTransformerPackage.classToPlain.returns({ id: 1, name: 'Test' });
interceptor.transformToPlain(input, options as any);
expect(mockTransformerPackage.classToPlain.calledOnce).to.be.true;
const callArgs = mockTransformerPackage.classToPlain.getCall(0).args;
expect(callArgs[1]).to.deep.include(options);
});
});
});

View File

@@ -897,6 +897,36 @@ describe('Logger', () => {
processStdoutWriteSpy.restore();
});
it('should respect maxStringLength when set to 0', () => {
const consoleLogger = new ConsoleLogger({
colors: false,
compact: false,
maxStringLength: 0,
});
consoleLogger.log({ name: 'abcdef' });
expect(processStdoutWriteSpy.calledOnce).to.be.true;
expect(processStdoutWriteSpy.firstCall.firstArg).to.include(
"''... 6 more characters",
);
});
it('should respect maxArrayLength when set to 0', () => {
const consoleLogger = new ConsoleLogger({
colors: false,
compact: false,
maxArrayLength: 0,
});
consoleLogger.log({ items: ['a', 'b', 'c'] });
expect(processStdoutWriteSpy.calledOnce).to.be.true;
expect(processStdoutWriteSpy.firstCall.firstArg).to.include(
'... 3 more items',
);
});
it('should support custom formatter', () => {
class CustomConsoleLogger extends ConsoleLogger {
protected formatMessage(

View File

@@ -1,5 +1,5 @@
<p align="center">
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="_blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
@@ -49,7 +49,7 @@ Please make sure to read the [Issue Reporting Checklist](https://github.com/nest
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
With official support, you can get expert help straight from the Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
## Support
@@ -63,6 +63,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td><a href="https://microsoft.com/" target="_blank"><img src="https://nestjs.com/img/logos/microsoft-logo.png" width="180" valign="middle" /></a></td>
<td><a href="https://mojam.co" target="_blank"><img src="https://nestjs.com/img/logos/mojam-logo.png" width="80" valign="middle" /></a></td>
<td><a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
<td><a href="https://serpapi.com/" target="_blank"><img src="https://nestjs.com/img/logos/serpapi-logo.png" width="150" valign="middle" /></a></td>
</tr>
</table>
@@ -92,6 +93,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://www.itflashcards.com/" target="_blank"><img src="https://nestjs.com/img/logos/it_flashcards-logo.png" width="170" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://arcjet.com/?ref=nestjs" target="_blank"><img src="https://nestjs.com/img/logos/arcjet-logo.svg" width="170" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://crawljobs.com" target="_blank"><img src="https://nestjs.com/img/logos/crawljobs-logo.svg" width="130" valign="middle" /></a></td>
</tr><tr>
<td align="center" valign="middle"><a href="https://pandektes.com" target="_blank"><img src="https://nestjs.com/img/logos/pandektes-logo.png" width="65" valign="middle" /></a></td>
</tr>
</table>

View File

@@ -9,8 +9,7 @@ export abstract class AbstractHttpAdapter<
TServer = any,
TRequest = any,
TResponse = any,
> implements HttpServer<TRequest, TResponse>
{
> implements HttpServer<TRequest, TResponse> {
protected httpServer: TServer;
protected onRouteTriggered:
| ((requestMethod: RequestMethod, path: string) => void)

View File

@@ -29,7 +29,8 @@ export abstract class AbstractInstanceResolver {
const pluckInstance = ({ wrapperRef }: InstanceLink) => {
if (
wrapperRef.scope === Scope.REQUEST ||
wrapperRef.scope === Scope.TRANSIENT
wrapperRef.scope === Scope.TRANSIENT ||
!wrapperRef.isDependencyTreeStatic()
) {
throw new InvalidClassScopeException(typeOrToken);
}
@@ -59,7 +60,7 @@ export abstract class AbstractInstanceResolver {
const pluckInstance = async (instanceLink: InstanceLink) => {
const { wrapperRef, collection } = instanceLink;
if (wrapperRef.isDependencyTreeStatic() && !wrapperRef.isTransient) {
return this.get(typeOrToken, { strict: options?.strict });
return wrapperRef.instance;
}
const ctorHost = wrapperRef.instance || { constructor: typeOrToken };

View File

@@ -553,9 +553,13 @@ export class Injector {
* instantiated beforehand.
*/
instanceHost.donePromise &&
void instanceHost.donePromise.then(() =>
this.loadProvider(instanceWrapper, moduleRef, contextId, inquirer),
);
void instanceHost.donePromise
.then(() =>
this.loadProvider(instanceWrapper, moduleRef, contextId, inquirer),
)
.catch(err => {
instanceWrapper.settlementSignal?.error(err);
});
}
if (instanceWrapper.async) {
const host = instanceWrapper.getInstanceByContextId(
@@ -615,7 +619,7 @@ export class Injector {
moduleRef,
dependencyContext.name!,
wrapper,
[],
new Set<string>(),
contextId,
inquirer,
keyOrIndex,
@@ -635,7 +639,7 @@ export class Injector {
moduleRef: Module,
name: InjectionToken,
wrapper: InstanceWrapper,
moduleRegistry: any[] = [],
moduleRegistry: Set<string> = new Set<string>(),
contextId = STATIC_CONTEXT,
inquirer?: InstanceWrapper,
keyOrIndex?: symbol | string | number,
@@ -653,11 +657,11 @@ export class Injector {
);
}
for (const relatedModule of children) {
if (moduleRegistry.includes(relatedModule.id)) {
if (moduleRegistry.has(relatedModule.id)) {
continue;
}
this.printLookingForProviderLog(name, relatedModule);
moduleRegistry.push(relatedModule.id);
moduleRegistry.add(relatedModule.id);
const { providers, exports } = relatedModule;
if (!exports.has(name) || !providers.has(name)) {

View File

@@ -408,17 +408,36 @@ export class InstanceWrapper<T = any> {
contextId: ContextId,
inquirer: InstanceWrapper | undefined,
): boolean {
if (!this.isDependencyTreeStatic() || contextId !== STATIC_CONTEXT) {
return false;
}
// Non-transient provider in static context
if (!this.isTransient) {
return true;
}
const isInquirerRequestScoped =
inquirer && !inquirer.isDependencyTreeStatic();
const isStaticTransient = this.isTransient && !isInquirerRequestScoped;
const rootInquirer = inquirer?.getRootInquirer();
return (
this.isDependencyTreeStatic() &&
contextId === STATIC_CONTEXT &&
(!this.isTransient ||
(isStaticTransient && !!inquirer && !inquirer.isTransient) ||
(isStaticTransient && !!rootInquirer && !rootInquirer.isTransient))
);
// Transient provider inquired by non-transient (e.g., DEFAULT -> TRANSIENT)
if (isStaticTransient && inquirer && !inquirer.isTransient) {
return true;
}
// Nested transient with non-transient root (e.g., DEFAULT -> TRANSIENT -> TRANSIENT)
if (isStaticTransient && rootInquirer && !rootInquirer.isTransient) {
return true;
}
// Nested transient during initial instantiation (rootInquirer not yet set)
if (isStaticTransient && inquirer?.isTransient && !rootInquirer) {
return true;
}
return false;
}
public attachRootInquirer(inquirer: InstanceWrapper) {

View File

@@ -7,9 +7,7 @@ import { ModuleOpaqueKeyFactory } from './interfaces/module-opaque-key-factory.i
const K_MODULE_ID = Symbol('K_MODULE_ID');
export class ByReferenceModuleOpaqueKeyFactory
implements ModuleOpaqueKeyFactory
{
export class ByReferenceModuleOpaqueKeyFactory implements ModuleOpaqueKeyFactory {
private readonly keyGenerationStrategy: 'random' | 'shallow';
constructor(options?: { keyGenerationStrategy: 'random' | 'shallow' }) {

View File

@@ -10,9 +10,7 @@ import { ModuleOpaqueKeyFactory } from './interfaces/module-opaque-key-factory.i
const CLASS_STR = 'class ';
const CLASS_STR_LEN = CLASS_STR.length;
export class DeepHashedModuleOpaqueKeyFactory
implements ModuleOpaqueKeyFactory
{
export class DeepHashedModuleOpaqueKeyFactory implements ModuleOpaqueKeyFactory {
private readonly moduleIdsCache = new WeakMap<Type<unknown>, string>();
private readonly moduleTokenCache = new Map<string, string>();
private readonly logger = new Logger(DeepHashedModuleOpaqueKeyFactory.name, {

View File

@@ -33,8 +33,8 @@ import { RouteInfoPathExtractor } from './route-info-path-extractor';
import { RoutesMapper } from './routes-mapper';
export class MiddlewareModule<
TAppOptions extends
NestApplicationContextOptions = NestApplicationContextOptions,
TAppOptions extends NestApplicationContextOptions =
NestApplicationContextOptions,
> {
private readonly routerProxy = new RouterProxy();
private readonly exceptionFiltersCache = new WeakMap();

View File

@@ -10,6 +10,7 @@ import {
DynamicModule,
GetOrResolveOptions,
SelectOptions,
ShutdownHooksOptions,
Type,
} from '@nestjs/common/interfaces';
import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface';
@@ -37,9 +38,9 @@ import { Module } from './injector/module';
* @publicApi
*/
export class NestApplicationContext<
TOptions extends
NestApplicationContextOptions = NestApplicationContextOptions,
>
TOptions extends NestApplicationContextOptions =
NestApplicationContextOptions,
>
extends AbstractInstanceResolver
implements INestApplicationContext
{
@@ -316,10 +317,14 @@ export class NestApplicationContext<
* process receives a shutdown signal.
*
* @param {ShutdownSignal[]} [signals=[]] The system signals it should listen to
* @param {ShutdownHooksOptions} [options={}] Options for configuring shutdown hooks behavior
*
* @returns {this} The Nest application context instance
*/
public enableShutdownHooks(signals: (ShutdownSignal | string)[] = []): this {
public enableShutdownHooks(
signals: (ShutdownSignal | string)[] = [],
options: ShutdownHooksOptions = {},
): this {
if (isEmpty(signals)) {
signals = Object.keys(ShutdownSignal).map(
(key: string) => ShutdownSignal[key],
@@ -336,7 +341,7 @@ export class NestApplicationContext<
.filter(signal => !this.activeShutdownSignals.includes(signal))
.toArray();
this.listenToShutdownSignals(signals);
this.listenToShutdownSignals(signals, options);
return this;
}
@@ -351,8 +356,12 @@ export class NestApplicationContext<
* process events
*
* @param {string[]} signals The system signals it should listen to
* @param {ShutdownHooksOptions} options Options for configuring shutdown hooks behavior
*/
protected listenToShutdownSignals(signals: string[]) {
protected listenToShutdownSignals(
signals: string[],
options: ShutdownHooksOptions = {},
) {
let receivedSignal = false;
const cleanup = async (signal: string) => {
try {
@@ -368,7 +377,15 @@ export class NestApplicationContext<
await this.dispose();
await this.callShutdownHook(signal);
signals.forEach(sig => process.removeListener(sig, cleanup));
process.kill(process.pid, signal);
if (options.useProcessExit) {
// Use process.exit() to ensure the 'exit' event is properly triggered.
// This is required for async loggers (like Pino with transports)
// to flush their buffers before the process terminates.
process.exit(0);
} else {
process.kill(process.pid, signal);
}
} catch (err) {
Logger.error(
MESSAGES.ERROR_DURING_SHUTDOWN,

View File

@@ -394,6 +394,9 @@ export class NestApplication
}
public useGlobalFilters(...filters: ExceptionFilter[]): this {
filters = this.applyInstanceDecoratorIfRegistered<ExceptionFilter>(
...filters,
);
this.config.useGlobalFilters(...filters);
filters.forEach(item =>
this.graphInspector.insertOrphanedEnhancer({
@@ -405,6 +408,9 @@ export class NestApplication
}
public useGlobalPipes(...pipes: PipeTransform<any>[]): this {
pipes = this.applyInstanceDecoratorIfRegistered<PipeTransform<any>>(
...pipes,
);
this.config.useGlobalPipes(...pipes);
pipes.forEach(item =>
this.graphInspector.insertOrphanedEnhancer({
@@ -416,6 +422,9 @@ export class NestApplication
}
public useGlobalInterceptors(...interceptors: NestInterceptor[]): this {
interceptors = this.applyInstanceDecoratorIfRegistered<NestInterceptor>(
...interceptors,
);
this.config.useGlobalInterceptors(...interceptors);
interceptors.forEach(item =>
this.graphInspector.insertOrphanedEnhancer({
@@ -427,6 +436,7 @@ export class NestApplication
}
public useGlobalGuards(...guards: CanActivate[]): this {
guards = this.applyInstanceDecoratorIfRegistered<CanActivate>(...guards);
this.config.useGlobalGuards(...guards);
guards.forEach(item =>
this.graphInspector.insertOrphanedEnhancer({
@@ -474,4 +484,14 @@ export class NestApplication
instance,
);
}
private applyInstanceDecoratorIfRegistered<T>(...instances: T[]): T[] {
if (this.appOptions.instrument?.instanceDecorator) {
return instances.map(
instance =>
this.appOptions.instrument!.instanceDecorator(instance) as T,
);
}
return instances;
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "11.1.8",
"version": "11.1.14",
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -39,7 +39,7 @@
"uid": "2.0.2"
},
"devDependencies": {
"@nestjs/common": "11.1.8"
"@nestjs/common": "11.1.14"
},
"peerDependencies": {
"@nestjs/common": "^11.0.0",
@@ -59,5 +59,6 @@
"@nestjs/platform-express": {
"optional": true
}
}
},
"gitHead": "bcb4747f7598a9d2655c8184a6d729ebefa07fbd"
}

View File

@@ -434,7 +434,7 @@ export class RouterExecutionContext {
}
const isSseHandler = !!this.reflectSse(callback);
if (isSseHandler) {
return <
return async <
TResult extends Observable<unknown> = any,
TResponse extends HeaderStream = any,
TRequest extends IncomingMessage = any,
@@ -443,7 +443,7 @@ export class RouterExecutionContext {
res: TResponse,
req: TRequest,
) => {
this.responseController.sse(
await this.responseController.sse(
result,
(res as any).raw || res,
(req as any).raw || req,

View File

@@ -99,12 +99,12 @@ export class RouterResponseController {
this.applicationRef.status(response, statusCode);
}
public sse<
public async sse<
TInput extends Observable<unknown> = any,
TResponse extends WritableHeaderStream = any,
TRequest extends IncomingMessage = any,
>(
result: TInput,
result: TInput | Promise<TInput>,
response: TResponse,
request: TRequest,
options?: { additionalHeaders: AdditionalHeaders },
@@ -114,12 +114,22 @@ export class RouterResponseController {
return;
}
this.assertObservable(result);
const observableResult = await Promise.resolve(result);
this.assertObservable(observableResult);
const stream = new SseStream(request);
stream.pipe(response, options);
const subscription = result
// Extract custom status code from response if it was set
const customStatusCode = (response as any).statusCode;
const pipeOptions =
typeof customStatusCode !== 'undefined'
? { ...options, statusCode: customStatusCode }
: options;
stream.pipe(response, pipeOptions);
const subscription = observableResult
.pipe(
map((message): MessageEvent => {
if (isObject(message)) {

View File

@@ -66,11 +66,13 @@ export class SseStream extends Transform {
destination: T,
options?: {
additionalHeaders?: AdditionalHeaders;
statusCode?: number;
end?: boolean;
},
): T {
if (destination.writeHead) {
destination.writeHead(200, {
const statusCode = options?.statusCode ?? 200;
destination.writeHead(statusCode, {
...options?.additionalHeaders,
// See https://github.com/dunglas/mercure/blob/master/hub/subscribe.go#L124-L130
'Content-Type': 'text/event-stream',

View File

@@ -0,0 +1,424 @@
import { expect } from 'chai';
import { InstanceWrapper } from '../../injector/instance-wrapper';
import { ModulesContainer } from '../../injector/modules-container';
import { DiscoverableMetaHostCollection } from '../../discovery/discoverable-meta-host-collection';
describe('DiscoverableMetaHostCollection', () => {
beforeEach(() => {
// Clear the metaHostLinks map before each test
DiscoverableMetaHostCollection.metaHostLinks.clear();
});
describe('addClassMetaHostLink', () => {
it('should add a link between a class reference and a metadata key', () => {
class TestClass {}
const metadataKey = 'test-meta-key';
DiscoverableMetaHostCollection.addClassMetaHostLink(
TestClass,
metadataKey,
);
expect(DiscoverableMetaHostCollection.metaHostLinks.get(TestClass)).to.eq(
metadataKey,
);
});
it('should overwrite existing link for the same class', () => {
class TestClass {}
DiscoverableMetaHostCollection.addClassMetaHostLink(TestClass, 'key1');
DiscoverableMetaHostCollection.addClassMetaHostLink(TestClass, 'key2');
expect(DiscoverableMetaHostCollection.metaHostLinks.get(TestClass)).to.eq(
'key2',
);
});
});
describe('insertByMetaKey', () => {
it('should create a new set when metaKey does not exist in collection', () => {
const collection = new Map<string, Set<InstanceWrapper>>();
const instanceWrapper = new InstanceWrapper({
token: 'TestToken',
name: 'TestProvider',
});
const metaKey = 'test-key';
DiscoverableMetaHostCollection.insertByMetaKey(
metaKey,
instanceWrapper,
collection,
);
expect(collection.has(metaKey)).to.be.true;
expect(collection.get(metaKey)!.has(instanceWrapper)).to.be.true;
expect(collection.get(metaKey)!.size).to.eq(1);
});
it('should add to existing set when metaKey already exists', () => {
const collection = new Map<string, Set<InstanceWrapper>>();
const instanceWrapper1 = new InstanceWrapper({
token: 'TestToken1',
name: 'TestProvider1',
});
const instanceWrapper2 = new InstanceWrapper({
token: 'TestToken2',
name: 'TestProvider2',
});
const metaKey = 'test-key';
DiscoverableMetaHostCollection.insertByMetaKey(
metaKey,
instanceWrapper1,
collection,
);
DiscoverableMetaHostCollection.insertByMetaKey(
metaKey,
instanceWrapper2,
collection,
);
expect(collection.get(metaKey)!.size).to.eq(2);
expect(collection.get(metaKey)!.has(instanceWrapper1)).to.be.true;
expect(collection.get(metaKey)!.has(instanceWrapper2)).to.be.true;
});
});
describe('getProvidersByMetaKey', () => {
it('should return empty set when hostContainerRef is not registered', () => {
const hostContainerRef = new ModulesContainer();
const metaKey = 'test-key';
const result = DiscoverableMetaHostCollection.getProvidersByMetaKey(
hostContainerRef,
metaKey,
);
expect(result).to.be.instanceOf(Set);
expect(result.size).to.eq(0);
});
it('should return empty set when metaKey is not found', () => {
const hostContainerRef = new ModulesContainer();
class TestClass {}
// Register a provider with a different metaKey
DiscoverableMetaHostCollection.addClassMetaHostLink(
TestClass,
'other-key',
);
const instanceWrapper = new InstanceWrapper({
token: TestClass,
name: 'TestProvider',
metatype: TestClass,
});
DiscoverableMetaHostCollection.inspectProvider(
hostContainerRef,
instanceWrapper,
);
const result = DiscoverableMetaHostCollection.getProvidersByMetaKey(
hostContainerRef,
'non-existent-key',
);
expect(result).to.be.instanceOf(Set);
expect(result.size).to.eq(0);
});
it('should return providers with matching metaKey', () => {
const hostContainerRef = new ModulesContainer();
class TestClass {}
const metaKey = 'test-key';
DiscoverableMetaHostCollection.addClassMetaHostLink(TestClass, metaKey);
const instanceWrapper = new InstanceWrapper({
token: TestClass,
name: 'TestProvider',
metatype: TestClass,
});
DiscoverableMetaHostCollection.inspectProvider(
hostContainerRef,
instanceWrapper,
);
const result = DiscoverableMetaHostCollection.getProvidersByMetaKey(
hostContainerRef,
metaKey,
);
expect(result.size).to.eq(1);
expect(result.has(instanceWrapper)).to.be.true;
});
});
describe('getControllersByMetaKey', () => {
it('should return empty set when hostContainerRef is not registered', () => {
const hostContainerRef = new ModulesContainer();
const metaKey = 'test-key';
const result = DiscoverableMetaHostCollection.getControllersByMetaKey(
hostContainerRef,
metaKey,
);
expect(result).to.be.instanceOf(Set);
expect(result.size).to.eq(0);
});
it('should return controllers with matching metaKey', () => {
const hostContainerRef = new ModulesContainer();
class TestController {}
const metaKey = 'controller-key';
DiscoverableMetaHostCollection.addClassMetaHostLink(
TestController,
metaKey,
);
const instanceWrapper = new InstanceWrapper({
token: TestController,
name: 'TestController',
metatype: TestController,
});
DiscoverableMetaHostCollection.inspectController(
hostContainerRef,
instanceWrapper,
);
const result = DiscoverableMetaHostCollection.getControllersByMetaKey(
hostContainerRef,
metaKey,
);
expect(result.size).to.eq(1);
expect(result.has(instanceWrapper)).to.be.true;
});
});
describe('inspectProvider', () => {
it('should not add provider when no metaKey is linked', () => {
const hostContainerRef = new ModulesContainer();
class UnlinkedClass {}
const instanceWrapper = new InstanceWrapper({
token: UnlinkedClass,
name: 'UnlinkedProvider',
metatype: UnlinkedClass,
});
DiscoverableMetaHostCollection.inspectProvider(
hostContainerRef,
instanceWrapper,
);
const result = DiscoverableMetaHostCollection.getProvidersByMetaKey(
hostContainerRef,
'any-key',
);
expect(result.size).to.eq(0);
});
it('should add provider when metaKey is linked', () => {
const hostContainerRef = new ModulesContainer();
class LinkedClass {}
const metaKey = 'linked-key';
DiscoverableMetaHostCollection.addClassMetaHostLink(LinkedClass, metaKey);
const instanceWrapper = new InstanceWrapper({
token: LinkedClass,
name: 'LinkedProvider',
metatype: LinkedClass,
});
DiscoverableMetaHostCollection.inspectProvider(
hostContainerRef,
instanceWrapper,
);
const result = DiscoverableMetaHostCollection.getProvidersByMetaKey(
hostContainerRef,
metaKey,
);
expect(result.size).to.eq(1);
expect(result.has(instanceWrapper)).to.be.true;
});
it('should not add provider when metatype is null and inject is not provided (useValue without inject)', () => {
const hostContainerRef = new ModulesContainer();
class ValueClass {}
const metaKey = 'value-key';
DiscoverableMetaHostCollection.addClassMetaHostLink(ValueClass, metaKey);
const instance = new ValueClass();
const instanceWrapper = new InstanceWrapper({
token: 'VALUE_TOKEN',
name: 'ValueProvider',
metatype: null as any,
instance,
});
DiscoverableMetaHostCollection.inspectProvider(
hostContainerRef,
instanceWrapper,
);
// When metatype is null and inject is not provided, the provider cannot be resolved
// because the code uses `metatype || inject` condition for performance optimization
const result = DiscoverableMetaHostCollection.getProvidersByMetaKey(
hostContainerRef,
metaKey,
);
expect(result.size).to.eq(0);
});
it('should use instance constructor when metatype is null but inject is provided', () => {
const hostContainerRef = new ModulesContainer();
class ValueClass {}
const metaKey = 'value-key';
DiscoverableMetaHostCollection.addClassMetaHostLink(ValueClass, metaKey);
const instance = new ValueClass();
const instanceWrapper = new InstanceWrapper({
token: 'VALUE_TOKEN',
name: 'ValueProvider',
metatype: null as any,
inject: [], // Providing inject (even empty) makes the condition truthy
instance,
});
DiscoverableMetaHostCollection.inspectProvider(
hostContainerRef,
instanceWrapper,
);
const result = DiscoverableMetaHostCollection.getProvidersByMetaKey(
hostContainerRef,
metaKey,
);
expect(result.size).to.eq(1);
});
it('should use instance constructor when inject is provided (useFactory)', () => {
const hostContainerRef = new ModulesContainer();
class FactoryResultClass {}
const metaKey = 'factory-key';
DiscoverableMetaHostCollection.addClassMetaHostLink(
FactoryResultClass,
metaKey,
);
const instance = new FactoryResultClass();
const instanceWrapper = new InstanceWrapper({
token: 'FACTORY_TOKEN',
name: 'FactoryProvider',
metatype: () => instance,
inject: ['DEP1', 'DEP2'],
instance,
});
DiscoverableMetaHostCollection.inspectProvider(
hostContainerRef,
instanceWrapper,
);
const result = DiscoverableMetaHostCollection.getProvidersByMetaKey(
hostContainerRef,
metaKey,
);
expect(result.size).to.eq(1);
});
});
describe('inspectController', () => {
it('should not add controller when no metaKey is linked', () => {
const hostContainerRef = new ModulesContainer();
class UnlinkedController {}
const instanceWrapper = new InstanceWrapper({
token: UnlinkedController,
name: 'UnlinkedController',
metatype: UnlinkedController,
});
DiscoverableMetaHostCollection.inspectController(
hostContainerRef,
instanceWrapper,
);
const result = DiscoverableMetaHostCollection.getControllersByMetaKey(
hostContainerRef,
'any-key',
);
expect(result.size).to.eq(0);
});
it('should add controller when metaKey is linked', () => {
const hostContainerRef = new ModulesContainer();
class LinkedController {}
const metaKey = 'linked-controller-key';
DiscoverableMetaHostCollection.addClassMetaHostLink(
LinkedController,
metaKey,
);
const instanceWrapper = new InstanceWrapper({
token: LinkedController,
name: 'LinkedController',
metatype: LinkedController,
});
DiscoverableMetaHostCollection.inspectController(
hostContainerRef,
instanceWrapper,
);
const result = DiscoverableMetaHostCollection.getControllersByMetaKey(
hostContainerRef,
metaKey,
);
expect(result.size).to.eq(1);
expect(result.has(instanceWrapper)).to.be.true;
});
});
describe('inspectInstanceWrapper with existing collection', () => {
it('should add to existing collection when hostContainerRef is already registered', () => {
const hostContainerRef = new ModulesContainer();
class TestClass1 {}
class TestClass2 {}
const metaKey = 'shared-key';
DiscoverableMetaHostCollection.addClassMetaHostLink(TestClass1, metaKey);
DiscoverableMetaHostCollection.addClassMetaHostLink(TestClass2, metaKey);
const instanceWrapper1 = new InstanceWrapper({
token: TestClass1,
name: 'TestProvider1',
metatype: TestClass1,
});
const instanceWrapper2 = new InstanceWrapper({
token: TestClass2,
name: 'TestProvider2',
metatype: TestClass2,
});
DiscoverableMetaHostCollection.inspectProvider(
hostContainerRef,
instanceWrapper1,
);
DiscoverableMetaHostCollection.inspectProvider(
hostContainerRef,
instanceWrapper2,
);
const result = DiscoverableMetaHostCollection.getProvidersByMetaKey(
hostContainerRef,
metaKey,
);
expect(result.size).to.eq(2);
expect(result.has(instanceWrapper1)).to.be.true;
expect(result.has(instanceWrapper2)).to.be.true;
});
});
});

View File

@@ -0,0 +1,539 @@
import { expect } from 'chai';
import * as sinon from 'sinon';
import { DiscoveryService } from '../../discovery/discovery-service';
import { InstanceWrapper } from '../../injector/instance-wrapper';
import { Module } from '../../injector/module';
import { ModulesContainer } from '../../injector/modules-container';
import { DiscoverableMetaHostCollection } from '../../discovery/discoverable-meta-host-collection';
describe('DiscoveryService', () => {
let discoveryService: DiscoveryService;
let modulesContainer: ModulesContainer;
let sandbox: sinon.SinonSandbox;
beforeEach(() => {
modulesContainer = new ModulesContainer();
discoveryService = new DiscoveryService(modulesContainer);
sandbox = sinon.createSandbox();
});
afterEach(() => {
sandbox.restore();
});
describe('createDecorator', () => {
it('should create a decorator with a unique KEY', () => {
const decorator1 = DiscoveryService.createDecorator();
const decorator2 = DiscoveryService.createDecorator();
expect(decorator1.KEY).to.be.a('string');
expect(decorator2.KEY).to.be.a('string');
expect(decorator1.KEY).to.not.equal(decorator2.KEY);
});
it('should create a decorator that can decorate classes', () => {
const TestDecorator = DiscoveryService.createDecorator<{
value: string;
}>();
@TestDecorator({ value: 'test' })
class TestClass {}
const metadata = Reflect.getMetadata(TestDecorator.KEY, TestClass);
expect(metadata).to.deep.equal({ value: 'test' });
});
it('should create a decorator that can decorate methods', () => {
const TestDecorator = DiscoveryService.createDecorator<{
event: string;
}>();
class TestClass {
@TestDecorator({ event: 'click' })
handleClick() {}
}
const metadata = Reflect.getMetadata(
TestDecorator.KEY,
new TestClass().handleClick,
);
expect(metadata).to.deep.equal({ event: 'click' });
});
it('should use empty object as default metadata when no options provided', () => {
const TestDecorator = DiscoveryService.createDecorator();
@TestDecorator()
class TestClass {}
const metadata = Reflect.getMetadata(TestDecorator.KEY, TestClass);
expect(metadata).to.deep.equal({});
});
it('should add class to DiscoverableMetaHostCollection when decorating a class', () => {
const addClassMetaHostLinkSpy = sandbox.spy(
DiscoverableMetaHostCollection,
'addClassMetaHostLink',
);
const TestDecorator = DiscoveryService.createDecorator();
@TestDecorator()
class TestClass {}
expect(addClassMetaHostLinkSpy.calledOnce).to.be.true;
expect(addClassMetaHostLinkSpy.calledWith(TestClass, TestDecorator.KEY))
.to.be.true;
});
it('should not add to DiscoverableMetaHostCollection when decorating a method', () => {
const addClassMetaHostLinkSpy = sandbox.spy(
DiscoverableMetaHostCollection,
'addClassMetaHostLink',
);
const TestDecorator = DiscoveryService.createDecorator();
class TestClass {
@TestDecorator()
testMethod() {}
}
expect(addClassMetaHostLinkSpy.called).to.be.false;
});
});
describe('getProviders', () => {
it('should return all providers from all modules when no options provided', () => {
const module1 = new Module(class Module1 {}, modulesContainer as any);
const module2 = new Module(class Module2 {}, modulesContainer as any);
// Clear default providers
module1.providers.clear();
module2.providers.clear();
const provider1 = new InstanceWrapper({
name: 'Provider1',
token: 'PROVIDER_1',
});
const provider2 = new InstanceWrapper({
name: 'Provider2',
token: 'PROVIDER_2',
});
const provider3 = new InstanceWrapper({
name: 'Provider3',
token: 'PROVIDER_3',
});
module1.providers.set('PROVIDER_1', provider1);
module1.providers.set('PROVIDER_2', provider2);
module2.providers.set('PROVIDER_3', provider3);
modulesContainer.set('Module1', module1);
modulesContainer.set('Module2', module2);
const providers = discoveryService.getProviders();
expect(providers).to.have.lengthOf(3);
expect(providers).to.include(provider1);
expect(providers).to.include(provider2);
expect(providers).to.include(provider3);
});
it('should return empty array when no modules exist', () => {
const providers = discoveryService.getProviders();
expect(providers).to.be.an('array').that.is.empty;
});
it('should return empty array when modules have no providers', () => {
const module1 = new Module(class Module1 {}, modulesContainer as any);
module1.providers.clear();
modulesContainer.set('Module1', module1);
const providers = discoveryService.getProviders();
expect(providers).to.be.an('array').that.is.empty;
});
it('should filter providers by metadataKey when provided', () => {
const metadataKey = 'test-metadata-key';
const provider1 = new InstanceWrapper({
name: 'Provider1',
token: 'PROVIDER_1',
});
const provider2 = new InstanceWrapper({
name: 'Provider2',
token: 'PROVIDER_2',
});
const providerSet = new Set([provider1, provider2]);
const getProvidersByMetaKeyStub = sandbox
.stub(DiscoverableMetaHostCollection, 'getProvidersByMetaKey')
.returns(providerSet);
const providers = discoveryService.getProviders({ metadataKey });
expect(getProvidersByMetaKeyStub.calledOnce).to.be.true;
expect(
getProvidersByMetaKeyStub.calledWith(modulesContainer, metadataKey),
).to.be.true;
expect(providers).to.have.lengthOf(2);
expect(providers).to.include(provider1);
expect(providers).to.include(provider2);
});
it('should return empty array when no providers match the metadataKey', () => {
const metadataKey = 'non-existent-key';
const emptySet = new Set<InstanceWrapper>();
sandbox
.stub(DiscoverableMetaHostCollection, 'getProvidersByMetaKey')
.returns(emptySet);
const providers = discoveryService.getProviders({ metadataKey });
expect(providers).to.be.an('array').that.is.empty;
});
it('should filter providers by included modules', () => {
class Module1 {}
class Module2 {}
class Module3 {}
const module1 = new Module(Module1, modulesContainer as any);
const module2 = new Module(Module2, modulesContainer as any);
const module3 = new Module(Module3, modulesContainer as any);
// Clear default providers
module1.providers.clear();
module2.providers.clear();
module3.providers.clear();
const provider1 = new InstanceWrapper({
name: 'Provider1',
token: 'PROVIDER_1',
});
const provider2 = new InstanceWrapper({
name: 'Provider2',
token: 'PROVIDER_2',
});
const provider3 = new InstanceWrapper({
name: 'Provider3',
token: 'PROVIDER_3',
});
module1.providers.set('PROVIDER_1', provider1);
module2.providers.set('PROVIDER_2', provider2);
module3.providers.set('PROVIDER_3', provider3);
modulesContainer.set('Module1', module1);
modulesContainer.set('Module2', module2);
modulesContainer.set('Module3', module3);
const providers = discoveryService.getProviders({
include: [Module1, Module2],
});
expect(providers).to.have.lengthOf(2);
expect(providers).to.include(provider1);
expect(providers).to.include(provider2);
expect(providers).to.not.include(provider3);
});
it('should return empty array when include option is empty array', () => {
const module1 = new Module(class Module1 {}, modulesContainer as any);
const provider1 = new InstanceWrapper({
name: 'Provider1',
token: 'PROVIDER_1',
});
module1.providers.set('PROVIDER_1', provider1);
modulesContainer.set('Module1', module1);
const providers = discoveryService.getProviders({ include: [] });
expect(providers).to.be.an('array').that.is.empty;
});
});
describe('getControllers', () => {
it('should return all controllers from all modules when no options provided', () => {
const module1 = new Module(class Module1 {}, modulesContainer as any);
const module2 = new Module(class Module2 {}, modulesContainer as any);
const controller1 = new InstanceWrapper({
name: 'Controller1',
token: 'CONTROLLER_1',
});
const controller2 = new InstanceWrapper({
name: 'Controller2',
token: 'CONTROLLER_2',
});
module1.controllers.set('CONTROLLER_1', controller1);
module2.controllers.set('CONTROLLER_2', controller2);
modulesContainer.set('Module1', module1);
modulesContainer.set('Module2', module2);
const controllers = discoveryService.getControllers();
expect(controllers).to.have.lengthOf(2);
expect(controllers).to.include(controller1);
expect(controllers).to.include(controller2);
});
it('should return empty array when no controllers exist', () => {
const module1 = new Module(class Module1 {}, modulesContainer as any);
modulesContainer.set('Module1', module1);
const controllers = discoveryService.getControllers();
expect(controllers).to.be.an('array').that.is.empty;
});
it('should filter controllers by metadataKey when provided', () => {
const metadataKey = 'controller-metadata-key';
const controller1 = new InstanceWrapper({
name: 'Controller1',
token: 'CONTROLLER_1',
});
const controllerSet = new Set([controller1]);
const getControllersByMetaKeyStub = sandbox
.stub(DiscoverableMetaHostCollection, 'getControllersByMetaKey')
.returns(controllerSet);
const controllers = discoveryService.getControllers({ metadataKey });
expect(getControllersByMetaKeyStub.calledOnce).to.be.true;
expect(
getControllersByMetaKeyStub.calledWith(modulesContainer, metadataKey),
).to.be.true;
expect(controllers).to.have.lengthOf(1);
expect(controllers).to.include(controller1);
});
it('should filter controllers by included modules', () => {
class Module1 {}
class Module2 {}
const module1 = new Module(Module1, modulesContainer as any);
const module2 = new Module(Module2, modulesContainer as any);
const controller1 = new InstanceWrapper({
name: 'Controller1',
token: 'CONTROLLER_1',
});
const controller2 = new InstanceWrapper({
name: 'Controller2',
token: 'CONTROLLER_2',
});
module1.controllers.set('CONTROLLER_1', controller1);
module2.controllers.set('CONTROLLER_2', controller2);
modulesContainer.set('Module1', module1);
modulesContainer.set('Module2', module2);
const controllers = discoveryService.getControllers({
include: [Module1],
});
expect(controllers).to.have.lengthOf(1);
expect(controllers).to.include(controller1);
expect(controllers).to.not.include(controller2);
});
});
describe('getMetadataByDecorator', () => {
it('should retrieve metadata from class using decorator', () => {
const TestDecorator = DiscoveryService.createDecorator<{
role: string;
}>();
@TestDecorator({ role: 'admin' })
class TestClass {}
const instance = new TestClass();
const wrapper = new InstanceWrapper({
name: 'TestClass',
token: TestClass,
metatype: TestClass,
instance,
});
const metadata = discoveryService.getMetadataByDecorator(
TestDecorator,
wrapper,
);
expect(metadata).to.deep.equal({ role: 'admin' });
});
it('should retrieve metadata from method using decorator and methodKey', () => {
const TestDecorator = DiscoveryService.createDecorator<{
event: string;
}>();
class TestClass {
@TestDecorator({ event: 'created' })
onCreate() {}
}
const instance = new TestClass();
const wrapper = new InstanceWrapper({
name: 'TestClass',
token: TestClass,
metatype: TestClass,
instance,
});
const metadata = discoveryService.getMetadataByDecorator(
TestDecorator,
wrapper,
'onCreate',
);
expect(metadata).to.deep.equal({ event: 'created' });
});
it('should return undefined when metadata does not exist', () => {
const TestDecorator = DiscoveryService.createDecorator();
class TestClass {}
const instance = new TestClass();
const wrapper = new InstanceWrapper({
name: 'TestClass',
token: TestClass,
metatype: TestClass,
instance,
});
const metadata = discoveryService.getMetadataByDecorator(
TestDecorator,
wrapper,
);
expect(metadata).to.be.undefined;
});
it('should return undefined when methodKey does not exist on instance', () => {
const TestDecorator = DiscoveryService.createDecorator();
class TestClass {
existingMethod() {}
}
const instance = new TestClass();
const wrapper = new InstanceWrapper({
name: 'TestClass',
token: TestClass,
metatype: TestClass,
instance,
});
const metadata = discoveryService.getMetadataByDecorator(
TestDecorator,
wrapper,
'existingMethod', // Use existing method to avoid undefined reference error
);
expect(metadata).to.be.undefined;
});
it('should use metatype when instance.constructor is undefined', () => {
const TestDecorator = DiscoveryService.createDecorator<{
value: number;
}>();
@TestDecorator({ value: 42 })
class TestClass {}
const instanceWithoutConstructor: any = Object.create(null);
const wrapper = new InstanceWrapper({
name: 'TestClass',
token: TestClass,
metatype: TestClass,
instance: instanceWithoutConstructor,
});
const metadata = discoveryService.getMetadataByDecorator(
TestDecorator,
wrapper,
);
expect(metadata).to.deep.equal({ value: 42 });
});
it('should handle undefined instance gracefully', () => {
const TestDecorator = DiscoveryService.createDecorator<{
test: string;
}>();
@TestDecorator({ test: 'value' })
class TestClass {}
const wrapper = new InstanceWrapper({
name: 'TestClass',
token: TestClass,
metatype: TestClass,
instance: undefined,
});
const metadata = discoveryService.getMetadataByDecorator(
TestDecorator,
wrapper,
);
expect(metadata).to.deep.equal({ test: 'value' });
});
});
describe('getModules', () => {
it('should return all modules when no options provided', () => {
const module1 = new Module(class Module1 {}, modulesContainer as any);
const module2 = new Module(class Module2 {}, modulesContainer as any);
modulesContainer.set('Module1', module1);
modulesContainer.set('Module2', module2);
const modules = (discoveryService as any).getModules();
expect(modules).to.have.lengthOf(2);
expect(modules).to.include(module1);
expect(modules).to.include(module2);
});
it('should return empty array when no modules exist', () => {
const modules = (discoveryService as any).getModules();
expect(modules).to.be.an('array').that.is.empty;
});
it('should filter modules by include option', () => {
class Module1 {}
class Module2 {}
class Module3 {}
const module1 = new Module(Module1, modulesContainer as any);
const module2 = new Module(Module2, modulesContainer as any);
const module3 = new Module(Module3, modulesContainer as any);
modulesContainer.set('Module1', module1);
modulesContainer.set('Module2', module2);
modulesContainer.set('Module3', module3);
const modules = (discoveryService as any).getModules({
include: [Module1, Module3],
});
expect(modules).to.have.lengthOf(2);
expect(modules).to.include(module1);
expect(modules).to.include(module3);
expect(modules).to.not.include(module2);
});
it('should return empty array when include option is empty', () => {
const module1 = new Module(class Module1 {}, modulesContainer as any);
modulesContainer.set('Module1', module1);
const modules = (discoveryService as any).getModules({ include: [] });
expect(modules).to.be.an('array').that.is.empty;
});
});
});

View File

@@ -0,0 +1,52 @@
import { expect } from 'chai';
import { Logger } from '@nestjs/common';
import { SilentLogger } from '../../../injector/helpers/silent-logger';
describe('SilentLogger', () => {
let silentLogger: SilentLogger;
beforeEach(() => {
silentLogger = new SilentLogger();
});
it('should be an instance of Logger', () => {
expect(silentLogger).to.be.instanceOf(Logger);
});
describe('logging methods', () => {
it('should have log method that does nothing', () => {
expect(() => silentLogger.log()).to.not.throw();
expect(silentLogger.log()).to.be.undefined;
});
it('should have error method that does nothing', () => {
expect(() => silentLogger.error()).to.not.throw();
expect(silentLogger.error()).to.be.undefined;
});
it('should have warn method that does nothing', () => {
expect(() => silentLogger.warn()).to.not.throw();
expect(silentLogger.warn()).to.be.undefined;
});
it('should have debug method that does nothing', () => {
expect(() => silentLogger.debug()).to.not.throw();
expect(silentLogger.debug()).to.be.undefined;
});
it('should have verbose method that does nothing', () => {
expect(() => silentLogger.verbose()).to.not.throw();
expect(silentLogger.verbose()).to.be.undefined;
});
it('should have fatal method that does nothing', () => {
expect(() => silentLogger.fatal()).to.not.throw();
expect(silentLogger.fatal()).to.be.undefined;
});
it('should have setLogLevels method that does nothing', () => {
expect(() => silentLogger.setLogLevels()).to.not.throw();
expect(silentLogger.setLogLevels()).to.be.undefined;
});
});
});

View File

@@ -11,6 +11,7 @@ import { NestContainer } from '../../injector/container';
import { Injector, PropertyDependency } from '../../injector/injector';
import { InstanceWrapper } from '../../injector/instance-wrapper';
import { Module } from '../../injector/module';
import { SettlementSignal } from '../../injector/settlement-signal';
chai.use(chaiAsPromised);
@@ -546,6 +547,34 @@ describe('Injector', () => {
expect(result.instance).to.be.true;
});
});
describe('when instanceWrapper has forward ref and is in non-static context', () => {
it('should call settlementSignal.error when loadProvider throws', async () => {
const error = new Error('Test error');
const settlementSignal = new SettlementSignal();
const errorSpy = sinon.spy(settlementSignal, 'error');
const wrapper = new InstanceWrapper({
isResolved: false,
forwardRef: true,
});
wrapper.settlementSignal = settlementSignal;
const contextId = { id: 2 };
const instanceHost = wrapper.getInstanceByContextId(contextId);
instanceHost.donePromise = Promise.resolve();
sinon
.stub(injector, 'loadProvider')
.callsFake(() => Promise.reject(error));
await injector.resolveComponentHost(module, wrapper, contextId);
await new Promise(resolve => setImmediate(resolve));
expect(errorSpy.calledOnce).to.be.true;
expect(errorSpy.calledWith(error)).to.be.true;
});
});
});
describe('applyProperties', () => {

View File

@@ -190,4 +190,83 @@ describe('Nested Transient Isolation', () => {
);
});
});
describe('when DEFAULT scoped provider depends on nested TRANSIENT chain', () => {
@Injectable({ scope: Scope.TRANSIENT })
class NestedTransientService {
public static constructorCalled = false;
public readonly value = 'nested-initialized';
constructor() {
NestedTransientService.constructorCalled = true;
}
}
@Injectable({ scope: Scope.TRANSIENT })
class TransientService {
public static constructorCalled = false;
constructor(public readonly nested: NestedTransientService) {
TransientService.constructorCalled = true;
}
}
@Injectable()
class DefaultScopedParent {
constructor(public readonly transient: TransientService) {}
}
let nestedTransientWrapper: InstanceWrapper;
let transientWrapper: InstanceWrapper;
let parentWrapper: InstanceWrapper;
beforeEach(() => {
NestedTransientService.constructorCalled = false;
TransientService.constructorCalled = false;
nestedTransientWrapper = new InstanceWrapper({
name: NestedTransientService.name,
token: NestedTransientService,
metatype: NestedTransientService,
scope: Scope.TRANSIENT,
host: module,
});
transientWrapper = new InstanceWrapper({
name: TransientService.name,
token: TransientService,
metatype: TransientService,
scope: Scope.TRANSIENT,
host: module,
});
parentWrapper = new InstanceWrapper({
name: DefaultScopedParent.name,
token: DefaultScopedParent,
metatype: DefaultScopedParent,
scope: Scope.DEFAULT,
host: module,
});
module.providers.set(NestedTransientService, nestedTransientWrapper);
module.providers.set(TransientService, transientWrapper);
module.providers.set(DefaultScopedParent, parentWrapper);
});
it('should instantiate nested TRANSIENT providers from DEFAULT scope', async () => {
await injector.loadInstance(parentWrapper, module.providers, module);
const parentInstance = parentWrapper.instance;
expect(TransientService.constructorCalled).to.be.true;
expect(NestedTransientService.constructorCalled).to.be.true;
expect(parentInstance.transient).to.be.instanceOf(TransientService);
expect(parentInstance.transient.nested).to.be.instanceOf(
NestedTransientService,
);
expect(parentInstance.transient.nested.value).to.equal(
'nested-initialized',
);
});
});
});

View File

@@ -0,0 +1,160 @@
import { expect } from 'chai';
import { TreeNode } from '../../../injector/topology-tree/tree-node';
describe('TreeNode', () => {
describe('constructor', () => {
it('should create a node with the given value', () => {
const node = new TreeNode({ value: 'test', parent: null });
expect(node.value).to.equal('test');
});
it('should create a node with null parent', () => {
const node = new TreeNode({ value: 'test', parent: null });
expect(node.children.size).to.equal(0);
});
it('should create a node with a parent', () => {
const parent = new TreeNode({ value: 'parent', parent: null });
const child = new TreeNode({ value: 'child', parent });
expect(child.value).to.equal('child');
});
});
describe('addChild', () => {
it('should add a child to the node', () => {
const parent = new TreeNode({ value: 'parent', parent: null });
const child = new TreeNode({ value: 'child', parent: null });
parent.addChild(child);
expect(parent.children.has(child)).to.be.true;
expect(parent.children.size).to.equal(1);
});
it('should add multiple children', () => {
const parent = new TreeNode({ value: 'parent', parent: null });
const child1 = new TreeNode({ value: 'child1', parent: null });
const child2 = new TreeNode({ value: 'child2', parent: null });
parent.addChild(child1);
parent.addChild(child2);
expect(parent.children.size).to.equal(2);
});
});
describe('removeChild', () => {
it('should remove a child from the node', () => {
const parent = new TreeNode({ value: 'parent', parent: null });
const child = new TreeNode({ value: 'child', parent: null });
parent.addChild(child);
parent.removeChild(child);
expect(parent.children.has(child)).to.be.false;
expect(parent.children.size).to.equal(0);
});
it('should do nothing when removing a non-existent child', () => {
const parent = new TreeNode({ value: 'parent', parent: null });
const child = new TreeNode({ value: 'child', parent: null });
parent.removeChild(child);
expect(parent.children.size).to.equal(0);
});
});
describe('relink', () => {
it('should change the parent of a node', () => {
const oldParent = new TreeNode({ value: 'oldParent', parent: null });
const newParent = new TreeNode({ value: 'newParent', parent: null });
const child = new TreeNode({ value: 'child', parent: oldParent });
oldParent.addChild(child);
child.relink(newParent);
expect(oldParent.children.has(child)).to.be.false;
expect(newParent.children.has(child)).to.be.true;
});
it('should work when node has no previous parent', () => {
const newParent = new TreeNode({ value: 'newParent', parent: null });
const child = new TreeNode({ value: 'child', parent: null });
child.relink(newParent);
expect(newParent.children.has(child)).to.be.true;
});
});
describe('getDepth', () => {
it('should return 1 for a root node', () => {
const root = new TreeNode({ value: 'root', parent: null });
expect(root.getDepth()).to.equal(1);
});
it('should return 2 for a child of root', () => {
const root = new TreeNode({ value: 'root', parent: null });
const child = new TreeNode({ value: 'child', parent: root });
expect(child.getDepth()).to.equal(2);
});
it('should return correct depth for deeply nested nodes', () => {
const root = new TreeNode({ value: 'root', parent: null });
const level1 = new TreeNode({ value: 'level1', parent: root });
const level2 = new TreeNode({ value: 'level2', parent: level1 });
const level3 = new TreeNode({ value: 'level3', parent: level2 });
expect(level3.getDepth()).to.equal(4);
});
it('should return -1 when a cycle is detected', () => {
const nodeA = new TreeNode({ value: 'a', parent: null });
const nodeB = new TreeNode({ value: 'b', parent: nodeA });
const nodeC = new TreeNode({ value: 'c', parent: nodeB });
// Create cycle: A -> B -> C -> A
nodeA.relink(nodeC);
expect(nodeA.getDepth()).to.equal(-1);
});
});
describe('hasCycleWith', () => {
it('should return false when there is no cycle', () => {
const root = new TreeNode({ value: 'root', parent: null });
const child = new TreeNode({ value: 'child', parent: root });
expect(child.hasCycleWith('nonexistent')).to.be.false;
});
it('should return true when the target value exists in the parent chain', () => {
const root = new TreeNode({ value: 'root', parent: null });
const child = new TreeNode({ value: 'child', parent: root });
expect(child.hasCycleWith('root')).to.be.true;
});
it('should return true when checking against own value', () => {
const node = new TreeNode({ value: 'self', parent: null });
expect(node.hasCycleWith('self')).to.be.true;
});
it('should return false for root node with non-matching value', () => {
const root = new TreeNode({ value: 'root', parent: null });
expect(root.hasCycleWith('other')).to.be.false;
});
it('should return false when cycle exists but target not in chain', () => {
const nodeA = new TreeNode({ value: 'a', parent: null });
const nodeB = new TreeNode({ value: 'b', parent: nodeA });
const nodeC = new TreeNode({ value: 'c', parent: nodeB });
// Create cycle: A -> B -> C -> A
nodeA.relink(nodeC);
expect(nodeA.hasCycleWith('nonexistent')).to.be.false;
});
});
});

View File

@@ -1,4 +1,4 @@
import { InjectionToken, Provider, Scope } from '@nestjs/common';
import { Injectable, InjectionToken, Provider, Scope } from '@nestjs/common';
import { expect } from 'chai';
import * as sinon from 'sinon';
import { setTimeout } from 'timers/promises';
@@ -154,6 +154,56 @@ describe('NestApplicationContext', () => {
clock.restore();
});
it('should use process.exit when useProcessExit option is enabled', async () => {
const signal = 'SIGTERM';
const applicationContext = await testHelper(A, Scope.DEFAULT);
const processExitStub = sinon.stub(process, 'exit');
const processKillStub = sinon.stub(process, 'kill');
applicationContext.enableShutdownHooks([signal], {
useProcessExit: true,
});
const hookStub = sinon
.stub(applicationContext as any, 'callShutdownHook')
.callsFake(async () => undefined);
const shutdownCleanupRef = applicationContext['shutdownCleanupRef']!;
await shutdownCleanupRef(signal);
hookStub.restore();
processExitStub.restore();
processKillStub.restore();
expect(processExitStub.calledOnceWith(0)).to.be.true;
expect(processKillStub.called).to.be.false;
});
it('should use process.kill when useProcessExit option is not enabled', async () => {
const signal = 'SIGTERM';
const applicationContext = await testHelper(A, Scope.DEFAULT);
const processExitStub = sinon.stub(process, 'exit');
const processKillStub = sinon.stub(process, 'kill');
applicationContext.enableShutdownHooks([signal]);
const hookStub = sinon
.stub(applicationContext as any, 'callShutdownHook')
.callsFake(async () => undefined);
const shutdownCleanupRef = applicationContext['shutdownCleanupRef']!;
await shutdownCleanupRef(signal);
hookStub.restore();
processExitStub.restore();
processKillStub.restore();
expect(processKillStub.calledOnceWith(process.pid, signal)).to.be.true;
expect(processExitStub.called).to.be.false;
});
});
describe('get', () => {
@@ -375,4 +425,124 @@ describe('NestApplicationContext', () => {
});
});
});
describe('implicit request scope via enhancers', () => {
it('get() should throw when dependency tree is not static (request-scoped enhancer attached)', async () => {
class Host {}
@Injectable({ scope: Scope.REQUEST })
class ReqScopedPipe {}
const nestContainer = new NestContainer();
const injector = new Injector();
const instanceLoader = new InstanceLoader(
nestContainer,
injector,
new GraphInspector(nestContainer),
);
const { moduleRef } = (await nestContainer.addModule(class T {}, []))!;
// Register Host as a controller (matches real-world controller case)
nestContainer.addController(Host, moduleRef.token);
// Register a request-scoped injectable and attach it as an enhancer to Host
// This simulates a method-level pipe/guard/interceptor making Host implicitly request-scoped
nestContainer.addInjectable(ReqScopedPipe, moduleRef.token, 'pipe', Host);
const modules = nestContainer.getModules();
await instanceLoader.createInstancesOfDependencies(modules);
const appCtx = new NestApplicationContext(nestContainer);
// With a non-static dependency tree, get() should refuse and instruct to use resolve()
expect(() => appCtx.get(Host)).to.throw();
});
it('resolve() should instantiate when dependency tree is not static (request-scoped enhancer attached)', async () => {
class Host {}
@Injectable({ scope: Scope.REQUEST })
class ReqScopedPipe {}
const nestContainer = new NestContainer();
const injector = new Injector();
const instanceLoader = new InstanceLoader(
nestContainer,
injector,
new GraphInspector(nestContainer),
);
const { moduleRef } = (await nestContainer.addModule(class T {}, []))!;
// Register Host as a controller
nestContainer.addController(Host, moduleRef.token);
nestContainer.addInjectable(ReqScopedPipe, moduleRef.token, 'pipe', Host);
const modules = nestContainer.getModules();
await instanceLoader.createInstancesOfDependencies(modules);
const appCtx = new NestApplicationContext(nestContainer);
const instance = await appCtx.resolve(Host);
expect(instance).instanceOf(Host);
});
});
describe('resolve with each: true', () => {
it('should resolve all default-scoped providers registered under the same token', async () => {
class Service1 {}
class Service2 {}
class Service3 {}
const TOKEN = 'MULTI_TOKEN';
const nestContainer = new NestContainer();
const injector = new Injector();
const instanceLoader = new InstanceLoader(
nestContainer,
injector,
new GraphInspector(nestContainer),
);
// Create three modules, each with a provider under the same token
const { moduleRef: module1 } = (await nestContainer.addModule(
class Module1 {},
[],
))!;
const { moduleRef: module2 } = (await nestContainer.addModule(
class Module2 {},
[],
))!;
const { moduleRef: module3 } = (await nestContainer.addModule(
class Module3 {},
[],
))!;
nestContainer.addProvider(
{ provide: TOKEN, useClass: Service1 },
module1.token,
);
nestContainer.addProvider(
{ provide: TOKEN, useClass: Service2 },
module2.token,
);
nestContainer.addProvider(
{ provide: TOKEN, useClass: Service3 },
module3.token,
);
const modules = nestContainer.getModules();
await instanceLoader.createInstancesOfDependencies(modules);
const appCtx = new NestApplicationContext(nestContainer);
const instances = await appCtx.resolve(TOKEN, undefined, {
strict: false,
each: true,
});
expect(instances).to.be.an('array');
expect(instances).to.have.length(3);
expect(instances[0]).to.be.instanceOf(Service1);
expect(instances[1]).to.be.instanceOf(Service2);
expect(instances[2]).to.be.instanceOf(Service3);
});
});
});

View File

@@ -263,7 +263,7 @@ describe('RouterResponseController', () => {
it('should accept only observables', async () => {
const result = Promise.resolve('test');
try {
routerResponseController.sse(
await routerResponseController.sse(
result as unknown as any,
{} as unknown as ServerResponse,
{} as unknown as IncomingMessage,
@@ -275,6 +275,76 @@ describe('RouterResponseController', () => {
}
});
it('should accept Promise<Observable>', async () => {
class Sink extends Writable {
private readonly chunks: string[] = [];
_write(
chunk: any,
encoding: string,
callback: (error?: Error | null) => void,
): void {
this.chunks.push(chunk);
callback();
}
get content() {
return this.chunks.join('');
}
}
const written = (stream: Writable) =>
new Promise((resolve, reject) =>
stream.on('error', reject).on('finish', resolve),
);
const result = Promise.resolve(of('test'));
const response = new Sink();
const request = new PassThrough();
await routerResponseController.sse(
result,
response as unknown as ServerResponse,
request as unknown as IncomingMessage,
);
request.destroy();
await written(response);
expect(response.content).to.eql(
`
id: 1
data: test
`,
);
});
it('should use custom status code from response', async () => {
class SinkWithStatusCode extends Writable {
statusCode = 404;
writeHead = sinon.spy();
flushHeaders = sinon.spy();
_write(
chunk: any,
encoding: string,
callback: (error?: Error | null) => void,
): void {
callback();
}
}
const result = of('test');
const response = new SinkWithStatusCode();
const request = new PassThrough();
await routerResponseController.sse(
result,
response as unknown as ServerResponse,
request as unknown as IncomingMessage,
);
expect(response.writeHead.firstCall.args[0]).to.equal(404);
request.destroy();
});
it('should write string', async () => {
class Sink extends Writable {
private readonly chunks: string[] = [];
@@ -301,7 +371,7 @@ describe('RouterResponseController', () => {
const result = of('test');
const response = new Sink();
const request = new PassThrough();
routerResponseController.sse(
void routerResponseController.sse(
result,
response as unknown as ServerResponse,
request as unknown as IncomingMessage,
@@ -326,7 +396,7 @@ data: test
const request = new Writable();
request._write = () => {};
routerResponseController.sse(
void routerResponseController.sse(
result,
response as unknown as ServerResponse,
request as unknown as IncomingMessage,
@@ -343,7 +413,7 @@ data: test
const request = new Writable();
request._write = () => {};
routerResponseController.sse(
void routerResponseController.sse(
result,
response as unknown as ServerResponse,
request as unknown as IncomingMessage,
@@ -360,7 +430,7 @@ data: test
request._write = () => {};
try {
routerResponseController.sse(
void routerResponseController.sse(
result as unknown as Observable<string>,
response as unknown as ServerResponse,
request as unknown as IncomingMessage,
@@ -423,7 +493,7 @@ data: test
const request = new Writable();
request._write = () => {};
routerResponseController.sse(
void routerResponseController.sse(
result,
response as unknown as ServerResponse,
request as unknown as IncomingMessage,
@@ -450,7 +520,7 @@ data: test
const request = new Writable();
request._write = () => {};
routerResponseController.sse(
void routerResponseController.sse(
result,
response as unknown as ServerResponse,
request as unknown as IncomingMessage,
@@ -485,7 +555,7 @@ data: test
const result = new Subject();
const response = new Sink();
const request = new PassThrough();
routerResponseController.sse(
void routerResponseController.sse(
result,
response as unknown as ServerResponse,
request as unknown as IncomingMessage,

View File

@@ -160,6 +160,34 @@ data: hello
});
});
it('sets custom status code when provided', callback => {
const sse = new SseStream();
const sink = new Sink(
(status: number, headers: string | OutgoingHttpHeaders) => {
expect(status).to.equal(404);
callback();
return sink;
},
);
sse.pipe(sink, {
statusCode: 404,
});
});
it('defaults to 200 status code when not provided', callback => {
const sse = new SseStream();
const sink = new Sink(
(status: number, headers: string | OutgoingHttpHeaders) => {
expect(status).to.equal(200);
callback();
return sink;
},
);
sse.pipe(sink);
});
it('allows an eventsource to connect', callback => {
let sse: SseStream;
const server = createServer((req, res) => {

View File

@@ -1,5 +1,5 @@
<p align="center">
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="_blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
@@ -49,7 +49,7 @@ Please make sure to read the [Issue Reporting Checklist](https://github.com/nest
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
With official support, you can get expert help straight from the Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
## Support
@@ -63,6 +63,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td><a href="https://microsoft.com/" target="_blank"><img src="https://nestjs.com/img/logos/microsoft-logo.png" width="180" valign="middle" /></a></td>
<td><a href="https://mojam.co" target="_blank"><img src="https://nestjs.com/img/logos/mojam-logo.png" width="80" valign="middle" /></a></td>
<td><a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
<td><a href="https://serpapi.com/" target="_blank"><img src="https://nestjs.com/img/logos/serpapi-logo.png" width="150" valign="middle" /></a></td>
</tr>
</table>
@@ -92,6 +93,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://www.itflashcards.com/" target="_blank"><img src="https://nestjs.com/img/logos/it_flashcards-logo.png" width="170" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://arcjet.com/?ref=nestjs" target="_blank"><img src="https://nestjs.com/img/logos/arcjet-logo.svg" width="170" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://crawljobs.com" target="_blank"><img src="https://nestjs.com/img/logos/crawljobs-logo.svg" width="130" valign="middle" /></a></td>
</tr><tr>
<td align="center" valign="middle"><a href="https://pandektes.com" target="_blank"><img src="https://nestjs.com/img/logos/pandektes-logo.png" width="65" valign="middle" /></a></td>
</tr>
</table>

View File

@@ -151,7 +151,7 @@ export class ClientNats extends ClientProxy<NatsEvents, NatsStatus> {
EventKey extends keyof NatsEvents = keyof NatsEvents,
EventCallback extends NatsEvents[EventKey] = NatsEvents[EventKey],
>(event: EventKey, callback: EventCallback) {
this.statusEventEmitter.on(event, callback as any);
this.statusEventEmitter.on(event as string | symbol, callback as any);
}
public unwrap<T>(): T {

View File

@@ -19,6 +19,7 @@ export class ClientTCP extends ClientProxy<TcpEvents, TcpStatus> {
protected readonly host: string;
protected readonly socketClass: Type<TcpSocket>;
protected readonly tlsOptions?: ConnectionOptions;
protected readonly maxBufferSize?: number;
protected socket: TcpSocket | null = null;
protected connectionPromise: Promise<any> | null = null;
protected pendingEventListeners: Array<{
@@ -32,6 +33,7 @@ export class ClientTCP extends ClientProxy<TcpEvents, TcpStatus> {
this.host = this.getOptionsProp(options, 'host', TCP_DEFAULT_HOST);
this.socketClass = this.getOptionsProp(options, 'socketClass', JsonSocket);
this.tlsOptions = this.getOptionsProp(options, 'tlsOptions');
this.maxBufferSize = this.getOptionsProp(options, 'maxBufferSize');
this.initializeSerializer(options);
this.initializeDeserializer(options);
@@ -108,6 +110,13 @@ export class ClientTCP extends ClientProxy<TcpEvents, TcpStatus> {
} else {
socket = new net.Socket();
}
// Pass maxBufferSize only if socketClass is JsonSocket
// For custom socket classes, users should handle maxBufferSize in their own implementation
if (this.maxBufferSize !== undefined && this.socketClass === JsonSocket) {
return new this.socketClass(socket, {
maxBufferSize: this.maxBufferSize,
});
}
return new this.socketClass(socket);
}

View File

@@ -7,8 +7,7 @@ import { RequestContext } from '../interfaces';
export class RequestContextHost<
TData = any,
TContext extends BaseRpcContext = any,
> implements RequestContext<TData>
{
> implements RequestContext<TData> {
constructor(
public readonly pattern: string | Record<string, any>,
public readonly data: TData,

View File

@@ -152,16 +152,18 @@ export function GrpcStreamMethod(
// Override original method to call the "drainBuffer" method on the first parameter
// This is required to avoid premature message emission
descriptor.value = async function (
this: any,
observable: any,
...args: any[]
) {
const result = await Promise.resolve(
originalMethod.apply(this, [observable, ...args]),
);
descriptor.value = function (this: any, observable: any, ...args: any[]) {
const result = originalMethod.apply(this, [observable, ...args]);
const isPromise = result && typeof result.then === 'function';
if (isPromise) {
return result.then((data: any) => {
if (observable && observable.drainBuffer) {
observable.drainBuffer();
}
return data;
});
}
// Drain buffer if "drainBuffer" method is available
if (observable && observable.drainBuffer) {
observable.drainBuffer();
}

View File

@@ -5,9 +5,10 @@ import { Deserializer, IncomingResponse } from '../interfaces';
/**
* @publicApi
*/
export class KafkaResponseDeserializer
implements Deserializer<any, IncomingResponse>
{
export class KafkaResponseDeserializer implements Deserializer<
any,
IncomingResponse
> {
deserialize(message: any, options?: Record<string, any>): IncomingResponse {
const id = message.headers[KafkaHeaders.CORRELATION_ID].toString();
if (!isUndefined(message.headers[KafkaHeaders.NEST_ERR])) {

View File

@@ -12,9 +12,10 @@ import { RpcException } from './rpc-exception';
/**
* @publicApi
*/
export class BaseRpcExceptionFilter<T = any, R = any>
implements RpcExceptionFilter<T>
{
export class BaseRpcExceptionFilter<
T = any,
R = any,
> implements RpcExceptionFilter<T> {
private static readonly logger = new Logger('RpcExceptionsHandler');
public catch(exception: T, host: ArgumentsHost): Observable<R> {

View File

@@ -4,7 +4,11 @@ import { CorruptedPacketLengthException } from '../errors/corrupted-packet-lengt
import { MaxPacketLengthExceededException } from '../errors/max-packet-length-exceeded.exception';
import { TcpSocket } from './tcp-socket';
const MAX_BUFFER_SIZE = (512 * 1024 * 1024) / 4; // 512 MBs in characters with 4 bytes per character (32-bit)
const DEFAULT_MAX_BUFFER_SIZE = (512 * 1024 * 1024) / 4; // 512 MBs in characters with 4 bytes per character (32-bit)
export interface JsonSocketOptions {
maxBufferSize?: number;
}
export class JsonSocket extends TcpSocket {
private contentLength: number | null = null;
@@ -12,6 +16,12 @@ export class JsonSocket extends TcpSocket {
private readonly stringDecoder = new StringDecoder();
private readonly delimiter = '#';
private readonly maxBufferSize: number;
constructor(socket: any, options?: JsonSocketOptions) {
super(socket);
this.maxBufferSize = options?.maxBufferSize ?? DEFAULT_MAX_BUFFER_SIZE;
}
protected handleSend(message: any, callback?: (err?: any) => void) {
this.socket.write(this.formatMessageData(message), 'utf-8', callback);
@@ -23,7 +33,7 @@ export class JsonSocket extends TcpSocket {
: dataRaw;
this.buffer += data;
if (this.buffer.length > MAX_BUFFER_SIZE) {
if (this.buffer.length > this.maxBufferSize) {
const bufferLength = this.buffer.length;
this.buffer = '';
throw new MaxPacketLengthExceededException(bufferLength);

View File

@@ -6,8 +6,10 @@ import {
TopicPartitionOffsetAndMetadata,
} from '../external/kafka.interface';
export interface ClientKafkaProxy
extends Omit<ClientProxy<never, KafkaStatus>, 'on'> {
export interface ClientKafkaProxy extends Omit<
ClientProxy<never, KafkaStatus>,
'on'
> {
/**
* Reference to the Kafka consumer instance.
*/

View File

@@ -43,5 +43,10 @@ export interface TcpClientOptions {
deserializer?: Deserializer;
tlsOptions?: ConnectionOptions;
socketClass?: Type<TcpSocket>;
/**
* Maximum buffer size in characters (default: 128MB in characters, i.e., (512 * 1024 * 1024) / 4).
* This limit prevents memory exhaustion when receiving large TCP messages.
*/
maxBufferSize?: number;
};
}

View File

@@ -109,6 +109,11 @@ export interface TcpOptions {
tlsOptions?: TlsOptions;
deserializer?: Deserializer;
socketClass?: Type<TcpSocket>;
/**
* Maximum buffer size in characters (default: 128MB in characters, i.e., (512 * 1024 * 1024) / 4).
* This limit prevents memory exhaustion when receiving large TCP messages.
*/
maxBufferSize?: number;
};
}
@@ -334,6 +339,11 @@ export interface KafkaOptions {
postfixId?: string;
client?: KafkaConfig;
consumer?: ConsumerConfig;
/**
* Options passed to KafkaJS consumer.run().
* Note: `partitionsConsumedConcurrently` (KafkaJS parameter) controls
* concurrent processing at the partition level (not topic level).
*/
run?: Omit<ConsumerRunConfig, 'eachBatch' | 'eachMessage'>;
subscribe?: Omit<ConsumerSubscribeTopics, 'topics'>;
producer?: ProducerConfig;

View File

@@ -21,8 +21,8 @@ import { ListenersController } from './listeners-controller';
import { Server } from './server/server';
export class MicroservicesModule<
TAppOptions extends
NestApplicationContextOptions = NestApplicationContextOptions,
TAppOptions extends NestApplicationContextOptions =
NestApplicationContextOptions,
> {
private readonly clientsContainer = new ClientsContainer();
private listenersController: ListenersController;

View File

@@ -18,8 +18,10 @@ export interface ClientsModuleOptionsFactory {
createClientOptions(): Promise<ClientProvider> | ClientProvider;
}
export interface ClientsProviderAsyncOptions
extends Pick<ModuleMetadata, 'imports'> {
export interface ClientsProviderAsyncOptions extends Pick<
ModuleMetadata,
'imports'
> {
useExisting?: Type<ClientsModuleOptionsFactory>;
useClass?: Type<ClientsModuleOptionsFactory>;
useFactory?: (...args: any[]) => Promise<ClientProvider> | ClientProvider;

View File

@@ -170,6 +170,10 @@ export class NestMicroservice
'Cannot apply global exception filters: registration must occur before initialization.',
);
}
filters = this.applyInstanceDecoratorIfRegistered<ExceptionFilter>(
...filters,
);
this.applicationConfig.useGlobalFilters(...filters);
filters.forEach(item =>
this.graphInspector.insertOrphanedEnhancer({
@@ -191,6 +195,10 @@ export class NestMicroservice
'Global pipes registered after initialization will not be applied.',
);
}
pipes = this.applyInstanceDecoratorIfRegistered<PipeTransform<any>>(
...pipes,
);
this.applicationConfig.useGlobalPipes(...pipes);
pipes.forEach(item =>
this.graphInspector.insertOrphanedEnhancer({
@@ -212,6 +220,10 @@ export class NestMicroservice
'Cannot apply global interceptors: registration must occur before initialization.',
);
}
interceptors = this.applyInstanceDecoratorIfRegistered<NestInterceptor>(
...interceptors,
);
this.applicationConfig.useGlobalInterceptors(...interceptors);
interceptors.forEach(item =>
this.graphInspector.insertOrphanedEnhancer({
@@ -228,6 +240,8 @@ export class NestMicroservice
'Cannot apply global guards: registration must occur before initialization.',
);
}
guards = this.applyInstanceDecoratorIfRegistered<CanActivate>(...guards);
this.applicationConfig.useGlobalGuards(...guards);
guards.forEach(item =>
this.graphInspector.insertOrphanedEnhancer({
@@ -354,4 +368,14 @@ export class NestMicroservice
);
return config.useFactory(...args);
}
private applyInstanceDecoratorIfRegistered<T>(...instances: T[]): T[] {
if (this.appOptions.instrument?.instanceDecorator) {
return instances.map(
instance =>
this.appOptions.instrument!.instanceDecorator(instance) as T,
);
}
return instances;
}
}

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