Compare commits

...

673 Commits

Author SHA1 Message Date
Kamil Myśliwiec
e19b5866a2 chore(@nestjs) publish v11.0.0 release 2025-01-16 11:01:35 +01:00
Kamil Myśliwiec
224e0dda6b chore: upgrade multer 2025-01-16 10:59:54 +01:00
Kamil Myśliwiec
95654f9778 chore: update package.json 2025-01-16 10:58:17 +01:00
Kamil Mysliwiec
9719731c11 Merge pull request #14428 from nestjs/renovate/mercurius-16.x
fix(deps): update dependency mercurius to v16.0.1
2025-01-15 11:27:37 +01:00
renovate[bot]
105db11790 fix(deps): update dependency mercurius to v16.0.1 2025-01-15 10:05:47 +00:00
Kamil Myśliwiec
408a632c9d chore: regenerate lock file 2025-01-15 10:30:27 +01:00
Kamil Mysliwiec
8a17e38d01 Merge pull request #14427 from nestjs/renovate/eslint-plugin-prettier-5.x
chore(deps): update dependency eslint-plugin-prettier to v5.2.2
2025-01-15 10:29:14 +01:00
renovate[bot]
a200a77b9d chore(deps): update dependency eslint-plugin-prettier to v5.2.2 2025-01-15 08:11:24 +00:00
Kamil Mysliwiec
81e00f09b0 Merge pull request #14424 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.9.5
2025-01-15 09:09:29 +01:00
renovate[bot]
dc61009ea5 fix(deps): update dependency mongoose to v8.9.5 2025-01-14 09:13:26 +00:00
Kamil Myśliwiec
a9bbb4b10e chore: regenerate lock file 2025-01-14 10:11:47 +01:00
Kamil Mysliwiec
f97ce9182e Merge pull request #14423 from nestjs/renovate/node-22.x
chore(deps): update dependency @types/node to v22.10.6
2025-01-14 10:10:59 +01:00
renovate[bot]
fb20d462f7 chore(deps): update dependency @types/node to v22.10.6 2025-01-14 07:43:26 +00:00
Kamil Mysliwiec
ec04aea690 Merge pull request #14421 from nestjs/renovate/artillery-2.x
chore(deps): update dependency artillery to v2.0.22
2025-01-14 08:41:05 +01:00
renovate[bot]
a9aacbde81 chore(deps): update dependency artillery to v2.0.22 2025-01-13 17:26:56 +00:00
Kamil Myśliwiec
04dc341f21 chore: regenerate lock file 2025-01-13 12:18:00 +01:00
Kamil Mysliwiec
ba8649e543 Merge pull request #14419 from nestjs/renovate/ts-loader-9.x
chore(deps): update dependency ts-loader to v9.5.2
2025-01-13 11:40:01 +01:00
Kamil Mysliwiec
79060d3883 Merge pull request #14410 from nestjs/renovate/fastify-static-8.x
fix(deps): update dependency @fastify/static to v8.0.4
2025-01-13 11:39:44 +01:00
Kamil Mysliwiec
72e9eb90df Merge pull request #14402 from nestjs/renovate/fastify-middie-9.x
fix(deps): update dependency @fastify/middie to v9.0.3
2025-01-13 11:39:30 +01:00
renovate[bot]
ab47d9630e fix(deps): update dependency @fastify/static to v8.0.4 2025-01-13 10:12:37 +00:00
renovate[bot]
509daae60e fix(deps): update dependency @fastify/middie to v9.0.3 2025-01-13 10:12:08 +00:00
renovate[bot]
7371803cd7 chore(deps): update dependency ts-loader to v9.5.2 2025-01-13 10:11:40 +00:00
Kamil Mysliwiec
a4a9b52b1a Merge pull request #14417 from nestjs/renovate/ts-morph-25.x
fix(deps): update dependency ts-morph to v25
2025-01-13 11:07:15 +01:00
Kamil Mysliwiec
e114057ecd Merge pull request #14411 from nestjs/renovate/fastify-view-10.x
fix(deps): update dependency @fastify/view to v10.0.2
2025-01-13 11:06:39 +01:00
Kamil Mysliwiec
ce90f1cbed Merge pull request #14404 from nestjs/renovate/eslint-monorepo
chore(deps): update eslint monorepo to v9.18.0
2025-01-13 11:06:23 +01:00
Kamil Mysliwiec
0bdb49cfcb Merge pull request #14403 from nestjs/renovate/nats-2.x
chore(deps): update dependency nats to v2.29.1
2025-01-13 11:06:17 +01:00
Kamil Mysliwiec
3190c3433f Merge pull request #14401 from nestjs/renovate/fastify-formbody-8.x
fix(deps): update dependency @fastify/formbody to v8.0.2
2025-01-13 11:06:07 +01:00
Kamil Mysliwiec
44174e8d81 Merge pull request #14400 from nestjs/renovate/ansis-3.x
fix(deps): update dependency ansis to v3.8.1
2025-01-13 11:06:03 +01:00
Kamil Mysliwiec
cdff4c0deb Merge pull request #14399 from nestjs/renovate/nestjs-swagger-8.x
fix(deps): update dependency @nestjs/swagger to v8.1.1
2025-01-13 11:05:58 +01:00
Kamil Mysliwiec
91cd8aaa86 Merge pull request #14337 from nestjs/renovate/fastify-multipart-9.x
chore(deps): update dependency @fastify/multipart to v9.0.2
2025-01-13 11:05:51 +01:00
Kamil Mysliwiec
8658868c81 Merge pull request #14415 from nestjs/renovate/mercurius-16.x
fix(deps): update dependency mercurius to v16
2025-01-13 11:05:19 +01:00
Kamil Mysliwiec
8ce4c2a194 Merge pull request #14416 from nestjs/renovate/rimraf-6.x
fix(deps): update dependency rimraf to v6
2025-01-13 11:05:11 +01:00
renovate[bot]
bc98370002 fix(deps): update dependency @fastify/view to v10.0.2 2025-01-12 16:22:12 +00:00
renovate[bot]
816e9713b1 fix(deps): update dependency ts-morph to v25 2025-01-11 20:17:45 +00:00
renovate[bot]
4ce81f7b48 fix(deps): update dependency rimraf to v6 2025-01-11 20:17:34 +00:00
renovate[bot]
aabb59b9e4 fix(deps): update dependency mercurius to v16 2025-01-11 20:17:25 +00:00
renovate[bot]
58416e3e61 chore(deps): update eslint monorepo to v9.18.0 2025-01-11 20:15:26 +00:00
renovate[bot]
32c51b6200 chore(deps): update dependency nats to v2.29.1 2025-01-11 20:15:08 +00:00
renovate[bot]
838295ffd5 fix(deps): update dependency ansis to v3.8.1 2025-01-11 20:14:58 +00:00
renovate[bot]
467b882735 fix(deps): update dependency @nestjs/swagger to v8.1.1 2025-01-11 20:14:48 +00:00
renovate[bot]
4aa274a819 fix(deps): update dependency @fastify/formbody to v8.0.2 2025-01-11 20:14:34 +00:00
renovate[bot]
8f04d961d0 chore(deps): update dependency @fastify/multipart to v9.0.2 2025-01-11 20:14:22 +00:00
Kamil Mysliwiec
7368436fc3 Merge pull request #14396 from nestjs/renovate/supertest-7.x
chore(deps): update dependency supertest to v7
2025-01-10 09:47:06 +01:00
Kamil Mysliwiec
cc8f71bd74 Merge pull request #14397 from nestjs/renovate/webpack-cli-6.x
chore(deps): update dependency webpack-cli to v6
2025-01-10 09:46:59 +01:00
renovate[bot]
dbda94447a chore(deps): update dependency webpack-cli to v6 2025-01-10 08:11:42 +00:00
renovate[bot]
4f5691b5e5 chore(deps): update dependency supertest to v7 2025-01-10 08:11:38 +00:00
Kamil Mysliwiec
19fba18ab8 Merge pull request #14392 from nestjs/renovate/ansis-3.x
fix(deps): update dependency ansis to v3.8.0
2025-01-10 09:08:35 +01:00
Kamil Mysliwiec
49ac10f474 Merge pull request #14395 from nestjs/renovate/uuid-11.x
fix(deps): update dependency uuid to v11.0.5
2025-01-10 09:08:26 +01:00
renovate[bot]
f1d62cf0fd fix(deps): update dependency ansis to v3.8.0 2025-01-10 07:57:46 +00:00
renovate[bot]
e3ed91bf7a fix(deps): update dependency uuid to v11.0.5 2025-01-10 07:57:36 +00:00
Kamil Mysliwiec
fba96c6e50 Merge pull request #14394 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.9.4
2025-01-10 08:56:14 +01:00
renovate[bot]
e5748820c7 fix(deps): update dependency mongoose to v8.9.4 2025-01-09 22:19:30 +00:00
Kamil Mysliwiec
8f04235c41 Merge pull request #14390 from nestjs/renovate/mocha-11.x
chore(deps): update dependency mocha to v11
2025-01-09 14:53:46 +01:00
renovate[bot]
8039ed1fac chore(deps): update dependency mocha to v11 2025-01-09 13:45:49 +00:00
Kamil Myśliwiec
6791b6cbef style: address lint errors 2025-01-09 12:42:10 +01:00
Kamil Myśliwiec
20d86f3405 Merge branch 'mdorda-fix-13234' 2025-01-09 11:55:01 +01:00
Kamil Myśliwiec
db2a9b5aa3 chore: resolve conflicts 2025-01-09 11:54:46 +01:00
Kamil Mysliwiec
c42d235624 Merge pull request #14388 from nestjs/renovate/mysql2-3.x
fix(deps): update dependency mysql2 to v3.12.0
2025-01-09 11:31:04 +01:00
Kamil Mysliwiec
51f88aeb6e Merge pull request #14389 from nestjs/renovate/graphql-tools-monorepo
fix(deps): update graphql-tools monorepo
2025-01-09 11:30:57 +01:00
Kamil Myśliwiec
87d2a4eedb Merge branch 'kamilogorek-update-opencollective' 2025-01-09 11:30:39 +01:00
Kamil Myśliwiec
3d6faa8ae5 chore: resolve conflicts 2025-01-09 11:30:25 +01:00
renovate[bot]
0bc77e37f6 fix(deps): update graphql-tools monorepo 2025-01-09 10:05:27 +00:00
renovate[bot]
11a8f19d1a fix(deps): update dependency mysql2 to v3.12.0 2025-01-09 10:05:14 +00:00
Kamil Mysliwiec
2947330b9f Merge pull request #14386 from nestjs/renovate/ansis-3.x
fix(deps): update dependency ansis to v3.7.0
2025-01-09 11:03:21 +01:00
Kamil Mysliwiec
fbcae33b50 Merge pull request #14387 from nestjs/renovate/light-my-request-6.x
fix(deps): update dependency light-my-request to v6.5.1
2025-01-09 11:03:11 +01:00
renovate[bot]
30971d8ca3 fix(deps): update dependency light-my-request to v6.5.1 2025-01-09 09:54:07 +00:00
renovate[bot]
56a743b6cc fix(deps): update dependency ansis to v3.7.0 2025-01-09 09:53:55 +00:00
Kamil Mysliwiec
4f60402c23 Merge pull request #14385 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update dependency typescript-eslint to v8.19.1
2025-01-09 10:51:49 +01:00
renovate[bot]
c938ead110 chore(deps): update dependency typescript-eslint to v8.19.1 2025-01-09 09:33:35 +00:00
Kamil Mysliwiec
16776c2c3f Merge pull request #14384 from nestjs/renovate/typescript-5.x
fix(deps): update dependency typescript to v5.7.3
2025-01-09 10:31:08 +01:00
renovate[bot]
482ab803d9 fix(deps): update dependency typescript to v5.7.3 2025-01-09 07:52:52 +00:00
Kamil Mysliwiec
7eb8b82a40 Merge pull request #14381 from nestjs/renovate/lint-staged-15.x
chore(deps): update dependency lint-staged to v15.3.0
2025-01-09 08:47:48 +01:00
Kamil Mysliwiec
9404090877 Merge pull request #14378 from nestjs/renovate/core-js-3.x
chore(deps): update dependency core-js to v3.40.0
2025-01-09 08:47:39 +01:00
Kamil Mysliwiec
ebdbe82d96 Merge pull request #14379 from nestjs/renovate/globals-15.x
chore(deps): update dependency globals to v15.14.0
2025-01-09 08:47:19 +01:00
renovate[bot]
7c0d23d111 chore(deps): update dependency lint-staged to v15.3.0 2025-01-08 18:37:10 +00:00
Kamil Ogórek
a24ef96d06 chore(deps): Update opencollective to 0.4.1 under new scope 2025-01-08 17:38:33 +01:00
renovate[bot]
bd9634579a chore(deps): update dependency globals to v15.14.0 2025-01-08 14:36:16 +00:00
renovate[bot]
e4d50f1fd6 chore(deps): update dependency core-js to v3.40.0 2025-01-08 14:36:03 +00:00
Kamil Mysliwiec
b9ddc1d403 Merge pull request #14376 from nestjs/renovate/commitlint-monorepo
chore(deps): update dependency @commitlint/config-angular to v19.7.0
2025-01-08 10:03:13 +01:00
Kamil Mysliwiec
104a06e68c Merge pull request #14377 from nestjs/renovate/eslint-monorepo
chore(deps): update dependency @eslint/js to v9.17.0
2025-01-08 10:03:05 +01:00
renovate[bot]
35d01cc40e chore(deps): update dependency @eslint/js to v9.17.0 2025-01-08 09:01:18 +00:00
renovate[bot]
561f26bdf4 chore(deps): update dependency @commitlint/config-angular to v19.7.0 2025-01-08 09:01:05 +00:00
Kamil Mysliwiec
960960ec22 Merge pull request #14375 from nestjs/renovate/grpc-grpc-js-1.x-lockfile
chore(deps): update dependency @grpc/grpc-js to v1.12.5
2025-01-08 09:58:16 +01:00
renovate[bot]
e899b6c1d6 chore(deps): update dependency @grpc/grpc-js to v1.12.5 2025-01-08 08:57:55 +00:00
Kamil Mysliwiec
4acc167571 Merge pull request #14372 from nestjs/renovate/grpc-grpc-js-1.x
fix(deps): update dependency @grpc/grpc-js to v1.12.5
2025-01-08 09:55:34 +01:00
Kamil Mysliwiec
4cd1f9fcaf Merge pull request #14373 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.9.3
2025-01-08 09:55:25 +01:00
Kamil Mysliwiec
6b9ea755b0 Merge pull request #14374 from nestjs/renovate/uuid-11.x
fix(deps): update dependency uuid to v11.0.4
2025-01-08 09:55:15 +01:00
renovate[bot]
04d190236e fix(deps): update dependency uuid to v11.0.4 2025-01-08 08:51:01 +00:00
Kamil Myśliwiec
b0f2f7a107 chore: downgrade sinon-chai 2025-01-08 09:48:48 +01:00
Kamil Myśliwiec
93ce502262 chore: regenerate package lock 2025-01-08 09:15:24 +01:00
renovate[bot]
23636bce22 fix(deps): update dependency mongoose to v8.9.3 2025-01-08 07:54:39 +00:00
renovate[bot]
7da5e15ef7 fix(deps): update dependency @grpc/grpc-js to v1.12.5 2025-01-08 07:54:27 +00:00
Kamil Mysliwiec
17ddb7d8da Merge pull request #14371 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency @apollo/server to v4.11.3
2025-01-08 08:53:00 +01:00
Kamil Mysliwiec
1cbc61c81b Merge pull request #14370 from nestjs/renovate/ioredis-5.x
chore(deps): update dependency ioredis to v5.4.2
2025-01-08 08:52:51 +01:00
Kamil Myśliwiec
7bfda4c4d1 chore: sync package-lock file 2025-01-07 15:53:19 +01:00
renovate[bot]
4ed0765720 chore(deps): update dependency ioredis to v5.4.2 2025-01-07 14:50:03 +00:00
renovate[bot]
d9d779e281 fix(deps): update dependency @apollo/server to v4.11.3 2025-01-07 14:47:54 +00:00
Kamil Mysliwiec
6da1db2f59 Merge pull request #14197 from nestjs/dependabot/npm_and_yarn/fastify/static-8.0.3
chore(deps-dev): bump @fastify/static from 7.0.4 to 8.0.3
2025-01-07 15:46:47 +01:00
Kamil Mysliwiec
d55773b29e Merge pull request #14345 from nestjs/renovate/major-eslint-monorepo
chore(deps): update dependency eslint to v9
2025-01-07 15:46:35 +01:00
Kamil Mysliwiec
77c797764a Merge pull request #14368 from nestjs/renovate/node-22.x
chore(deps): update dependency @types/node to v22.10.5
2025-01-07 15:45:59 +01:00
Kamil Mysliwiec
5781527f06 Merge pull request #14369 from nestjs/renovate/concurrently-9.x
chore(deps): update dependency concurrently to v9.1.2
2025-01-07 15:45:50 +01:00
Kamil Myśliwiec
0094e0df49 test: add optional chaining to eventsource init payload 2025-01-07 15:39:00 +01:00
dependabot[bot]
8edc1a40e7 chore(deps-dev): bump @fastify/static from 7.0.4 to 8.0.3
Bumps [@fastify/static](https://github.com/fastify/fastify-static) from 7.0.4 to 8.0.3.
- [Release notes](https://github.com/fastify/fastify-static/releases)
- [Commits](https://github.com/fastify/fastify-static/compare/v7.0.4...v8.0.3)

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-10 00:56:31 +00:00
renovate[bot]
5b055df726 fix(deps): update dependency @apollo/gateway to v2.9.3 2024-12-09 16:40:47 +00:00
renovate[bot]
3251caf25a chore(deps): update nest monorepo 2024-12-09 16:40:29 +00:00
renovate[bot]
bb02172980 chore(deps): update dependency webpack to v5.97.1 2024-12-09 12:50:09 +00:00
Kamil Mysliwiec
d7555a5eb7 Merge pull request #14295 from nestjs/renovate/redis-4.x
chore(deps): update dependency redis to v4.7.0
2024-12-09 13:43:53 +01:00
Kamil Mysliwiec
4a2c057784 Merge pull request #14297 from nestjs/renovate/ts-jest-29.x
chore(deps): update dependency ts-jest to v29.2.5
2024-12-09 13:43:45 +01:00
Kamil Mysliwiec
abc906808a Merge pull request #14298 from nestjs/renovate/typescript-5.x
chore(deps): update dependency typescript to v5.7.2
2024-12-09 13:43:36 +01:00
Kamil Myśliwiec
909001d52e fix(microservices): call cleanup function on grpc call end 2024-12-09 12:56:03 +01:00
renovate[bot]
6bb2bd20db chore(deps): update dependency ts-jest to v29.2.5 2024-12-09 11:19:58 +00:00
renovate[bot]
d486d82110 chore(deps): update dependency redis to v4.7.0 2024-12-09 11:19:44 +00:00
Kamil Myśliwiec
d0fb875e23 chore(@nestjs) publish v10.4.15 release 2024-12-09 12:15:54 +01:00
renovate[bot]
8f2329bee5 chore(deps): update dependency typescript to v5.7.2 2024-12-09 11:15:32 +00:00
Kamil Myśliwiec
b3412d9ca9 Merge branch 'master' of https://github.com/nestjs/nest 2024-12-09 12:14:37 +01:00
Kamil Myśliwiec
1d457fe79f chore(@nestjs) publish v10.4.14 release 2024-12-09 12:14:21 +01:00
Kamil Mysliwiec
6d90dfadca Merge pull request #14294 from nestjs/renovate/prettier-3.x
chore(deps): update dependency prettier to v3.4.2
2024-12-09 12:10:34 +01:00
renovate[bot]
b8ed8eb4fd chore(deps): update dependency prettier to v3.4.2 2024-12-09 10:18:07 +00:00
Kamil Mysliwiec
e52f80af3c Merge pull request #14292 from nestjs/renovate/eslint-plugin-prettier-5.x
chore(deps): update dependency eslint-plugin-prettier to v5.2.1
2024-12-09 11:14:51 +01:00
renovate[bot]
c7e5e08c97 chore(deps): update dependency eslint-plugin-prettier to v5.2.1 2024-12-09 09:24:15 +00:00
Kamil Mysliwiec
ef67824272 Merge pull request #14160 from nestjs/renovate/fastify-middie-8.x
chore(deps): update dependency @fastify/middie to v8.3.3
2024-12-09 10:19:55 +01:00
Kamil Mysliwiec
3044aae2fe Merge pull request #14291 from nestjs/renovate/eslint-plugin-import-2.x
chore(deps): update dependency eslint-plugin-import to v2.31.0
2024-12-09 10:19:48 +01:00
renovate[bot]
e22768083e chore(deps): update dependency eslint-plugin-import to v2.31.0 2024-12-09 09:18:15 +00:00
renovate[bot]
27aaa560e1 chore(deps): update dependency @fastify/middie to v8.3.3 2024-12-09 09:17:53 +00:00
Kamil Mysliwiec
d3f525135b Merge pull request #14286 from nestjs/renovate/eslint-monorepo
chore(deps): update dependency eslint to v8.57.1
2024-12-09 10:12:41 +01:00
Kamil Mysliwiec
fd7d10f69f Merge pull request #14285 from nestjs/renovate/typescript-eslint-monorepo
chore(deps): update dependency @typescript-eslint/parser to v8.17.0
2024-12-09 10:12:34 +01:00
Kamil Mysliwiec
c9a600c3f5 Merge pull request #14290 from nestjs/dependabot/npm_and_yarn/prettier-3.4.2
chore(deps-dev): bump prettier from 3.3.3 to 3.4.2
2024-12-09 10:12:24 +01:00
dependabot[bot]
a9a7a9095c chore(deps-dev): bump prettier from 3.3.3 to 3.4.2
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.3 to 3.4.2.
- [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.3.3...3.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-09 00:26:34 +00:00
renovate[bot]
2c276ac8ec chore(deps): update dependency eslint to v8.57.1 2024-12-06 14:59:12 +00:00
renovate[bot]
0d0b5f7098 chore(deps): update dependency @typescript-eslint/parser to v8.17.0 2024-12-06 14:58:59 +00:00
Kamil Mysliwiec
0e5bf68e7a Merge pull request #14283 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.8.4
2024-12-06 12:30:43 +01:00
Kamil Mysliwiec
6029a251ba Merge pull request #14284 from nestjs/renovate/babel-monorepo
chore(deps): update dependency @babel/cli to v7.26.4
2024-12-06 12:30:33 +01:00
renovate[bot]
cf9bf7cdc2 chore(deps): update dependency @babel/cli to v7.26.4 2024-12-06 11:06:47 +00:00
renovate[bot]
03e0af6440 fix(deps): update dependency mongoose to v8.8.4 2024-12-06 11:06:42 +00:00
Kamil Mysliwiec
9e5e4f6db3 Merge pull request #14280 from nestjs/renovate/commitlint-monorepo
chore(deps): update dependency @commitlint/cli to v19.6.0
2024-12-06 12:02:51 +01:00
Kamil Mysliwiec
39cc540826 Merge pull request #14282 from nestjs/renovate/express-4.x
fix(deps): update dependency express to v4.21.2
2024-12-06 12:02:43 +01:00
renovate[bot]
4971ef3a5a chore(deps): update dependency @commitlint/cli to v19.6.0 2024-12-06 07:19:17 +00:00
renovate[bot]
f4b242a6aa fix(deps): update dependency express to v4.21.2 2024-12-06 07:18:47 +00:00
Kamil Mysliwiec
31a5a552ca Merge pull request #14279 from nestjs/renovate/confluentinc-cp-zookeeper-7.x
chore(deps): update confluentinc/cp-zookeeper docker tag to v7.8.0
2024-12-06 08:12:54 +01:00
Kamil Myśliwiec
3e55791401 Merge branch '11.0.0' into chore/express-v5 2024-12-05 14:53:03 +01:00
Kamil Myśliwiec
6a84d6e25e fix(core): set distance to max, dont override on calc 2024-12-05 14:52:08 +01:00
Kamil Myśliwiec
121494ac4e Merge branch '11.0.0' into chore/express-v5 2024-12-05 14:15:45 +01:00
Kamil Myśliwiec
648b438df1 Merge branch '11.0.0' of https://github.com/nestjs/nest into 11.0.0 2024-12-05 14:15:24 +01:00
Kamil Myśliwiec
8bb562301f fix(core): set global modules distance to -1 2024-12-05 14:13:48 +01:00
renovate[bot]
b642364f6b chore(deps): update confluentinc/cp-zookeeper docker tag to v7.8.0 2024-12-05 12:43:26 +00:00
Kamil Mysliwiec
fb72d01118 Merge pull request #14275 from nestjs/renovate/amqplib-0.x
chore(deps): update dependency @types/amqplib to v0.10.6
2024-12-05 13:39:23 +01:00
Kamil Mysliwiec
8c1a6878cd Merge pull request #14277 from nestjs/renovate/nest-graphql-monorepo
fix(deps): update nest-graphql monorepo to v12.2.2
2024-12-05 13:39:16 +01:00
renovate[bot]
42c4316777 fix(deps): update nest-graphql monorepo to v12.2.2 2024-12-05 07:42:01 +00:00
renovate[bot]
a03363f9ca chore(deps): update dependency @types/amqplib to v0.10.6 2024-12-05 07:41:40 +00:00
Kamil Mysliwiec
563c088f2a Merge pull request #14271 from nestjs/renovate/dotenv-16.x
fix(deps): update dependency dotenv to v16.4.7
2024-12-05 08:31:18 +01:00
Kamil Mysliwiec
31c6fadbc3 Merge pull request #14272 from nestjs/renovate/confluentinc-cp-kafka-7.x
chore(deps): update confluentinc/cp-kafka docker tag to v7.8.0
2024-12-05 08:31:12 +01:00
Kamil Mysliwiec
e24a6833af Merge pull request #14273 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.12.4
chore(deps-dev): bump @grpc/grpc-js from 1.12.2 to 1.12.4
2024-12-05 08:31:06 +01:00
dependabot[bot]
84ab3145a9 chore(deps-dev): bump @grpc/grpc-js from 1.12.2 to 1.12.4
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.12.2 to 1.12.4.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.12.2...@grpc/grpc-js@1.12.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-05 00:28:49 +00:00
renovate[bot]
f0824383ba chore(deps): update confluentinc/cp-kafka docker tag to v7.8.0 2024-12-04 09:50:03 +00:00
Kamil Mysliwiec
762406a78d Merge pull request #14266 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo
2024-12-04 10:45:02 +01:00
renovate[bot]
e0e9002bb7 chore(deps): update babel monorepo 2024-12-04 09:42:49 +00:00
renovate[bot]
15c04cd0e5 fix(deps): update dependency dotenv to v16.4.7 2024-12-04 09:42:42 +00:00
Kamil Mysliwiec
c341a02243 Merge pull request #14267 from flovouin/fix-shutdown-hooks-order
Fix shutdown hooks order
2024-12-04 10:37:49 +01:00
Kamil Mysliwiec
f5f226c513 Merge pull request #14265 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v10.4.13
2024-12-04 10:37:01 +01:00
Kamil Mysliwiec
26f1341429 Merge pull request #14269 from nestjs/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-8.17.0
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.15.0 to 8.17.0
2024-12-04 10:36:54 +01:00
dependabot[bot]
07886bf320 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.15.0 to 8.17.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.17.0/packages/eslint-plugin)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-04 00:26:06 +00:00
Flo
3080787d9b fix(core): call shutdown hooks in reverse distance order 2024-12-03 16:56:13 +01:00
renovate[bot]
0e54f52d27 fix(deps): update nest monorepo to v10.4.13 2024-12-03 14:37:32 +00:00
Kamil Mysliwiec
50796582df Merge pull request #14264 from nestjs/renovate/reflect-metadata-0.x
fix(deps): update dependency reflect-metadata to v0.2.2
2024-12-03 15:29:00 +01:00
renovate[bot]
e3c95e4f60 fix(deps): update dependency reflect-metadata to v0.2.2 2024-12-03 13:07:08 +00:00
Kamil Mysliwiec
6ea7dcebb6 Merge pull request #14262 from nestjs/renovate/nestjs-typeorm-10.x
fix(deps): update dependency @nestjs/typeorm to v10.0.2
2024-12-03 14:00:59 +01:00
Kamil Mysliwiec
34c5ba6191 Merge pull request #14263 from nestjs/renovate/dotenv-16.x
fix(deps): update dependency dotenv to v16.4.6
2024-12-03 14:00:53 +01:00
Kamil Myśliwiec
d2a45f3e25 chore: use optional group wrapped splat param 2024-12-03 12:34:37 +01:00
renovate[bot]
edb8b1b0e8 fix(deps): update dependency dotenv to v16.4.6 2024-12-03 11:32:16 +00:00
renovate[bot]
ce764067a4 fix(deps): update dependency @nestjs/typeorm to v10.0.2 2024-12-03 11:32:08 +00:00
Kamil Mysliwiec
ef66275ae9 Merge pull request #14260 from nestjs/renovate/bytes-3.x
chore(deps): update dependency @types/bytes to v3.1.5
2024-12-03 12:26:50 +01:00
Kamil Mysliwiec
21143d757b Merge pull request #14261 from nestjs/renovate/nestjs-serve-static-4.x
fix(deps): update dependency @nestjs/serve-static to v4.0.2
2024-12-03 12:26:43 +01:00
renovate[bot]
06349b61cd chore(deps): update dependency @types/bytes to v3.1.5 2024-12-03 10:41:23 +00:00
Kamil Myśliwiec
1eba0121a0 chore(@nestjs) publish v10.4.13 release 2024-12-03 11:37:34 +01:00
Kamil Myśliwiec
c5bbd1e40f Merge branch 'master' of https://github.com/nestjs/nest 2024-12-03 11:03:20 +01:00
Kamil Mysliwiec
265f6d03c8 Merge pull request #14256 from sapenlei/chore/add-type-declaration-RawBody
chore(common): Add type declaration for RawBody decorator with pipes
2024-12-03 11:02:48 +01:00
Kamil Myśliwiec
3f127e6a2f Merge branch 'master' of https://github.com/nestjs/nest 2024-12-03 10:55:32 +01:00
Kamil Myśliwiec
b1b262f4c3 fix(microservices): unsubscribe instead of completing replay buffer 2024-12-03 10:54:56 +01:00
sapenlei
59bf615d29 refactor(common): Add type declaration for RawBody decorator with pipes 2024-12-03 17:53:30 +08:00
renovate[bot]
c53eee2065 fix(deps): update dependency @nestjs/serve-static to v4.0.2 2024-12-03 09:49:57 +00:00
Kamil Mysliwiec
25feb4540a Merge pull request #14257 from nestjs/renovate/fastify-static-7.x
fix(deps): update dependency @fastify/static to v7.0.4
2024-12-03 09:50:31 +01:00
Kamil Mysliwiec
9edc20d84c Merge pull request #14258 from nestjs/renovate/nestjs-sequelize-10.x
fix(deps): update dependency @nestjs/sequelize to v10.0.1
2024-12-03 09:50:24 +01:00
renovate[bot]
f6240160ae fix(deps): update dependency @nestjs/sequelize to v10.0.1 2024-12-03 08:46:54 +00:00
renovate[bot]
5a558b271f fix(deps): update dependency @fastify/static to v7.0.4 2024-12-03 08:46:47 +00:00
Kamil Mysliwiec
2c72d447c1 Merge pull request #14249 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/users-application/apollo/gateway-2.8.5
chore(deps): bump @apollo/gateway from 2.4.8 to 2.8.5 in /sample/32-graphql-federation-schema-first/users-application
2024-12-03 09:37:02 +01:00
dependabot[bot]
a7dd69328a chore(deps): bump @apollo/gateway
Bumps [@apollo/gateway](https://github.com/apollographql/federation/tree/HEAD/gateway-js) from 2.4.8 to 2.8.5.
- [Release notes](https://github.com/apollographql/federation/releases)
- [Changelog](https://github.com/apollographql/federation/blob/main/gateway-js/CHANGELOG.md)
- [Commits](https://github.com/apollographql/federation/commits/@apollo/gateway@2.8.5/gateway-js)

---
updated-dependencies:
- dependency-name: "@apollo/gateway"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-03 08:36:40 +00:00
Kamil Mysliwiec
57c5e6f118 Merge pull request #14250 from nestjs/renovate/jest-monorepo
chore(deps): update jest monorepo
2024-12-03 09:36:05 +01:00
Kamil Mysliwiec
bc50321c7a Merge pull request #14245 from nestjs/renovate/mqtt-5.x
chore(deps): update dependency mqtt to v5.10.3
2024-12-03 09:35:52 +01:00
Kamil Mysliwiec
9b0cd523aa Merge pull request #14247 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v10.4.12
2024-12-03 09:35:46 +01:00
Kamil Mysliwiec
24e0106b46 Merge pull request #14251 from nestjs/dependabot/npm_and_yarn/graphql-tools-9.0.5
chore(deps-dev): bump graphql-tools from 9.0.3 to 9.0.5
2024-12-03 09:35:32 +01:00
sapenlei
439231ed61 chore(common): Add type declaration for RawBody decorator with pipes
Closes #14254
2024-12-03 11:18:29 +08:00
dependabot[bot]
425121d809 chore(deps-dev): bump graphql-tools from 9.0.3 to 9.0.5
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 9.0.3 to 9.0.5.
- [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.5/packages/graphql-tools)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-02 00:24:21 +00:00
renovate[bot]
d0fe4833ad fix(deps): update nest monorepo to v10.4.12 2024-12-01 19:17:01 +00:00
renovate[bot]
c95ed06498 chore(deps): update jest monorepo 2024-12-01 19:16:50 +00:00
renovate[bot]
d7b460c8b8 chore(deps): update dependency mqtt to v5.10.3 2024-12-01 19:16:43 +00:00
Kamil Mysliwiec
28b785991b Merge pull request #14248 from micalevisk/refactor-drop-lock-files-from-samples
chore: remove package lock files from sample projects
2024-12-01 20:12:49 +01:00
Micael Levi L. Cavalcante
72b32356dc chore: remove package lock files from sample projects 2024-12-01 13:18:25 -04:00
Kamil Mysliwiec
b1a2582abc Merge pull request #14246 from nestjs/renovate/nest-monorepo
chore(deps): update nest monorepo
2024-11-29 12:49:54 +01:00
renovate[bot]
c8c9ce7e89 chore(deps): update nest monorepo 2024-11-29 11:41:54 +00:00
Kamil Myśliwiec
cf8d27c2f3 chore(@nestjs) publish v10.4.12 release 2024-11-29 12:31:17 +01:00
Kamil Mysliwiec
526f3d4b0a Merge pull request #14241 from LhonRafaat/fix/validationpipe-nested-query-params
fix(common): enforce string type in validationpipe
2024-11-29 12:27:26 +01:00
Kamil Mysliwiec
3eea086936 Merge pull request #14243 from nestjs/renovate/node-20.x
chore(deps): update dependency @types/node to v20.17.9
2024-11-29 12:23:57 +01:00
lhonRafaat
74c4376bbc fix(common): enforce strin value if not undefined 2024-11-29 10:49:05 +03:00
renovate[bot]
6474afae9d chore(deps): update dependency @types/node to v20.17.9 2024-11-29 07:41:11 +00:00
Kamil Mysliwiec
f53d138b04 Merge pull request #14240 from nestjs/renovate/multer-1.x
chore(deps): update dependency @types/multer to v1.4.12
2024-11-29 08:35:36 +01:00
lhonRafaat
6563c18417 fix(common): return undefined if string type value is undefined 2024-11-28 21:22:22 +03:00
lhonRafaat
a071a73e6d fix(common): enforce string type in validationpipe
strictly parse the value to string to avoid nested objects being passed if the type is explicitly set to string

closes #14234
2024-11-28 17:46:02 +03:00
renovate[bot]
fb9a534531 chore(deps): update dependency @types/multer to v1.4.12 2024-11-28 13:09:52 +00:00
Kamil Myśliwiec
700a85d211 chore: update package.json 2024-11-28 14:06:38 +01:00
Kamil Myśliwiec
7197cc1a8a feat: add normalize path to http adapter 2024-11-28 14:06:15 +01:00
Kamil Mysliwiec
d220da6b6f Merge pull request #14239 from nestjs/renovate/chai-4.x
chore(deps): update dependency @types/chai to v4.3.20
2024-11-28 11:42:21 +01:00
renovate[bot]
c0a87b868f chore(deps): update dependency @types/chai to v4.3.20 2024-11-28 10:37:21 +00:00
Kamil Mysliwiec
988d49e0d0 Merge pull request #14237 from nestjs/renovate/confluentinc-cp-zookeeper-7.x
chore(deps): update confluentinc/cp-zookeeper docker tag to v7.7.2
2024-11-28 11:29:14 +01:00
Kamil Myśliwiec
7f142e9399 feat: add legacy route converter, update tests 2024-11-28 11:28:56 +01:00
renovate[bot]
fc8c3e2167 chore(deps): update confluentinc/cp-zookeeper docker tag to v7.7.2 2024-11-28 10:07:26 +00:00
Kamil Mysliwiec
19f9e4ed1b Merge pull request #14236 from nestjs/renovate/confluentinc-cp-kafka-7.x
chore(deps): update confluentinc/cp-kafka docker tag to v7.7.2
2024-11-28 11:03:14 +01:00
renovate[bot]
50e97b2abe chore(deps): update confluentinc/cp-kafka docker tag to v7.7.2 2024-11-28 09:39:44 +00:00
Kamil Mysliwiec
18389c7261 Merge pull request #12253 from nestjs/renovate/apollo-graphql-packages
fix(deps): update apollo graphql packages
2024-11-28 10:36:55 +01:00
Kamil Mysliwiec
4808efa0cd Merge pull request #14235 from nestjs/dependabot/npm_and_yarn/commitlint/config-angular-19.6.0
chore(deps-dev): bump @commitlint/config-angular from 19.5.0 to 19.6.0
2024-11-28 08:09:41 +01:00
dependabot[bot]
d51448cae6 chore(deps-dev): bump @commitlint/config-angular from 19.5.0 to 19.6.0
Bumps [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular) from 19.5.0 to 19.6.0.
- [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/v19.6.0/@commitlint/config-angular)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-28 00:46:51 +00:00
Kamil Myśliwiec
4f008fabd2 Merge branch '11.0.0' into chore/express-v5 2024-11-27 15:10:12 +01:00
Kamil Myśliwiec
f9c578680c style: address lint errors 2024-11-27 13:34:42 +01:00
Kamil Mysliwiec
6f7d470389 Merge pull request #14213 from mag123c/feature/14070-add-error-message-file-validator
feat(common): add error messages for file validators
2024-11-27 13:32:21 +01:00
Kamil Myśliwiec
95bd1ce678 Merge branch 'notusertelken-feature/mqtt-raw-output' into 11.0.0 2024-11-27 12:52:33 +01:00
Kamil Myśliwiec
43804c7c40 chore: resolve conflicts 2024-11-27 12:52:09 +01:00
renovate[bot]
da369005f2 fix(deps): update apollo graphql packages 2024-11-27 11:45:15 +00:00
Kamil Mysliwiec
b31f9e4825 Merge pull request #14226 from nestjs/renovate/tslib-2.x
fix(deps): update dependency tslib to v2.8.1
2024-11-27 12:40:35 +01:00
Kamil Mysliwiec
34eb4c1be9 Merge pull request #14233 from nestjs/renovate/nest-monorepo
chore(deps): update nest monorepo
2024-11-27 12:40:04 +01:00
Kamil Myśliwiec
5ca5c74c24 ci: use node 20.18 as the maintenance version 2024-11-27 12:39:49 +01:00
renovate[bot]
ccfd0f19b6 chore(deps): update nest monorepo 2024-11-27 11:36:17 +00:00
renovate[bot]
7db85ad33c fix(deps): update dependency tslib to v2.8.1 2024-11-27 11:23:50 +00:00
Kamil Mysliwiec
f69bb660e0 Merge pull request #14232 from nestjs/renovate/npm-path-to-regexp-vulnerability
fix(deps): update dependency path-to-regexp to v3.3.0 [security]
2024-11-27 12:19:05 +01:00
Kamil Myśliwiec
6e0f891f48 style: address lint errors and warnings 2024-11-27 12:18:43 +01:00
Kamil Myśliwiec
ca76e698f4 test(microservices): fix client mqtt unit test (use endasync) 2024-11-27 12:18:27 +01:00
renovate[bot]
ffaa6de5c4 fix(deps): update dependency path-to-regexp to v3.3.0 [security] 2024-11-27 11:16:04 +00:00
Kamil Myśliwiec
d606466b37 Merge branch 'master' into 11.0.0 2024-11-27 12:03:56 +01:00
Kamil Mysliwiec
315a430197 Merge pull request #14229 from nestjs/renovate/mongo-8.x
chore(deps): update mongo docker tag to v8
2024-11-27 12:03:41 +01:00
Kamil Mysliwiec
eca955d3d0 Merge pull request #14228 from nestjs/renovate/node-22.x
chore(deps): update dependency @types/node to v22.10.0
2024-11-27 12:03:17 +01:00
Kamil Mysliwiec
0e92425c0e Merge pull request #14227 from nestjs/renovate/nest-graphql-monorepo
fix(deps): update nest-graphql monorepo to v12.2.1
2024-11-27 12:03:09 +01:00
Kamil Mysliwiec
a23e7df2a4 Merge pull request #14225 from nestjs/renovate/socket.io-packages
fix(deps): update dependency socket.io to v4.8.1
2024-11-27 12:02:52 +01:00
Kamil Mysliwiec
5b0824385f Merge pull request #14224 from nestjs/renovate/sequelize-6.x
fix(deps): update dependency sequelize to v6.37.5
2024-11-27 12:02:44 +01:00
Kamil Mysliwiec
95d5dc1af3 Merge pull request #14230 from nestjs/renovate/mysql-9.x
chore(deps): update mysql docker tag to v9
2024-11-27 12:02:35 +01:00
Kamil Mysliwiec
f1226548f7 Merge pull request #14231 from nestjs/renovate/nestjs-swagger-8.x
fix(deps): update dependency @nestjs/swagger to v8
2024-11-27 12:02:16 +01:00
Kamil Myśliwiec
bedf1fa2a6 chore(@nestjs) publish v10.4.11 release 2024-11-27 12:01:46 +01:00
Kamil Myśliwiec
96e3e79acc fix(grpc): schedule messages forwarding after the current event loop 2024-11-27 11:50:50 +01:00
renovate[bot]
c5e1c2e74a fix(deps): update dependency @nestjs/swagger to v8 2024-11-27 10:24:12 +00:00
renovate[bot]
a9b198c08f chore(deps): update mysql docker tag to v9 2024-11-27 10:23:53 +00:00
renovate[bot]
043d4a095b chore(deps): update mongo docker tag to v8 2024-11-27 10:23:42 +00:00
renovate[bot]
09f1d002f3 chore(deps): update dependency @types/node to v22.10.0 2024-11-27 10:22:41 +00:00
renovate[bot]
91dffa5da4 fix(deps): update nest-graphql monorepo to v12.2.1 2024-11-27 10:18:53 +00:00
renovate[bot]
13a22ef3d6 fix(deps): update dependency socket.io to v4.8.1 2024-11-27 10:17:05 +00:00
renovate[bot]
d7d784f926 fix(deps): update dependency sequelize to v6.37.5 2024-11-27 10:16:45 +00:00
Kamil Myśliwiec
e411d80d4d chore: remove a leftover 2024-11-27 11:06:07 +01:00
Kamil Myśliwiec
ca70f0754c chore(deps): update package.json 2024-11-27 11:05:18 +01:00
Kamil Myśliwiec
cf17e4d521 chore: mqtt updates, integration test improvements 2024-11-27 11:04:51 +01:00
Kamil Mysliwiec
9fb542968b Merge pull request #14223 from nestjs/renovate/nest-monorepo
chore(deps): update nest monorepo
2024-11-27 10:57:53 +01:00
renovate[bot]
e6fe92ce79 chore(deps): update nest monorepo 2024-11-27 09:57:12 +00:00
Kamil Mysliwiec
2df0c754da Merge pull request #14222 from nestjs/renovate/nest-monorepo
chore(deps): update nest monorepo
2024-11-27 10:48:24 +01:00
renovate[bot]
a119a1a9c1 chore(deps): update nest monorepo 2024-11-27 09:30:26 +00:00
Kamil Myśliwiec
74e318c930 test: add not null assertion 2024-11-27 10:23:47 +01:00
Kamil Myśliwiec
5ebe4b93b3 chore(@nestjs) publish v10.4.10 release 2024-11-27 10:18:59 +01:00
Kamil Myśliwiec
74789282d1 chore: update minimum node version 2024-11-27 10:06:57 +01:00
Kamil Myśliwiec
e2893f951c chore: add non null assertions 2024-11-27 10:06:07 +01:00
Kamil Mysliwiec
4a9a3d86c2 Merge pull request #14221 from nestjs/renovate/mysql-8.x
chore(deps): update mysql docker tag to v8.4.3
2024-11-27 10:00:48 +01:00
Kamil Mysliwiec
1cf339c5be Merge pull request #14220 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.96.1
2024-11-27 10:00:36 +01:00
Kamil Mysliwiec
2c2d766502 Merge pull request #14219 from nestjs/renovate/nodemon-3.x
chore(deps): update dependency nodemon to v3.1.7
2024-11-27 10:00:28 +01:00
Kamil Myśliwiec
170f2e0754 Merge branch 'master' into 11.0.0 2024-11-27 09:59:29 +01:00
Kamil Myśliwiec
dbeaa0b316 sample: fix mongoose model mock 2024-11-27 09:59:11 +01:00
mag123c
11f8a4a216 feat(common): add error messages for file validators 2024-11-27 17:58:35 +09:00
Kamil Mysliwiec
5396c8c6f0 Merge pull request #14218 from nestjs/renovate/confluentinc-cp-zookeeper-7.x
chore(deps): update confluentinc/cp-zookeeper docker tag to v7.7.1
2024-11-27 09:57:33 +01:00
renovate[bot]
13092aeac0 chore(deps): update dependency webpack to v5.96.1 2024-11-27 08:57:32 +00:00
Kamil Mysliwiec
6aa6d47c25 Merge pull request #14217 from nestjs/renovate/confluentinc-cp-kafka-7.x
chore(deps): update confluentinc/cp-kafka docker tag to v7.7.1
2024-11-27 09:57:25 +01:00
renovate[bot]
38bea6e544 chore(deps): update dependency nodemon to v3.1.7 2024-11-27 08:57:12 +00:00
Kamil Mysliwiec
42a443ee9a Merge pull request #14216 from nestjs/renovate/rimraf-5.x
fix(deps): update dependency rimraf to v5.0.10
2024-11-27 09:56:34 +01:00
Kamil Mysliwiec
f39cffe8ea Merge pull request #14215 from nestjs/renovate/dotenv-16.x
fix(deps): update dependency dotenv to v16.4.5
2024-11-27 09:56:24 +01:00
Kamil Mysliwiec
f97c8bc586 Merge pull request #14214 from nestjs/renovate/grpc-reflection-1.x
fix(deps): update dependency @grpc/reflection to v1.0.4
2024-11-27 09:56:03 +01:00
Kamil Myśliwiec
d27628aafa chore: resolve conflicts 2024-11-27 09:55:20 +01:00
Kamil Myśliwiec
339be465fe chore: resolve conflicts 2024-11-27 09:49:01 +01:00
renovate[bot]
ca78cbe447 chore(deps): update mysql docker tag to v8.4.3 2024-11-27 08:48:24 +00:00
renovate[bot]
9e21f093d8 chore(deps): update confluentinc/cp-zookeeper docker tag to v7.7.1 2024-11-27 08:47:12 +00:00
renovate[bot]
619db30f16 chore(deps): update confluentinc/cp-kafka docker tag to v7.7.1 2024-11-27 08:46:59 +00:00
renovate[bot]
9174dd647e fix(deps): update dependency rimraf to v5.0.10 2024-11-27 08:46:41 +00:00
Kamil Myśliwiec
f95758d88d sample: replace findByIdAndRemove with findByIdAndDelete 2024-11-27 09:43:57 +01:00
renovate[bot]
7854ceb1db fix(deps): update dependency dotenv to v16.4.5 2024-11-27 08:41:58 +00:00
renovate[bot]
d8343a22cc fix(deps): update dependency @grpc/reflection to v1.0.4 2024-11-27 08:41:19 +00:00
Kamil Mysliwiec
0ca42ba500 Merge pull request #14205 from nestjs/chore/eslint-v9
chore(dev-deps): upgrade to eslint v9
2024-11-27 09:41:08 +01:00
Kamil Myśliwiec
356469bfcc ci: run spec and packages lint in parallel 2024-11-27 09:29:39 +01:00
Kamil Mysliwiec
38ab78272f Merge pull request #12940 from nestjs/renovate/mongoose-8.x
fix(deps): update dependency mongoose to v8.8.3
2024-11-27 09:27:18 +01:00
Kamil Myśliwiec
a41781ac14 ci: update lint integration script 2024-11-27 09:06:43 +01:00
renovate[bot]
45f3322832 fix(deps): update dependency mongoose to v8.8.3 2024-11-27 07:57:35 +00:00
Kamil Mysliwiec
9bbc4dbab3 Merge pull request #14207 from nestjs/renovate/dotenv-8.x
chore(deps): update dependency @types/dotenv to v8.2.3
2024-11-27 08:50:19 +01:00
Kamil Mysliwiec
b46508793e Merge pull request #14208 from nestjs/renovate/node-20.x
chore(deps): update dependency @types/node to v20.17.8
2024-11-27 08:50:10 +01:00
Kamil Mysliwiec
feb75da3ce Merge pull request #14209 from nestjs/renovate/amqplib-0.x
chore(deps): update dependency amqplib to v0.10.5
2024-11-27 08:50:02 +01:00
Kamil Myśliwiec
4895e3bac1 ci: increase max old space size for lint scripts 2024-11-27 08:49:25 +01:00
renovate[bot]
46db58c196 chore(deps): update dependency amqplib to v0.10.5 2024-11-27 07:47:07 +00:00
renovate[bot]
638d4666fb chore(deps): update dependency @types/node to v20.17.8 2024-11-27 07:46:32 +00:00
Kamil Mysliwiec
91190b4175 Merge pull request #14212 from nestjs/renovate/npm-webpack-vulnerability
chore(deps): update dependency webpack to v5.94.0 [security]
2024-11-27 08:43:07 +01:00
renovate[bot]
d1a76abe21 chore(deps): update dependency @types/dotenv to v8.2.3 2024-11-27 07:42:51 +00:00
renovate[bot]
055709dd3a chore(deps): update dependency webpack to v5.94.0 [security] 2024-11-27 07:40:26 +00:00
Kamil Mysliwiec
f80b00793c Merge pull request #14210 from nestjs/renovate/husky-9.x
chore(deps): update dependency husky to v9.1.7
2024-11-27 08:39:07 +01:00
Kamil Myśliwiec
ab79649b91 ci: run lint sequentially in ci 2024-11-27 08:38:14 +01:00
Kamil Myśliwiec
f94ef9044f test: ignore floating request promises (done cb) 2024-11-27 08:37:58 +01:00
Kamil Mysliwiec
b876e6b60d Merge pull request #14211 from nestjs/renovate/nest-monorepo
chore(deps): update nest monorepo
2024-11-27 08:30:17 +01:00
renovate[bot]
a7392981cf chore(deps): update nest monorepo 2024-11-27 07:27:07 +00:00
renovate[bot]
afb889dd21 chore(deps): update dependency husky to v9.1.7 2024-11-27 07:22:52 +00:00
Kamil Mysliwiec
8da7ebcbfd Merge pull request #14206 from nestjs/dependabot/npm_and_yarn/mongoose-8.8.3
chore(deps-dev): bump mongoose from 8.8.1 to 8.8.3
2024-11-27 08:15:28 +01:00
dependabot[bot]
c90553bb05 chore(deps-dev): bump mongoose from 8.8.1 to 8.8.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.8.1 to 8.8.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.8.1...8.8.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-27 00:39:08 +00:00
Kamil Myśliwiec
93150409b9 test: error messages for node above v20 (json socket) 2024-11-26 15:22:51 +01:00
Kamil Myśliwiec
7e774b12a5 ci: use active node version for lint 2024-11-26 15:12:49 +01:00
Kamil Myśliwiec
2e0de4a9e1 ci: update node versions matrix 2024-11-26 15:06:21 +01:00
Kamil Myśliwiec
e8bc2580e7 chore: minore fixes 2024-11-26 14:56:42 +01:00
Kamil Myśliwiec
7d3e5c1a38 build: use strict null checks part 5 2024-11-26 14:39:51 +01:00
Kamil Myśliwiec
5b220df118 build: use strict null checks part 4 2024-11-26 14:03:07 +01:00
Kamil Myśliwiec
b94b0b910e build: use strict null checks part 3 2024-11-26 13:49:07 +01:00
Kamil Myśliwiec
22008976ec build: use strict null checks part 2 2024-11-26 13:36:33 +01:00
Kamil Myśliwiec
cfe0f47e8a Merge branch 'chore/eslint-v9' of https://github.com/nestjs/nest into chore/eslint-v9 2024-11-26 12:47:16 +01:00
Kamil Myśliwiec
10fdf16c47 build: use strict null checks part 1 2024-11-26 12:46:59 +01:00
Kamil Mysliwiec
5662fc1ac9 Merge branch '11.0.0' into chore/eslint-v9 2024-11-26 12:00:34 +01:00
Kamil Myśliwiec
38367e8e88 style: address spec lint errors 2024-11-26 11:57:05 +01:00
Kamil Myśliwiec
8829b8d1d7 style: address packages lint errors 2024-11-26 10:38:31 +01:00
Kamil Myśliwiec
236b633a76 style: address integration tests lint errors 2024-11-26 09:39:20 +01:00
Kamil Mysliwiec
8102325bd2 Merge pull request #14204 from sapenlei/fix/non-shared-server-close
fix(websockets): ensure non-shared servers call close method
2024-11-26 08:19:50 +01:00
sapen
bba5fde16e fix(websockets): ensure non-shared servers call close method 2024-11-26 11:11:58 +08:00
Kamil Myśliwiec
416830c392 chore(@nestjs) publish v10.4.9 release 2024-11-25 15:34:51 +01:00
Kamil Mysliwiec
9286733482 Merge pull request #13923 from DylanVeldra/fix-tenant-context-payload
fix(core): merge req context with tenant payload in the request instance
2024-11-25 15:01:51 +01:00
Kamil Mysliwiec
81597f7ed9 Merge branch 'master' into fix-tenant-context-payload 2024-11-25 14:38:47 +01:00
Kamil Myśliwiec
84b8744f90 refactor: methods order, types in e2e test 2024-11-25 14:34:28 +01:00
Kamil Mysliwiec
95c8547b68 Merge pull request #14185 from sapenlei/fix/prevent-socketio-server-close
fix(websockets): Prevent HTTP server early close in Socket.IO shutdown
2024-11-25 14:31:18 +01:00
Kamil Myśliwiec
ae0517b364 Merge branch 'master' of https://github.com/nestjs/nest 2024-11-25 14:28:56 +01:00
Kamil Myśliwiec
8ffae006c8 sample: revert microservices sample local updates 2024-11-25 14:28:44 +01:00
Kamil Mysliwiec
f7248e2d8d Merge pull request #14181 from nestjs/fix/validation-pipe-swc-enum-bug
fix(common): fallback to empty string for enums when validating (swc builder)
2024-11-25 14:12:13 +01:00
Kamil Mysliwiec
edf574a29e Merge pull request #14200 from nestjs/feat/allow-queue-per-handler
feat(microservices): support nats queue per handler
2024-11-25 14:12:02 +01:00
Kamil Myśliwiec
25ad5b4b80 refactor(core): tiny improvements 2024-11-25 14:11:38 +01:00
Kamil Mysliwiec
3324703b88 Merge pull request #13804 from patrickacioli/fix-lazy-transient-provider
fix(core): dependencies not resolving for transient lazy providers
2024-11-25 14:10:06 +01:00
Kamil Myśliwiec
ab660c7edd test: add unit test 2024-11-25 13:48:54 +01:00
Kamil Myśliwiec
21279a9c49 feat(microservices): support nats queue per handler 2024-11-25 13:42:24 +01:00
Kamil Mysliwiec
59374c9b8c Merge pull request #13797 from patrickacioli/fix-fastify-global-route-prefix
fix(fastify-adapter): middleware not executed when root path is excluded
2024-11-25 13:37:55 +01:00
sapen
3b5cb562a1 test(websockets): Add integration test for Socket.IO HTTP server shutdown 2024-11-22 20:14:02 +08:00
Kamil Mysliwiec
43cf5723a3 Merge pull request #14184 from nestjs/feat/include-error-cause-ws
feat(websockets): include exception cause to associate error with req
2024-11-22 11:33:20 +01:00
Kamil Mysliwiec
b04895aed2 Merge pull request #14182 from nestjs/feat/intrinsic-exception
feat(common): introduce intrinsic exception
2024-11-22 11:32:18 +01:00
Kamil Mysliwiec
67e30e2f1f Merge pull request #14192 from nestjs/renovate/npm-webpack-vulnerability
chore(deps): update dependency webpack to v5.94.0 [security]
2024-11-22 11:31:18 +01:00
sapen
f650c22af8 fix(websockets): Revert type 2024-11-22 15:45:08 +08:00
renovate[bot]
2b90f44621 chore(deps): update dependency webpack to v5.94.0 [security] 2024-11-22 07:27:42 +00:00
Kamil Mysliwiec
3cf1130eaa Merge pull request #14191 from nestjs/dependabot/npm_and_yarn/light-my-request-6.3.0
chore(deps): bump light-my-request from 6.1.0 to 6.3.0
2024-11-22 08:24:47 +01:00
dependabot[bot]
646c663366 chore(deps): bump light-my-request from 6.1.0 to 6.3.0
Bumps [light-my-request](https://github.com/fastify/light-my-request) from 6.1.0 to 6.3.0.
- [Release notes](https://github.com/fastify/light-my-request/releases)
- [Commits](https://github.com/fastify/light-my-request/compare/v6.1.0...v6.3.0)

---
updated-dependencies:
- dependency-name: light-my-request
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-22 00:26:01 +00:00
Kamil Mysliwiec
f39fdacf8a Merge pull request #14188 from nestjs/dependabot/npm_and_yarn/sample/30-event-emitter/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/30-event-emitter
2024-11-21 14:37:45 +01:00
dependabot[bot]
7fe2f43d28 chore(deps): bump cross-spawn in /sample/30-event-emitter
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 13:19:30 +00:00
Kamil Mysliwiec
180a3e6bd3 Merge pull request #14187 from nestjs/dependabot/npm_and_yarn/sample/34-using-esm-packages/multi-c29acd3782
chore(deps): bump cookie and @nestjs/platform-express in /sample/34-using-esm-packages
2024-11-21 14:18:28 +01:00
Kamil Mysliwiec
afbba2d318 Merge pull request #14189 from nestjs/dependabot/npm_and_yarn/sample/19-auth-jwt/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/19-auth-jwt
2024-11-21 14:18:19 +01:00
Kamil Myśliwiec
f80984fb78 test: update integration test 2024-11-21 14:17:57 +01:00
dependabot[bot]
e3e9636dcc chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/19-auth-jwt
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 13:14:40 +00:00
Kamil Mysliwiec
a4ddd867e6 Merge pull request #14186 from nestjs/dependabot/npm_and_yarn/sample/31-graphql-federation-code-first/posts-application/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/31-graphql-federation-code-first/posts-application
2024-11-21 14:13:14 +01:00
dependabot[bot]
f99353f45e chore(deps): bump cookie and @nestjs/platform-express
Bumps [cookie](https://github.com/jshttp/cookie) to 0.7.1 and updates ancestor dependency [@nestjs/platform-express](https://github.com/nestjs/nest/tree/HEAD/packages/platform-express). These dependencies need to be updated together.


Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `@nestjs/platform-express` from 10.4.4 to 10.4.8
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/commits/v10.4.8/packages/platform-express)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: "@nestjs/platform-express"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 11:49:11 +00:00
dependabot[bot]
f3c0fcde5b chore(deps): bump cross-spawn
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 11:49:11 +00:00
Kamil Mysliwiec
29cc21c7b7 Merge pull request #14183 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/posts-application/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/32-graphql-federation-schema-first/posts-application
2024-11-21 12:47:07 +01:00
Kamil Myśliwiec
5c7724b649 test: update integration test 2024-11-21 12:46:20 +01:00
Kamil Myśliwiec
a3dbbecd61 feat: add cause factory to allow controlling the cause shape 2024-11-21 12:42:40 +01:00
sapen
40dbb27519 fix(websockets): Prevent HTTP server early close in Socket.IO shutdown 2024-11-21 19:20:26 +08:00
Kamil Myśliwiec
db95f2009d test: add missing unit tests, update typo 2024-11-21 12:06:35 +01:00
Kamil Myśliwiec
9020d759ca chore: export error payload interface 2024-11-21 11:35:24 +01:00
Kamil Myśliwiec
9a2b04947e chore: include pattern too 2024-11-21 11:35:02 +01:00
Kamil Myśliwiec
24983c8893 Merge branch 'feat/intrinsic-exception' into feat/include-error-cause-ws 2024-11-21 11:33:24 +01:00
Kamil Myśliwiec
a077ea51c1 Merge branch '11.0.0' into feat/intrinsic-exception 2024-11-21 10:43:36 +01:00
Kamil Myśliwiec
03a61e9728 chore: revert apply decorators signature (regression) 2024-11-21 10:41:37 +01:00
dependabot[bot]
2111a40e47 chore(deps): bump cross-spawn
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 09:32:47 +00:00
Kamil Mysliwiec
440e9cf6a3 Merge pull request #14176 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/users-application/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/32-graphql-federation-schema-first/users-application
2024-11-21 10:31:30 +01:00
Kamil Myśliwiec
c5e5b9072c feat(websockets): include exception cause to associate error with req 2024-11-21 10:30:26 +01:00
Kamil Myśliwiec
f99617dd6b feat(common): introduce intrinsic exception 2024-11-21 10:09:43 +01:00
Kamil Mysliwiec
f76a69341e Update packages/common/pipes/validation.pipe.ts 2024-11-21 09:48:21 +01:00
Kamil Myśliwiec
a3acefffda fix(common): fallback to empty string for enums when validating (swc) 2024-11-21 09:38:42 +01:00
Kamil Mysliwiec
73dea121d7 Merge pull request #14179 from nestjs/dependabot/npm_and_yarn/types/mocha-10.0.10
chore(deps-dev): bump @types/mocha from 10.0.9 to 10.0.10
2024-11-21 08:20:48 +01:00
Kamil Mysliwiec
a1732f5b3d Merge pull request #14175 from micalevisk/fix-issue-14154
fix(common,core): align the logic of optional provider
2024-11-21 08:20:34 +01:00
dependabot[bot]
76e73c26d5 chore(deps-dev): bump @types/mocha from 10.0.9 to 10.0.10
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 10.0.9 to 10.0.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-21 00:23:58 +00:00
dependabot[bot]
62e3bd5a16 chore(deps): bump cross-spawn
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-20 14:45:08 +00:00
Kamil Mysliwiec
45f4612ed5 Merge pull request #14174 from nestjs/dependabot/npm_and_yarn/sample/22-graphql-prisma/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/22-graphql-prisma
2024-11-20 15:43:53 +01:00
Micael Levi L. Cavalcante
aabde1aadb fix(common,core): align the logic of optional provider 2024-11-20 09:43:11 -04:00
Micael Levi L. Cavalcante
de6f7ca20e test(common): improve test suite for getInjectionProviders 2024-11-20 09:40:33 -04:00
dependabot[bot]
33be15afd5 chore(deps): bump cross-spawn in /sample/22-graphql-prisma
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-20 13:30:43 +00:00
Kamil Mysliwiec
48a74b338b Merge pull request #14173 from nestjs/dependabot/npm_and_yarn/sample/28-sse/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/28-sse
2024-11-20 14:27:26 +01:00
Kamil Myśliwiec
5064d9b4a4 Merge branch 'pacyL2K19-test/sample-12-graphql-schema-first' 2024-11-20 12:56:23 +01:00
Kamil Myśliwiec
d98524ab9c chore: minor formatting changes 2024-11-20 12:56:10 +01:00
Kamil Myśliwiec
ddf99c39d0 Merge branch 'martinvysnovsky-test-sample-mongoose' 2024-11-20 12:53:04 +01:00
Kamil Myśliwiec
691e7d448e chore: minor formatting changes 2024-11-20 12:52:50 +01:00
Kamil Myśliwiec
518879b3d6 Merge branch 'test-sample-mongoose' of https://github.com/martinvysnovsky/nest into martinvysnovsky-test-sample-mongoose 2024-11-20 12:50:39 +01:00
Kamil Myśliwiec
b770d7d9b2 Merge branch 'master' of https://github.com/nestjs/nest 2024-11-20 12:49:16 +01:00
Kamil Myśliwiec
8b978e3028 Merge branch 'Yansb-test/sample-01-cats-app' 2024-11-20 12:49:03 +01:00
Kamil Myśliwiec
0f25e83229 style: minor formatting changes 2024-11-20 12:48:53 +01:00
Kamil Myśliwiec
f3ec5f22fa Merge branch 'test/sample-01-cats-app' of https://github.com/Yansb/nest into Yansb-test/sample-01-cats-app 2024-11-20 12:48:06 +01:00
dependabot[bot]
467697599f chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/28-sse
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-20 11:47:13 +00:00
Kamil Mysliwiec
1dafb5fdce Merge pull request #14165 from nestjs/dependabot/npm_and_yarn/typescript-eslint/parser-8.15.0
chore(deps-dev): bump @typescript-eslint/parser from 8.14.0 to 8.15.0
2024-11-20 12:46:02 +01:00
Kamil Myśliwiec
212d07fcbf refactor(common): improve apply decorators types 2024-11-20 12:45:29 +01:00
Kamil Mysliwiec
71e8acec39 Merge pull request #14163 from nestjs/fix/grpc-client-streaming-bug
fix(microservices): grpc client streaming bugs
2024-11-20 11:11:51 +01:00
Kamil Mysliwiec
6094701679 Merge pull request #12954 from gunb0s/feature/nestjs-kafka-emit-batch
feat: emit batch
2024-11-20 11:11:43 +01:00
Kamil Mysliwiec
bdc9b4409a Merge pull request #14142 from nestjs/feat/microservice-client-server-additions
feat(microservices): add status, unwrap, on, and other features
2024-11-20 11:04:50 +01:00
Kamil Myśliwiec
c66d1fb5f7 fix: add type constraints and assertions 2024-11-20 10:41:37 +01:00
Kamil Mysliwiec
99b5a5bbfe Merge pull request #14171 from nestjs/dependabot/npm_and_yarn/sample/11-swagger/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/11-swagger
2024-11-20 10:39:37 +01:00
Kamil Mysliwiec
1531e6a767 Merge pull request #14172 from nestjs/dependabot/npm_and_yarn/sample/35-use-esm-package-after-node22/multi-c29acd3782
chore(deps): bump cookie and @nestjs/platform-express in /sample/35-use-esm-package-after-node22
2024-11-20 10:36:36 +01:00
dependabot[bot]
3fa80a9dab chore(deps): bump cookie and @nestjs/platform-express
Bumps [cookie](https://github.com/jshttp/cookie) to 0.7.1 and updates ancestor dependency [@nestjs/platform-express](https://github.com/nestjs/nest/tree/HEAD/packages/platform-express). These dependencies need to be updated together.


Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `@nestjs/platform-express` from 10.4.4 to 10.4.8
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/commits/v10.4.8/packages/platform-express)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: "@nestjs/platform-express"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-20 09:27:05 +00:00
Kamil Mysliwiec
439516d7dc Merge pull request #14051 from micalevisk/add-esm-only-sample
chore: add sample on how to use esm on cjs
2024-11-20 10:26:00 +01:00
dependabot[bot]
22c4e9cae3 chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/11-swagger
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-20 09:22:40 +00:00
Kamil Mysliwiec
9356509274 Update packages/microservices/server/server-nats.ts
Co-authored-by: Rick Dutour Geerling <rick@trilon.io>
2024-11-20 10:22:02 +01:00
Kamil Mysliwiec
2dda578d9a Merge pull request #14170 from nestjs/dependabot/npm_and_yarn/sample/24-serve-static/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/24-serve-static
2024-11-20 10:21:33 +01:00
Kamil Myśliwiec
b65c41c5a8 fix: use proxy, drain buffer before execution 2024-11-20 10:21:10 +01:00
dependabot[bot]
f0c3cef7d4 chore(deps): bump cross-spawn in /sample/24-serve-static
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-20 08:24:47 +00:00
Kamil Mysliwiec
e2e70c1bc3 Merge pull request #14169 from nestjs/dependabot/npm_and_yarn/sample/15-mvc/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/15-mvc
2024-11-20 09:23:39 +01:00
dependabot[bot]
70c18e9e7b chore(deps-dev): bump @typescript-eslint/parser from 8.14.0 to 8.15.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.14.0 to 8.15.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.15.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-20 07:42:35 +00:00
dependabot[bot]
102718ad1b chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/15-mvc
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-20 07:42:00 +00:00
Kamil Mysliwiec
02d26a6fd7 Merge pull request #14164 from nestjs/dependabot/npm_and_yarn/sample/01-cats-app/cross-spawn-7.0.6
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/01-cats-app
2024-11-20 08:40:13 +01:00
Kamil Mysliwiec
8279fb5319 Merge pull request #14167 from nestjs/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-8.15.0
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.14.0 to 8.15.0
2024-11-20 08:40:05 +01:00
dependabot[bot]
d4e5743c9b 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.14.0 to 8.15.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.15.0/packages/eslint-plugin)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-19 00:49:10 +00:00
dependabot[bot]
b1e33ece5d chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /sample/01-cats-app
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 22:46:40 +00:00
Micael Levi L. Cavalcante
e15d73190d chore: add sample on how to use esm with nodejs experimental flag 2024-11-18 11:30:39 -04:00
Kamil Myśliwiec
4564503936 fix: use valid reference for the cancel event constant 2024-11-18 15:27:45 +01:00
Kamil Mysliwiec
129fe79f6b Update packages/microservices/server/server-rmq.ts
Co-authored-by: Rick Dutour Geerling <rick@trilon.io>
2024-11-18 15:26:15 +01:00
Kamil Mysliwiec
4f55f88bff Update packages/microservices/server/server-nats.ts
Co-authored-by: Rick Dutour Geerling <rick@trilon.io>
2024-11-18 15:26:07 +01:00
Kamil Myśliwiec
30a6b52c50 fix(microservices): grpc client streaming bugs #14094 #13818 2024-11-18 15:23:44 +01:00
Kamil Mysliwiec
397390083f Merge pull request #13278 from johaven/feat-webdav-methods
feat(core,common,platform-fastify): add webdav http methods support
2024-11-18 13:16:35 +01:00
Kamil Myśliwiec
bc31b5cff5 test: update tcp config opts type 2024-11-18 13:14:59 +01:00
Kamil Mysliwiec
fb6025eb76 Merge pull request #13990 from Tony133/feat/upgrade-fastify-v5
feat(platform-fastify): added support for Fastify v5
2024-11-18 12:46:08 +01:00
Kamil Myśliwiec
3267135f2d chore: resolve merge conflicts 2024-11-18 12:45:34 +01:00
Kamil Mysliwiec
234d8d5600 Merge pull request #13924 from alinowrouzii/feat-microservices/nats-gracefull-shutdown
feat(microservices): add gracefull shutdown option for nats server
2024-11-18 12:33:48 +01:00
Kamil Mysliwiec
774ccbe1b2 Merge pull request #12622 from jmcdo29/feat/async-microservce-config
feat: allow for microservice options to come from the di container
2024-11-18 12:18:57 +01:00
Kamil Mysliwiec
ad97a73ab2 Merge branch '11.0.0' into feat-microservices/nats-gracefull-shutdown 2024-11-18 12:18:16 +01:00
Kamil Mysliwiec
00bb6309c1 Merge pull request #13407 from MegaSpaceHamlet/multer-error-fieldname
Multer error fieldname
2024-11-18 12:09:40 +01:00
Kamil Myśliwiec
c239f9a037 refactor: replace inline as any calls with untyped vars 2024-11-18 10:33:51 +01:00
Kamil Mysliwiec
a669981c81 Merge pull request #14121 from nestjs/feat/logger-additions
feat(common): json logger and a few other improvements
2024-11-18 10:09:57 +01:00
Kamil Myśliwiec
47941ba4d9 test: update outdated unit test 2024-11-18 09:56:13 +01:00
Kamil Mysliwiec
e89bb8e4a2 Merge pull request #14127 from CodyTseng/feat-ws-message-preprocessor
feat(ws): introduce message parser for ws adapter
2024-11-18 09:52:52 +01:00
Kamil Mysliwiec
ca86bf6374 Merge pull request #14129 from EeeasyCode/fix/issue-#13931
fix: rabbitmq bindings and auto-generated queues
2024-11-18 09:52:00 +01:00
Kamil Myśliwiec
09a193337a Merge branch 'ReneZeidler-fix-get-all-and-merge' into 11.0.0 2024-11-18 09:51:35 +01:00
Kamil Mysliwiec
bc19f81729 Merge pull request #14161 from nestjs/dependabot/npm_and_yarn/sample/25-dynamic-modules/cross-spawn-7.0.5
chore(deps): bump cross-spawn from 7.0.3 to 7.0.5 in /sample/25-dynamic-modules
2024-11-18 09:50:43 +01:00
Kamil Myśliwiec
33ef121d6b chore: a few improvements 2024-11-18 09:49:48 +01:00
dependabot[bot]
989075e6c1 chore(deps): bump cross-spawn in /sample/25-dynamic-modules
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.5.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.5)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 08:17:48 +00:00
Kamil Mysliwiec
c60428a6fd Merge pull request #14159 from nestjs/dependabot/npm_and_yarn/sample/33-graphql-mercurius/cross-spawn-7.0.5
chore(deps): bump cross-spawn from 7.0.3 to 7.0.5 in /sample/33-graphql-mercurius
2024-11-18 09:16:06 +01:00
Kamil Mysliwiec
d2ac397115 Merge pull request #13388 from AlexRMU/master
Сorrection of `Reflector` types
2024-11-18 09:14:09 +01:00
Kamil Myśliwiec
9129e4f858 refactor: remove redundant conditions 2024-11-18 09:10:34 +01:00
Kamil Myśliwiec
f37dafc132 chore: pass error instance to logger error method 2024-11-18 09:08:47 +01:00
Kamil Mysliwiec
3ad835c05d Merge pull request #14110 from wenlong-chen/fix-global-module-distance
fix(core): calculate module distance after bindGlobalScope
2024-11-18 08:18:34 +01:00
Kamil Mysliwiec
e965b4a141 Merge pull request #14111 from wenlong-chen/fix-module-destroy-order
fix(core): Order of module destroy should be the reverse of module init
2024-11-18 08:18:16 +01:00
Kamil Mysliwiec
92e2db8d99 Merge pull request #13632 from nestjs/renovate/npm-mysql2-vulnerability
fix(deps): update dependency mysql2 to v3.9.8 [security]
2024-11-18 08:16:45 +01:00
dependabot[bot]
5911ed245e chore(deps): bump cross-spawn in /sample/33-graphql-mercurius
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.5.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.5)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 07:15:19 +00:00
Kamil Mysliwiec
1b4decf75e Merge pull request #14151 from nestjs/dependabot/npm_and_yarn/sample/27-scheduling/cross-spawn-7.0.5
chore(deps): bump cross-spawn from 7.0.3 to 7.0.5 in /sample/27-scheduling
2024-11-18 08:13:39 +01:00
Kamil Mysliwiec
36756dd194 Merge pull request #14153 from micalevisk/patch-1
chore: shallow cloning `wrk` repository on benchmark setup
2024-11-18 08:13:18 +01:00
Kamil Mysliwiec
27193cc99f Merge pull request #14155 from webdiscus/cli-color-to-ansis
build(sample): replace cli-color with smaller and faster ansis
2024-11-18 08:13:08 +01:00
Micael Levi L. Cavalcante
194732f4aa chore: shallow cloning wrk repository on benchmarking setup 2024-11-17 12:41:46 -04:00
biodiscus
3559e0c1f2 build(sample): replace cli-color with smaller and faster ansis 2024-11-17 17:01:47 +01:00
dependabot[bot]
2e4ebe4870 chore(deps): bump cross-spawn in /sample/27-scheduling
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.5.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.5)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-16 21:17:27 +00:00
Kamil Mysliwiec
7d62aad5fc Merge pull request #14146 from nestjs/dependabot/npm_and_yarn/sample/28-sse/multi-c29acd3782
chore(deps): bump cookie and @nestjs/platform-express in /sample/28-sse
2024-11-16 22:16:21 +01:00
Kamil Mysliwiec
ef8f64cf42 Merge pull request #14149 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/gateway/cross-spawn-7.0.5
chore(deps): bump cross-spawn from 7.0.3 to 7.0.5 in /sample/32-graphql-federation-schema-first/gateway
2024-11-16 22:16:13 +01:00
Kamil Mysliwiec
afa667509f Merge pull request #12995 from nestjs/renovate/supertest-6.x
chore(deps): update dependency supertest to v6.3.4
2024-11-16 22:15:59 +01:00
renovate[bot]
dc09280634 chore(deps): update dependency supertest to v6.3.4 2024-11-16 20:31:33 +00:00
dependabot[bot]
8115930ec8 chore(deps): bump cookie and @nestjs/platform-express in /sample/28-sse
Bumps [cookie](https://github.com/jshttp/cookie) to 0.7.1 and updates ancestor dependency [@nestjs/platform-express](https://github.com/nestjs/nest/tree/HEAD/packages/platform-express). These dependencies need to be updated together.


Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `@nestjs/platform-express` from 10.4.4 to 10.4.8
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/commits/v10.4.8/packages/platform-express)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: "@nestjs/platform-express"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-16 20:27:58 +00:00
Kamil Mysliwiec
8fc1c9786a Merge pull request #12815 from nestjs/renovate/node-20.x
chore(deps): update dependency @types/node to v20.17.6
2024-11-16 21:26:57 +01:00
renovate[bot]
2b9f2fd493 chore(deps): update dependency @types/node to v20.17.6 2024-11-16 20:20:53 +00:00
renovate[bot]
2867dff697 fix(deps): update dependency mysql2 to v3.9.8 [security] 2024-11-16 20:18:43 +00:00
dependabot[bot]
ee7eb9d48d chore(deps): bump cross-spawn
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.5.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.5)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-16 20:13:01 +00:00
Kamil Mysliwiec
f38a07719a Merge pull request #14147 from nestjs/chore/upgrade-deps
chore: upgrade deps
2024-11-16 21:11:51 +01:00
Kamil Myśliwiec
af8cd7e4c9 sample: update grpc example 2024-11-16 20:49:36 +01:00
Kamil Myśliwiec
c800b06a22 ci: update node version for eslint workflow 2024-11-16 20:38:48 +01:00
Kamil Myśliwiec
f00192f4f1 chore: regenerate package-lock 2024-11-16 20:32:25 +01:00
Kamil Myśliwiec
b8ddf4fa59 chore: revert markdown-table 2024-11-16 20:29:41 +01:00
Kamil Myśliwiec
a9954025dd style(lint): update eslint rules 2024-11-16 20:26:21 +01:00
Kamil Myśliwiec
0d9b7c85db sample: updateg grpc options type 2024-11-16 20:25:42 +01:00
Kamil Myśliwiec
d9a592d899 chore: update package json 2024-11-16 20:01:52 +01:00
Kamil Myśliwiec
ef24801fcc chore: upgrade deps 2024-11-16 20:00:50 +01:00
Kamil Mysliwiec
bde210677f Merge pull request #14144 from nestjs/dependabot/npm_and_yarn/sample/33-graphql-mercurius/multi-ba981ebd23
chore(deps): bump cookie, light-my-request and @nestjs/platform-fastify in /sample/33-graphql-mercurius
2024-11-15 15:29:41 +01:00
Kamil Myśliwiec
d35006a0d3 chore: update readmes 2024-11-15 14:55:07 +01:00
dependabot[bot]
29a80ba8ab chore(deps): bump cookie, light-my-request and @nestjs/platform-fastify
Bumps [cookie](https://github.com/jshttp/cookie) to 0.7.2 and updates ancestor dependencies [cookie](https://github.com/jshttp/cookie), [light-my-request](https://github.com/fastify/light-my-request) and [@nestjs/platform-fastify](https://github.com/nestjs/nest/tree/HEAD/packages/platform-fastify). These dependencies need to be updated together.


Updates `cookie` from 0.5.0 to 0.7.2
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.5.0...v0.7.2)

Updates `light-my-request` from 5.11.0 to 5.14.0
- [Release notes](https://github.com/fastify/light-my-request/releases)
- [Commits](https://github.com/fastify/light-my-request/compare/v5.11.0...v5.14.0)

Updates `@nestjs/platform-fastify` from 10.3.2 to 10.4.8
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/commits/v10.4.8/packages/platform-fastify)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: light-my-request
  dependency-type: indirect
- dependency-name: "@nestjs/platform-fastify"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 13:53:10 +00:00
Kamil Myśliwiec
3c5180d2d5 chore(@nestjs) publish v10.4.8 release 2024-11-15 14:51:54 +01:00
Kamil Mysliwiec
a7b73e3107 Merge pull request #14143 from nestjs/feat/expose-listening-stream
feat(core): expose listening stream from http adapter host
2024-11-15 14:40:16 +01:00
Kamil Mysliwiec
491ed77f22 Merge pull request #14059 from v-sum/fix-disregarded-rmq-client-options
fix(microservices): include discarded rmq client options
2024-11-15 14:32:46 +01:00
Kamil Myśliwiec
e64ab182ba refactor(core): replace internal init with an inline promise 2024-11-15 14:32:09 +01:00
Kamil Mysliwiec
dade6d5889 Merge pull request #14139 from mksony/chore/ensure-application-init-before-accepting-sigterm
chore(core): defer application shutdown until init finishes
2024-11-15 14:31:03 +01:00
Kamil Mysliwiec
49dc36d9e5 Merge pull request #14132 from nestjs/fix/mqtt-microservices-qos2
fix(microservices): no messages emitted with mqtt when qos set
2024-11-15 14:30:42 +01:00
Kamil Mysliwiec
831d29553d Merge pull request #14133 from nestjs/fix/flaky-durable-provider
fix(core): flaky durable provider, remove instance on error
2024-11-15 14:30:28 +01:00
Kamil Mysliwiec
feb2135373 Merge pull request #14123 from micalevisk/feat/narrow-nest-factories-methods
feat(core)!: type narrowing valid entry module for nestjs factories
2024-11-15 13:29:54 +01:00
Kamil Mysliwiec
9ea618e0a8 Update packages/core/nest-factory.ts 2024-11-15 13:29:35 +01:00
Kamil Myśliwiec
259b5dd828 fix: remove duplicated client redis message handler 2024-11-15 13:27:04 +01:00
Kamil Myśliwiec
66c3ab23ee sample: update grpc client options type 2024-11-15 12:48:22 +01:00
Kamil Myśliwiec
f2b6cc0e93 fix: fix minor type issues, broken imports 2024-11-15 11:50:09 +01:00
Kamil Myśliwiec
1a076fc4cb feat(core): expose listening stream from http adapter host 2024-11-15 11:23:16 +01:00
Kamil Myśliwiec
f983f03665 fix: update broken import paths 2024-11-15 10:19:26 +01:00
Kamil Mysliwiec
9a48dc123e Merge pull request #14131 from nestjs/feat/number-exception-create-body
feat(common): allow passing number to http error createBody
2024-11-15 10:18:14 +01:00
Kamil Mysliwiec
07adf37156 Merge pull request #14122 from nestjs/feat/parse-date-pipe
feat(common): add ParseDatePipe, add tsdoc to other pipes
2024-11-15 10:17:52 +01:00
Kamil Mysliwiec
ea92f5fb3a Merge pull request #14134 from nestjs/feat/add-max-tcp-message-length
feat(microservices): add max tcp packet buffer length
2024-11-15 10:17:28 +01:00
Kamil Myśliwiec
3dfc7fc68e feat(microservices): add status, unwrap, on, and other features 2024-11-15 10:03:05 +01:00
Max Karacsony
5c6986f0c7 chore(core): defer application shutdown until init finishes 2024-11-14 13:50:07 +01:00
codytseng
33e32d9d5d feat(ws): allow setting message parser in constructor 2024-11-13 09:58:32 +08:00
codytseng
2ab99739cd refactor(ws): rename to message parser and move json parse logic inside 2024-11-13 09:57:29 +08:00
Kamil Myśliwiec
9ae6a4c19f feat(microservices): add max tcp packet buffer length 2024-11-12 13:37:14 +01:00
Kamil Myśliwiec
229d97f018 fix(core): flaky durable provider, remove instance on error #13953 2024-11-12 13:23:51 +01:00
Kamil Myśliwiec
1fe4dc2cad fix(microservices): no messages emitted with mqtt when qos set #14079 2024-11-12 12:35:25 +01:00
Kamil Myśliwiec
35846843e1 feat(common): allow passing number to http error create body #12787 2024-11-12 11:12:41 +01:00
Kamil Mysliwiec
945d134b66 Merge pull request #14126 from EeeasyCode/issue-#14093
fix(common): type narrowing context parameter on createParamDecorator's callback
2024-11-12 09:36:52 +01:00
Khan / 이창민
e231f9887e fix: rabbitmq bindings and auto-generated queues 2024-11-11 15:31:19 +09:00
Khan / 이창민
2874478b95 fix: import to use direct file path 2024-11-11 00:05:24 +09:00
codytseng
de13eec632 feat: introduce message preprocessor for ws adapter 2024-11-10 16:14:07 +08:00
Khan / 이창민
e9d57dd795 fix: type narrowing ctx 2024-11-10 16:31:29 +09:00
Micael Levi L. Cavalcante
3cdaaf0bed feat(core): type narrowing valid entry module for nestjs factories 2024-11-09 06:50:47 -04:00
Kamil Myśliwiec
66c4810b0f style: fix linter issues 2024-11-08 14:29:42 +01:00
Kamil Myśliwiec
23e602b712 style: fix linter issues 2024-11-08 14:09:58 +01:00
Kamil Myśliwiec
e767bd364e feat: produce a parseable json when colors off and compact on 2024-11-08 13:49:42 +01:00
Kamil Mysliwiec
bcda8fd791 Merge pull request #14115 from Tony133/chore/update-fastify-view-options-interface
chore(fastify): update fastify view options interface
2024-11-08 12:26:59 +01:00
Kamil Mysliwiec
fb32ef6d46 Merge pull request #14116 from Tony133/chore/update-fastify-static-options-interface
refactor(fastify): update fastify static options interface
2024-11-08 12:26:29 +01:00
Kamil Mysliwiec
51a03bbcf2 Merge pull request #14113 from nestjs/feat/context-select-options
feat(core): allow overriding abortOnError for the select method
2024-11-08 11:44:11 +01:00
Kamil Mysliwiec
f191f0f1fd Merge pull request #14112 from nestjs/fix/instance-method-call
fix(microservices): use instance refs for target handler callbacks
2024-11-08 11:43:06 +01:00
Kamil Mysliwiec
84bf5706e2 Merge pull request #14097 from clkamp/wip-distance-order
fix(core): revisit dependencies w/ possibly higher distance
2024-11-08 11:42:49 +01:00
Kamil Myśliwiec
03d8bcc21c feat: add pid to log object 2024-11-08 11:32:08 +01:00
Kamil Myśliwiec
e75eb1d14a feat(common): json logger and a few other improvements 2024-11-08 11:21:37 +01:00
Tony133
790bafa46e refactor(): update fastify static options interface 2024-11-07 21:15:39 +01:00
Tony133
f13e32ad33 chore: update fastify view options interface 2024-11-07 21:12:38 +01:00
Antonio Tripodi
1ed97489e3 Merge branch 'master' into feat/upgrade-fastify-v5 2024-11-07 18:39:10 +01:00
Tony133
7de7320550 chore: upgrade dependencies for nest v11.x 2024-11-07 18:37:41 +01:00
Kamil Mysliwiec
3081f544f4 Merge pull request #14114 from micalevisk/fix-issue-13733
fix(common)!: drop broken support for promises on `exports` of modules
2024-11-07 14:10:35 +01:00
Micael Levi L. Cavalcante
5bc7f91d90 fix(common): drop broken support for promises on exports of modules 2024-11-07 08:49:14 -04:00
Kamil Mysliwiec
6ea78d52fb Merge pull request #13628 from tomflorentin/master
chore(class-transformer): plainToClass is deprectated and replaced with plainToInstance
2024-11-07 12:38:37 +01:00
Kamil Myśliwiec
38bfa9a13a feat(core): allow overriding abort on error for select method 2024-11-07 12:18:12 +01:00
Kamil Myśliwiec
f273041594 test: update unit tests 2024-11-07 12:07:59 +01:00
Kamil Myśliwiec
da8ebded25 fix(microservices): use instance ref to call handler #13473 2024-11-07 12:01:18 +01:00
Wenlong Chen
34c2ccabe8 fix(core): Order of module destroy should be the reverse of module init 2024-11-06 21:08:35 +08:00
Kamil Mysliwiec
0f38439aa6 Merge pull request #12761 from PieterScheffers/tcp-use-random-port
Be able to use a random port for the TCP server
2024-11-06 13:22:30 +01:00
Kamil Mysliwiec
5cdea22c39 Merge pull request #13468 from nestjs/revert-13467-revert-13283-fix/unnecessary-call
fix(microservices): delete unnecessary call of grpcClient.start
2024-11-06 12:54:35 +01:00
Kamil Mysliwiec
fd563c0ae9 Merge pull request #12735 from micalevisk/feat/narrow-inject
feat(common)!: type narrowing allowed injection tokens for `@Inject()`
2024-11-06 12:53:08 +01:00
Kamil Mysliwiec
9b690d95a2 Merge branch '11.0.0' into master 2024-11-06 12:51:14 +01:00
Kamil Mysliwiec
6228af1444 Merge pull request #13336 from nestjs/feat/module-opaque-keys
feat(core): introduce different module opaque key factories
2024-11-06 12:49:55 +01:00
Kamil Mysliwiec
8d0a3cd457 Merge pull request #12893 from Hareloo/12864-default-number-query-param-bug
fix(common): when transforming undefined numeric values
2024-11-06 12:49:48 +01:00
Kamil Mysliwiec
c63717db9d Merge pull request #12764 from kmw14641/kmw14641-bugfix/class-serializer-interceptor
fix(common): apply options to plaintoclass in classserializerinterceptor
2024-11-06 12:48:37 +01:00
Kamil Mysliwiec
9cb84e78f8 Update packages/microservices/server/server-tcp.ts
Co-authored-by: Gil Tichon <gil.tichon@lemonade.com>
2024-11-06 12:47:19 +01:00
Wenlong Chen
5ccc88fe8a fix(core): Calculate module distance after bindGlobalScope 2024-11-06 19:02:17 +08:00
Johaven
af4e1d0a33 Merge branch 'nestjs:master' into feat-webdav-methods 2024-11-02 00:22:06 +01:00
Christian Lütke Stetzkamp
2c8982a2c7 fix(core): revisit dependencies w/ possibly higher distance 2024-10-29 15:33:44 +01:00
Vasile Sumanschi
9cd43532ae fix(microservices): include discarded rmq client options
all other properties, beside 'connectionOptions', from the socketOptions object ( of type AmqpConnectionManagerSocketOptions )
were being discarded on the creation of the AmqpConnectionManager client
https://github.com/nestjs/nest/blob/master/packages/microservices/external/rmq-url.interface.ts#L47
https://github.com/jwalton/node-amqp-connection-manager/blob/v4.1.14/src/AmqpConnectionManager.ts#L46

https://github.com/nestjs/nest/issues/5788#issuecomment-2373361313
2024-10-09 01:17:27 +03:00
Johaven
e1c1945a45 fix(platform-fastify): uppercase methods 2024-10-08 13:49:56 +02:00
Johaven
0d5ad26268 Merge branch 'nestjs:master' into feat-webdav-methods 2024-10-08 13:42:54 +02:00
Micael Levi L. Cavalcante
aff30bf63d chore: support skip npm script execution depending on require nodejs 2024-10-02 18:03:17 -04:00
Micael Levi L. Cavalcante
0dafaaa0b9 chore: add sample on how to use esm on cjs 2024-10-01 09:35:05 -04:00
Johaven
bc36e3c32a Merge branch 'nestjs:master' into feat-webdav-methods 2024-09-19 10:12:45 +02:00
Tony133
5f45310ab6 feat(platform-fastify): added compatibility for fastify version 5.x 2024-09-17 22:58:29 +02:00
Johaven
96bf1d9bb7 Merge branch 'nestjs:master' into feat-webdav-methods 2024-09-16 14:39:48 +02:00
Ali Nowrouzi
d20a1e580f feat(microservices): add gracefull shutdown option for nats server 2024-08-28 22:30:10 +03:30
DylanVeldra
6dba4debb9 fix(core): merge req context with tenant payload in the request instance 2024-08-18 17:11:49 +02:00
Johaven
09cfc8279f Merge branch 'nestjs:master' into feat-webdav-methods 2024-08-15 13:23:01 +02:00
Martin Vyšňovský
3e061e9b14 feat(06-mongoose): add update method 2024-08-14 13:07:18 +02:00
Martin Vyšňovský
d0b2835293 test(06-mongoose): add missing tests for service 2024-08-14 13:03:15 +02:00
Martin Vyšňovský
2da82286d2 test(06-mongoose): refactor tests for service 2024-08-14 13:01:09 +02:00
Martin Vyšňovský
3c6a295037 test(06-mongoose): add missing tests for controller 2024-08-14 12:51:28 +02:00
Martin Vyšňovský
3117b241c1 test(06-mongoose): refactor tests for controller 2024-08-14 12:51:28 +02:00
Martin Vyšňovský
f0527d08fc chore(deps): update @nestjs/mongoose in 06-mongoose sample 2024-08-14 12:24:23 +02:00
Johaven
b90e19f15f Merge branch 'nestjs:master' into feat-webdav-methods 2024-08-13 15:05:28 +02:00
johaven
b62b9255cf feat(core,common,platform-fastify): add webdav http methods support 2024-08-12 11:18:40 +02:00
Patrick Acioli
daf0f88366 fix(core): dependencies not resolving for transient lazy providers 2024-07-19 03:01:48 -03:00
Patrick Acioli
91beaf7bc2 fix(core): dependencies not resolving for transient lazy providers 2024-07-19 02:46:52 -03:00
Patrick Acioli
ba761c1488 fix(fastify-adapter): middleware not executed when root path is excluded 2024-07-17 20:45:44 -03:00
Tom Florentin
3fd4220052 plain to class deprectated 2024-05-29 11:09:42 +02:00
Kamil Mysliwiec
7d5adfcc1f Revert "Revert "fix(microservice) Delete unnecessary call of grpcClient.start"" 2024-04-19 09:14:09 +02:00
MegaSpaceHamlet
ef12d355ff refactor(platform-express): modify error arg type
Add the possible `field` property to the `error` arg in
`transformExecption`.
2024-04-08 16:58:33 -04:00
Alex
52b2c72124 Improving types 2024-04-03 12:26:16 +05:00
Alex
1ccc7f9d91 Сorrection of Reflector types 2024-04-02 16:01:17 +05:00
MegaSpaceHamlet
50e1d705c3 feat(platform-express): multer errors show 'field'
Multer errors may include a 'field' property for certain errors. Pass it
along into the error message.
2024-03-30 22:43:51 -04:00
Kamil Myśliwiec
b3f85e9c04 test: update module compiler test 2024-03-19 10:52:31 +01:00
Kamil Myśliwiec
c4a905b996 chore: update comment to suggest switching to a different algorithm 2024-03-19 09:37:58 +01:00
Kamil Myśliwiec
094c35cf79 refactor: update types to better reflect dynamic metadata shape 2024-03-19 09:35:43 +01:00
Kamil Mysliwiec
30110d49e0 Update packages/core/injector/compiler.ts
Co-authored-by: Vinicius Lourenço <12551007+H4ad@users.noreply.github.com>
2024-03-19 09:33:04 +01:00
Kamil Myśliwiec
fb72a8ec9f feat(core): introduce different module opaque key factories 2024-03-18 10:12:56 +01:00
cain
0f00a347a6 test: test for emit-batch 2024-03-12 14:58:19 +09:00
Marek Dorda
8af7183c30 fix: typings for fastify enableCors method
Fastify adapter uses typings from `@fastify/cors` package for `enableCors` method

Fix nestjs/nest#13234
2024-02-22 07:34:33 +01:00
cain
14cffb328a fix: modify access modifier 2023-12-21 15:57:49 +09:00
cain
cb8e04dd62 feat: add block wrapping return 2023-12-21 10:26:48 +09:00
cain
069676fd84 feat: emit batch 2023-12-20 16:59:46 +09:00
Hareloo
0d7a768b89 fix(common): when transforming undefined numeric values
Transforming numeric values in validationpipe is incorrect when value is undefined

closes #12864
2023-12-06 20:52:48 +02:00
pacyL2K19
86826a651a test(sample-12): add e2e tests 2023-11-25 19:10:02 +02:00
pacyL2K19
bb520c073e test(sample-12): add unit tests to increase test coverage 2023-11-25 19:10:02 +02:00
pacyL2K19
992b18e12a test(sample-12): add unit test to the cat-owner resolver field 2023-11-25 19:10:02 +02:00
pacyL2K19
d073083757 test(sample-12): add unit tests to the cats.resolver 2023-11-25 19:10:02 +02:00
pacyL2K19
1a80a9c6cd test(sample-12): setup testing environment - write unit tests for cats.service.ts file 2023-11-25 19:09:59 +02:00
kmw14641
ed8699769d fix(common): apply options to plaintoclass in classserializerinterceptor
fixed issue that with type option which is not already converted,
any other option cannot be applied to plainToClass

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

Fixes #12231
2023-08-21 10:44:28 +02:00
yansb
c032e83e4d test(sample-01): improved tests 2022-12-01 08:23:18 -03:00
yansb
5c9bcc85ef test(sample-01): added controller create cat unit test 2022-11-30 21:50:16 -03:00
yansb
7ec3eb235d test(sample-01): added service unit tests 2022-11-30 21:14:15 -03:00
Manuel Herrera
cdf2aa5b06 feat(microservices): fixed mqtt serializer tests 2022-01-21 19:20:52 -03:00
Manuel Herrera
5b40b2fe81 feat(microservices): replaced empty options object with undefined 2022-01-21 19:09:34 -03:00
Manuel Herrera
5baba4b3e2 feat(microservices): raw output to publish and dispatch on mqtt client 2022-01-21 18:58:23 -03:00
Manuel Herrera
0ba8946bcd feat(microservices): removed rawOutputPackets from MqttOptions interface 2022-01-20 13:54:56 -03:00
Manuel Herrera
b8ac795804 feat(microservices): removed rawOutput and moved stringify to serializer 2022-01-20 10:24:16 -03:00
Manuel Herrera
8617ee9952 feat(microservices): added MqttOption for passing raw output to pub 2022-01-19 22:30:22 -03:00
624 changed files with 24906 additions and 619472 deletions

View File

@@ -6,16 +6,16 @@ parameters:
default: false
legacy-node-version:
type: string
default: '14.21.3'
default: '18.20'
maintenance-node-version:
type: string
default: '16.20'
default: '20.18'
active-node-version:
type: string
default: '18.17'
default: '22.11'
current-node-version:
type: string
default: '20.5'
default: '23.3'
aliases:
- &restore-cache
@@ -121,14 +121,14 @@ jobs:
lint:
working_directory: ~/nest
docker:
- image: cimg/node:<< pipeline.parameters.maintenance-node-version >>
- image: cimg/node:<< pipeline.parameters.active-node-version >>
steps:
- checkout
- *restore-cache
- *install-deps
- run:
name: Lint
command: npm run lint
command: npm run lint:ci
integration_tests:
working_directory: ~/nest

View File

@@ -6,8 +6,8 @@ cd "$(dirname "$0")"
cd /tmp/
sudo apt-get install build-essential libssl-dev git -y
git clone https://github.com/wg/wrk.git wrk
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
sudo cp wrk /usr/local/bin

View File

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

View File

@@ -1,47 +0,0 @@
module.exports = {
root: true,
env: {
node: true,
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'prettier',
],
overrides: [
{
files: ['**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-array-constructor': 'off',
},
},
{
files: ['**/*.spec.ts', 'integration/**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.spec.json',
sourceType: 'module',
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
},
}
]
};

4
.gitignore vendored
View File

@@ -1,4 +1,5 @@
packages/*/package-lock.json
sample/*/package-lock.json
# dependencies
node_modules/
@@ -10,7 +11,7 @@ node_modules/
/.devcontainer
/.classpath
/.project
/.settings
/.settings
*.code-workspace
# Vim
@@ -50,3 +51,4 @@ build/config\.gypi
.npmrc
pnpm-lock.yaml
/.history

View File

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

55
eslint.config.mjs Normal file
View File

@@ -0,0 +1,55 @@
// @ts-check
import eslint from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: ['node_modules', '**/node_modules/**', '**/*.js', '**/*.d.ts'],
},
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
ecmaVersion: 5,
sourceType: 'module',
parserOptions: {
project: ['tsconfig.json', 'tsconfig.spec.json'],
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": false,
"checksConditionals": false
}
],
"@typescript-eslint/require-await": "off",
'@typescript-eslint/prefer-promise-reject-errors': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/only-throw-error': 'off',
},
},
);

View File

@@ -4,6 +4,7 @@ import * as chaiAsPromised from 'chai-as-promised';
import * as sinon from 'sinon';
import { BarService } from '../src/bar.service';
import { FooService } from '../src/foo.service';
chai.use(chaiAsPromised);
const { expect } = chai;

View File

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

View File

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

View File

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

View File

@@ -17,17 +17,17 @@ export class WebhooksExplorer {
const { name } = this.discoveryService.getMetadataByDecorator(
Webhook,
wrapper,
);
)!;
return {
name,
handlers: this.metadataScanner
.getAllMethodNames(wrapper.metatype.prototype)
.getAllMethodNames(wrapper.metatype!.prototype)
.map(methodName => {
const { event } = this.discoveryService.getMetadataByDecorator(
WebhookHandler,
wrapper,
methodName,
);
)!;
return {
methodName,
event,

View File

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

View File

@@ -25,8 +25,9 @@ services:
- "9001:9001"
restart: always
mysql:
image: mysql:8.3.0
image: mysql:9.1.0
environment:
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
ports:
@@ -50,7 +51,7 @@ services:
zookeeper:
container_name: test-zookeeper
hostname: zookeeper
image: confluentinc/cp-zookeeper:7.5.3
image: confluentinc/cp-zookeeper:7.8.0
ports:
- "2181:2181"
environment:
@@ -59,7 +60,7 @@ services:
kafka:
container_name: test-kafka
hostname: kafka
image: confluentinc/cp-kafka:7.5.3
image: confluentinc/cp-kafka:7.8.0
depends_on:
- zookeeper
ports:

View File

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

View File

@@ -35,7 +35,7 @@ export class RecipesResolver {
@Args('newRecipeData') newRecipeData: NewRecipeInput,
): Promise<Recipe> {
const recipe = await this.recipesService.create(newRecipeData);
pubSub.publish('recipeAdded', { recipeAdded: recipe });
void pubSub.publish('recipeAdded', { recipeAdded: recipe });
return recipe;
}

View File

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

View File

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

View File

@@ -20,6 +20,6 @@ export class CatsRequestScopedService {
}
findOneById(id: number): Cat {
return this.cats.find(cat => cat.id === id);
return this.cats.find(cat => cat.id === id)!;
}
}

View File

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

View File

@@ -20,6 +20,6 @@ export class CatsService {
}
findOneById(id: number): Cat {
return this.cats.find(cat => cat.id === id);
return this.cats.find(cat => cat.id === id)!;
}
}

View File

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

View File

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

View File

@@ -50,6 +50,16 @@ class TestController {
return RETURN_VALUE;
}
@Get('legacy-wildcard/overview')
testLegacyWildcard() {
return RETURN_VALUE;
}
@Get('splat-wildcard/overview')
testSplatWildcard() {
return RETURN_VALUE;
}
@Get('overview/:id')
overviewById() {
return RETURN_VALUE;
@@ -64,10 +74,17 @@ class TestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.end(MIDDLEWARE_VALUE))
.exclude('test', 'overview/:id', 'wildcard/(.*)', {
path: 'middleware',
method: RequestMethod.POST,
})
.exclude(
'test',
'overview/:id',
'wildcard/*',
'legacy-wildcard/(.*)',
'splat-wildcard/*splat',
{
path: 'middleware',
method: RequestMethod.POST,
},
)
.forRoutes('*');
}
}
@@ -126,6 +143,18 @@ describe('Exclude middleware (fastify)', () => {
.expect(200, RETURN_VALUE);
});
it(`should exclude "/legacy-wildcard/overview" endpoint (by wildcard, legacy syntax)`, () => {
return request(app.getHttpServer())
.get('/legacy-wildcard/overview')
.expect(200, RETURN_VALUE);
});
it(`should exclude "/splat-wildcard/overview" endpoint (by wildcard, new syntax)`, () => {
return request(app.getHttpServer())
.get('/splat-wildcard/overview')
.expect(200, RETURN_VALUE);
});
afterEach(async () => {
await app.close();
});

View File

@@ -41,6 +41,16 @@ class TestController {
return RETURN_VALUE;
}
@Get('legacy-wildcard/overview')
testLegacyWildcard() {
return RETURN_VALUE;
}
@Get('splat-wildcard/overview')
testSplatWildcard() {
return RETURN_VALUE;
}
@Get('overview/:id')
overviewById() {
return RETURN_VALUE;
@@ -60,12 +70,19 @@ class TestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.send(MIDDLEWARE_VALUE))
.exclude('test', 'overview/:id', 'wildcard/(.*)', {
path: 'middleware',
method: RequestMethod.POST,
})
.exclude(
'test',
'overview/:id',
'wildcard/*',
'legacy-wildcard/(.*)',
'splat-wildcard/*splat',
{
path: 'middleware',
method: RequestMethod.POST,
},
)
.exclude('multiple/exclude')
.forRoutes('*');
.forRoutes('*path');
}
}
@@ -116,6 +133,18 @@ describe('Exclude middleware', () => {
.expect(200, RETURN_VALUE);
});
it(`should exclude "/legacy-wildcard/overview" endpoint (by wildcard, legacy syntax)`, () => {
return request(app.getHttpServer())
.get('/legacy-wildcard/overview')
.expect(200, RETURN_VALUE);
});
it(`should exclude "/splat-wildcard/overview" endpoint (by wildcard, new syntax)`, () => {
return request(app.getHttpServer())
.get('/splat-wildcard/overview')
.expect(200, RETURN_VALUE);
});
it(`should exclude "/multiple/exclude" endpoint`, () => {
return request(app.getHttpServer())
.get('/multiple/exclude')

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,8 +1,8 @@
import { Controller } from '@nestjs/common';
import { MessagePattern, Payload } from '@nestjs/microservices';
import { ExternalSvcService } from './external-svc.service';
import { CreateExternalSvcDto } from './dto/create-external-svc.dto';
import { UpdateExternalSvcDto } from './dto/update-external-svc.dto';
import { ExternalSvcService } from './external-svc.service';
@Controller()
export class ExternalSvcController {

View File

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

View File

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

View File

@@ -0,0 +1,32 @@
import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import { TransientLazyModule } from '../src/transient.module';
import { LazyController } from '../src/lazy.controller';
import * as chai from 'chai';
import { expect } from 'chai';
import * as request from 'supertest';
describe('Lazy Transient providers', () => {
let app: INestApplication;
beforeEach(async () => {
const module = await Test.createTestingModule({
controllers: [LazyController],
}).compile();
app = module.createNestApplication();
await app.init();
});
it('should not recreate dependencies for default scope', async () => {
const resultOne = await request(app.getHttpServer()).get('/lazy/transient');
const resultTwo = await request(app.getHttpServer()).get('/lazy/transient');
expect(resultOne.text).to.be.equal('Hi! Counter is 1');
expect(resultOne.statusCode).to.be.equal(200);
expect(resultTwo.text).to.be.equal('Hi! Counter is 2');
expect(resultTwo.statusCode).to.be.equal(200);
});
});

View File

@@ -3,7 +3,13 @@ import { GlobalService } from './global.module';
@Injectable()
export class EagerService {
private counter = 0;
constructor(public globalService: GlobalService) {}
sayHello() {
this.counter++;
return 'Hi! Counter is ' + this.counter;
}
}
@Module({

View File

@@ -0,0 +1,18 @@
import { Controller, Get } from '@nestjs/common';
import { LazyModuleLoader } from '@nestjs/core';
@Controller('lazy')
export class LazyController {
constructor(private lazyLoadModule: LazyModuleLoader) {}
@Get('transient')
async exec() {
const { TransientLazyModule } = await import('./transient.module');
const moduleRef = await this.lazyLoadModule.load(() => TransientLazyModule);
const { TransientService } = await import('./transient.service');
const _service = await moduleRef.resolve(TransientService);
return _service.eager();
}
}

View File

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

View File

@@ -0,0 +1,11 @@
import { Module } from '@nestjs/common';
import { GlobalService } from './global.module';
import { EagerService } from './eager.module';
import { TransientService } from './transient.service';
@Module({
imports: [],
providers: [TransientService, GlobalService, EagerService],
exports: [TransientService],
})
export class TransientLazyModule {}

View File

@@ -0,0 +1,11 @@
import { Injectable, Scope } from '@nestjs/common';
import { EagerService } from './eager.module';
@Injectable({ scope: Scope.TRANSIENT })
export class TransientService {
constructor(private eagerService: EagerService) {}
eager() {
return this.eagerService.sayHello();
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -7,7 +7,7 @@ import {
} from '@nestjs/common';
import { ClientProxyFactory } from '@nestjs/microservices';
import { Observable, throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { catchError, tap } from 'rxjs/operators';
@Controller()
export class DisconnectedClientController {
@@ -24,12 +24,16 @@ export class DisconnectedClientController {
return throwError(() =>
code === 'ECONNREFUSED' ||
code === 'CONN_ERR' ||
code === 'ENOTFOUND' ||
code === 'CONNECTION_REFUSED' ||
error.message === 'Connection is closed.'
error.message.includes('Connection is closed.')
? new RequestTimeoutException('ECONNREFUSED')
: new InternalServerErrorException(),
);
}),
tap({
error: () => client.close(),
}),
);
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -27,10 +27,14 @@ describe('Durable providers', () => {
tenantId: number,
end: (err?: any) => void,
endpoint = '/durable',
opts: {
forceError: boolean;
} = { forceError: false },
) =>
request(server)
.get(endpoint)
.set({ ['x-tenant-id']: tenantId })
.set({ ['x-tenant-id']: String(tenantId) })
.set({ ['x-force-error']: opts.forceError ? 'true' : 'false' })
.end((err, res) => {
if (err) return end(err);
end(res);
@@ -84,6 +88,42 @@ describe('Durable providers', () => {
);
expect(result.body).deep.equal({ tenantId: '3' });
});
it(`should return the same tenantId both from durable request scoped service and non-durable request scoped service`, async () => {
let result: request.Response;
result = await new Promise<request.Response>(resolve =>
performHttpCall(1, resolve, '/durable/request-context'),
);
expect(result.body).deep.equal({
durableService: '1',
nonDurableService: '1',
});
result = await new Promise<request.Response>(resolve =>
performHttpCall(2, resolve, '/durable/request-context'),
);
expect(result.body).deep.equal({
durableService: '2',
nonDurableService: '2',
});
});
it(`should not cache durable providers that throw errors`, async () => {
let result: request.Response;
result = await new Promise<request.Response>(resolve =>
performHttpCall(10, resolve, '/durable/echo', { forceError: true }),
);
expect(result.statusCode).equal(412);
// The second request should be successful
result = await new Promise<request.Response>(resolve =>
performHttpCall(10, resolve, '/durable/echo'),
);
expect(result.body).deep.equal({ tenantId: '10' });
});
});
after(async () => {

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,23 +1,35 @@
import { ContextId, ContextIdStrategy, HostComponentInfo } from '@nestjs/core';
import { Request } from 'express';
export type TenantContext = {
tenantId: string;
forceError?: boolean;
};
const tenants = new Map<string, ContextId>();
export class DurableContextIdStrategy implements ContextIdStrategy {
attach(contextId: ContextId, request: Request) {
const tenantId = request.headers['x-tenant-id'] as string;
const forceError = request.headers['x-force-error'] === 'true';
let tenantSubTreeId: ContextId;
if (tenants.has(tenantId)) {
tenantSubTreeId = tenants.get(tenantId);
tenantSubTreeId = tenants.get(tenantId)!;
} else {
tenantSubTreeId = { id: +tenantId } as ContextId;
tenants.set(tenantId, tenantSubTreeId);
}
const payload: TenantContext = { tenantId };
if (forceError) {
payload.forceError = true;
}
return {
resolve: (info: HostComponentInfo) =>
info.isTreeDurable ? tenantSubTreeId : contextId,
payload: { tenantId },
payload,
};
}
}

View File

@@ -1,9 +1,13 @@
import { Controller, Get } from '@nestjs/common';
import { DurableService } from './durable.service';
import { NonDurableService } from './non-durable.service';
@Controller('durable')
export class DurableController {
constructor(private readonly durableService: DurableService) {}
constructor(
private readonly durableService: DurableService,
private readonly nonDurableService: NonDurableService,
) {}
@Get()
greeting(): string {
@@ -12,6 +16,16 @@ export class DurableController {
@Get('echo')
echo() {
return this.durableService.requestPayload;
return {
tenantId: this.durableService.getTenantId(),
};
}
@Get('request-context')
getRequestContext() {
return {
durableService: this.durableService.getTenantId(),
nonDurableService: this.nonDurableService.getTenantId(),
};
}
}

View File

@@ -3,11 +3,13 @@ import { APP_GUARD } from '@nestjs/core';
import { DurableController } from './durable.controller';
import { DurableGuard } from './durable.guard';
import { DurableService } from './durable.service';
import { NonDurableService } from './non-durable.service';
@Module({
controllers: [DurableController],
providers: [
DurableService,
NonDurableService,
{
provide: APP_GUARD,
useClass: DurableGuard,

View File

@@ -1,14 +1,28 @@
import { Inject, Injectable, Scope } from '@nestjs/common';
import {
Inject,
Injectable,
PreconditionFailedException,
Scope,
} from '@nestjs/common';
import { REQUEST } from '@nestjs/core';
import { TenantContext } from './durable-context-id.strategy';
@Injectable({ scope: Scope.REQUEST, durable: true })
export class DurableService {
public instanceCounter = 0;
constructor(@Inject(REQUEST) public readonly requestPayload: unknown) {}
constructor(@Inject(REQUEST) private readonly requestPayload: TenantContext) {
if (requestPayload.forceError) {
throw new PreconditionFailedException('Forced error');
}
}
greeting() {
++this.instanceCounter;
return `Hello world! Counter: ${this.instanceCounter}`;
}
getTenantId() {
return this.requestPayload.tenantId;
}
}

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