Compare commits

...

478 Commits

Author SHA1 Message Date
Kamil Myśliwiec
ccc8a987ae chore(@nestjs) publish v9.3.10 release 2023-03-15 14:18:30 +01:00
Kamil Mysliwiec
7fb37bd233 Merge pull request #11131 from Flusinerd/cache-ttl-bug
fix(common): fix cache ttl not beeing respected
2023-03-15 14:15:55 +01:00
Kamil Myśliwiec
77ee77afab Merge branch 'master' of https://github.com/nestjs/nest 2023-03-15 14:14:51 +01:00
Kamil Myśliwiec
a064e6df66 feat(core): add support for partial graphs 2023-03-15 14:14:37 +01:00
Kamil Mysliwiec
ee11bea4ed Update packages/common/cache/interceptors/cache.interceptor.ts 2023-03-15 08:17:02 +01:00
Kamil Mysliwiec
ffe9651109 Merge pull request #11267 from nestjs/dependabot/npm_and_yarn/apollo/server-4.5.0
chore(deps-dev): bump @apollo/server from 4.4.1 to 4.5.0
2023-03-15 08:16:07 +01:00
Kamil Mysliwiec
510d57ebec Merge pull request #11266 from nestjs/dependabot/npm_and_yarn/lint-staged-13.2.0
chore(deps-dev): bump lint-staged from 13.1.2 to 13.2.0
2023-03-15 08:15:00 +01:00
Kamil Mysliwiec
40155e9b4f Merge pull request #11268 from nestjs/dependabot/npm_and_yarn/nats-2.13.1
chore(deps-dev): bump nats from 2.13.0 to 2.13.1
2023-03-15 08:14:52 +01:00
Kamil Mysliwiec
626d37a277 Merge pull request #11269 from nestjs/dependabot/npm_and_yarn/ws-8.13.0
chore(deps): bump ws from 8.12.1 to 8.13.0
2023-03-15 08:14:49 +01:00
dependabot[bot]
3d21912734 chore(deps-dev): bump @apollo/server from 4.4.1 to 4.5.0
Bumps [@apollo/server](https://github.com/apollographql/apollo-server/tree/HEAD/packages/server) from 4.4.1 to 4.5.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/packages/server/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/@apollo/server@4.5.0/packages/server)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 07:14:29 +00:00
dependabot[bot]
7f76ade025 chore(deps): bump ws from 8.12.1 to 8.13.0
Bumps [ws](https://github.com/websockets/ws) from 8.12.1 to 8.13.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.12.1...8.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 07:14:15 +00:00
Kamil Mysliwiec
3d52e19a83 Merge pull request #11270 from nestjs/dependabot/npm_and_yarn/sinon-15.0.2
chore(deps-dev): bump sinon from 15.0.1 to 15.0.2
2023-03-15 08:13:12 +01:00
Kamil Mysliwiec
e0d859c5bd Merge pull request #11271 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-11.0.3
chore(deps-dev): bump @nestjs/apollo from 11.0.2 to 11.0.3
2023-03-15 08:11:34 +01:00
Kamil Mysliwiec
46d9d82e79 Merge pull request #11274 from nestjs/dependabot/npm_and_yarn/fastify/multipart-7.5.0
chore(deps-dev): bump @fastify/multipart from 7.4.2 to 7.5.0
2023-03-15 08:11:28 +01:00
Kamil Mysliwiec
a4c023ea8a Merge pull request #11275 from nestjs/dependabot/npm_and_yarn/core-js-3.29.1
chore(deps-dev): bump core-js from 3.29.0 to 3.29.1
2023-03-15 08:11:23 +01:00
dependabot[bot]
2d0a0254ca chore(deps-dev): bump sinon from 15.0.1 to 15.0.2
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.0.1 to 15.0.2.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v15.0.1...v15.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 07:10:26 +00:00
Kamil Mysliwiec
46dbf615e1 Merge pull request #11276 from nestjs/dependabot/npm_and_yarn/mongoose-6.10.3
chore(deps-dev): bump mongoose from 6.10.2 to 6.10.3
2023-03-15 08:07:51 +01:00
Kamil Mysliwiec
473e3402ed Merge pull request #11283 from nestjs/dependabot/npm_and_yarn/types/node-18.15.3
chore(deps-dev): bump @types/node from 18.15.0 to 18.15.3
2023-03-15 08:07:18 +01:00
Kamil Mysliwiec
5702d3b8e2 Merge pull request #11284 from nestjs/dependabot/npm_and_yarn/sample/08-webpack/webpack-5.76.0
chore(deps-dev): bump webpack from 5.73.0 to 5.76.0 in /sample/08-webpack
2023-03-15 08:07:12 +01:00
Kamil Mysliwiec
1518191051 Merge pull request #11280 from micalevisk/fix/issue-11279
fix(platform-express): wrong type def for `NestExpressApplication#listen`
2023-03-15 08:06:40 +01:00
dependabot[bot]
8af4394b1e chore(deps-dev): bump webpack in /sample/08-webpack
Bumps [webpack](https://github.com/webpack/webpack) from 5.73.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.73.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 03:00:24 +00:00
dependabot[bot]
1bc5259ff9 chore(deps-dev): bump @types/node from 18.15.0 to 18.15.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.0 to 18.15.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 01:02:01 +00:00
Micael Levi L. Cavalcante
545d69c0f6 fix(platform-express): replace net.server with http.server 2023-03-14 14:44:13 -04:00
dependabot[bot]
c80c789d99 chore(deps-dev): bump mongoose from 6.10.2 to 6.10.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.10.2 to 6.10.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/6.10.2...6.10.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-14 02:06:47 +00:00
dependabot[bot]
2cc4c29e21 chore(deps-dev): bump core-js from 3.29.0 to 3.29.1
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.29.0 to 3.29.1.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.29.1/packages/core-js)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-14 02:02:13 +00:00
dependabot[bot]
0e509f87af chore(deps-dev): bump @fastify/multipart from 7.4.2 to 7.5.0
Bumps [@fastify/multipart](https://github.com/fastify/fastify-multipart) from 7.4.2 to 7.5.0.
- [Release notes](https://github.com/fastify/fastify-multipart/releases)
- [Commits](https://github.com/fastify/fastify-multipart/compare/v7.4.2...v7.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-14 01:56:10 +00:00
Kamil Mysliwiec
a61bcd3099 Merge pull request #11260 from Tony133/chore/update-comment-jsdoc-and-others-update
chore(): update comment jsdoc and others update
2023-03-13 08:23:39 +01:00
Kamil Mysliwiec
aa83bb5ef4 Merge pull request #11261 from jbl428/microservice-server-type
test: add microservice generic type explicitly
2023-03-13 08:22:54 +01:00
Kamil Mysliwiec
f5d359e349 Merge pull request #11263 from SloCompTech/master
Updated excluded path in 24-serve-static example
2023-03-13 08:18:29 +01:00
dependabot[bot]
dfad4e7ad6 chore(deps-dev): bump @nestjs/apollo from 11.0.2 to 11.0.3
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 11.0.2 to 11.0.3.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v11.0.2...v11.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 01:26:27 +00:00
dependabot[bot]
31179fcd55 chore(deps-dev): bump nats from 2.13.0 to 2.13.1
Bumps [nats](https://github.com/nats-io/nats.js) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/nats-io/nats.js/releases)
- [Commits](https://github.com/nats-io/nats.js/compare/v2.13.0...v2.13.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 01:15:52 +00:00
dependabot[bot]
05b7b9e484 chore(deps-dev): bump lint-staged from 13.1.2 to 13.2.0
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.1.2 to 13.2.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.1.2...v13.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 01:07:15 +00:00
Martin Dagarin
5575545be5 Updated excluded path in 24-serve-static example
Updated path specification to working one #92.
2023-03-11 16:13:53 +01:00
Jake Son
56b0c57729 test: add microservice generic type explicitly 2023-03-11 09:45:21 +09:00
Tony133
1e7bc5a21d chore(): remove import not used 2023-03-10 18:48:32 +01:00
Tony133
b895b03ebe chore(): update comment jsdoc 2023-03-10 18:36:50 +01:00
Kamil Myśliwiec
e63f5c0ff5 chore: upgrade apollo, fix integration tests 2023-03-10 17:15:17 +01:00
Kamil Myśliwiec
99dc8e6d18 chore: upgrade grapql to v16 2023-03-10 16:03:16 +01:00
Kamil Myśliwiec
0a82282098 test: remove the debug flag 2023-03-10 15:22:07 +01:00
Kamil Myśliwiec
dd649481bf chore(deps): upgrade gql and apollo packages 2023-03-10 14:36:29 +01:00
Kamil Mysliwiec
d11549c6c3 Merge pull request #11044 from mohamadrezamomeni/refactor-satisfy-function-quality-in-parse-file.pipe.ts
refactor(common): satisfy function quality in parse-file.pipe.ts
2023-03-10 14:35:37 +01:00
Kamil Mysliwiec
364d416841 Update packages/common/pipes/file/parse-file.pipe.ts 2023-03-10 14:22:31 +01:00
Kamil Mysliwiec
91009d8669 Update packages/common/pipes/file/parse-file.pipe.ts 2023-03-10 14:22:26 +01:00
Kamil Mysliwiec
f89cd0dbaa Update packages/common/pipes/file/parse-file.pipe.ts 2023-03-10 14:22:21 +01:00
Kamil Mysliwiec
797b08850e Merge pull request #11186 from CodyTseng/fix-ws-adaptor-filter-non-nil-result
fix(ws): filter only nil results
2023-03-10 14:17:54 +01:00
Kamil Mysliwiec
8b72c52678 Merge pull request #11170 from thgh/parse-array-pipe-string
Add test case for ParseArrayPipe that doesn't work as expected
2023-03-10 14:17:02 +01:00
Kamil Mysliwiec
ca2eed1fbc Merge pull request #11104 from eugenk/feature/expose-external-context-creator
feat(core): expose external-context-creator
2023-03-10 14:16:03 +01:00
Kamil Myśliwiec
ef04478555 chore(sample): update samples to use the latest apollo version 2023-03-10 14:12:04 +01:00
mohamadrezamomen97@gmail.com
99288e0f14 chore: unneccery functions 2023-03-10 16:38:12 +03:30
Kamil Mysliwiec
87939461e5 Merge pull request #11251 from nestjs/dependabot/npm_and_yarn/nats-2.13.0
chore(deps-dev): bump nats from 2.12.1 to 2.13.0
2023-03-10 13:25:25 +01:00
Kamil Mysliwiec
0a4b6fcb39 Merge pull request #11257 from nestjs/dependabot/npm_and_yarn/types/node-18.15.0
chore(deps-dev): bump @types/node from 18.14.6 to 18.15.0
2023-03-10 13:25:08 +01:00
dependabot[bot]
ff24dbd19a chore(deps-dev): bump @types/node from 18.14.6 to 18.15.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.14.6 to 18.15.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-10 01:08:38 +00:00
Kamil Mysliwiec
78ac574b9b Merge pull request #11245 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo
2023-03-09 12:22:17 +01:00
Kamil Mysliwiec
45a1916a39 Merge pull request #11243 from nestjs/renovate/bull-3.x
chore(deps): update dependency @types/bull to v3.15.9
2023-03-09 12:22:11 +01:00
Kamil Mysliwiec
90532ba3c0 Merge pull request #11246 from nestjs/renovate/confluentinc-cp-zookeeper-7.x
chore(deps): update confluentinc/cp-zookeeper docker tag to v7.3.2
2023-03-09 12:22:04 +01:00
Kamil Mysliwiec
3ddd950944 Merge pull request #11250 from nestjs/renovate/major-graphql-tools-monorepo
fix(deps): update dependency @graphql-tools/utils to v9
2023-03-09 12:21:54 +01:00
Thomas Ghysels
96afa8e650 fix: disable JSON parse for strings in ParseArrayPipe 2023-03-09 10:40:21 +01:00
dependabot[bot]
3f77136979 chore(deps-dev): bump nats from 2.12.1 to 2.13.0
Bumps [nats](https://github.com/nats-io/nats.js) from 2.12.1 to 2.13.0.
- [Release notes](https://github.com/nats-io/nats.js/releases)
- [Commits](https://github.com/nats-io/nats.js/compare/v2.12.1...v2.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-09 01:03:37 +00:00
renovate[bot]
c7eafb2b5f fix(deps): update dependency @graphql-tools/utils to v9 2023-03-08 22:32:25 +00:00
renovate[bot]
f33f9c6465 chore(deps): update confluentinc/cp-zookeeper docker tag to v7.3.2 2023-03-08 22:18:00 +00:00
renovate[bot]
3aed6965fc chore(deps): update babel monorepo 2023-03-08 22:17:44 +00:00
renovate[bot]
e99a6f9e02 chore(deps): update dependency @types/bull to v3.15.9 2023-03-08 22:11:56 +00:00
Kamil Mysliwiec
9c3f65807c Merge pull request #11204 from nestjs/dependabot/npm_and_yarn/sample/01-cats-app/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/01-cats-app
2023-03-08 08:37:12 +01:00
Kamil Mysliwiec
6e7688b735 Merge pull request #11203 from nestjs/dependabot/npm_and_yarn/sample/06-mongoose/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/06-mongoose
2023-03-08 08:37:03 +01:00
Kamil Mysliwiec
fb0dd9780c Merge pull request #11205 from nestjs/dependabot/npm_and_yarn/sample/10-fastify/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/10-fastify
2023-03-08 08:36:56 +01:00
Kamil Mysliwiec
eeb7aa3895 Merge pull request #11206 from nestjs/dependabot/npm_and_yarn/sample/30-event-emitter/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/30-event-emitter
2023-03-08 08:36:50 +01:00
Kamil Mysliwiec
5ab25d15d9 Merge pull request #11207 from nestjs/dependabot/npm_and_yarn/sample/19-auth-jwt/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/19-auth-jwt
2023-03-08 08:36:45 +01:00
Kamil Mysliwiec
50798f10aa Merge pull request #11208 from nestjs/dependabot/npm_and_yarn/sample/05-sql-typeorm/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/05-sql-typeorm
2023-03-08 08:36:40 +01:00
Kamil Mysliwiec
963e2bdb31 Merge pull request #11209 from nestjs/dependabot/npm_and_yarn/sample/15-mvc/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/15-mvc
2023-03-08 08:36:33 +01:00
dependabot[bot]
6c36e09318 chore(deps): bump @nestjs/core in /sample/01-cats-app
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:36:31 +00:00
Kamil Mysliwiec
ef413d320f Merge pull request #11210 from nestjs/dependabot/npm_and_yarn/sample/22-graphql-prisma/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/22-graphql-prisma
2023-03-08 08:36:26 +01:00
dependabot[bot]
25d15695e8 chore(deps): bump @nestjs/core in /sample/06-mongoose
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:36:19 +00:00
dependabot[bot]
4dc2cbebec chore(deps): bump @nestjs/core in /sample/30-event-emitter
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:36:19 +00:00
dependabot[bot]
611ea05425 chore(deps): bump @nestjs/core in /sample/05-sql-typeorm
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:36:18 +00:00
Kamil Mysliwiec
6609ed0423 Merge pull request #11211 from nestjs/dependabot/npm_and_yarn/sample/02-gateways/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/02-gateways
2023-03-08 08:36:18 +01:00
dependabot[bot]
b1a2879646 chore(deps): bump @nestjs/core in /sample/19-auth-jwt
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:36:17 +00:00
dependabot[bot]
14ac406689 chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/10-fastify
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:36:14 +00:00
Kamil Mysliwiec
eb1c127a20 Merge pull request #11214 from nestjs/dependabot/npm_and_yarn/sample/09-babel-example/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/09-babel-example
2023-03-08 08:36:10 +01:00
dependabot[bot]
98df800c02 chore(deps): bump @nestjs/core in /sample/22-graphql-prisma
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:36:10 +00:00
dependabot[bot]
90eb0b47e0 chore(deps): bump @nestjs/core in /sample/02-gateways
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:35:57 +00:00
dependabot[bot]
01e847a6f3 chore(deps): bump @nestjs/core in /sample/09-babel-example
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:35:47 +00:00
dependabot[bot]
c31f0bdf50 chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/15-mvc
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:35:45 +00:00
Kamil Mysliwiec
58f07160d8 Merge pull request #11212 from nestjs/dependabot/npm_and_yarn/sample/08-webpack/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/08-webpack
2023-03-08 08:35:45 +01:00
dependabot[bot]
13f6eb496b chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/08-webpack
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:35:39 +00:00
Kamil Mysliwiec
c969008159 Merge pull request #11216 from nestjs/dependabot/npm_and_yarn/sample/17-mvc-fastify/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/17-mvc-fastify
2023-03-08 08:35:38 +01:00
Kamil Mysliwiec
8a9328a80f Merge pull request #11230 from nestjs/dependabot/npm_and_yarn/sample/16-gateways-ws/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/16-gateways-ws
2023-03-08 08:35:31 +01:00
dependabot[bot]
0905442138 chore(deps): bump @nestjs/core in /sample/17-mvc-fastify
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:35:31 +00:00
dependabot[bot]
63411a1874 chore(deps): bump @nestjs/core in /sample/16-gateways-ws
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:35:22 +00:00
Kamil Mysliwiec
0aef0c7ce4 Merge pull request #11213 from nestjs/dependabot/npm_and_yarn/sample/12-graphql-schema-first/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/12-graphql-schema-first
2023-03-08 08:35:10 +01:00
Kamil Mysliwiec
11603b1486 Merge pull request #11215 from nestjs/dependabot/npm_and_yarn/sample/28-sse/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/28-sse
2023-03-08 08:35:05 +01:00
Kamil Mysliwiec
831b99bac2 Merge pull request #11217 from nestjs/dependabot/npm_and_yarn/sample/20-cache/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/20-cache
2023-03-08 08:34:56 +01:00
dependabot[bot]
f0304895a2 chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/20-cache
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:34:51 +00:00
dependabot[bot]
951c9cdb66 chore(deps): bump @nestjs/core in /sample/12-graphql-schema-first
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:34:50 +00:00
Kamil Mysliwiec
c1a0437cc4 Merge pull request #11218 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/gateway/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/32-graphql-federation-schema-first/gateway
2023-03-08 08:34:50 +01:00
Kamil Mysliwiec
76a1b15019 Merge pull request #11219 from nestjs/dependabot/npm_and_yarn/sample/24-serve-static/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/24-serve-static
2023-03-08 08:34:45 +01:00
dependabot[bot]
4591486e33 chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/28-sse
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:34:44 +00:00
dependabot[bot]
979726b8bf chore(deps): bump @nestjs/core in /sample/24-serve-static
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:34:39 +00:00
Kamil Mysliwiec
4a3fa7ccb3 Merge pull request #11220 from nestjs/dependabot/npm_and_yarn/sample/31-graphql-federation-code-first/users-application/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/31-graphql-federation-code-first/users-application
2023-03-08 08:34:38 +01:00
dependabot[bot]
b803b4f79d chore(deps): bump @nestjs/core
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:34:35 +00:00
Kamil Mysliwiec
56e1ac1e0c Merge pull request #11221 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/posts-application/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/32-graphql-federation-schema-first/posts-application
2023-03-08 08:34:25 +01:00
Kamil Mysliwiec
6d605d30b9 Merge pull request #11222 from nestjs/dependabot/npm_and_yarn/sample/31-graphql-federation-code-first/gateway/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/31-graphql-federation-code-first/gateway
2023-03-08 08:34:19 +01:00
dependabot[bot]
3492e782a8 chore(deps): bump @nestjs/core
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:34:13 +00:00
Kamil Mysliwiec
23e6120dd5 Merge pull request #11223 from nestjs/dependabot/npm_and_yarn/sample/18-context/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/18-context
2023-03-08 08:34:13 +01:00
Kamil Mysliwiec
14e0064e23 Merge pull request #11224 from nestjs/dependabot/npm_and_yarn/sample/21-serializer/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/21-serializer
2023-03-08 08:34:04 +01:00
Kamil Mysliwiec
51684f761e Merge pull request #11225 from nestjs/dependabot/npm_and_yarn/sample/14-mongoose-base/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/14-mongoose-base
2023-03-08 08:33:57 +01:00
dependabot[bot]
e7bb3ad4b4 chore(deps): bump @nestjs/core
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:33:54 +00:00
Kamil Mysliwiec
3476a6aa3a Merge pull request #11226 from nestjs/dependabot/npm_and_yarn/sample/11-swagger/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/11-swagger
2023-03-08 08:33:51 +01:00
Kamil Mysliwiec
77132abd13 Merge pull request #11227 from nestjs/dependabot/npm_and_yarn/sample/33-graphql-mercurius/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/33-graphql-mercurius
2023-03-08 08:33:44 +01:00
Kamil Mysliwiec
d7e57e71aa Merge pull request #11228 from nestjs/dependabot/npm_and_yarn/sample/27-scheduling/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/27-scheduling
2023-03-08 08:33:37 +01:00
dependabot[bot]
d09a4a37a5 chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/11-swagger
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:33:32 +00:00
Kamil Mysliwiec
e188875abd Merge pull request #11229 from nestjs/dependabot/npm_and_yarn/sample/03-microservices/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/03-microservices
2023-03-08 08:33:32 +01:00
Kamil Mysliwiec
d30168fd7d Merge pull request #11231 from nestjs/dependabot/npm_and_yarn/sample/26-queues/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/26-queues
2023-03-08 08:33:24 +01:00
Kamil Mysliwiec
dd1b92169c Merge pull request #11232 from nestjs/dependabot/npm_and_yarn/sample/29-file-upload/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/29-file-upload
2023-03-08 08:33:17 +01:00
dependabot[bot]
396ca30110 chore(deps): bump @nestjs/core in /sample/03-microservices
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:33:16 +00:00
dependabot[bot]
4b1cd6ba34 chore(deps): bump @nestjs/core in /sample/27-scheduling
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:33:15 +00:00
dependabot[bot]
d9cffd7b02 chore(deps): bump @nestjs/core
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:32:59 +00:00
dependabot[bot]
862fd4561b chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/18-context
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:32:57 +00:00
dependabot[bot]
9856d3f226 chore(deps): bump @nestjs/core in /sample/14-mongoose-base
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:32:55 +00:00
dependabot[bot]
ad8a4d33f0 chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/26-queues
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:32:54 +00:00
dependabot[bot]
62c84614f3 chore(deps): bump @nestjs/core in /sample/21-serializer
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:32:53 +00:00
dependabot[bot]
7d4eed47a3 chore(deps): bump @nestjs/core in /sample/29-file-upload
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:32:51 +00:00
Kamil Mysliwiec
31f9b4e23f Merge pull request #11233 from nestjs/dependabot/npm_and_yarn/sample/13-mongo-typeorm/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/13-mongo-typeorm
2023-03-08 08:32:28 +01:00
dependabot[bot]
f11eca31d8 chore(deps): bump @nestjs/core in /sample/33-graphql-mercurius
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:32:27 +00:00
Kamil Mysliwiec
9a0d636dd4 Merge pull request #11234 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/users-application/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/32-graphql-federation-schema-first/users-application
2023-03-08 08:32:21 +01:00
dependabot[bot]
f6ff13310b chore(deps): bump @nestjs/core
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:32:12 +00:00
dependabot[bot]
26597c175f chore(deps): bump @nestjs/core in /sample/13-mongo-typeorm
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 07:32:09 +00:00
Kamil Mysliwiec
ecfd433878 Merge pull request #11235 from nestjs/dependabot/npm_and_yarn/sample/23-graphql-code-first/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/23-graphql-code-first
2023-03-08 08:31:39 +01:00
Kamil Mysliwiec
7710285756 Merge pull request #11236 from nestjs/dependabot/npm_and_yarn/sample/04-grpc/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/04-grpc
2023-03-08 08:31:33 +01:00
Kamil Mysliwiec
9a046ecad5 Merge pull request #11237 from nestjs/dependabot/npm_and_yarn/sample/07-sequelize/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/07-sequelize
2023-03-08 08:31:29 +01:00
Kamil Mysliwiec
4dfbeea57c Merge pull request #11238 from nestjs/dependabot/npm_and_yarn/sample/31-graphql-federation-code-first/posts-application/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/31-graphql-federation-code-first/posts-application
2023-03-08 08:31:20 +01:00
Kamil Mysliwiec
17987d0d6a Merge pull request #11239 from nestjs/dependabot/npm_and_yarn/sample/25-dynamic-modules/nestjs/core-9.0.5
chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/25-dynamic-modules
2023-03-08 08:31:16 +01:00
Kamil Mysliwiec
efb61c9be8 Merge pull request #11201 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.8.12
chore(deps-dev): bump @grpc/grpc-js from 1.8.11 to 1.8.12
2023-03-08 08:30:59 +01:00
dependabot[bot]
e879b98395 chore(deps-dev): bump @grpc/grpc-js from 1.8.11 to 1.8.12
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.8.11 to 1.8.12.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.8.11...@grpc/grpc-js@1.8.12)

---
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>
2023-03-08 07:29:53 +00:00
Kamil Mysliwiec
cb06ff9e20 Merge pull request #11202 from nestjs/dependabot/npm_and_yarn/mongoose-6.10.2
chore(deps-dev): bump mongoose from 6.10.1 to 6.10.2
2023-03-08 08:29:24 +01:00
Kamil Mysliwiec
4b21f88a41 Merge pull request #11200 from nestjs/dependabot/npm_and_yarn/graphql-tools-8.3.19
chore(deps-dev): bump graphql-tools from 8.3.18 to 8.3.19
2023-03-08 08:28:14 +01:00
Kamil Mysliwiec
e3d2872d9c Merge pull request #11199 from nestjs/dependabot/npm_and_yarn/eslint-config-prettier-8.7.0
chore(deps-dev): bump eslint-config-prettier from 8.6.0 to 8.7.0
2023-03-08 08:27:44 +01:00
Kamil Mysliwiec
2bcb124685 Merge pull request #11198 from nestjs/dependabot/npm_and_yarn/fastify/multipart-7.4.2
chore(deps-dev): bump @fastify/multipart from 7.4.1 to 7.4.2
2023-03-08 08:27:36 +01:00
Kamil Mysliwiec
0c6be4fcd5 Merge pull request #11197 from nestjs/dependabot/npm_and_yarn/fastify-4.14.1
chore(deps): bump fastify from 4.14.0 to 4.14.1
2023-03-08 08:27:15 +01:00
dependabot[bot]
178c3e656a chore(deps): bump @nestjs/core in /sample/25-dynamic-modules
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 03:14:44 +00:00
dependabot[bot]
da03fd1fa7 chore(deps): bump @nestjs/core
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 03:05:38 +00:00
dependabot[bot]
fb8b6a819d chore(deps): bump @nestjs/core in /sample/07-sequelize
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 03:05:22 +00:00
dependabot[bot]
70e92344fb chore(deps): bump @nestjs/core from 9.0.1 to 9.0.5 in /sample/04-grpc
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 03:05:04 +00:00
dependabot[bot]
bdb6ba0a23 chore(deps): bump @nestjs/core in /sample/23-graphql-code-first
Bumps [@nestjs/core](https://github.com/nestjs/nest) from 9.0.1 to 9.0.5.
- [Release notes](https://github.com/nestjs/nest/releases)
- [Commits](https://github.com/nestjs/nest/compare/v9.0.1...v9.0.5)

---
updated-dependencies:
- dependency-name: "@nestjs/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 03:04:59 +00:00
dependabot[bot]
aa3fb3b677 chore(deps-dev): bump mongoose from 6.10.1 to 6.10.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.10.1 to 6.10.2.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.10.1...6.10.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 01:05:45 +00:00
dependabot[bot]
a731f0d5bc chore(deps-dev): bump graphql-tools from 8.3.18 to 8.3.19
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 8.3.18 to 8.3.19.
- [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@8.3.19/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>
2023-03-07 01:10:38 +00:00
dependabot[bot]
3c5fce12ec chore(deps-dev): bump eslint-config-prettier from 8.6.0 to 8.7.0
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.6.0 to 8.7.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.6.0...v8.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-07 01:08:07 +00:00
dependabot[bot]
7cfb23128f chore(deps-dev): bump @fastify/multipart from 7.4.1 to 7.4.2
Bumps [@fastify/multipart](https://github.com/fastify/fastify-multipart) from 7.4.1 to 7.4.2.
- [Release notes](https://github.com/fastify/fastify-multipart/releases)
- [Commits](https://github.com/fastify/fastify-multipart/compare/v7.4.1...v7.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-07 01:05:45 +00:00
dependabot[bot]
b91677a027 chore(deps): bump fastify from 4.14.0 to 4.14.1
Bumps [fastify](https://github.com/fastify/fastify) from 4.14.0 to 4.14.1.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v4.14.0...v4.14.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-07 01:01:01 +00:00
Kamil Mysliwiec
c3abc94994 Merge pull request #11180 from nestjs/dependabot/npm_and_yarn/apollo-server-core-3.12.0
chore(deps-dev): bump apollo-server-core from 3.11.1 to 3.12.0
2023-03-06 08:43:52 +01:00
dependabot[bot]
dd73f1e074 chore(deps-dev): bump apollo-server-core from 3.11.1 to 3.12.0
Bumps [apollo-server-core](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-core) from 3.11.1 to 3.12.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/apollo-server-core@3.12.0/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-core@3.12.0/packages/apollo-server-core)

---
updated-dependencies:
- dependency-name: apollo-server-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 07:31:46 +00:00
Kamil Mysliwiec
c3f9270cc2 Merge pull request #11181 from nestjs/dependabot/npm_and_yarn/nodemon-2.0.21
chore(deps-dev): bump nodemon from 2.0.20 to 2.0.21
2023-03-06 08:29:41 +01:00
Kamil Mysliwiec
32751a7af0 Merge pull request #11182 from nestjs/dependabot/npm_and_yarn/apollo-server-express-3.12.0
chore(deps-dev): bump apollo-server-express from 3.11.1 to 3.12.0
2023-03-06 08:29:34 +01:00
dependabot[bot]
9939b91bd8 chore(deps-dev): bump nodemon from 2.0.20 to 2.0.21
Bumps [nodemon](https://github.com/remy/nodemon) from 2.0.20 to 2.0.21.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](https://github.com/remy/nodemon/compare/v2.0.20...v2.0.21)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 07:29:34 +00:00
Kamil Mysliwiec
baf8e38610 Merge pull request #11191 from nestjs/dependabot/npm_and_yarn/fastify-4.14.0
chore(deps): bump fastify from 4.13.0 to 4.14.0
2023-03-06 08:28:55 +01:00
Kamil Mysliwiec
517152ddaf Merge pull request #11192 from nestjs/dependabot/npm_and_yarn/mongoose-6.10.1
chore(deps-dev): bump mongoose from 6.10.0 to 6.10.1
2023-03-06 08:27:35 +01:00
Kamil Mysliwiec
c7b08fc26e Merge pull request #11193 from nestjs/dependabot/npm_and_yarn/types/node-18.14.6
chore(deps-dev): bump @types/node from 18.14.2 to 18.14.6
2023-03-06 08:27:24 +01:00
Kamil Mysliwiec
161690c7ac Merge pull request #11194 from nestjs/dependabot/npm_and_yarn/mysql2-3.2.0
chore(deps-dev): bump mysql2 from 3.1.2 to 3.2.0
2023-03-06 08:27:11 +01:00
dependabot[bot]
9eadbe6e0e chore(deps-dev): bump mysql2 from 3.1.2 to 3.2.0
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.1.2 to 3.2.0.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.1.2...v3.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 01:17:11 +00:00
dependabot[bot]
e0b3c3976e chore(deps-dev): bump @types/node from 18.14.2 to 18.14.6
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.14.2 to 18.14.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 01:12:56 +00:00
dependabot[bot]
11937ff0e2 chore(deps-dev): bump mongoose from 6.10.0 to 6.10.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.10.0 to 6.10.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.10.0...6.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 01:10:24 +00:00
dependabot[bot]
994c21511c chore(deps): bump fastify from 4.13.0 to 4.14.0
Bumps [fastify](https://github.com/fastify/fastify) from 4.13.0 to 4.14.0.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v4.13.0...v4.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 01:05:07 +00:00
codytseng
6f8f111397 fix(ws): filter non nil result 2023-03-03 14:48:14 +08:00
dependabot[bot]
d6392f61bc chore(deps-dev): bump apollo-server-express from 3.11.1 to 3.12.0
Bumps [apollo-server-express](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-express) from 3.11.1 to 3.12.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/apollo-server-express@3.12.0/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-express@3.12.0/packages/apollo-server-express)

---
updated-dependencies:
- dependency-name: apollo-server-express
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-03 01:15:14 +00:00
Kamil Mysliwiec
06b796098d Merge pull request #11177 from jongwooo/docs/fix-typo-on-issue-template
docs: fix typo
2023-03-02 08:13:12 +01:00
Jongwoo Han
6b456a8cce docs: fix typo 2023-03-02 06:49:33 +09:00
Kamil Mysliwiec
45f78426a6 Merge pull request #11171 from nestjs/dependabot/npm_and_yarn/kafkajs-2.2.4
chore(deps-dev): bump kafkajs from 2.2.3 to 2.2.4
2023-02-28 10:16:05 +01:00
dependabot[bot]
3e04a71449 chore(deps-dev): bump kafkajs from 2.2.3 to 2.2.4
Bumps [kafkajs](https://github.com/tulios/kafkajs) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/tulios/kafkajs/releases)
- [Changelog](https://github.com/tulios/kafkajs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tulios/kafkajs/compare/v2.2.3...v2.2.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-28 01:07:56 +00:00
Thomas Ghysels
a804bf4509 Add test case for ParseArrayPipe that doesn't work as expected 2023-02-27 14:07:11 +01:00
Kamil Mysliwiec
1e60955c01 Merge pull request #11161 from nestjs/dependabot/npm_and_yarn/sample/07-sequelize/sequelize-6.29.0
chore(deps): bump sequelize from 6.28.2 to 6.29.0 in /sample/07-sequelize
2023-02-27 08:29:59 +01:00
Kamil Mysliwiec
b276022744 Merge pull request #11164 from nestjs/dependabot/npm_and_yarn/core-js-3.29.0
chore(deps-dev): bump core-js from 3.28.0 to 3.29.0
2023-02-27 08:29:49 +01:00
Kamil Mysliwiec
5e92786997 Merge pull request #11165 from nestjs/dependabot/npm_and_yarn/amqp-connection-manager-4.1.11
chore(deps-dev): bump amqp-connection-manager from 4.1.10 to 4.1.11
2023-02-27 08:29:43 +01:00
Kamil Mysliwiec
d9a97562d5 Merge pull request #11166 from nestjs/dependabot/npm_and_yarn/types/node-18.14.2
chore(deps-dev): bump @types/node from 18.14.1 to 18.14.2
2023-02-27 08:29:37 +01:00
Kamil Mysliwiec
2e3cc0abd9 Merge pull request #11167 from nestjs/dependabot/npm_and_yarn/redis-4.6.5
chore(deps-dev): bump redis from 4.6.4 to 4.6.5
2023-02-27 08:29:32 +01:00
Kamil Mysliwiec
8a1df1fb10 Merge pull request #11168 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.8.11
chore(deps-dev): bump @grpc/grpc-js from 1.8.10 to 1.8.11
2023-02-27 08:29:21 +01:00
dependabot[bot]
4ee9e63656 chore(deps-dev): bump @grpc/grpc-js from 1.8.10 to 1.8.11
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.8.10 to 1.8.11.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.8.10...@grpc/grpc-js@1.8.11)

---
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>
2023-02-27 01:18:10 +00:00
dependabot[bot]
94aad126e2 chore(deps-dev): bump redis from 4.6.4 to 4.6.5
Bumps [redis](https://github.com/redis/node-redis) from 4.6.4 to 4.6.5.
- [Release notes](https://github.com/redis/node-redis/releases)
- [Changelog](https://github.com/redis/node-redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/node-redis/compare/redis@4.6.4...redis@4.6.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 01:16:31 +00:00
dependabot[bot]
60c5fe0fa0 chore(deps-dev): bump @types/node from 18.14.1 to 18.14.2
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.14.1 to 18.14.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 01:15:10 +00:00
dependabot[bot]
4645756066 chore(deps-dev): bump amqp-connection-manager from 4.1.10 to 4.1.11
Bumps [amqp-connection-manager](https://github.com/jwalton/node-amqp-connection-manager) from 4.1.10 to 4.1.11.
- [Release notes](https://github.com/jwalton/node-amqp-connection-manager/releases)
- [Changelog](https://github.com/jwalton/node-amqp-connection-manager/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jwalton/node-amqp-connection-manager/compare/v4.1.10...v4.1.11)

---
updated-dependencies:
- dependency-name: amqp-connection-manager
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 01:08:52 +00:00
dependabot[bot]
e62814c4e5 chore(deps-dev): bump core-js from 3.28.0 to 3.29.0
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.28.0 to 3.29.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.29.0/packages/core-js)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 01:05:40 +00:00
dependabot[bot]
c311a6c40d chore(deps): bump sequelize in /sample/07-sequelize
Bumps [sequelize](https://github.com/sequelize/sequelize) from 6.28.2 to 6.29.0.
- [Release notes](https://github.com/sequelize/sequelize/releases)
- [Commits](https://github.com/sequelize/sequelize/compare/v6.28.2...v6.29.0)

---
updated-dependencies:
- dependency-name: sequelize
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 01:33:35 +00:00
Kamil Mysliwiec
bd9998590f Merge pull request #11160 from stevejkang/fix-typo-on-issue-template
docs: fix typo
2023-02-24 14:39:22 +01:00
stevejkang
ac89fc64ce docs: fix typo 2023-02-24 22:25:17 +09:00
Kamil Mysliwiec
5dcb56bd7c Merge pull request #11158 from nestjs/dependabot/npm_and_yarn/cache-manager-5.1.7
chore(deps-dev): bump cache-manager from 5.1.6 to 5.1.7
2023-02-24 08:27:39 +01:00
Kamil Mysliwiec
bf71c17a20 Merge pull request #11159 from nestjs/dependabot/npm_and_yarn/fast-json-stringify-5.6.2
chore(deps): bump fast-json-stringify from 5.6.1 to 5.6.2
2023-02-24 08:27:33 +01:00
Kamil Mysliwiec
c457a970a0 Merge pull request #11157 from nestjs/dependabot/npm_and_yarn/types/node-18.14.1
chore(deps-dev): bump @types/node from 18.14.0 to 18.14.1
2023-02-24 08:27:23 +01:00
dependabot[bot]
4f8fd5f0ea chore(deps): bump fast-json-stringify from 5.6.1 to 5.6.2
Bumps [fast-json-stringify](https://github.com/fastify/fast-json-stringify) from 5.6.1 to 5.6.2.
- [Release notes](https://github.com/fastify/fast-json-stringify/releases)
- [Commits](https://github.com/fastify/fast-json-stringify/compare/v5.6.1...v5.6.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-24 00:20:11 +00:00
dependabot[bot]
dd99f1814d chore(deps-dev): bump cache-manager from 5.1.6 to 5.1.7
Bumps [cache-manager](https://github.com/node-cache-manager/node-cache-manager) from 5.1.6 to 5.1.7.
- [Release notes](https://github.com/node-cache-manager/node-cache-manager/releases)
- [Changelog](https://github.com/node-cache-manager/node-cache-manager/blob/master/CHANGELOG.md)
- [Commits](https://github.com/node-cache-manager/node-cache-manager/compare/5.1.6...5.1.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-24 00:19:17 +00:00
dependabot[bot]
455ecc6659 chore(deps-dev): bump @types/node from 18.14.0 to 18.14.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.14.0 to 18.14.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-24 00:13:50 +00:00
Kamil Mysliwiec
54bf3fd43f Merge pull request #11147 from nestjs/dependabot/npm_and_yarn/nats-2.12.1
chore(deps-dev): bump nats from 2.12.0 to 2.12.1
2023-02-23 10:49:46 +01:00
Kamil Mysliwiec
9d0d7b1675 Merge pull request #11148 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.8.10
chore(deps-dev): bump @grpc/grpc-js from 1.8.9 to 1.8.10
2023-02-23 10:49:41 +01:00
Kamil Mysliwiec
3a306bb3e9 Merge pull request #11150 from nestjs/dependabot/npm_and_yarn/body-parser-1.20.2
chore(deps): bump body-parser from 1.20.1 to 1.20.2
2023-02-23 10:49:36 +01:00
Kamil Mysliwiec
7fc35588d0 Merge pull request #11151 from nestjs/dependabot/npm_and_yarn/mongoose-6.10.0
chore(deps-dev): bump mongoose from 6.9.2 to 6.10.0
2023-02-23 10:49:30 +01:00
Kamil Mysliwiec
ac9c28fcfe Merge pull request #11152 from nestjs/dependabot/npm_and_yarn/fast-json-stringify-5.6.1
chore(deps): bump fast-json-stringify from 5.5.0 to 5.6.1
2023-02-23 10:49:25 +01:00
Kamil Mysliwiec
bfd6becb80 Merge pull request #11153 from nestjs/dependabot/npm_and_yarn/sample/07-sequelize/sequelize-6.28.2
chore(deps): bump sequelize from 6.21.2 to 6.28.2 in /sample/07-sequelize
2023-02-23 10:49:17 +01:00
dependabot[bot]
7e80904159 chore(deps): bump sequelize in /sample/07-sequelize
Bumps [sequelize](https://github.com/sequelize/sequelize) from 6.21.2 to 6.28.2.
- [Release notes](https://github.com/sequelize/sequelize/releases)
- [Commits](https://github.com/sequelize/sequelize/compare/v6.21.2...v6.28.2)

---
updated-dependencies:
- dependency-name: sequelize
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-23 04:09:23 +00:00
dependabot[bot]
9cb92bb2e2 chore(deps): bump fast-json-stringify from 5.5.0 to 5.6.1
Bumps [fast-json-stringify](https://github.com/fastify/fast-json-stringify) from 5.5.0 to 5.6.1.
- [Release notes](https://github.com/fastify/fast-json-stringify/releases)
- [Commits](https://github.com/fastify/fast-json-stringify/compare/v5.5.0...v5.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-23 00:22:51 +00:00
dependabot[bot]
68618c456d chore(deps-dev): bump mongoose from 6.9.2 to 6.10.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.9.2 to 6.10.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.9.2...6.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-23 00:20:14 +00:00
dependabot[bot]
3ea485f158 chore(deps): bump body-parser from 1.20.1 to 1.20.2
Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.20.1 to 1.20.2.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.20.1...1.20.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-23 00:17:39 +00:00
dependabot[bot]
006233be64 chore(deps-dev): bump @grpc/grpc-js from 1.8.9 to 1.8.10
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.8.9 to 1.8.10.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.8.9...@grpc/grpc-js@1.8.10)

---
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>
2023-02-22 01:25:58 +00:00
dependabot[bot]
c0b3f7ff72 chore(deps-dev): bump nats from 2.12.0 to 2.12.1
Bumps [nats](https://github.com/nats-io/nats.js) from 2.12.0 to 2.12.1.
- [Release notes](https://github.com/nats-io/nats.js/releases)
- [Commits](https://github.com/nats-io/nats.js/compare/v2.12.0...v2.12.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-22 00:28:30 +00:00
Kamil Mysliwiec
302f08dc52 Merge pull request #11135 from nestjs/dependabot/npm_and_yarn/commitlint/config-angular-17.4.4
chore(deps-dev): bump @commitlint/config-angular from 17.4.3 to 17.4.4
2023-02-21 13:15:20 +01:00
dependabot[bot]
4b1b3b4774 chore(deps-dev): bump @commitlint/config-angular from 17.4.3 to 17.4.4
Bumps [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular) from 17.4.3 to 17.4.4.
- [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/v17.4.4/@commitlint/config-angular)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 07:17:53 +00:00
Kamil Mysliwiec
5f26def84c Merge pull request #11136 from nestjs/dependabot/npm_and_yarn/commitlint/cli-17.4.4
chore(deps-dev): bump @commitlint/cli from 17.4.3 to 17.4.4
2023-02-21 08:15:09 +01:00
Kamil Mysliwiec
983aaf58f0 Merge pull request #11137 from nestjs/dependabot/npm_and_yarn/types/node-18.14.0
chore(deps-dev): bump @types/node from 18.13.0 to 18.14.0
2023-02-21 08:15:04 +01:00
Kamil Mysliwiec
30193ceab8 Merge pull request #11143 from nestjs/dependabot/npm_and_yarn/socket.io-4.6.1
chore(deps): bump socket.io from 4.6.0 to 4.6.1
2023-02-21 08:14:58 +01:00
Kamil Mysliwiec
a183b7840e Merge pull request #11144 from nestjs/dependabot/npm_and_yarn/socket.io-client-4.6.1
chore(deps-dev): bump socket.io-client from 4.6.0 to 4.6.1
2023-02-21 08:14:43 +01:00
dependabot[bot]
4329971658 chore(deps-dev): bump socket.io-client from 4.6.0 to 4.6.1
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/4.6.0...4.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 01:11:37 +00:00
dependabot[bot]
c704308796 chore(deps): bump socket.io from 4.6.0 to 4.6.1
Bumps [socket.io](https://github.com/socketio/socket.io) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.6.0...4.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 01:07:54 +00:00
dependabot[bot]
b2769d36e2 chore(deps-dev): bump @types/node from 18.13.0 to 18.14.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.13.0 to 18.14.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 01:12:04 +00:00
dependabot[bot]
574cbb01eb chore(deps-dev): bump @commitlint/cli from 17.4.3 to 17.4.4
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 17.4.3 to 17.4.4.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v17.4.4/@commitlint/cli)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 01:09:21 +00:00
Jan Krueger
7ef71f3f9b fix(common): fix cache-manager version detection running every request
move cache-manager version detection to constructor
2023-02-19 21:48:33 +01:00
Jan Krueger
e7b38a0dcd refactor(common): refactor cache-manager version detection
refactor cache-manager version detection in CacheInterceptor to be lazy
2023-02-19 21:18:45 +01:00
Jan Krüger
63814af6e6 Update packages/common/cache/interceptors/cache.interceptor.ts
Co-authored-by: Micael Levi L. Cavalcante <mllc@icomp.ufam.edu.br>
2023-02-19 18:24:17 +01:00
Jan Krueger
e151c47839 fix(common): fix cache ttl not beeing respected 2023-02-17 17:01:32 +01:00
Kamil Mysliwiec
1cc4f101a2 Merge pull request #11127 from nestjs/dependabot/npm_and_yarn/sample/33-graphql-mercurius/undici-5.19.1
chore(deps): bump undici from 5.9.1 to 5.19.1 in /sample/33-graphql-mercurius
2023-02-17 08:53:16 +01:00
Kamil Mysliwiec
87d1be8c9b Merge pull request #11128 from nestjs/dependabot/npm_and_yarn/mongoose-6.9.2
chore(deps-dev): bump mongoose from 6.9.1 to 6.9.2
2023-02-17 08:52:48 +01:00
dependabot[bot]
46239d9c76 chore(deps-dev): bump mongoose from 6.9.1 to 6.9.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.9.1 to 6.9.2.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.9.1...6.9.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-17 01:06:07 +00:00
dependabot[bot]
ca2bbfef4b chore(deps): bump undici in /sample/33-graphql-mercurius
Bumps [undici](https://github.com/nodejs/undici) from 5.9.1 to 5.19.1.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.9.1...v5.19.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-16 23:34:27 +00:00
Kamil Mysliwiec
ef3b5d743e Merge pull request #11120 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.8.9
chore(deps-dev): bump @grpc/grpc-js from 1.8.8 to 1.8.9
2023-02-16 08:56:13 +01:00
Kamil Mysliwiec
936cb9615a Merge pull request #11121 from nestjs/dependabot/npm_and_yarn/light-my-request-5.9.1
chore(deps): bump light-my-request from 5.8.0 to 5.9.1
2023-02-16 08:55:05 +01:00
dependabot[bot]
bd69f17a8c chore(deps): bump light-my-request from 5.8.0 to 5.9.1
Bumps [light-my-request](https://github.com/fastify/light-my-request) from 5.8.0 to 5.9.1.
- [Release notes](https://github.com/fastify/light-my-request/releases)
- [Commits](https://github.com/fastify/light-my-request/compare/v5.8.0...v5.9.1)

---
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>
2023-02-16 01:10:45 +00:00
dependabot[bot]
ed9c4d495e chore(deps-dev): bump @grpc/grpc-js from 1.8.8 to 1.8.9
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.8.8 to 1.8.9.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.8.8...@grpc/grpc-js@1.8.9)

---
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>
2023-02-16 01:07:25 +00:00
Kamil Mysliwiec
176ec4ef00 Merge pull request #11113 from nestjs/dependabot/npm_and_yarn/fastify/multipart-7.4.1
chore(deps-dev): bump @fastify/multipart from 7.4.0 to 7.4.1
2023-02-15 12:59:41 +01:00
dependabot[bot]
658c30508c chore(deps-dev): bump @fastify/multipart from 7.4.0 to 7.4.1
Bumps [@fastify/multipart](https://github.com/fastify/fastify-multipart) from 7.4.0 to 7.4.1.
- [Release notes](https://github.com/fastify/fastify-multipart/releases)
- [Commits](https://github.com/fastify/fastify-multipart/compare/v7.4.0...v7.4.1)

---
updated-dependencies:
- dependency-name: "@fastify/multipart"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-14 22:24:55 +00:00
Kamil Myśliwiec
98a2802c00 chore(@nestjs) publish v9.3.9 release 2023-02-14 11:19:36 +01:00
Kamil Mysliwiec
4a7a61a1b0 Merge pull request #11109 from nestjs/dependabot/npm_and_yarn/commitlint/cli-17.4.3
chore(deps-dev): bump @commitlint/cli from 17.4.2 to 17.4.3
2023-02-14 09:26:33 +01:00
dependabot[bot]
f907ae82f5 chore(deps-dev): bump @commitlint/cli from 17.4.2 to 17.4.3
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 17.4.2 to 17.4.3.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v17.4.3/@commitlint/cli)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-14 08:24:29 +00:00
Kamil Mysliwiec
ba38eda74c Merge pull request #11106 from nestjs/dependabot/npm_and_yarn/core-js-3.28.0
chore(deps-dev): bump core-js from 3.27.2 to 3.28.0
2023-02-14 09:19:05 +01:00
Kamil Mysliwiec
fe171fda29 Merge pull request #11107 from nestjs/dependabot/npm_and_yarn/ws-8.12.1
chore(deps): bump ws from 8.12.0 to 8.12.1
2023-02-14 09:18:59 +01:00
Kamil Mysliwiec
1689ae2fc4 Merge pull request #11108 from nestjs/dependabot/npm_and_yarn/grpc/proto-loader-0.7.5
chore(deps-dev): bump @grpc/proto-loader from 0.7.4 to 0.7.5
2023-02-14 09:18:52 +01:00
Kamil Mysliwiec
6ecb213b9b Merge pull request #11110 from nestjs/dependabot/npm_and_yarn/lint-staged-13.1.2
chore(deps-dev): bump lint-staged from 13.1.1 to 13.1.2
2023-02-14 09:18:39 +01:00
Kamil Mysliwiec
38a2c7005c Merge pull request #11111 from nestjs/dependabot/npm_and_yarn/commitlint/config-angular-17.4.3
chore(deps-dev): bump @commitlint/config-angular from 17.4.2 to 17.4.3
2023-02-14 09:18:33 +01:00
dependabot[bot]
e03aca6221 chore(deps-dev): bump @commitlint/config-angular from 17.4.2 to 17.4.3
Bumps [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular) from 17.4.2 to 17.4.3.
- [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/v17.4.3/@commitlint/config-angular)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-14 01:36:26 +00:00
dependabot[bot]
fecf2db872 chore(deps-dev): bump lint-staged from 13.1.1 to 13.1.2
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.1.1 to 13.1.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.1.1...v13.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-14 01:35:58 +00:00
dependabot[bot]
26b4eae5fd chore(deps-dev): bump @grpc/proto-loader from 0.7.4 to 0.7.5
Bumps [@grpc/proto-loader](https://github.com/grpc/grpc-node) from 0.7.4 to 0.7.5.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/proto-loader@0.7.4...@grpc/proto-loader@0.7.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-14 01:34:33 +00:00
dependabot[bot]
d5c6234ad6 chore(deps): bump ws from 8.12.0 to 8.12.1
Bumps [ws](https://github.com/websockets/ws) from 8.12.0 to 8.12.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.12.0...8.12.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-14 01:31:46 +00:00
dependabot[bot]
06aed0eca5 chore(deps-dev): bump core-js from 3.27.2 to 3.28.0
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.27.2 to 3.28.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.28.0/packages/core-js)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-14 01:14:45 +00:00
Kamil Myśliwiec
b9a9da31aa test(core): fix init time tests 2023-02-13 15:49:38 +01:00
Kamil Myśliwiec
3c4ff60679 feat(core): add init time for analytics purposes 2023-02-13 15:15:17 +01:00
Kamil Mysliwiec
dbf7f36d91 Merge pull request #11102 from nestjs/dependabot/npm_and_yarn/ioredis-5.3.1
chore(deps-dev): bump ioredis from 5.3.0 to 5.3.1
2023-02-13 08:25:14 +01:00
Kamil Mysliwiec
1af75d750f Merge pull request #11103 from nestjs/dependabot/npm_and_yarn/fastify/static-6.9.0
chore(deps-dev): bump @fastify/static from 6.8.0 to 6.9.0
2023-02-13 08:25:08 +01:00
Eugen Kuksa
aaaa1b7af1 feat(core): expose external-context-creator
Allow third party packages to register handlers (like controller
methods) that pass through the whole pipeline of interceptors, pipes,
guards, filters and param decorators while still being compliant with
node16 moduleResolution, where imports like

```typescript
import {
  ExternalContextCreator,
  ParamsFactory,
} from "@nestjs/core/helpers/external-context-creator";
```

are not allowed.

No tests are added here because functionality is not changed.
2023-02-13 07:33:22 +01:00
dependabot[bot]
a5b2825008 chore(deps-dev): bump @fastify/static from 6.8.0 to 6.9.0
Bumps [@fastify/static](https://github.com/fastify/fastify-static) from 6.8.0 to 6.9.0.
- [Release notes](https://github.com/fastify/fastify-static/releases)
- [Commits](https://github.com/fastify/fastify-static/compare/v6.8.0...v6.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 01:15:03 +00:00
dependabot[bot]
504e68142e chore(deps-dev): bump ioredis from 5.3.0 to 5.3.1
Bumps [ioredis](https://github.com/luin/ioredis) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/luin/ioredis/releases)
- [Changelog](https://github.com/luin/ioredis/blob/main/CHANGELOG.md)
- [Commits](https://github.com/luin/ioredis/compare/v5.3.0...v5.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 01:06:48 +00:00
Kamil Mysliwiec
5735640413 Merge pull request #11067 from Tony133/chore/mark-facing-apis-public-microservices
chore(microservices): mark facing apis public in microservices
2023-02-12 18:22:20 +01:00
Tony133
b1398ec4c2 chore(microservices): mark facing apis public 2023-02-12 11:25:06 +01:00
Antonio Tripodi
2251363856 Merge branch 'nestjs:master' into chore/mark-facing-apis-public-microservices 2023-02-12 10:41:50 +01:00
Kamil Mysliwiec
f2b26981b5 Merge pull request #11096 from Lioness100/master
docs: fix typos
2023-02-11 10:19:07 +01:00
Lioness100
fda5fff1cd docs: fix typos 2023-02-10 21:39:29 -05:00
Kamil Myśliwiec
8aa042d937 chore(@nestjs) publish v9.3.8 release 2023-02-10 11:34:26 +01:00
Kamil Myśliwiec
e54b691eb5 test(core): update tests to include entry providers 2023-02-10 11:30:47 +01:00
Kamil Mysliwiec
786edcda72 Merge pull request #11091 from nestjs/dependabot/npm_and_yarn/fastify-4.13.0
chore(deps): bump fastify from 4.12.0 to 4.13.0
2023-02-10 11:08:54 +01:00
Kamil Mysliwiec
b497e0ba19 Merge pull request #11092 from nestjs/dependabot/npm_and_yarn/nats-2.12.0
chore(deps-dev): bump nats from 2.11.0 to 2.12.0
2023-02-10 11:08:39 +01:00
Kamil Myśliwiec
18a30cf1ac Merge branch 'master' of https://github.com/nestjs/nest 2023-02-10 10:59:51 +01:00
Kamil Myśliwiec
7d92d33614 fix(core): pass enhancer subtype for custom providers 2023-02-10 10:59:03 +01:00
Kamil Myśliwiec
a2b3e1b727 feat(core): introduce entry providers concept 2023-02-10 10:58:37 +01:00
dependabot[bot]
29c8022161 chore(deps-dev): bump nats from 2.11.0 to 2.12.0
Bumps [nats](https://github.com/nats-io/nats.js) from 2.11.0 to 2.12.0.
- [Release notes](https://github.com/nats-io/nats.js/releases)
- [Commits](https://github.com/nats-io/nats.js/compare/v2.11.0...v2.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-10 01:05:33 +00:00
dependabot[bot]
9b9fe4494f chore(deps): bump fastify from 4.12.0 to 4.13.0
Bumps [fastify](https://github.com/fastify/fastify) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v4.12.0...v4.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-10 01:01:54 +00:00
Tony133
0df4dcafa2 chore(microservices): mark facing apis public in microservices 2023-02-09 10:33:27 +01:00
Kamil Mysliwiec
88fa8ee647 Merge pull request #11087 from nestjs/dependabot/npm_and_yarn/mysql2-3.1.2
chore(deps-dev): bump mysql2 from 3.1.1 to 3.1.2
2023-02-09 08:46:27 +01:00
Kamil Mysliwiec
b0b433bec9 Merge pull request #11088 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.8.8
chore(deps-dev): bump @grpc/grpc-js from 1.8.7 to 1.8.8
2023-02-09 08:46:19 +01:00
Kamil Mysliwiec
2f730ffcb6 Merge pull request #11089 from nestjs/dependabot/npm_and_yarn/prettier-2.8.4
chore(deps-dev): bump prettier from 2.8.3 to 2.8.4
2023-02-09 08:44:42 +01:00
dependabot[bot]
13f4c89fd7 chore(deps-dev): bump prettier from 2.8.3 to 2.8.4
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.3 to 2.8.4.
- [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/2.8.3...2.8.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 00:16:07 +00:00
dependabot[bot]
11b39d3366 chore(deps-dev): bump @grpc/grpc-js from 1.8.7 to 1.8.8
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.8.7 to 1.8.8.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.8.7...@grpc/grpc-js@1.8.8)

---
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>
2023-02-09 00:08:58 +00:00
dependabot[bot]
c51783e1ab chore(deps-dev): bump mysql2 from 3.1.1 to 3.1.2
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.1.1...v3.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 00:05:39 +00:00
Kamil Myśliwiec
7a90b7c9b4 chore: update package.json version 2023-02-08 14:37:37 +01:00
Kamil Myśliwiec
206bbd6471 chore(@nestjs) publish v9.3.7 release 2023-02-08 14:36:42 +01:00
Kamil Myśliwiec
be5434951d fix(core): fix deterministic uuid registry 2023-02-08 14:34:54 +01:00
Kamil Myśliwiec
6d1e9aff98 chore(@nestjs) publish v9.3.6 release 2023-02-08 13:09:30 +01:00
Kamil Myśliwiec
ec8ab90c58 chore: revert package.json change 2023-02-08 12:58:42 +01:00
Kamil Myśliwiec
033d97839f feat(core): use hashcode for uuid registry 2023-02-08 12:15:21 +01:00
Kamil Myśliwiec
f88dff24d9 Merge branch 'master' of https://github.com/nestjs/nest 2023-02-08 11:03:34 +01:00
Kamil Myśliwiec
5a110c453d test: update snapshots 2023-02-08 11:03:25 +01:00
Kamil Mysliwiec
426682b3d8 Merge pull request #11058 from vizio360/testForStaticityWhenCircularDependency
test(core):  added tests for checking durability and staticity calculation when circular dependency
2023-02-08 10:48:47 +01:00
Kamil Myśliwiec
bf5b7ad394 feat(core): initialize on preview allowlist 2023-02-08 10:42:52 +01:00
Simone Vicentini
ce9e9a65f4 test(core): Added tests
Added new tests for checking durability when circula dependency present
2023-02-08 08:38:57 +00:00
Kamil Mysliwiec
a64b9cc9cb Merge pull request #11073 from H4ad/fix/issue-with-xxhash
fix(core): removed xxhash to fix #11071
2023-02-08 09:08:32 +01:00
Kamil Mysliwiec
d8c8f5be43 Merge pull request #11075 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.2.0
chore(deps-dev): bump @nestjs/graphql from 10.1.7 to 10.2.0
2023-02-08 09:07:36 +01:00
Kamil Mysliwiec
a7b2bf5638 Merge pull request #11081 from jmcdo29/fix/logger-error-parameters
fix(common): account for when stack is undefined in logger
2023-02-08 09:07:24 +01:00
dependabot[bot]
40471bf020 chore(deps-dev): bump @nestjs/graphql from 10.1.7 to 10.2.0
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.1.7 to 10.2.0.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.1.7...v10.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-08 07:59:12 +00:00
Kamil Mysliwiec
a4a8561ce5 Merge pull request #11076 from nestjs/dependabot/npm_and_yarn/mysql2-3.1.1
chore(deps-dev): bump mysql2 from 3.1.0 to 3.1.1
2023-02-08 08:56:17 +01:00
Kamil Mysliwiec
90ce5ae2b5 Merge pull request #11077 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.2.0
chore(deps-dev): bump @nestjs/apollo from 10.1.7 to 10.2.0
2023-02-08 08:56:08 +01:00
Kamil Mysliwiec
036a05c021 Merge pull request #11078 from nestjs/dependabot/npm_and_yarn/typeorm-0.3.12
chore(deps-dev): bump typeorm from 0.3.11 to 0.3.12
2023-02-08 08:55:50 +01:00
Kamil Mysliwiec
ca0d0c2c65 Merge pull request #11079 from nestjs/dependabot/npm_and_yarn/types/node-18.13.0
chore(deps-dev): bump @types/node from 18.11.19 to 18.13.0
2023-02-08 08:55:44 +01:00
Kamil Mysliwiec
a6dce1fc92 Merge pull request #11080 from nestjs/dependabot/npm_and_yarn/lint-staged-13.1.1
chore(deps-dev): bump lint-staged from 13.1.0 to 13.1.1
2023-02-08 08:54:58 +01:00
Jay McDoniel
bd74c7f1e3 chore: add link to comment with explanation 2023-02-07 16:56:50 -08:00
dependabot[bot]
22edce8ae6 chore(deps-dev): bump lint-staged from 13.1.0 to 13.1.1
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.1.0 to 13.1.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.1.0...v13.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-08 00:33:15 +00:00
Jay McDoniel
0fbceee402 fix(common): account for when stack is undefined in logger
Due to a change in #10531 when the `stack` is added as `undefined` a
new `undefined` log would be added whenever `this.logger.error()`
would be called. Now, we check that the last element is either
a string or undefined, and if so strip the last element. That element
should only exist when we artificially add the stack via the changes
from #10531.

closes #11074
2023-02-07 16:32:03 -08:00
dependabot[bot]
1e3f1fe748 chore(deps-dev): bump @types/node from 18.11.19 to 18.13.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.11.19 to 18.13.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-08 00:22:52 +00:00
dependabot[bot]
fef8e71a82 chore(deps-dev): bump typeorm from 0.3.11 to 0.3.12
Bumps [typeorm](https://github.com/typeorm/typeorm) from 0.3.11 to 0.3.12.
- [Release notes](https://github.com/typeorm/typeorm/releases)
- [Changelog](https://github.com/typeorm/typeorm/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typeorm/typeorm/compare/0.3.11...0.3.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-08 00:19:44 +00:00
dependabot[bot]
a417e895c3 chore(deps-dev): bump @nestjs/apollo from 10.1.7 to 10.2.0
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.1.7 to 10.2.0.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.1.7...v10.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-08 00:16:31 +00:00
dependabot[bot]
1dd4648640 chore(deps-dev): bump mysql2 from 3.1.0 to 3.1.1
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.1.0...v3.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-08 00:10:15 +00:00
Vinícius Lourenço
bd92969b0c fix(core): removed xxhash to fix #11071 2023-02-07 16:29:37 -03:00
Kamil Mysliwiec
4dcb8d54d5 Merge pull request #11059 from nestjs/dependabot/npm_and_yarn/mongoose-6.9.1
chore(deps-dev): bump mongoose from 6.9.0 to 6.9.1
2023-02-07 14:24:41 +01:00
Kamil Myśliwiec
075c8d0f81 chore(@nestjs) publish v9.3.5 release 2023-02-07 14:23:59 +01:00
Kamil Myśliwiec
89837fcfd5 fix(common): fix validation pipe regression #11070 2023-02-07 14:22:10 +01:00
Kamil Myśliwiec
51f4ba7fda chore(@nestjs) publish v9.3.4 release 2023-02-07 13:42:43 +01:00
Kamil Myśliwiec
8bcd80f724 Merge branch 'jpogorzelski-fix/include-uid-in-core-dependencies' 2023-02-07 13:38:07 +01:00
Kamil Myśliwiec
56dea12e25 chore: fix package.json order 2023-02-07 13:37:59 +01:00
Kamil Myśliwiec
a4b41419c8 Merge branch 'fix/include-uid-in-core-dependencies' of https://github.com/jpogorzelski/nest into jpogorzelski-fix/include-uid-in-core-dependencies 2023-02-07 13:37:32 +01:00
Kamil Mysliwiec
244c3c793d Merge pull request #11060 from nestjs/dependabot/npm_and_yarn/graphql-tools-8.3.18
chore(deps-dev): bump graphql-tools from 8.3.17 to 8.3.18
2023-02-07 13:37:02 +01:00
Kamil Mysliwiec
8ca22e7d15 Merge pull request #11061 from nestjs/dependabot/npm_and_yarn/cache-manager-5.1.6
chore(deps-dev): bump cache-manager from 5.1.5 to 5.1.6
2023-02-07 13:33:21 +01:00
Kamil Mysliwiec
4f62a0ed1c Merge pull request #11062 from nestjs/dependabot/npm_and_yarn/socket.io-4.6.0
chore(deps): bump socket.io from 4.5.4 to 4.6.0
2023-02-07 13:33:14 +01:00
Kamil Mysliwiec
af9703252c Merge pull request #11063 from nestjs/dependabot/npm_and_yarn/engine.io-client-6.4.0
chore(deps-dev): bump engine.io-client from 6.3.1 to 6.4.0
2023-02-07 13:33:09 +01:00
Kamil Mysliwiec
81ef0ac06f Merge pull request #11064 from nestjs/dependabot/npm_and_yarn/socket.io-client-4.6.0
chore(deps-dev): bump socket.io-client from 4.5.4 to 4.6.0
2023-02-07 13:32:59 +01:00
Kamil Mysliwiec
974987f9fb Merge pull request #11066 from jmcdo29/fix/cache-interceptorignore-streamable
fix: skip caching the response if it is a streamable file instance
2023-02-07 13:32:50 +01:00
Jakub Pogorzelski
92bf2f06f9 fix(core): need to depend on the uid
Closes #11068
2023-02-07 12:34:19 +01:00
Jay McDoniel
6b15ac0880 fix: skip caching the response if it is a streamable file instance 2023-02-06 20:50:48 -08:00
dependabot[bot]
c907995be9 chore(deps-dev): bump socket.io-client from 4.5.4 to 4.6.0
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.5.4 to 4.6.0.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/4.5.4...4.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 00:31:35 +00:00
dependabot[bot]
b6cd399adc chore(deps-dev): bump engine.io-client from 6.3.1 to 6.4.0
Bumps [engine.io-client](https://github.com/socketio/engine.io-client) from 6.3.1 to 6.4.0.
- [Release notes](https://github.com/socketio/engine.io-client/releases)
- [Changelog](https://github.com/socketio/engine.io-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io-client/compare/6.3.1...6.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 00:30:13 +00:00
dependabot[bot]
b34e9e26c6 chore(deps): bump socket.io from 4.5.4 to 4.6.0
Bumps [socket.io](https://github.com/socketio/socket.io) from 4.5.4 to 4.6.0.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.5.4...4.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 00:28:46 +00:00
dependabot[bot]
8d603d1b2c chore(deps-dev): bump cache-manager from 5.1.5 to 5.1.6
Bumps [cache-manager](https://github.com/node-cache-manager/node-cache-manager) from 5.1.5 to 5.1.6.
- [Release notes](https://github.com/node-cache-manager/node-cache-manager/releases)
- [Changelog](https://github.com/node-cache-manager/node-cache-manager/blob/master/CHANGELOG.md)
- [Commits](https://github.com/node-cache-manager/node-cache-manager/compare/5.1.5...5.1.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 00:16:28 +00:00
dependabot[bot]
f0f846684a chore(deps-dev): bump graphql-tools from 8.3.17 to 8.3.18
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 8.3.17 to 8.3.18.
- [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@8.3.18/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>
2023-02-07 00:12:10 +00:00
dependabot[bot]
b932cc56ce chore(deps-dev): bump mongoose from 6.9.0 to 6.9.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.9.0 to 6.9.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.9.0...6.9.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 00:04:44 +00:00
Simone Vicentini
2cd8a59db1 test(core): added test
Added test for staticity calcuation when circular dependency present
2023-02-06 17:35:30 +00:00
Kamil Myśliwiec
67a58e9b85 chore: update readme 2023-02-06 14:40:50 +01:00
Kamil Myśliwiec
f57eacc952 chore(@nestjs) publish v9.3.3 release 2023-02-06 14:39:23 +01:00
Kamil Myśliwiec
6c99b704f6 fix(core): default deps introspection return val should be false 2023-02-06 14:28:09 +01:00
Kamil Mysliwiec
0a3a87673a Merge pull request #11053 from nestjs/chore/remove-uuid
chore(core): remove uuid dependency
2023-02-06 11:08:48 +01:00
Kamil Myśliwiec
36065d30f2 chore: update tests, id as string 2023-02-06 10:52:15 +01:00
Mohammad Reza Momeni
57d8ab9a23 refactor: correct grammer of variable 2023-02-06 13:15:05 +03:30
Kamil Myśliwiec
d323edbab9 chore(core): remove uuid dependency 2023-02-06 10:33:39 +01:00
mohamadrezamomeni
3dc080bd77 Update packages/common/pipes/file/parse-file.pipe.ts
Co-authored-by: Kamil Mysliwiec <mail@kamilmysliwiec.com>
2023-02-06 12:51:19 +03:30
Kamil Myśliwiec
71c987e490 Merge branch 'perf/metadata-scanner' of https://github.com/H4ad/nest 2023-02-06 10:20:40 +01:00
Kamil Myśliwiec
7b69554776 Merge branch 'CodyTseng-fix-middleware-exclude' 2023-02-06 10:19:03 +01:00
Kamil Myśliwiec
1069796df7 test: update broken unit tests 2023-02-06 10:18:38 +01:00
Kamil Myśliwiec
cf88a7814e Merge branch 'fix-middleware-exclude' of https://github.com/CodyTseng/nest into CodyTseng-fix-middleware-exclude 2023-02-06 10:13:53 +01:00
Kamil Myśliwiec
bf1071f142 Merge branch 'H4ad-perf/module-token-factory-fast-path' 2023-02-06 10:12:36 +01:00
Kamil Myśliwiec
e1c2d27966 style(core): minor formatting, naming changes 2023-02-06 10:12:20 +01:00
Kamil Myśliwiec
76b7185623 chore: resolve conflicts 2023-02-06 10:08:01 +01:00
Kamil Mysliwiec
dac1219879 Merge pull request #11041 from vizio360/fixFor11002
fix(core): 🚑 Fix for calculating durability of a provider
2023-02-06 09:59:53 +01:00
Kamil Mysliwiec
97e9c184a2 Merge pull request #11034 from Tony133/chore/mark-facing-apis-public-testing
chore(testing, websockets): mark facing apis public
2023-02-06 09:54:37 +01:00
Kamil Mysliwiec
1d5856c731 Update packages/core/middleware/builder.ts 2023-02-06 09:54:00 +01:00
Kamil Mysliwiec
c9c6468861 Update packages/core/middleware/route-info-path-extractor.ts 2023-02-06 09:53:51 +01:00
Tony133
216ce4c60f chore(websockets): mark facing apis public in websockets 2023-02-06 09:39:18 +01:00
Kamil Mysliwiec
6b39aaa00e Merge pull request #11049 from nestjs/dependabot/npm_and_yarn/types/node-18.11.19
chore(deps-dev): bump @types/node from 18.11.18 to 18.11.19
2023-02-06 09:24:04 +01:00
Kamil Mysliwiec
f211dee41a Merge pull request #11050 from nestjs/dependabot/npm_and_yarn/types/express-4.17.17
chore(deps-dev): bump @types/express from 4.17.16 to 4.17.17
2023-02-06 09:23:53 +01:00
Kamil Mysliwiec
593e6ffb1a Merge pull request #11051 from nestjs/dependabot/npm_and_yarn/cache-manager-5.1.5
chore(deps-dev): bump cache-manager from 5.1.4 to 5.1.5
2023-02-06 09:21:16 +01:00
Kamil Mysliwiec
ab25307fc2 Merge pull request #11052 from nestjs/dependabot/npm_and_yarn/engine.io-client-6.3.1
chore(deps-dev): bump engine.io-client from 6.3.0 to 6.3.1
2023-02-06 09:08:38 +01:00
dependabot[bot]
5a6bc1899b chore(deps-dev): bump engine.io-client from 6.3.0 to 6.3.1
Bumps [engine.io-client](https://github.com/socketio/engine.io-client) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/socketio/engine.io-client/releases)
- [Changelog](https://github.com/socketio/engine.io-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io-client/compare/6.3.0...6.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 00:31:19 +00:00
dependabot[bot]
51dab24dad chore(deps-dev): bump cache-manager from 5.1.4 to 5.1.5
Bumps [cache-manager](https://github.com/node-cache-manager/node-cache-manager) from 5.1.4 to 5.1.5.
- [Release notes](https://github.com/node-cache-manager/node-cache-manager/releases)
- [Changelog](https://github.com/node-cache-manager/node-cache-manager/blob/master/CHANGELOG.md)
- [Commits](https://github.com/node-cache-manager/node-cache-manager/compare/5.1.4...5.1.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 00:24:59 +00:00
dependabot[bot]
19492a9974 chore(deps-dev): bump @types/express from 4.17.16 to 4.17.17
Bumps [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express) from 4.17.16 to 4.17.17.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 00:18:27 +00:00
dependabot[bot]
3806a7631c chore(deps-dev): bump @types/node from 18.11.18 to 18.11.19
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.11.18 to 18.11.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 00:14:19 +00:00
Mohammad Reza Momeni
446100cef7 fix: simple idea 2023-02-05 21:46:11 +03:30
Mohammad Reza Momeni
c17fc02cb3 refactor: get function of isRejected from utilities 2023-02-05 20:57:17 +03:30
Mohammad Reza Momeni
555a556d8d fix: fix performance issue 2023-02-05 20:47:05 +03:30
Mohammad Reza Momeni
43668f4efe fix: validate sequentially 2023-02-05 19:49:27 +03:30
Vinícius Lourenço
7f43821d48 perf(core): change sha1 to xxhash 2023-02-04 12:39:36 -03:00
Vinícius Lourenço
713ece9e88 perf(core): added map to cache scan from prototype 2023-02-04 10:04:45 -03:00
Mohammad Reza Momeni
4d226e7077 chore: define type for validateFilesOrfile 2023-02-04 15:40:53 +03:30
Mohammad Reza Momeni
212ffe77de chore: use better variable for checking file exist or not exist 2023-02-04 13:12:30 +03:30
Mohammad Reza Momeni
9a5bb3447b refactor: satisfy functional quality in parse-filel.pipe 2023-02-04 12:56:11 +03:30
Simone Vicentini
422eeb9ffa test(core): removed describe.only 2023-02-04 09:15:05 +00:00
Simone Vicentini
ab7cbf35f5 fix(core): 🚑 fix for 11002
Updated logic to determine dep tree durability and staticity and added a ton of tests
2023-02-04 09:12:09 +00:00
Mohammad Reza Momeni
09907ce7e4 refactor: use iterator instead of loop 2023-02-04 12:21:31 +03:30
codytseng
b8702d5dbd fix(core): add global prefix to exclude paths for middleware 2023-02-04 12:17:00 +08:00
Simone Vicentini
5a333d4fa7 fix(core): 🚑 remove extra durable check 2023-02-03 22:38:56 +00:00
Simone Vicentini
c3ad373f91 fix(core): 🚑 Fix for calculating durability of a provider 2023-02-03 22:22:18 +00:00
Tony133
e92ae413f4 chore(websockets): mark facing apis public in websockets 2023-02-03 16:56:49 +01:00
Kamil Mysliwiec
ac6fc6ba9f Merge pull request #11033 from Tony133/chore/mark-facing-apis-public-platform
chore(platform): mark facing apis public adapter express, socket.io, ws
2023-02-03 13:19:17 +01:00
Kamil Mysliwiec
2124bc874c Update renovate.json 2023-02-03 13:02:45 +01:00
Tony133
c79f35c37c chore(testing): remove mark facing apis public 2023-02-03 12:37:40 +01:00
Tony133
b1d53e227b chore(testing): mark facing apis public 2023-02-03 12:27:12 +01:00
Tony133
15e4a5f9f1 chore(platform): mark facing apis public adapter express, socket.io, ws 2023-02-03 12:18:36 +01:00
Kamil Mysliwiec
6ab4b4891c Update Readme.md 2023-02-03 12:05:40 +01:00
Vinícius Lourenço
2d7703af06 chore(core): removed unused object-hash dependency 2023-02-03 08:04:06 -03:00
Vinícius Lourenço
caf056fba5 perf(core): faster module token factory 2023-02-03 08:04:00 -03:00
Kamil Myśliwiec
423b28a8bf chore(@nestjs) publish v9.3.2 release 2023-02-03 12:03:17 +01:00
Kamil Mysliwiec
fe745831d5 Merge pull request #11028 from nestjs/chore/forbid-unknown-values-validation-pipe
chore(common): set forbid unknown values to false by default
2023-02-03 12:01:45 +01:00
Kamil Mysliwiec
20b545bf48 Merge pull request #11031 from nestjs/fix/unwrap-forward-ref
fix(core): unwrap forward ref in module compiler
2023-02-03 11:59:49 +01:00
Kamil Mysliwiec
b92e0e99c7 Merge pull request #11032 from Tony133/chore/mark-facing-apis-public-fastify-adapter
chore(fastify): mark facing apis public fastify
2023-02-03 11:59:40 +01:00
Tony133
d93b77a6ab chore(fastify): mark facing apis public fastify 2023-02-03 11:54:28 +01:00
Kamil Myśliwiec
bb283861fd test: update validation pipe tests 2023-02-03 11:44:34 +01:00
Kamil Myśliwiec
25d0c3f30f Merge branch 'master' into chore/forbid-unknown-values-validation-pipe 2023-02-03 11:35:28 +01:00
Kamil Myśliwiec
c6ebbf7cb8 Merge branch 'master' of https://github.com/nestjs/nest 2023-02-03 11:32:58 +01:00
Kamil Myśliwiec
b73501c1e3 fix(core): unwrap forward ref in module compiler 2023-02-03 11:32:41 +01:00
Kamil Myśliwiec
0e3f9bd527 fix(microservices): add optional chaining to app options - backward compat 2023-02-03 11:32:17 +01:00
Kamil Mysliwiec
452a71bfcf Merge pull request #11026 from nestjs/fix/kafka-client-parallel-messages
fix(microservices): messages emitted before kafka client is ready fail
2023-02-03 10:40:47 +01:00
Kamil Mysliwiec
dac07fafb6 Merge pull request #11027 from meteorlxy/fix/import-common
fix(core): import common package correctly
2023-02-03 10:27:58 +01:00
Kamil Mysliwiec
c7ac493b53 Merge pull request #10390 from CodyTseng/fix-middleware-global-prefix
fix(core): let the middleware can  get the params in the global prefix
2023-02-03 10:24:47 +01:00
Kamil Myśliwiec
7b7b8b9260 chore: 2022 to 2023 2023-02-03 10:22:13 +01:00
Kamil Myśliwiec
f285d7c954 chore: rename to initialied, update unit tests 2023-02-03 10:19:43 +01:00
meteorlxy
c8e129b95c fix(core): import common package correctly 2023-02-03 17:16:16 +08:00
Cody Tseng
6d64d91122 Update packages/core/middleware/route-info-path-extractor.ts
Co-authored-by: Kamil Mysliwiec <mail@kamilmysliwiec.com>
2023-02-03 17:03:01 +08:00
Kamil Myśliwiec
491f132b8e chore(common): set forbid unknown values to false by default 2023-02-03 09:55:12 +01:00
Kamil Myśliwiec
255b9cb8a0 fix(microservices): messages emitted before kafka client is ready fail 2023-02-03 09:43:08 +01:00
Kamil Mysliwiec
03efdce8d6 Merge pull request #11020 from nestjs/fix/kafka-retriable-error-bugs
fix(microservices): pull kafka retriable error from all handlers, laz…
2023-02-03 09:11:20 +01:00
Kamil Myśliwiec
0e84b80138 fix(microservices): fork join event handlers 2023-02-03 08:48:50 +01:00
Kamil Mysliwiec
2aa94cd2c1 Merge pull request #11025 from nestjs/revert-11018-revert-10809-fix/durable-payload-regression
Revert "Revert "fix(core,microservices): inject the context when the tree is not durable""
2023-02-03 08:35:27 +01:00
Kamil Mysliwiec
1cc23f7d9d Revert "Revert "fix(core,microservices): inject the context when the tree is not durable"" 2023-02-03 08:35:13 +01:00
Kamil Myśliwiec
43d0c166d4 fix(microservices): pull kafka retriable error from all handlers, lazy throw 2023-02-02 15:39:45 +01:00
Kamil Mysliwiec
2ed509a0f6 Merge pull request #11019 from nestjs/fix/gracefully-reconnect-rmq
fix(microservices): rmq should gracefully reconnect upon error
2023-02-02 14:46:22 +01:00
Kamil Myśliwiec
9eb3b8903a test: change send to queue spy to a stub 2023-02-02 14:25:38 +01:00
Kamil Mysliwiec
4ad3cbc6a6 Merge pull request #11018 from nestjs/revert-10809-fix/durable-payload-regression
Revert "fix(core,microservices): inject the context when the tree is not durable"
2023-02-02 13:40:17 +01:00
Kamil Myśliwiec
754d1daebc fix(microservices): rmq should gracefully reconnect upon error 2023-02-02 13:35:40 +01:00
Kamil Mysliwiec
da708c7216 Merge pull request #10474 from tuxmachine/fix/8469-fastify-errors-content-type
Fix Content-Type for unexpected errors in Fastify
2023-02-02 13:34:49 +01:00
Kamil Mysliwiec
9141d245a8 Revert "fix(core,microservices): inject the context when the tree is not durable" 2023-02-02 13:06:19 +01:00
Kamil Mysliwiec
77ec351c1f Merge pull request #11012 from nestjs/dependabot/npm_and_yarn/sample/31-graphql-federation-code-first/gateway/http-cache-semantics-4.1.1
chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /sample/31-graphql-federation-code-first/gateway
2023-02-02 11:58:57 +01:00
dependabot[bot]
416ec6938a chore(deps): bump http-cache-semantics
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/commits)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 10:57:34 +00:00
Kamil Mysliwiec
ae1fdfb52a Merge pull request #11015 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/gateway/http-cache-semantics-4.1.1
chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /sample/32-graphql-federation-schema-first/gateway
2023-02-02 11:56:47 +01:00
dependabot[bot]
29a18ef5d7 chore(deps): bump http-cache-semantics
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/commits)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 10:56:36 +00:00
Kamil Mysliwiec
c46cb29638 Merge pull request #11005 from nestjs/dependabot/npm_and_yarn/graphql-tools-8.3.17
chore(deps-dev): bump graphql-tools from 8.3.16 to 8.3.17
2023-02-02 11:55:59 +01:00
Kamil Mysliwiec
8ce73f3544 Merge pull request #11013 from nestjs/dependabot/npm_and_yarn/sample/31-graphql-federation-code-first/posts-application/http-cache-semantics-4.1.1
chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /sample/31-graphql-federation-code-first/posts-application
2023-02-02 11:55:52 +01:00
Kamil Mysliwiec
ff2684c217 Merge pull request #11014 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/posts-application/http-cache-semantics-4.1.1
chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /sample/32-graphql-federation-schema-first/posts-application
2023-02-02 11:55:43 +01:00
dependabot[bot]
61fce51212 chore(deps): bump http-cache-semantics
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/commits)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 10:54:24 +00:00
dependabot[bot]
0b6e59ba46 chore(deps): bump http-cache-semantics
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/commits)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 10:54:19 +00:00
Kamil Mysliwiec
cba648b166 Merge pull request #11016 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/users-application/http-cache-semantics-4.1.1
chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /sample/32-graphql-federation-schema-first/users-application
2023-02-02 11:53:45 +01:00
Kamil Mysliwiec
dad667988c Merge pull request #11017 from nestjs/dependabot/npm_and_yarn/http-cache-semantics-4.1.1
chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1
2023-02-02 11:53:38 +01:00
Kamil Mysliwiec
db7501f7b4 Merge pull request #11011 from nestjs/dependabot/npm_and_yarn/sample/31-graphql-federation-code-first/users-application/http-cache-semantics-4.1.1
chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 in /sample/31-graphql-federation-code-first/users-application
2023-02-02 11:53:22 +01:00
dependabot[bot]
82930ee86d chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/commits)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 10:42:14 +00:00
Kamil Mysliwiec
79773fe0ae Merge pull request #11004 from nestjs/dependabot/npm_and_yarn/tslib-2.5.0
chore(deps): bump tslib from 2.4.1 to 2.5.0
2023-02-02 11:41:19 +01:00
dependabot[bot]
2c1c2a0f61 chore(deps): bump http-cache-semantics
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/commits)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 10:41:15 +00:00
dependabot[bot]
412b60bf59 chore(deps): bump http-cache-semantics
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/commits)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 10:41:08 +00:00
Kamil Mysliwiec
d860e44b8a Merge pull request #11006 from nestjs/dependabot/npm_and_yarn/redis-4.6.4
chore(deps-dev): bump redis from 4.5.1 to 4.6.4
2023-02-02 11:41:06 +01:00
Kamil Mysliwiec
e316f6cd0e Merge pull request #11007 from nestjs/dependabot/npm_and_yarn/core-js-3.27.2
chore(deps-dev): bump core-js from 3.27.1 to 3.27.2
2023-02-02 11:40:59 +01:00
Kamil Mysliwiec
e9b02dd833 Merge pull request #11008 from nestjs/dependabot/npm_and_yarn/mongoose-6.9.0
chore(deps-dev): bump mongoose from 6.8.4 to 6.9.0
2023-02-02 11:40:52 +01:00
Kamil Mysliwiec
32af34f226 Merge pull request #11003 from nestjs/dependabot/npm_and_yarn/typescript-4.9.5
chore(deps-dev): bump typescript from 4.9.4 to 4.9.5
2023-02-02 11:40:29 +01:00
Kamil Mysliwiec
664510a1b4 Merge pull request #11001 from bittlerr/nats-server-debug-messages-filter
refactor(microservices): use switch case for types of statuses in server
2023-02-02 08:45:32 +01:00
codytseng
5e5828ba12 refactor: delete unused import 2023-02-02 15:15:54 +08:00
dependabot[bot]
dd72da7294 chore(deps-dev): bump mongoose from 6.8.4 to 6.9.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.8.4 to 6.9.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.8.4...6.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 00:28:39 +00:00
dependabot[bot]
3c932e33bc chore(deps-dev): bump core-js from 3.27.1 to 3.27.2
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.27.1 to 3.27.2.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.27.2/packages/core-js)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 00:25:00 +00:00
dependabot[bot]
a86fafed14 chore(deps-dev): bump redis from 4.5.1 to 4.6.4
Bumps [redis](https://github.com/redis/node-redis) from 4.5.1 to 4.6.4.
- [Release notes](https://github.com/redis/node-redis/releases)
- [Changelog](https://github.com/redis/node-redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/node-redis/compare/redis@4.5.1...redis@4.6.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 00:21:41 +00:00
dependabot[bot]
a99846b817 chore(deps-dev): bump graphql-tools from 8.3.16 to 8.3.17
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 8.3.16 to 8.3.17.
- [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@8.3.17/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>
2023-02-02 00:13:36 +00:00
dependabot[bot]
d45b16e791 chore(deps): bump tslib from 2.4.1 to 2.5.0
Bumps [tslib](https://github.com/Microsoft/tslib) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/Microsoft/tslib/releases)
- [Commits](https://github.com/Microsoft/tslib/compare/2.4.1...2.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 00:10:48 +00:00
dependabot[bot]
15ac489573 chore(deps-dev): bump typescript from 4.9.4 to 4.9.5
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.4 to 4.9.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.4...v4.9.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 00:04:49 +00:00
Vinícius Lourenço
ccbb604fc2 perf(core): better performance to get method names 2023-02-01 18:56:42 -03:00
Constantin Cuciurcă
1f327efd03 refactor(microservices): use switch case for types of statuses in server 2023-02-01 20:10:30 +02:00
codytseng
c6dbc05bb6 refactor: MiddlewareModule constructor parameters 2023-02-01 23:22:02 +08:00
codytseng
33fe1d0337 fix: duplicate identifier 2023-02-01 22:41:24 +08:00
codytseng
25dd621132 Merge branch 'master' into fix-middleware-global-prefix 2023-02-01 22:36:47 +08:00
Kamil Myśliwiec
d9c394bb44 chore(@nestjs) publish v9.3.1 release 2023-02-01 15:33:21 +01:00
Kamil Myśliwiec
91f7190b07 fix(common): drop class-validator imports 2023-02-01 15:32:46 +01:00
Kamil Myśliwiec
0a4f9419d8 chore: update package.json version 2023-02-01 15:04:22 +01:00
Kamil Myśliwiec
eba8f15683 chore(@nestjs) publish v9.3.0 release 2023-02-01 15:00:02 +01:00
Kamil Mysliwiec
2310c56f4c Merge pull request #10997 from nestjs/dependabot/npm_and_yarn/sample/04-grpc/json5-1.0.2
chore(deps): bump json5 from 1.0.1 to 1.0.2 in /sample/04-grpc
2023-02-01 14:58:03 +01:00
Kamil Mysliwiec
06ea451f1f Merge pull request #11000 from nestjs/dependabot/npm_and_yarn/sample/01-cats-app/json5-1.0.2
chore(deps): bump json5 from 1.0.1 to 1.0.2 in /sample/01-cats-app
2023-02-01 14:57:57 +01:00
dependabot[bot]
b2c55a6f79 chore(deps): bump json5 from 1.0.1 to 1.0.2 in /sample/01-cats-app
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-01 13:35:50 +00:00
dependabot[bot]
3d366ce5c5 chore(deps): bump json5 from 1.0.1 to 1.0.2 in /sample/04-grpc
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-01 13:35:48 +00:00
Kamil Mysliwiec
f7e366600f Merge pull request #10999 from nestjs/dependabot/npm_and_yarn/sample/02-gateways/json5-1.0.2
chore(deps): bump json5 from 1.0.1 to 1.0.2 in /sample/02-gateways
2023-02-01 14:35:10 +01:00
Kamil Mysliwiec
55bc840edb Merge pull request #10998 from nestjs/dependabot/npm_and_yarn/sample/03-microservices/json5-1.0.2
chore(deps): bump json5 from 1.0.1 to 1.0.2 in /sample/03-microservices
2023-02-01 14:35:03 +01:00
Kamil Mysliwiec
22c3175552 Merge pull request #10982 from Inoir/fix/kafka-rpc-exception-stall
fix: kafka rpc exception not resolved
2023-02-01 14:31:43 +01:00
Kamil Myśliwiec
c1815d2f8c fix: revert #10801 2023-02-01 14:29:21 +01:00
Dominik Koller
34654244a7 put resolve in else block 2023-02-01 14:10:57 +01:00
Kamil Myśliwiec
2924c03aa3 fix: apply uuid factory strategy in testing module, update snapshots 2023-02-01 14:03:05 +01:00
Kamil Myśliwiec
d1ec9db5f2 fix(core): revert the original metadata scanner 2023-02-01 13:47:38 +01:00
Kamil Myśliwiec
cb7e10dbc3 Merge branch 'master' of https://github.com/nestjs/nest 2023-02-01 13:40:38 +01:00
Kamil Myśliwiec
511e7162a6 style: fix lint errors, ignore js and d.ts files 2023-02-01 13:40:29 +01:00
Kamil Mysliwiec
32b0d9c600 Merge pull request #10737 from mahkassem/Parse-File-Pipe-Fix
Parse file pipe fix (multiple files validation)
2023-02-01 13:20:06 +01:00
Kamil Mysliwiec
967a136834 Merge pull request #10201 from nkitku/patch-1
Fix HTTPException on minifying class names, its not match regex expre…
2023-02-01 13:17:30 +01:00
dependabot[bot]
1aadd30f46 chore(deps): bump json5 from 1.0.1 to 1.0.2 in /sample/02-gateways
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-01 12:16:41 +00:00
dependabot[bot]
ae76b521d6 chore(deps): bump json5 from 1.0.1 to 1.0.2 in /sample/03-microservices
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-01 12:16:27 +00:00
Kamil Mysliwiec
38c365215a Merge pull request #10531 from ChrisiPK/patch-logger-error-call
fix(common): correct order for logger error parameters
2023-02-01 13:14:17 +01:00
Kamil Mysliwiec
80b8c86c68 Merge pull request #10557 from weal1312/fix/cache_manager_store
fix(common): CacheStoreFactory type
2023-02-01 13:10:07 +01:00
Kamil Myśliwiec
8756ed3d68 Merge branch 'e-dot-master' 2023-02-01 13:09:27 +01:00
Dominik Koller
0b395d1f59 resolve on error 2023-02-01 03:07:35 +01:00
Mahmoud Kassem
452f19461c fix(parse-file): remove object case 2022-12-08 08:23:08 +02:00
Mahmoud Kassem
7792c43b93 fix(parse-file): multi files validation 2022-12-07 23:17:27 +02:00
codytseng
a1f17e2271 refactor: rename getPaths to extractPathsFrom 2022-11-24 21:34:45 +08:00
codytseng
ecba3bafde refactor: create a separate class to retrieve the paths 2022-11-24 14:37:59 +08:00
codytseng
daa2054000 style: keep up with current standards 2022-11-24 11:49:42 +08:00
codytseng
151a67b752 refactor: applicationConfig instead (instance as any).config 2022-11-24 09:32:09 +08:00
codytseng
60772c39e1 feat: use mapToExcludeRoute() when set global prefix 2022-11-23 22:34:25 +08:00
codytseng
7d1fa9a216 test: global prefix options 2022-11-23 18:23:00 +08:00
codytseng
758cd2d8b1 refactor: wrap get paths logic into a private function 2022-11-23 18:18:32 +08:00
codytseng
fdc5f34219 feat: move test 2022-11-23 16:07:13 +08:00
Cody Tseng
d5f434ce75 Merge branch 'nestjs:master' into fix-middleware-global-prefix 2022-11-20 01:07:44 +08:00
codytseng
4a27d263c5 test: update the middleware get the params from global prefix test 2022-11-20 00:25:59 +08:00
codytseng
cc7e829804 feat: version-aware middleware 2022-11-19 18:11:09 +08:00
codytseng
4c4c13bf84 Merge branch 'master' into fix-middleware-global-prefix 2022-11-15 22:38:42 +08:00
weal1312
d6097a10ac fix(common): CacheStoreFactory type 2022-11-12 04:04:56 +08:00
ChrisiPK
584015bc77 fix(common): correct order for logger error parameters
The error() function of a logger has two optional parameters: the trace and the context. The logger
now no longer passes the global context as the first optional parameter when there are is no value
supplied for the trace parameter. Instead, the trace parameter is passed as undefined and the
context is passed as the second optional parameter.

This fixes a bug where the trace is overwritten by the context when passed to custom loggers.
Fixes gremo/nest-winston#473
2022-11-07 21:28:41 +00:00
Rick Dutour Geerling
61d25beae0 fix(fastify): always return errors as application/json
If user overrides the Content-Type but doesn't add a custom exception
filter to handle errors, then Nest will respond with a JSON error
object. We should ensure the Content-Type header matches the body
in this case.
2022-10-31 12:09:25 +01:00
Rick Dutour Geerling
ddf3301d49 fix(express): always return errors as application/json
If user overrides the Content-Type but doesn't add a custom exception
filter to handle errors, then Nest will respond with a JSON error
object. We should ensure the Content-Type header matches the body
in this case.
2022-10-31 12:09:24 +01:00
codytseng
3d1632693c style(core): add missing period 2022-10-15 11:08:25 +08:00
codytseng
c437ac97d0 fix(core): add leading slash to excluded paths 2022-10-15 10:50:25 +08:00
codytseng
b7f458f3fe test: add the middleware get the params from global prefix test 2022-10-11 15:33:36 +08:00
codytseng
75d5d64ec7 fix(core): let the middleware can get the params in the global prefix 2022-10-10 22:56:30 +08:00
nkitku
f3e6c54b3e Fix HTTPException on minifying class names, its not match regex expression
```js
"BadRequest".match(/[A-Z][a-z]+|[0-9]+/g).join(' ') // this is ok 
// but on minify 
"t".match(/[A-Z][a-z]+|[0-9]+/g).join(' ') // throws error
// Uncaught TypeError: Cannot read properties of null (reading 'join')
```
2022-08-30 11:47:26 +05:30
313 changed files with 44539 additions and 45195 deletions

View File

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

View File

@@ -57,7 +57,7 @@ body:
required: true
attributes:
label: "Expected behavior"
description: "A clear and concise description of what you expected to happend (or code)"
description: "A clear and concise description of what you expected to happened (or code)"
- type: markdown
attributes:

View File

@@ -74,7 +74,7 @@ body:
required: true
attributes:
label: "Expected behavior"
description: "A clear and concise description of what you expected to happend (or code)"
description: "A clear and concise description of what you expected to happened (or code)"
- type: textarea
attributes:

View File

@@ -11,7 +11,6 @@
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>

View File

@@ -0,0 +1,35 @@
import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { CustomTtlModule } from '../src/custom-ttl/custom-ttl.module';
describe('Caching Custom TTL', () => {
let server;
let app: INestApplication;
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [CustomTtlModule],
}).compile();
app = module.createNestApplication();
server = app.getHttpServer();
await app.init();
});
it('should return a differnt value after the TTL is elapsed', async () => {
await request(server).get('/').expect(200, '0');
await new Promise(resolve => setTimeout(resolve, 500));
await request(server).get('/').expect(200, '1');
});
it('should return the cached value within the TTL', async () => {
await request(server).get('/').expect(200, '0');
await new Promise(resolve => setTimeout(resolve, 200));
await request(server).get('/').expect(200, '0');
});
afterEach(async () => {
await app.close();
});
});

View File

@@ -0,0 +1,20 @@
import {
CacheInterceptor,
CacheTTL,
Controller,
Get,
UseInterceptors,
} from '@nestjs/common';
@Controller()
export class CustomTtlController {
counter = 0;
constructor() {}
@Get()
@CacheTTL(500)
@UseInterceptors(CacheInterceptor)
getNumber() {
return this.counter++;
}
}

View File

@@ -0,0 +1,8 @@
import { CacheModule, Module } from '@nestjs/common';
import { CustomTtlController } from './custom-ttl.controller';
@Module({
imports: [CacheModule.register()],
controllers: [CustomTtlController],
})
export class CustomTtlModule {}

View File

@@ -0,0 +1,40 @@
{
"compilerOptions": {
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es6",
"sourceMap": true,
"allowJs": 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

@@ -50,7 +50,7 @@ services:
zookeeper:
container_name: test-zookeeper
hostname: zookeeper
image: confluentinc/cp-zookeeper:7.0.1
image: confluentinc/cp-zookeeper:7.3.2
ports:
- "2181:2181"
environment:

View File

@@ -30,8 +30,8 @@ describe('GraphQL Pipes', () => {
errors: [
{
extensions: {
code: 'BAD_USER_INPUT',
response: {
code: 'BAD_REQUEST',
originalError: {
error: 'Bad Request',
message: [
'description must be longer than or equal to 30 characters',
@@ -39,7 +39,14 @@ describe('GraphQL Pipes', () => {
statusCode: 400,
},
},
locations: [
{
column: 3,
line: 2,
},
],
message: 'Bad Request Exception',
path: ['addRecipe'],
},
],
});

View File

@@ -15,7 +15,7 @@ scalar Date
type Query {
recipe(id: String!): Recipe!
recipes(skip: Int = 0, take: Int = 25): [Recipe!]!
recipes(skip: Int! = 0, take: Int! = 25): [Recipe!]!
}
type Mutation {
@@ -31,4 +31,4 @@ input NewRecipeInput {
type Subscription {
recipeAdded: Recipe!
}
}

View File

@@ -9,7 +9,7 @@ import { RecipesModule } from './recipes/recipes.module';
RecipesModule,
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
debug: false,
includeStacktraceInErrorResponses: false,
installSubscriptionHandlers: true,
autoSchemaFile: join(
process.cwd(),

View File

@@ -1,9 +1,9 @@
import { ValidationPipe } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './app.module';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
const app = await NestFactory.create(AppModule);
app.useGlobalPipes(new ValidationPipe());
await app.listen(3000);
}

View File

@@ -9,6 +9,7 @@ import { CatsModule } from './cats/cats.module';
CatsModule,
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
includeStacktraceInErrorResponses: true,
typePaths: [join(__dirname, '**', '*.graphql')],
}),
],

View File

@@ -1,39 +1,134 @@
import { HttpStatus, INestApplication } from '@nestjs/common';
import { HttpServer, HttpStatus, INestApplication } from '@nestjs/common';
import {
FastifyAdapter,
NestFastifyApplication,
} from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
import { ErrorsController } from '../src/errors/errors.controller';
describe('Error messages', () => {
let server;
let app: INestApplication;
let server: HttpServer;
beforeEach(async () => {
const module = await Test.createTestingModule({
controllers: [ErrorsController],
}).compile();
describe('Express', () => {
let app: INestApplication;
beforeEach(async () => {
const module = await Test.createTestingModule({
controllers: [ErrorsController],
}).compile();
app = module.createNestApplication();
server = app.getHttpServer();
await app.init();
});
app = module.createNestApplication();
server = app.getHttpServer();
await app.init();
});
it(`/GET`, () => {
return request(server).get('/sync').expect(HttpStatus.BAD_REQUEST).expect({
statusCode: 400,
error: 'Bad Request',
message: 'Integration test',
it(`/GET`, () => {
return request(server)
.get('/sync')
.expect(HttpStatus.BAD_REQUEST)
.expect({
statusCode: 400,
error: 'Bad Request',
message: 'Integration test',
});
});
it(`/GET (Promise/async)`, () => {
return request(server)
.get('/async')
.expect(HttpStatus.BAD_REQUEST)
.expect({
statusCode: 400,
error: 'Bad Request',
message: 'Integration test',
});
});
it(`/GET (InternalServerError despite custom content-type)`, async () => {
return request(server)
.get('/unexpected-error')
.expect(HttpStatus.INTERNAL_SERVER_ERROR)
.expect({
statusCode: 500,
message: 'Internal server error',
});
});
afterEach(async () => {
await app.close();
});
});
it(`/GET (Promise/async)`, () => {
return request(server).get('/async').expect(HttpStatus.BAD_REQUEST).expect({
statusCode: 400,
error: 'Bad Request',
message: 'Integration test',
});
});
describe('Fastify', () => {
let app: NestFastifyApplication;
beforeEach(async () => {
const module = await Test.createTestingModule({
controllers: [ErrorsController],
}).compile();
afterEach(async () => {
await app.close();
app = module.createNestApplication<NestFastifyApplication>(
new FastifyAdapter(),
);
server = app.getHttpServer();
await app.init();
});
it(`/GET`, async () => {
return app
.inject({
method: 'GET',
url: '/sync',
})
.then(({ payload, statusCode }) => {
expect(statusCode).to.equal(HttpStatus.BAD_REQUEST);
expect(payload).to.equal(
JSON.stringify({
statusCode: 400,
error: 'Bad Request',
message: 'Integration test',
}),
);
});
});
it(`/GET (Promise/async)`, async () => {
return app
.inject({
method: 'GET',
url: '/sync',
})
.then(({ payload, statusCode }) => {
expect(statusCode).to.equal(HttpStatus.BAD_REQUEST);
expect(payload).to.equal(
JSON.stringify({
statusCode: 400,
error: 'Bad Request',
message: 'Integration test',
}),
);
});
});
it(`/GET (InternalServerError despite custom content-type)`, async () => {
return app
.inject({
method: 'GET',
url: '/unexpected-error',
})
.then(({ payload, statusCode }) => {
expect(statusCode).to.equal(HttpStatus.INTERNAL_SERVER_ERROR);
expect(payload).to.equal(
JSON.stringify({
statusCode: 500,
message: 'Internal server error',
}),
);
});
});
afterEach(async () => {
await app.close();
});
});
});

View File

@@ -77,6 +77,26 @@ describe('Middleware', () => {
});
});
describe('when using default URI versioning with the global prefix', () => {
beforeEach(async () => {
app = await createAppWithVersioning(
{
type: VersioningType.URI,
defaultVersion: VERSION_NEUTRAL,
},
async (app: INestApplication) => {
app.setGlobalPrefix('api');
},
);
});
it(`forRoutes({ path: '/versioned', version: '1', method: RequestMethod.ALL })`, () => {
return request(app.getHttpServer())
.get('/api/v1/versioned')
.expect(200, VERSIONED_VALUE);
});
});
describe('when using HEADER versioning', () => {
beforeEach(async () => {
app = await createAppWithVersioning({
@@ -133,6 +153,7 @@ describe('Middleware', () => {
async function createAppWithVersioning(
versioningOptions: VersioningOptions,
beforeInit?: (app: INestApplication) => Promise<void>,
): Promise<INestApplication> {
const app = (
await Test.createTestingModule({
@@ -141,6 +162,9 @@ async function createAppWithVersioning(
).createNestApplication();
app.enableVersioning(versioningOptions);
if (beforeInit) {
await beforeInit(app);
}
await app.init();
return app;

View File

@@ -12,6 +12,7 @@ import { AppModule } from '../src/app.module';
const RETURN_VALUE = 'test';
const SCOPED_VALUE = 'test_scoped';
const WILDCARD_VALUE = 'test_wildcard';
const EXCLUDE_VALUE = 'test_exclude';
@Controller()
class TestController {
@@ -24,6 +25,11 @@ class TestController {
wildcard_nested() {
return RETURN_VALUE;
}
@Get('exclude')
exclude() {
return EXCLUDE_VALUE;
}
}
@Module({
@@ -36,8 +42,10 @@ class TestModule {
.apply((req, res, next) => res.send(WILDCARD_VALUE))
.forRoutes('tests/*')
.apply((req, res, next) => res.send(SCOPED_VALUE))
.exclude('exclude')
.forRoutes(TestController)
.apply((req, res, next) => res.send(RETURN_VALUE))
.exclude('exclude')
.forRoutes('*');
}
}
@@ -45,25 +53,34 @@ class TestModule {
describe('Middleware', () => {
let app: INestApplication;
beforeEach(async () => {
app = (
await Test.createTestingModule({
imports: [TestModule],
}).compile()
).createNestApplication();
await app.init();
it(`forRoutes(*)`, async () => {
app = await createApp();
await request(app.getHttpServer()).get('/hello').expect(200, RETURN_VALUE);
await request(app.getHttpServer())
.get('/exclude')
.expect(200, EXCLUDE_VALUE);
});
it(`forRoutes(*)`, () => {
return request(app.getHttpServer()).get('/hello').expect(200, RETURN_VALUE);
it(`forRoutes(*) with global prefix`, async () => {
app = await createApp(app => app.setGlobalPrefix('api'));
await request(app.getHttpServer())
.get('/api/hello')
.expect(200, RETURN_VALUE);
await request(app.getHttpServer())
.get('/api/exclude')
.expect(200, EXCLUDE_VALUE);
});
it(`forRoutes(TestController)`, () => {
return request(app.getHttpServer()).get('/test').expect(200, SCOPED_VALUE);
it(`forRoutes(TestController)`, async () => {
app = await createApp();
await request(app.getHttpServer()).get('/test').expect(200, SCOPED_VALUE);
await request(app.getHttpServer())
.get('/exclude')
.expect(200, EXCLUDE_VALUE);
});
it(`forRoutes(tests/*)`, () => {
it(`forRoutes(tests/*)`, async () => {
app = await createApp();
return request(app.getHttpServer())
.get('/tests/wildcard')
.expect(200, WILDCARD_VALUE);
@@ -73,3 +90,20 @@ describe('Middleware', () => {
await app.close();
});
});
async function createApp(
beforeInit?: (app: INestApplication) => void,
): Promise<INestApplication> {
const app = (
await Test.createTestingModule({
imports: [TestModule],
}).compile()
).createNestApplication();
if (beforeInit) {
beforeInit(app);
}
await app.init();
return app;
}

View File

@@ -1,4 +1,4 @@
import { BadRequestException, Controller, Get } from '@nestjs/common';
import { BadRequestException, Controller, Get, Header } from '@nestjs/common';
@Controller()
export class ErrorsController {
@@ -12,6 +12,12 @@ export class ErrorsController {
this.throwError();
}
@Get('unexpected-error')
@Header('Content-Type', 'application/pdf')
unexpectedError() {
throw new Error();
}
throwError() {
throw new BadRequestException({
statusCode: 400,

View File

@@ -6,7 +6,7 @@ class ServiceInjectingItself {
}
@Injectable()
class ServiceInjectingItselfForwared {
class ServiceInjectingItselfForward {
constructor(
@Inject(forwardRef(() => ServiceInjectingItself))
private readonly coreService: ServiceInjectingItself,
@@ -24,7 +24,7 @@ class ServiceInjectingItselfViaCustomToken {
export class SelfInjectionProviderModule {}
@Module({
providers: [ServiceInjectingItselfForwared],
providers: [ServiceInjectingItselfForward],
})
export class SelfInjectionForwardProviderModule {}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,12 @@
import { ValidationPipe } from '@nestjs/common';
import { Injector } from '@nestjs/core/injector/injector';
import { SerializedGraph } from '@nestjs/core/inspector/serialized-graph';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test, TestingModule } from '@nestjs/testing';
import { expect } from 'chai';
import { readFileSync } from 'fs';
import { readFileSync, writeFileSync } from 'fs';
import { join } from 'path';
import * as sinon from 'sinon';
import { AppModule } from '../src/app.module';
import { HttpExceptionFilter } from '../src/common/filters/http-exception.filter';
import { TimeoutInterceptor } from '../src/common/interceptors/timeout.interceptor';
@@ -13,6 +15,8 @@ describe('Graph inspector', () => {
let testingModule: TestingModule;
before(async () => {
sinon.stub(Injector.prototype as any, 'getNowTimestamp').callsFake(() => 0);
testingModule = await Test.createTestingModule({
imports: [AppModule],
}).compile({ snapshot: true });
@@ -22,10 +26,10 @@ describe('Graph inspector', () => {
const graph = testingModule.get(SerializedGraph);
// Update snapshot:
// writeFileSync(
// join(__dirname, 'fixtures', 'pre-init-graph.json'),
// graph.toString(),
// );
writeFileSync(
join(__dirname, 'fixtures', 'pre-init-graph.json'),
graph.toString(),
);
const snapshot = readFileSync(
join(__dirname, 'fixtures', 'pre-init-graph.json'),
@@ -41,16 +45,19 @@ describe('Graph inspector', () => {
app.useGlobalFilters(new HttpExceptionFilter());
app.useGlobalInterceptors(new TimeoutInterceptor());
app.enableVersioning();
app.connectMicroservice({ transport: Transport.TCP, options: {} });
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.TCP,
options: {},
});
await app.init();
const graph = testingModule.get(SerializedGraph);
// Update snapshot:
// writeFileSync(
// join(__dirname, 'fixtures', 'post-init-graph.json'),
// graph.toString(),
// );
writeFileSync(
join(__dirname, 'fixtures', 'post-init-graph.json'),
graph.toString(),
);
const snapshot = readFileSync(
join(__dirname, 'fixtures', 'post-init-graph.json'),

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { MqttBroadcastController } from '../src/mqtt/mqtt-broadcast.controller';
@@ -16,13 +16,13 @@ describe('MQTT transport', () => {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.MQTT,
options: {
host: '0.0.0.0',
},
});
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.MQTT,
options: {
host: '0.0.0.0',

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { NatsBroadcastController } from '../src/nats/nats-broadcast.controller';
@@ -16,13 +16,13 @@ describe('NATS transport', () => {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.NATS,
options: {
servers: 'nats://0.0.0.0:4222',
},
});
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.NATS,
options: {
servers: 'servers://0.0.0.0:4222',

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { RedisBroadcastController } from '../src/redis/redis-broadcast.controller';
@@ -16,16 +16,18 @@ describe('REDIS transport', () => {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.REDIS,
options: {
url: 'redis://0.0.0.0:6379',
host: '0.0.0.0',
port: 6379,
},
});
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.REDIS,
options: {
url: 'redis://0.0.0.0:6379',
host: '0.0.0.0',
port: 6379,
},
});
await app.startAllMicroservices();

View File

@@ -1,5 +1,5 @@
import { INestApplication, Logger } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { Admin, ITopicMetadata, Kafka } from 'kafkajs';
import * as request from 'supertest';
@@ -37,7 +37,7 @@ describe.skip('Kafka concurrent', function () {
const server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.KAFKA,
options: {
client: {

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { MqttController } from '../src/mqtt/mqtt.controller';
@@ -16,7 +16,7 @@ describe('MQTT transport', () => {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.MQTT,
options: {
url: 'mqtt://0.0.0.0:1883',

View File

@@ -1,7 +1,7 @@
import * as GRPC from '@grpc/grpc-js';
import * as ProtoLoader from '@grpc/proto-loader';
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { ExpressAdapter } from '@nestjs/platform-express';
import { Test } from '@nestjs/testing';
import { fail } from 'assert';
@@ -26,7 +26,7 @@ describe('Advanced GRPC transport', () => {
/*
* Create microservice configuration
*/
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.GRPC,
options: {
url: 'localhost:5001',

View File

@@ -1,7 +1,7 @@
import * as GRPC from '@grpc/grpc-js';
import * as ProtoLoader from '@grpc/proto-loader';
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { fail } from 'assert';
import { expect } from 'chai';
@@ -22,7 +22,7 @@ describe('GRPC transport', () => {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.GRPC,
options: {
package: ['math', 'math2'],

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
@@ -29,7 +29,7 @@ describe.skip('Kafka transport', function () {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.KAFKA,
options: {
client: {

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
@@ -17,7 +17,7 @@ describe('MQTT transport', () => {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.MQTT,
options: {
url: 'mqtt://0.0.0.0:1883',

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
@@ -19,7 +19,7 @@ describe('NATS transport', () => {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.NATS,
options: {
servers: 'nats://0.0.0.0:4222',

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
@@ -17,10 +17,11 @@ describe('REDIS transport', () => {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.REDIS,
options: {
url: 'redis://0.0.0.0:6379',
host: '0.0.0.0',
port: 6379,
},
});
await app.startAllMicroservices();

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
@@ -17,7 +17,7 @@ describe('RabbitMQ transport', () => {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.RMQ,
options: {
urls: [`amqp://0.0.0.0:5672`],

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
@@ -18,7 +18,7 @@ describe('RPC transport', () => {
app = module.createNestApplication();
server = app.getHttpAdapter().getInstance();
app.connectMicroservice({
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.TCP,
options: {
host: '0.0.0.0',

View File

@@ -119,6 +119,17 @@ describe('Global prefix', () => {
await request(server).get('/api/v1/middleware/foo').expect(404);
});
it(`should get the params in the global prefix`, async () => {
app.setGlobalPrefix('/api/:tenantId');
server = app.getHttpServer();
await app.init();
await request(server)
.get('/api/test/params')
.expect(200, { '0': 'params', tenantId: 'test' });
});
afterEach(async () => {
await app.close();
});

View File

@@ -7,6 +7,11 @@ export class AppController {
return 'Hello: ' + req.extras?.data;
}
@Get('params')
getParams(@Req() req): any {
return req.middlewareParams;
}
@Get('health')
getHealth(): string {
return 'up';

View File

@@ -22,6 +22,11 @@ export class AppModule {
req.extras = { data: 'Data attached in middleware' };
next();
})
.forRoutes({ path: '*', method: RequestMethod.GET })
.apply((req, res, next) => {
req.middlewareParams = req.params;
next();
})
.forRoutes({ path: '*', method: RequestMethod.GET });
}
}

View File

@@ -1,5 +1,5 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
@@ -31,7 +31,7 @@ describe('Request scope (microservices)', () => {
}).compile();
app = module.createNestApplication();
app.connectMicroservice({ transport: Transport.TCP });
app.connectMicroservice<MicroserviceOptions>({ transport: Transport.TCP });
server = app.getHttpServer();
await app.init();

View File

@@ -32,7 +32,7 @@ export const sendHttpRequest = async (url: URL) => {
res.on('data', chunk => {
// no op
});
// fail the test if somethin goes wrong
// fail the test if something goes wrong
res.on('error', err => {
reject(err);
});

View File

@@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "9.3.0-beta.3"
"version": "9.3.10"
}

2308
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "9.1.2",
"version": "9.3.7",
"description": "Modern, fast, powerful node.js web framework",
"homepage": "https://nestjs.com",
"repository": {
@@ -64,7 +64,7 @@
"cli-color": "2.0.3",
"cors": "2.8.5",
"express": "4.18.2",
"fast-json-stringify": "5.5.0",
"fast-json-stringify": "5.6.2",
"fast-safe-stringify": "2.1.1",
"graphql-subscriptions": "2.0.0",
"iterare": "1.2.1",
@@ -72,25 +72,26 @@
"path-to-regexp": "3.2.0",
"reflect-metadata": "0.1.13",
"rxjs": "7.8.0",
"socket.io": "4.5.4",
"tslib": "2.4.1",
"socket.io": "4.6.1",
"tslib": "2.5.0",
"uid": "2.0.1",
"uuid": "9.0.0"
},
"devDependencies": {
"@apollo/server": "4.5.0",
"@codechecks/client": "0.1.12",
"@commitlint/cli": "17.4.2",
"@commitlint/config-angular": "17.4.2",
"@commitlint/cli": "17.4.4",
"@commitlint/config-angular": "17.4.4",
"@fastify/cors": "^8.0.0",
"@fastify/formbody": "7.4.0",
"@fastify/middie": "8.1.0",
"@fastify/multipart": "7.4.0",
"@fastify/static": "6.8.0",
"@fastify/multipart": "7.5.0",
"@fastify/static": "6.9.0",
"@fastify/view": "7.4.1",
"@grpc/grpc-js": "1.8.7",
"@grpc/proto-loader": "0.7.4",
"@nestjs/apollo": "10.1.7",
"@nestjs/graphql": "10.1.7",
"@grpc/grpc-js": "1.8.12",
"@grpc/proto-loader": "0.7.5",
"@nestjs/apollo": "11.0.3",
"@nestjs/graphql": "11.0.0",
"@nestjs/mongoose": "9.2.1",
"@nestjs/typeorm": "9.0.1",
"@types/amqplib": "0.10.1",
@@ -98,24 +99,22 @@
"@types/chai": "4.3.4",
"@types/chai-as-promised": "7.1.5",
"@types/cors": "2.8.13",
"@types/express": "4.17.16",
"@types/express": "4.17.17",
"@types/gulp": "4.0.10",
"@types/http-errors": "2.0.1",
"@types/mocha": "10.0.1",
"@types/node": "18.11.18",
"@types/node": "18.15.3",
"@types/sinon": "10.0.13",
"@types/supertest": "2.0.12",
"@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"amqp-connection-manager": "4.1.10",
"amqp-connection-manager": "4.1.11",
"amqplib": "0.10.3",
"apollo-server-core": "3.11.1",
"apollo-server-express": "3.11.1",
"artillery": "1.7.9",
"body-parser": "1.20.1",
"body-parser": "1.20.2",
"bytes": "3.1.2",
"cache-manager": "5.1.4",
"cache-manager": "5.1.7",
"cache-manager-redis-store": "3.0.1",
"chai": "4.3.7",
"chai-as-promised": "7.1.1",
@@ -123,18 +122,18 @@
"commitlint-circle": "1.0.0",
"concurrently": "7.6.0",
"conventional-changelog": "3.1.25",
"core-js": "3.27.1",
"core-js": "3.29.1",
"coveralls": "3.1.1",
"delete-empty": "3.0.0",
"engine.io-client": "6.3.0",
"engine.io-client": "6.4.0",
"eslint": "7.32.0",
"eslint-config-prettier": "8.6.0",
"eslint-config-prettier": "8.7.0",
"eslint-plugin-import": "2.27.5",
"eventsource": "2.0.2",
"fancy-log": "2.0.0",
"fastify": "4.12.0",
"graphql": "15.8.0",
"graphql-tools": "8.3.16",
"fastify": "4.14.1",
"graphql": "16.6.0",
"graphql-tools": "8.3.19",
"gulp": "4.0.2",
"gulp-clang-format": "1.0.27",
"gulp-clean": "0.4.0",
@@ -144,37 +143,37 @@
"http-errors": "2.0.0",
"husky": "8.0.3",
"imports-loader": "4.0.1",
"ioredis": "5.3.0",
"ioredis": "5.3.1",
"json-loader": "0.5.7",
"kafkajs": "2.2.3",
"kafkajs": "2.2.4",
"lerna": "2.11.0",
"lerna-changelog": "2.2.0",
"light-my-request": "5.8.0",
"lint-staged": "13.1.0",
"light-my-request": "5.9.1",
"lint-staged": "13.2.0",
"markdown-table": "2.0.0",
"merge-graphql-schemas": "1.7.8",
"mocha": "10.2.0",
"mongoose": "6.8.4",
"mongoose": "6.10.3",
"mqtt": "4.3.7",
"multer": "1.4.4",
"mysql2": "3.1.0",
"nats": "2.11.0",
"nodemon": "2.0.20",
"mysql2": "3.2.0",
"nats": "2.13.1",
"nodemon": "2.0.21",
"nyc": "15.1.0",
"prettier": "2.8.3",
"redis": "4.5.1",
"prettier": "2.8.4",
"redis": "4.6.5",
"rxjs-compat": "6.6.7",
"sinon": "15.0.1",
"sinon": "15.0.2",
"sinon-chai": "3.7.0",
"socket.io-client": "4.5.4",
"socket.io-client": "4.6.1",
"subscriptions-transport-ws": "0.11.0",
"supertest": "6.3.3",
"ts-morph": "17.0.1",
"ts-node": "10.9.1",
"typeorm": "0.3.11",
"typescript": "4.9.4",
"typeorm": "0.3.12",
"typescript": "4.9.5",
"wrk": "1.2.1",
"ws": "8.12.0"
"ws": "8.13.0"
},
"engines": {
"node": ">= 12.9.0"

View File

@@ -11,7 +11,6 @@
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>

View File

@@ -1,6 +1,7 @@
import { Observable, of } from 'rxjs';
import { tap } from 'rxjs/operators';
import { Inject, Injectable, Optional } from '../../decorators';
import { StreamableFile } from '../../file-stream';
import {
CallHandler,
ExecutionContext,
@@ -8,7 +9,8 @@ import {
NestInterceptor,
} from '../../interfaces';
import { Logger } from '../../services/logger.service';
import { isFunction, isNil } from '../../utils/shared.utils';
import { loadPackage } from '../../utils/load-package.util';
import { isFunction, isNil, isNumber } from '../../utils/shared.utils';
import {
CACHE_KEY_METADATA,
CACHE_MANAGER,
@@ -34,10 +36,22 @@ export class CacheInterceptor implements NestInterceptor {
protected readonly httpAdapterHost: HttpAdapterHost;
protected allowedMethods = ['GET'];
private cacheManagerIsv5OrGreater: boolean;
constructor(
@Inject(CACHE_MANAGER) protected readonly cacheManager: any,
@Inject(REFLECTOR) protected readonly reflector: any,
) {}
) {
// We need to check if the cache-manager package is v5 or greater
// because the set method signature changed in v5
const cacheManagerPackage = loadPackage(
'cache-manager',
'CacheModule',
() => require('cache-manager'),
);
this.cacheManagerIsv5OrGreater = 'memoryStore' in cacheManagerPackage;
}
async intercept(
context: ExecutionContext,
@@ -58,15 +72,23 @@ export class CacheInterceptor implements NestInterceptor {
const ttl = isFunction(ttlValueOrFactory)
? await ttlValueOrFactory(context)
: ttlValueOrFactory;
return next.handle().pipe(
tap(async response => {
const args = isNil(ttl) ? [key, response] : [key, response, { ttl }];
if (response instanceof StreamableFile) {
return;
}
const args = [key, response];
if (!isNil(ttl)) {
args.push(this.cacheManagerIsv5OrGreater ? ttl : { ttl });
}
try {
await this.cacheManager.set(...args);
} catch (err) {
Logger.error(
`An error has occured when inserting "key: ${key}", "value: ${response}"`,
`An error has occurred when inserting "key: ${key}", "value: ${response}"`,
'CacheInterceptor',
);
}

View File

@@ -47,15 +47,17 @@ export interface CacheStoreSetOptions<T> {
*
* @publicApi
*/
export interface CacheStoreFactory {
/**
* Return a configured cache store.
*
* @param args Cache manager options received from `CacheModule.register()`
* or `CacheModule.registerAsync()`
*/
create(args: LiteralObject): CacheStore;
}
export type CacheStoreFactory =
| {
/**
* Return a configured cache store.
*
* @param args Cache manager options received from `CacheModule.register()`
* or `CacheModule.registerAsync()`
*/
create(args: LiteralObject): CacheStore;
}
| ((args: LiteralObject) => CacheStore | Promise<CacheStore>);
/**
* Interface defining Cache Manager configuration options.

View File

@@ -35,7 +35,7 @@ export const ENHANCER_KEY_TO_SUBTYPE_MAP = {
} as const;
export type EnhancerSubtype =
typeof ENHANCER_KEY_TO_SUBTYPE_MAP[keyof typeof ENHANCER_KEY_TO_SUBTYPE_MAP];
(typeof ENHANCER_KEY_TO_SUBTYPE_MAP)[keyof typeof ENHANCER_KEY_TO_SUBTYPE_MAP];
export const RENDER_METADATA = '__renderTemplate__';
export const HTTP_CODE_METADATA = '__httpCode__';
@@ -48,3 +48,4 @@ export const VERSION_METADATA = '__version__';
export const INJECTABLE_WATERMARK = '__injectable__';
export const CONTROLLER_WATERMARK = '__controller__';
export const CATCH_WATERMARK = '__catch__';
export const ENTRY_PROVIDER_WATERMARK = '__entryProvider__';

View File

@@ -69,7 +69,7 @@ export function Controller(): ClassDecorator;
* It defines a class that provides a context for one or more message or event
* handlers.
*
* @param {string, Array} prefix string that defines a `route path prefix`. The prefix
* @param {string|Array} prefix string that defines a `route path prefix`. The prefix
* is pre-pended to the path specified in any request decorator in the class.
*
* @see [Routing](https://docs.nestjs.com/controllers#routing)

View File

@@ -99,9 +99,9 @@ export class HttpException extends Error {
) {
this.message = (this.response as Record<string, any>).message;
} else if (this.constructor) {
this.message = this.constructor.name
.match(/[A-Z][a-z]+|[0-9]+/g)
.join(' ');
this.message =
this.constructor.name.match(/[A-Z][a-z]+|[0-9]+/g)?.join(' ') ??
'Error';
}
}

View File

@@ -1,6 +1,6 @@
/*
* Nest @common
* Copyright(c) 2017 - 2022 Kamil Mysliwiec
* Copyright(c) 2017 - 2023 Kamil Mysliwiec
* https://nestjs.com
* MIT Licensed
*/

View File

@@ -79,7 +79,7 @@ export class ConfigurableModuleBuilder<
/**
* Registers the "extras" object (a set of extra options that can be used to modify the dynamic module definition).
* Values you specify within the "extras" object will be used as default values (that can be overriden by module consumers).
* Values you specify within the "extras" object will be used as default values (that can be overridden by module consumers).
*
* This method also applies the so-called "module definition transform function" that takes the auto-generated
* dynamic module object ("DynamicModule") and the actual consumer "extras" object as input parameters.

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/common",
"version": "9.3.0-beta.3",
"version": "9.3.10",
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
"author": "Kamil Mysliwiec",
"homepage": "https://nestjs.com",
@@ -18,7 +18,7 @@
"license": "MIT",
"dependencies": {
"iterare": "1.2.1",
"tslib": "2.4.1",
"tslib": "2.5.0",
"uid": "2.0.1"
},
"peerDependencies": {

View File

@@ -1,6 +1,7 @@
/**
* Interface describing FileValidators, which can be added to a {@link ParseFilePipe}.
* Interface describing FileValidators, which can be added to a ParseFilePipe
*
* @see {ParseFilePipe}
* @publicApi
*/
export abstract class FileValidator<TValidationOptions = Record<string, any>> {

View File

@@ -7,7 +7,7 @@ export type MaxFileSizeValidatorOptions = {
/**
* Defines the built-in MaxSize File Validator
*
* @see [File Validators](https://docs.nestjs.com/techniques/file-upload#validators)
* @see [File Validators](https://docs.nestjs.com/techniques/file-upload#file-validation)
*
* @publicApi
*/

View File

@@ -1,16 +1,16 @@
import { isUndefined } from '../../utils/shared.utils';
import { Injectable, Optional } from '../../decorators/core';
import { HttpStatus } from '../../enums';
import { PipeTransform } from '../../interfaces/features/pipe-transform.interface';
import { HttpErrorByCode } from '../../utils/http-error-by-code.util';
import { isEmpty, isObject, isUndefined } from '../../utils/shared.utils';
import { FileValidator } from './file-validator.interface';
import { ParseFileOptions } from './parse-file-options.interface';
/**
* Defines the built-in ParseFile Pipe. This pipe can be used to validate incoming files
* with `@UploadedFile()` decorator. You can use either other specific built-in validators
* or provide one of your own, simply implementing it through {@link FileValidator}
* interface and adding it to ParseFilePipe's constructor.
* or provide one of your own, simply implementing it through FileValidator interface
* and adding it to ParseFilePipe's constructor.
*
* @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes)
*
@@ -39,25 +39,36 @@ export class ParseFilePipe implements PipeTransform<any> {
}
async transform(value: any): Promise<any> {
if (isUndefined(value)) {
if (this.fileIsRequired) {
throw this.exceptionFactory('File is required');
}
const areThereAnyFilesIn = this.thereAreNoFilesIn(value);
return value;
if (areThereAnyFilesIn && this.fileIsRequired) {
throw this.exceptionFactory('File is required');
}
if (!areThereAnyFilesIn && this.validators.length) {
await this.validateFilesOrFile(value);
}
if (this.validators.length) {
return value;
}
private async validateFilesOrFile(value: any): Promise<void> {
if (Array.isArray(value)) {
await Promise.all(value.map(f => this.validate(f)));
} else {
await this.validate(value);
}
return value;
}
private thereAreNoFilesIn(value: any): boolean {
const isEmptyArray = Array.isArray(value) && isEmpty(value);
const isEmptyObject = isObject(value) && isEmpty(Object.keys(value));
return isUndefined(value) || isEmptyArray || isEmptyObject;
}
protected async validate(file: any): Promise<any> {
for (const validator of this.validators) {
await this.validateOrThrow(file, validator);
}
return file;
}

View File

@@ -88,10 +88,11 @@ export class ParseArrayPipe implements PipeTransform {
const isExpectedTypePrimitive = this.isExpectedTypePrimitive();
const toClassInstance = (item: any, index?: number) => {
try {
item = JSON.parse(item);
} catch {}
if (this.options.items !== String) {
try {
item = JSON.parse(item);
} catch {}
}
if (isExpectedTypePrimitive) {
return this.validatePrimitive(item, index);
}

View File

@@ -66,8 +66,10 @@ export class ValidationPipe implements PipeTransform<any> {
...validatorOptions
} = options;
// @see https://github.com/nestjs/nest/issues/10683#issuecomment-1413690508
this.validatorOptions = { forbidUnknownValues: false, ...validatorOptions };
this.isTransformEnabled = !!transform;
this.validatorOptions = validatorOptions;
this.transformOptions = transformOptions;
this.isDetailedOutputDisabled = disableErrorMessages;
this.validateCustomDecorators = validateCustomDecorators || false;
@@ -153,7 +155,11 @@ export class ValidationPipe implements PipeTransform<any> {
// if the value was originally undefined or null, revert it back
return originalValue;
}
return Object.keys(this.validatorOptions).length > 0
// we check if the number of keys of the "validatorOptions" is higher than 1 (instead of 0)
// because the "forbidUnknownValues" now fallbacks to "false" (in case it wasn't explicitly specified)
const shouldTransformToPlain =
Object.keys(this.validatorOptions).length > 1;
return shouldTransformToPlain
? classTransformer.classToPlain(entity, this.transformOptions)
: value;
}

View File

@@ -1,6 +1,6 @@
import { Injectable, Optional } from '../decorators/core';
import { clc, yellow } from '../utils/cli-colors.util';
import { isPlainObject, isString } from '../utils/shared.utils';
import { isPlainObject, isString, isUndefined } from '../utils/shared.utils';
import { LoggerService, LogLevel } from './logger.service';
import { isLogLevelEnabled } from './utils';
@@ -279,7 +279,8 @@ export class ConsoleLogger implements LoggerService {
}
const lastElement = messages[messages.length - 1];
const isStack = isString(lastElement);
if (!isStack) {
// https://github.com/nestjs/nest/issues/11074#issuecomment-1421680060
if (!isStack && !isUndefined(lastElement)) {
return { messages, context };
}
return {

View File

@@ -125,7 +125,9 @@ export class Logger implements LoggerService {
@Logger.WrapBuffer
error(message: any, ...optionalParams: any[]) {
optionalParams = this.context
? optionalParams.concat(this.context)
? (optionalParams.length ? optionalParams : [undefined]).concat(
this.context,
)
: optionalParams;
this.localInstance?.error(message, ...optionalParams);

View File

@@ -51,7 +51,7 @@ describe('mixin', () => {
expect(type.name).to.not.eql('Test');
});
it('should not lost the design:parmatypes metadata', () => {
it('should not lost the design:paramtypes metadata', () => {
const type = mixin(Test);
const constructorParams = Reflect.getMetadata('design:paramtypes', type);

View File

@@ -240,7 +240,7 @@ describe('HttpException', () => {
expect(cause).to.be.eql(errorCause);
});
it('configures a cause when using a bult-in exception with options', () => {
it('configures a cause when using a built-in exception with options', () => {
const builtInErrorClasses = [
BadGatewayException,
BadRequestException,

View File

@@ -78,8 +78,11 @@ describe('ParseArrayPipe', () => {
target = new ParseArrayPipe();
expect(
await target.transform('1,2,3', {} as ArgumentMetadata),
).to.be.deep.equal(['1', '2', '3']);
await target.transform(
'1,2.0,3,{},true,null,,',
{} as ArgumentMetadata,
),
).to.be.deep.equal(['1', '2.0', '3', '{}', 'true', 'null', '', '']);
target = new ParseArrayPipe({ separator: '/' });
@@ -171,13 +174,16 @@ describe('ParseArrayPipe', () => {
target = new ParseArrayPipe({ items: Number });
expect(
await target.transform('1,2,3', {} as ArgumentMetadata),
await target.transform('1,2.0,3', {} as ArgumentMetadata),
).to.deep.equal([1, 2, 3]);
target = new ParseArrayPipe({ items: String });
expect(
await target.transform('1,2,3', {} as ArgumentMetadata),
).to.deep.equal(['1', '2', '3']);
await target.transform(
'1,2.0,3,{},true,null,,',
{} as ArgumentMetadata,
),
).to.deep.equal(['1', '2.0', '3', '{}', 'true', 'null', '', '']);
target = new ParseArrayPipe({ items: Boolean });
expect(

View File

@@ -45,7 +45,7 @@ class TestModel {
public optionalProp: string;
}
class TestModelNoValidaton {
class TestModelNoValidation {
constructor() {}
public prop1: string;
@@ -367,7 +367,7 @@ describe('ValidationPipe', () => {
});
});
});
describe('when type doesnt match', () => {
describe("when type doesn't match", () => {
describe('when validation rules are applied', () => {
it('should throw an error', async () => {
target = new ValidationPipe();
@@ -384,12 +384,12 @@ describe('ValidationPipe', () => {
});
describe('otherwise', () => {
it('should not reject', async () => {
target = new ValidationPipe({ forbidUnknownValues: false });
target = new ValidationPipe();
const testObj = [
{ prop1: 'value1', prop2: 'value2', prop3: 'value3' },
];
const objMetadata = { ...metadata, metatype: TestModelNoValidaton };
const objMetadata = { ...metadata, metatype: TestModelNoValidation };
const result = await target.transform(testObj, objMetadata);
expect(result).to.not.be.instanceOf(TestModel);
@@ -447,7 +447,7 @@ describe('ValidationPipe', () => {
target = new ValidationPipe({ expectedType: TestModel });
const testObj = { prop1: 'value1', prop2: 'value2' };
expect(await target.transform(testObj, m)).to.equal(testObj);
expect(await target.transform(testObj, m)).to.deep.equal(testObj);
});
it('should validate against the expected type if presented and metatype is primitive type', async () => {
@@ -460,7 +460,7 @@ describe('ValidationPipe', () => {
target = new ValidationPipe({ expectedType: TestModel });
const testObj = { prop1: 'value1', prop2: 'value2' };
expect(await target.transform(testObj, m)).to.equal(testObj);
expect(await target.transform(testObj, m)).to.deep.equal(testObj);
});
});
});

View File

@@ -442,6 +442,17 @@ describe('Logger', () => {
);
expect(processStdoutWriteSpy.thirdCall.firstArg).to.include('ms');
});
it('should log out an error to stderr but not include an undefined log', () => {
const message = 'message 1';
logger.error(message);
expect(processStderrWriteSpy.calledOnce).to.be.true;
expect(processStderrWriteSpy.firstCall.firstArg).to.include(
`[${globalContext}]`,
);
expect(processStderrWriteSpy.firstCall.firstArg).to.include(message);
});
});
describe('when logging is disabled', () => {
@@ -480,43 +491,87 @@ describe('Logger', () => {
warn(message: any, context?: string) {}
}
const customLogger = new CustomLogger();
const originalLogger = new Logger();
describe('with global context', () => {
const customLogger = new CustomLogger();
const globalContext = 'RandomContext';
const originalLogger = new Logger(globalContext);
let previousLoggerRef: LoggerService;
let previousLoggerRef: LoggerService;
beforeEach(() => {
previousLoggerRef =
Logger['localInstanceRef'] || Logger['staticInstanceRef'];
Logger.overrideLogger(customLogger);
beforeEach(() => {
previousLoggerRef =
Logger['localInstanceRef'] || Logger['staticInstanceRef'];
Logger.overrideLogger(customLogger);
});
afterEach(() => {
Logger.overrideLogger(previousLoggerRef);
});
it('should call custom logger "#log()" method with context as second argument', () => {
const message = 'random log message with global context';
const customLoggerLogSpy = sinon.spy(customLogger, 'log');
originalLogger.log(message);
expect(customLoggerLogSpy.called).to.be.true;
expect(customLoggerLogSpy.calledWith(message, globalContext)).to.be
.true;
});
it('should call custom logger "#error()" method with context as third argument', () => {
const message = 'random error message with global context';
const customLoggerErrorSpy = sinon.spy(customLogger, 'error');
originalLogger.error(message);
expect(customLoggerErrorSpy.called).to.be.true;
expect(
customLoggerErrorSpy.calledWith(message, undefined, globalContext),
).to.be.true;
});
});
describe('without global context', () => {
const customLogger = new CustomLogger();
const originalLogger = new Logger();
afterEach(() => {
Logger.overrideLogger(previousLoggerRef);
});
let previousLoggerRef: LoggerService;
it('should call custom logger "#log()" method', () => {
const message = 'random message';
const context = 'RandomContext';
beforeEach(() => {
previousLoggerRef =
Logger['localInstanceRef'] || Logger['staticInstanceRef'];
Logger.overrideLogger(customLogger);
});
const customLoggerLogSpy = sinon.spy(customLogger, 'log');
afterEach(() => {
Logger.overrideLogger(previousLoggerRef);
});
originalLogger.log(message, context);
it('should call custom logger "#log()" method', () => {
const message = 'random message';
const context = 'RandomContext';
expect(customLoggerLogSpy.called).to.be.true;
expect(customLoggerLogSpy.calledWith(message, context)).to.be.true;
});
const customLoggerLogSpy = sinon.spy(customLogger, 'log');
it('should call custom logger "#error()" method', () => {
const message = 'random message';
const context = 'RandomContext';
originalLogger.log(message, context);
const customLoggerErrorSpy = sinon.spy(customLogger, 'error');
expect(customLoggerLogSpy.called).to.be.true;
expect(customLoggerLogSpy.calledWith(message, context)).to.be.true;
});
originalLogger.error(message, context);
it('should call custom logger "#error()" method', () => {
const message = 'random message';
const context = 'RandomContext';
expect(customLoggerErrorSpy.called).to.be.true;
expect(customLoggerErrorSpy.calledWith(message, context)).to.be.true;
const customLoggerErrorSpy = sinon.spy(customLogger, 'error');
originalLogger.error(message, undefined, context);
expect(customLoggerErrorSpy.called).to.be.true;
expect(customLoggerErrorSpy.calledWith(message, undefined, context))
.to.be.true;
});
});
});
});

View File

@@ -11,7 +11,6 @@
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>

View File

@@ -1,14 +1,15 @@
import { InjectorDependencyContext } from '../../injector/injector';
import { Module } from '../../injector/module';
import { UNKNOWN_DEPENDENCIES_MESSAGE } from '../messages';
import { RuntimeException } from './runtime.exception';
import { Module } from '../../injector/module';
export class UnknownDependenciesException extends RuntimeException {
constructor(
type: string | symbol,
unknownDependencyContext: InjectorDependencyContext,
module?: Module,
public readonly type: string | symbol,
public readonly context: InjectorDependencyContext,
public readonly moduleRef?: Module,
public readonly metadata?: { id: string },
) {
super(UNKNOWN_DEPENDENCIES_MESSAGE(type, unknownDependencyContext, module));
super(UNKNOWN_DEPENDENCIES_MESSAGE(type, context, moduleRef));
}
}

View File

@@ -26,7 +26,7 @@ const getInstanceName = (instance: unknown): string => {
* Returns the name of the dependency
* Tries to get the class name, otherwise the string value
* (= injection token). As fallback it returns '+'
* @param dependency The dependency whichs name should get displayed
* @param dependency The name of the dependency to be displayed
*/
const getDependencyName = (dependency: InjectorDependency): string =>
// use class name

View File

@@ -1,2 +1,3 @@
export * from './context-id-factory';
export * from './external-context-creator';
export * from './http-adapter-host';

View File

@@ -1,6 +1,6 @@
/*
* Nest @core
* Copyright(c) 2017 - 2022 Kamil Mysliwiec
* Copyright(c) 2017 - 2023 Kamil Mysliwiec
* https://nestjs.com
* MIT Licensed
*/
@@ -13,6 +13,7 @@ export * from './discovery';
export * from './exceptions';
export * from './helpers';
export * from './injector';
export * from './inspector';
export * from './metadata-scanner';
export * from './middleware';
export * from './nest-application';

View File

@@ -1,4 +1,8 @@
import { DynamicModule, Type } from '@nestjs/common/interfaces';
import {
DynamicModule,
ForwardReference,
Type,
} from '@nestjs/common/interfaces';
import { ModuleTokenFactory } from './module-token-factory';
export interface ModuleFactory {
@@ -18,19 +22,25 @@ export class ModuleCompiler {
return { type, dynamicMetadata, token };
}
public extractMetadata(metatype: Type<any> | DynamicModule): {
public extractMetadata(
metatype: Type<any> | ForwardReference | DynamicModule,
): {
type: Type<any>;
dynamicMetadata?: Partial<DynamicModule> | undefined;
} {
if (!this.isDynamicModule(metatype)) {
return { type: metatype };
return {
type: (metatype as ForwardReference)?.forwardRef
? (metatype as ForwardReference).forwardRef()
: metatype,
};
}
const { module: type, ...dynamicMetadata } = metatype;
return { type, dynamicMetadata };
}
public isDynamicModule(
module: Type<any> | DynamicModule,
module: Type<any> | DynamicModule | ForwardReference,
): module is DynamicModule {
return !!(module as DynamicModule).module;
}

View File

@@ -10,6 +10,7 @@ import {
UndefinedForwardRefException,
UnknownModuleException,
} from '../errors/exceptions';
import { InitializeOnPreviewAllowlist } from '../inspector/initialize-on-preview.allowlist';
import { SerializedGraph } from '../inspector/serialized-graph';
import { REQUEST } from '../router/request/request-constants';
import { ModuleCompiler } from './compiler';
@@ -80,6 +81,7 @@ export class NestContainer {
}
const moduleRef = new Module(type, this);
moduleRef.token = token;
moduleRef.initOnPreview = this.shouldInitOnPreview(type);
this.modules.set(token, moduleRef);
const updatedScope = [].concat(scope, type);
@@ -255,4 +257,8 @@ export class NestContainer {
isResolved: true,
});
}
private shouldInitOnPreview(type: Type) {
return InitializeOnPreviewAllowlist.has(type);
}
}

View File

@@ -4,7 +4,7 @@ import { InstanceToken } from '../module';
/**
* Returns the instances which are transient
* @param instances The instances which should be checked whether they are transcient
* @param instances The instances which should be checked whether they are transient
*/
export function getTransientInstances(
instances: [InstanceToken, InstanceWrapper][],
@@ -20,7 +20,7 @@ export function getTransientInstances(
/**
* Returns the instances which are not transient
* @param instances The instances which should be checked whether they are transcient
* @param instances The instances which should be checked whether they are transient
*/
export function getNonTransientInstances(
instances: [InstanceToken, InstanceWrapper][],

View File

@@ -22,6 +22,7 @@ import {
isUndefined,
} from '@nestjs/common/utils/shared.utils';
import { iterate } from 'iterare';
import { performance } from 'perf_hooks';
import { RuntimeException } from '../errors/exceptions/runtime.exception';
import { UndefinedDependencyException } from '../errors/exceptions/undefined-dependency.exception';
import { UnknownDependenciesException } from '../errors/exceptions/unknown-dependencies.exception';
@@ -129,6 +130,7 @@ export class Injector {
return done();
}
try {
const t0 = this.getNowTimestamp();
const callback = async (instances: unknown[]) => {
const properties = await this.resolveProperties(
wrapper,
@@ -146,6 +148,7 @@ export class Injector {
inquirer,
);
this.applyProperties(instance, properties);
wrapper.initTime = this.getNowTimestamp() - t0;
done();
};
await this.resolveConstructorParams<T>(
@@ -353,7 +356,9 @@ export class Injector {
}
public reflectConstructorParams<T>(type: Type<T>): any[] {
const paramtypes = [...(Reflect.getMetadata(PARAMTYPES_METADATA, type) || [])];
const paramtypes = [
...(Reflect.getMetadata(PARAMTYPES_METADATA, type) || []),
];
const selfParams = this.reflectSelfParams<T>(type);
selfParams.forEach(({ index, param }) => (paramtypes[index] = param));
@@ -502,6 +507,7 @@ export class Injector {
wrapper.name,
dependencyContext,
moduleRef,
{ id: wrapper.id },
);
}
if (providers.has(name)) {
@@ -542,6 +548,7 @@ export class Injector {
wrapper.name,
dependencyContext,
moduleRef,
{ id: wrapper.id },
);
}
return instanceWrapper;
@@ -715,7 +722,7 @@ export class Injector {
wrapper.isLazyTransient(contextId, inquirer) ||
wrapper.isExplicitlyRequested(contextId, inquirer);
if (this.options?.preview) {
if (this.options?.preview && !wrapper.host?.initOnPreview) {
instanceHost.isResolved = true;
return instanceHost.instance;
}
@@ -940,4 +947,8 @@ export class Injector {
})
: contextId;
}
private getNowTimestamp() {
return performance.now();
}
}

View File

@@ -27,8 +27,13 @@ export class InstanceLoader<TInjector extends Injector = Injector> {
) {
this.createPrototypes(modules);
await this.createInstances(modules);
try {
await this.createInstances(modules);
} catch (err) {
this.graphInspector.inspectModules(modules);
this.graphInspector.registerPartial(err);
throw err;
}
this.graphInspector.inspectModules(modules);
}

View File

@@ -69,6 +69,7 @@ export class InstanceWrapper<T = any> {
public inject?: FactoryProvider['inject'];
public forwardRef?: boolean;
public durable?: boolean;
public initTime?: number;
private static logger: LoggerService = new Logger(InstanceWrapper.name);
@@ -203,15 +204,18 @@ export class InstanceWrapper<T = any> {
if (!isUndefined(this.isTreeDurable)) {
return this.isTreeDurable;
}
if (this.durable === true) {
this.isTreeDurable = true;
this.printIntrospectedAsDurable();
if (this.scope === Scope.REQUEST) {
this.isTreeDurable = this.durable === undefined ? false : this.durable;
if (this.isTreeDurable) {
this.printIntrospectedAsDurable();
}
return this.isTreeDurable;
}
const isStatic = this.isDependencyTreeStatic();
if (isStatic) {
return false;
}
const isTreeNonDurable = this.introspectDepsAttribute(
(collection, registry) =>
collection.some(
@@ -221,7 +225,7 @@ export class InstanceWrapper<T = any> {
),
lookupRegistry,
);
this.isTreeDurable = !isTreeNonDurable && this.durable !== false;
this.isTreeDurable = !isTreeNonDurable;
if (this.isTreeDurable) {
this.printIntrospectedAsDurable();
}
@@ -236,32 +240,30 @@ export class InstanceWrapper<T = any> {
lookupRegistry: string[] = [],
): boolean {
if (lookupRegistry.includes(this[INSTANCE_ID_SYMBOL])) {
return true;
return false;
}
lookupRegistry = lookupRegistry.concat(this[INSTANCE_ID_SYMBOL]);
const { dependencies, properties, enhancers } =
this[INSTANCE_METADATA_SYMBOL];
let introspectionResult =
(dependencies && callback(dependencies, lookupRegistry)) || !dependencies;
let introspectionResult = dependencies
? callback(dependencies, lookupRegistry)
: false;
if (!introspectionResult || !(properties || enhancers)) {
if (introspectionResult || !(properties || enhancers)) {
return introspectionResult;
}
const propertiesHosts = (properties || []).map(item => item.wrapper);
introspectionResult =
introspectionResult &&
((properties &&
callback(
introspectionResult = properties
? callback(
properties.map(item => item.wrapper),
lookupRegistry,
)) ||
!properties);
if (!introspectionResult || !enhancers) {
)
: false;
if (introspectionResult || !enhancers) {
return introspectionResult;
}
return callback(enhancers, lookupRegistry);
return enhancers ? callback(enhancers, lookupRegistry) : false;
}
public isDependencyTreeStatic(lookupRegistry: string[] = []): boolean {
@@ -273,10 +275,10 @@ export class InstanceWrapper<T = any> {
this.printIntrospectedAsRequestScoped();
return this.isTreeStatic;
}
this.isTreeStatic = this.introspectDepsAttribute(
this.isTreeStatic = !this.introspectDepsAttribute(
(collection, registry) =>
collection.every((item: InstanceWrapper) =>
item.isDependencyTreeStatic(registry),
collection.some(
(item: InstanceWrapper) => !item.isDependencyTreeStatic(registry),
),
lookupRegistry,
);

View File

@@ -2,10 +2,14 @@ import { DynamicModule } from '@nestjs/common';
import { Type } from '@nestjs/common/interfaces/type.interface';
import { randomStringGenerator } from '@nestjs/common/utils/random-string-generator.util';
import { isFunction, isSymbol } from '@nestjs/common/utils/shared.utils';
import { createHash } from 'crypto';
import stringify from 'fast-safe-stringify';
import * as hash from 'object-hash';
const CLASS_STR = 'class ';
const CLASS_STR_LEN = CLASS_STR.length;
export class ModuleTokenFactory {
private readonly moduleTokenCache = new Map<string, string>();
private readonly moduleIdsCache = new WeakMap<Type<unknown>, string>();
public create(
@@ -13,23 +17,36 @@ export class ModuleTokenFactory {
dynamicModuleMetadata?: Partial<DynamicModule> | undefined,
): string {
const moduleId = this.getModuleId(metatype);
if (!dynamicModuleMetadata) {
return this.getStaticModuleToken(moduleId, this.getModuleName(metatype));
}
const opaqueToken = {
id: moduleId,
module: this.getModuleName(metatype),
dynamic: this.getDynamicMetadataToken(dynamicModuleMetadata),
dynamic: dynamicModuleMetadata,
};
return hash(opaqueToken, { ignoreUnknown: true });
const opaqueTokenString = this.getStringifiedOpaqueToken(opaqueToken);
return this.hashString(opaqueTokenString);
}
public getDynamicMetadataToken(
dynamicModuleMetadata: Partial<DynamicModule> | undefined,
): string {
public getStaticModuleToken(moduleId: string, moduleName: string): string {
const key = `${moduleId}_${moduleName}`;
if (this.moduleTokenCache.has(key)) {
return this.moduleTokenCache.get(key);
}
const hash = this.hashString(key);
this.moduleTokenCache.set(key, hash);
return hash;
}
public getStringifiedOpaqueToken(opaqueToken: object | undefined): string {
// Uses safeStringify instead of JSON.stringify to support circular dynamic modules
// The replacer function is also required in order to obtain real class names
// instead of the unified "Function" key
return dynamicModuleMetadata
? stringify(dynamicModuleMetadata, this.replacer)
: '';
return opaqueToken ? stringify(opaqueToken, this.replacer) : '';
}
public getModuleId(metatype: Type<unknown>): string {
@@ -46,14 +63,18 @@ export class ModuleTokenFactory {
return metatype.name;
}
private hashString(value: string): string {
return createHash('sha256').update(value).digest('hex');
}
private replacer(key: string, value: any) {
if (isFunction(value)) {
const funcAsString = value.toString();
const isClass = /^class\s/.test(funcAsString);
const isClass = funcAsString.slice(0, CLASS_STR_LEN) === CLASS_STR;
if (isClass) {
return value.name;
}
return hash(funcAsString, { ignoreUnknown: true });
return funcAsString;
}
if (isSymbol(value)) {
return value.toString();

View File

@@ -1,4 +1,7 @@
import { EnhancerSubtype } from '@nestjs/common/constants';
import {
EnhancerSubtype,
ENTRY_PROVIDER_WATERMARK,
} from '@nestjs/common/constants';
import {
ClassProvider,
Controller,
@@ -61,8 +64,11 @@ export class Module {
InstanceToken,
InstanceWrapper<Controller>
>();
private readonly _entryProviderKeys = new Set<InstanceToken>();
private readonly _exports = new Set<InstanceToken>();
private _distance = 0;
private _initOnPreview = false;
private _isGlobal = false;
private _token: string;
@@ -98,6 +104,14 @@ export class Module {
this._isGlobal = global;
}
get initOnPreview() {
return this._initOnPreview;
}
set initOnPreview(initOnPreview: boolean) {
this._initOnPreview = initOnPreview;
}
get providers(): Map<InstanceToken, InstanceWrapper<Injectable>> {
return this._providers;
}
@@ -139,6 +153,12 @@ export class Module {
return this._controllers;
}
get entryProviders(): Array<InstanceWrapper<Injectable>> {
return Array.from(this._entryProviderKeys).map(token =>
this.providers.get(token),
);
}
get exports(): Set<InstanceToken> {
return this._exports;
}
@@ -217,7 +237,11 @@ export class Module {
host?: Type<T>,
) {
if (this.isCustomProvider(injectable)) {
return this.addCustomProvider(injectable, this._injectables);
return this.addCustomProvider(
injectable,
this._injectables,
enhancerSubtype,
);
}
let instanceWrapper = this.injectables.get(injectable);
if (!instanceWrapper) {
@@ -249,8 +273,12 @@ export class Module {
): Provider | InjectionToken;
public addProvider(provider: Provider, enhancerSubtype?: EnhancerSubtype) {
if (this.isCustomProvider(provider)) {
if (this.isEntryProvider(provider.provide)) {
this._entryProviderKeys.add(provider.provide);
}
return this.addCustomProvider(provider, this._providers, enhancerSubtype);
}
this._providers.set(
provider,
new InstanceWrapper({
@@ -264,6 +292,11 @@ export class Module {
host: this,
}),
);
if (this.isEntryProvider(provider)) {
this._entryProviderKeys.add(provider);
}
return provider as Type<Injectable>;
}
@@ -340,10 +373,12 @@ export class Module {
if (isUndefined(durable)) {
durable = isDurable(useClass);
}
const token = provider.provide;
collection.set(
provider.provide,
token,
new InstanceWrapper({
token: provider.provide,
token,
name: useClass?.name || useClass,
metatype: useClass,
instance: null,
@@ -623,9 +658,15 @@ export class Module {
};
}
private isEntryProvider(metatype: InjectionToken): boolean {
return typeof metatype === 'function'
? !!Reflect.getMetadata(ENTRY_PROVIDER_WATERMARK, metatype)
: false;
}
private generateUuid(): string {
const UUID_NAMESPACE = 'fb848993-0c82-4b9e-ae95-3c3c1dbe3d6b';
const prefix = 'M_';
const key = this.name?.toString() ?? this.token?.toString();
return key ? UuidFactory.get(key, UUID_NAMESPACE) : randomStringGenerator();
return key ? UuidFactory.get(`${prefix}_${key}`) : randomStringGenerator();
}
}

View File

@@ -1,8 +1,8 @@
import { v4 as uuid } from 'uuid';
import { uid } from 'uid';
import { Module } from './module';
export class ModulesContainer extends Map<string, Module> {
private readonly _applicationId = uuid();
private readonly _applicationId = uid(21);
get applicationId(): string {
return this._applicationId;

View File

@@ -1,20 +1,23 @@
import { v5 as uuid } from 'uuid';
const DEFAULT_UUID_NAMESPACE = 'efa0df42-88af-474f-9cad-4206a2319f07';
export class DeterministicUuidRegistry {
private static readonly registry = new Set<string>();
private static readonly registry = new Map<string, boolean>();
static get(str: string, namespace: string = DEFAULT_UUID_NAMESPACE, inc = 0) {
const id = inc ? uuid(str + `${inc}`, namespace) : uuid(str, namespace);
static get(str: string, inc = 0) {
const id = inc ? this.hashCode(`${str}_${inc}`) : this.hashCode(str);
if (this.registry.has(id)) {
return this.get(str, namespace, inc + 1);
return this.get(str, inc + 1);
}
this.registry.add(id);
this.registry.set(id, true);
return id;
}
static clear() {
this.registry.clear();
}
private static hashCode(s: string) {
let h = 0;
for (let i = 0; i < s.length; i++)
h = (Math.imul(31, h) + s.charCodeAt(i)) | 0;
return h.toString();
}
}

View File

@@ -1,3 +1,4 @@
import { UnknownDependenciesException } from '../errors/exceptions/unknown-dependencies.exception';
import { NestContainer } from '../injector/container';
import { InstanceWrapper } from '../injector/instance-wrapper';
import { Module } from '../injector/module';
@@ -6,6 +7,7 @@ import { EnhancerMetadataCacheEntry } from './interfaces/enhancer-metadata-cache
import { Entrypoint } from './interfaces/entrypoint.interface';
import { OrphanedEnhancerDefinition } from './interfaces/extras.interface';
import { ClassNode, Node } from './interfaces/node.interface';
import { PartialGraphHost } from './partial-graph.host';
import { SerializedGraph } from './serialized-graph';
export class GraphInspector {
@@ -33,6 +35,29 @@ export class GraphInspector {
DeterministicUuidRegistry.clear();
}
public registerPartial(error: unknown) {
this.graph.status = 'partial';
if (error instanceof UnknownDependenciesException) {
this.graph.metadata = {
cause: {
type: 'unknown-dependencies',
context: error.context,
moduleId: error.moduleRef?.id,
nodeId: error.metadata?.id,
},
};
} else {
this.graph.metadata = {
cause: {
type: 'unknown',
error,
},
};
}
PartialGraphHost.register(this.graph);
}
public inspectInstanceWrapper<T = any>(
source: InstanceWrapper<T>,
moduleRef: Module,
@@ -103,6 +128,7 @@ export class GraphInspector {
exported: moduleRef.exports.has(wrapper.token),
token: wrapper.token,
subtype: wrapper.subtype,
initTime: wrapper.initTime,
},
});
}

View File

@@ -0,0 +1,4 @@
export * from './graph-inspector';
export * from './initialize-on-preview.allowlist';
export * from './partial-graph.host';
export * from './serialized-graph';

View File

@@ -0,0 +1,13 @@
import { Type } from '@nestjs/common';
export class InitializeOnPreviewAllowlist {
private static readonly allowlist = new WeakMap<Type, boolean>();
public static add(type: Type) {
this.allowlist.set(type, true);
}
public static has(type: Type) {
return this.allowlist.has(type);
}
}

View File

@@ -22,6 +22,7 @@ export type ClassNode = {
exported: boolean;
scope: Scope;
token: InjectionToken;
initTime: number;
/**
* Enhancers metadata collection
*/

View File

@@ -0,0 +1,15 @@
import { SerializedGraphStatus } from '../serialized-graph';
import { Edge } from './edge.interface';
import { Entrypoint } from './entrypoint.interface';
import { Extras } from './extras.interface';
import { Node } from './node.interface';
import { SerializedGraphMetadata } from './serialized-graph-metadata.interface';
export interface SerializedGraphJson {
nodes: Record<string, Node>;
edges: Record<string, Edge>;
entrypoints: Record<string, Entrypoint<unknown>[]>;
extras: Extras;
status?: SerializedGraphStatus;
metadata?: SerializedGraphMetadata;
}

View File

@@ -0,0 +1,11 @@
import { InjectorDependencyContext } from '../../injector/injector';
export interface SerializedGraphMetadata {
cause: {
type: 'unknown-dependencies' | 'unknown';
context?: InjectorDependencyContext;
moduleId?: string;
nodeId?: string;
error?: any;
};
}

View File

@@ -0,0 +1,17 @@
import { SerializedGraph } from './serialized-graph';
export class PartialGraphHost {
private static partialGraph: SerializedGraph;
static toJSON() {
return this.partialGraph?.toJSON();
}
static toString() {
return this.partialGraph?.toString();
}
static register(partialGraph: SerializedGraph) {
this.partialGraph = partialGraph;
}
}

View File

@@ -16,7 +16,10 @@ import {
OrphanedEnhancerDefinition,
} from './interfaces/extras.interface';
import { Node } from './interfaces/node.interface';
import { SerializedGraphJson } from './interfaces/serialized-graph-json.interface';
import { SerializedGraphMetadata } from './interfaces/serialized-graph-metadata.interface';
export type SerializedGraphStatus = 'partial' | 'complete';
type WithOptionalId<T extends Record<'id', string>> = Omit<T, 'id'> &
Partial<Pick<T, 'id'>>;
@@ -28,6 +31,8 @@ export class SerializedGraph {
orphanedEnhancers: [],
attachedEnhancers: [],
};
private _status: SerializedGraphStatus = 'complete';
private _metadata?: SerializedGraphMetadata;
private static readonly INTERNAL_PROVIDERS: Array<InjectionToken> = [
ApplicationConfig,
@@ -44,6 +49,14 @@ export class SerializedGraph {
INQUIRER,
];
set status(status: SerializedGraphStatus) {
this._status = status;
}
set metadata(metadata: SerializedGraphMetadata) {
this._metadata = metadata;
}
public insertNode(nodeDefinition: Node) {
if (
nodeDefinition.metadata.type === 'provider' &&
@@ -109,13 +122,21 @@ export class SerializedGraph {
return this.nodes.get(id);
}
public toJSON() {
return {
public toJSON(): SerializedGraphJson {
const json: SerializedGraphJson = {
nodes: Object.fromEntries(this.nodes),
edges: Object.fromEntries(this.edges),
entrypoints: Object.fromEntries(this.entrypoints),
extras: this.extras,
};
if (this._status) {
json['status'] = this._status;
}
if (this._metadata) {
json['metadata'] = this._metadata;
}
return json;
}
public toString() {
@@ -131,10 +152,6 @@ export class SerializedGraph {
private generateUuidByEdgeDefinition(
edgeDefinition: WithOptionalId<Edge>,
): string {
const UUID_NAMESPACE = '7a6d19ab-ec88-419f-a833-062532c468a7';
return DeterministicUuidRegistry.get(
JSON.stringify(edgeDefinition),
UUID_NAMESPACE,
);
return DeterministicUuidRegistry.get(JSON.stringify(edgeDefinition));
}
}

View File

@@ -1,4 +1,4 @@
import { randomStringGenerator } from '../../common/utils/random-string-generator.util';
import { randomStringGenerator } from '@nestjs/common/utils/random-string-generator.util';
import { DeterministicUuidRegistry } from './deterministic-uuid-registry';
export enum UuidFactoryMode {
@@ -7,15 +7,15 @@ export enum UuidFactoryMode {
}
export class UuidFactory {
private static _mode: UuidFactoryMode = UuidFactoryMode.Random;
private static _mode = UuidFactoryMode.Random;
static set mode(value: UuidFactoryMode) {
this._mode = value;
}
static get(key: string = '', namespace?: string) {
static get(key = '') {
return this._mode === UuidFactoryMode.Deterministic
? DeterministicUuidRegistry.get(key, namespace)
? DeterministicUuidRegistry.get(key)
: randomStringGenerator();
}
}

View File

@@ -6,14 +6,22 @@ import {
} from '@nestjs/common/utils/shared.utils';
export class MetadataScanner {
private readonly cachedScannedPrototypes: Map<object, string[]> = new Map();
/**
* @deprecated
* @see {@link getAllMethodNames}
* @see getAllMethodNames
*/
public scanFromPrototype<T extends Injectable, R = any>(
instance: T,
prototype: object | null,
prototype: object,
callback: (name: string) => R,
): R[] {
if (!prototype) {
return [];
}
const visitedNames = new Map<string, boolean>();
const result: R[] = [];
@@ -22,9 +30,12 @@ export class MetadataScanner {
if (visitedNames.has(property)) {
continue;
}
visitedNames.set(property, true);
// reason: https://github.com/nestjs/nest/pull/10821#issuecomment-1411916533
const descriptor = Object.getOwnPropertyDescriptor(prototype, property);
if (
descriptor.set ||
descriptor.get ||
@@ -35,6 +46,7 @@ export class MetadataScanner {
}
const value = callback(property);
if (isNil(value)) {
continue;
}
@@ -49,23 +61,42 @@ export class MetadataScanner {
return result;
}
*getAllFilteredMethodNames(
prototype: object | null,
/**
* @deprecated
* @see {@link getAllMethodNames}
* @see getAllMethodNames
*/
public *getAllFilteredMethodNames(
prototype: object,
): IterableIterator<string> {
yield* this.getAllMethodNames(prototype);
}
public getAllMethodNames(prototype: object | null): string[] {
if (!prototype) {
return [];
}
if (this.cachedScannedPrototypes.has(prototype)) {
return this.cachedScannedPrototypes.get(prototype);
}
const visitedNames = new Map<string, boolean>();
const result: string[] = [];
this.cachedScannedPrototypes.set(prototype, result);
do {
for (const property of Object.getOwnPropertyNames(prototype)) {
if (visitedNames.has(property)) {
continue;
}
visitedNames.set(property, true);
// reason: https://github.com/nestjs/nest/pull/10821#issuecomment-1411916533
const descriptor = Object.getOwnPropertyDescriptor(prototype, property);
if (
descriptor.set ||
descriptor.get ||
@@ -82,6 +113,6 @@ export class MetadataScanner {
prototype !== Object.prototype
);
return result.values();
return result;
}
}

View File

@@ -6,10 +6,11 @@ import {
} from '@nestjs/common/interfaces';
import {
MiddlewareConfigProxy,
RouteInfo,
MiddlewareConfiguration,
RouteInfo,
} from '@nestjs/common/interfaces/middleware';
import { iterate } from 'iterare';
import { RouteInfoPathExtractor } from './route-info-path-extractor';
import { RoutesMapper } from './routes-mapper';
import { filterMiddleware } from './utils';
@@ -19,12 +20,17 @@ export class MiddlewareBuilder implements MiddlewareConsumer {
constructor(
private readonly routesMapper: RoutesMapper,
private readonly httpAdapter: HttpServer,
private readonly routeInfoPathExtractor: RouteInfoPathExtractor,
) {}
public apply(
...middleware: Array<Type<any> | Function | any>
): MiddlewareConfigProxy {
return new MiddlewareBuilder.ConfigProxy(this, flatten(middleware));
return new MiddlewareBuilder.ConfigProxy(
this,
flatten(middleware),
this.routeInfoPathExtractor,
);
}
public build(): MiddlewareConfiguration[] {
@@ -41,6 +47,7 @@ export class MiddlewareBuilder implements MiddlewareConsumer {
constructor(
private readonly builder: MiddlewareBuilder,
private readonly middleware: Array<Type<any> | Function | any>,
private routeInfoPathExtractor: RouteInfoPathExtractor,
) {}
public getExcludedRoutes(): RouteInfo[] {
@@ -50,7 +57,10 @@ export class MiddlewareBuilder implements MiddlewareConsumer {
public exclude(
...routes: Array<string | RouteInfo>
): MiddlewareConfigProxy {
this.excludedRoutes = this.getRoutesFlatList(routes);
this.excludedRoutes = this.getRoutesFlatList(routes).map(route => ({
...route,
path: this.routeInfoPathExtractor.extractPathFrom(route),
}));
return this;
}

View File

@@ -1,4 +1,4 @@
import { HttpServer, Logger, VersioningType } from '@nestjs/common';
import { HttpServer, Logger } from '@nestjs/common';
import { RequestMethod } from '@nestjs/common/enums/request-method.enum';
import {
MiddlewareConfiguration,
@@ -6,10 +6,7 @@ import {
RouteInfo,
} from '@nestjs/common/interfaces/middleware';
import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface';
import {
addLeadingSlash,
isUndefined,
} from '@nestjs/common/utils/shared.utils';
import { isUndefined } from '@nestjs/common/utils/shared.utils';
import { ApplicationConfig } from '../application-config';
import { InvalidMiddlewareException } from '../errors/exceptions/invalid-middleware.exception';
import { RuntimeException } from '../errors/exceptions/runtime.exception';
@@ -26,13 +23,13 @@ import {
MiddlewareEntrypointMetadata,
} from '../inspector/interfaces/entrypoint.interface';
import { REQUEST_CONTEXT_ID } from '../router/request/request-constants';
import { RoutePathFactory } from '../router/route-path-factory';
import { RouterExceptionFilters } from '../router/router-exception-filters';
import { RouterProxy } from '../router/router-proxy';
import { isRequestMethodAll, isRouteExcluded } from '../router/utils';
import { isRequestMethodAll } from '../router/utils';
import { MiddlewareBuilder } from './builder';
import { MiddlewareContainer } from './container';
import { MiddlewareResolver } from './resolver';
import { RouteInfoPathExtractor } from './route-info-path-extractor';
import { RoutesMapper } from './routes-mapper';
export class MiddlewareModule<
@@ -46,13 +43,11 @@ export class MiddlewareModule<
private routerExceptionFilter: RouterExceptionFilters;
private routesMapper: RoutesMapper;
private resolver: MiddlewareResolver;
private config: ApplicationConfig;
private container: NestContainer;
private httpAdapter: HttpServer;
private graphInspector: GraphInspector;
private appOptions: TAppOptions;
constructor(private readonly routePathFactory: RoutePathFactory) {}
private routeInfoPathExtractor: RouteInfoPathExtractor;
public async register(
middlewareContainer: MiddlewareContainer,
@@ -73,8 +68,7 @@ export class MiddlewareModule<
);
this.routesMapper = new RoutesMapper(container);
this.resolver = new MiddlewareResolver(middlewareContainer, injector);
this.config = config;
this.routeInfoPathExtractor = new RouteInfoPathExtractor(config);
this.injector = injector;
this.container = container;
this.httpAdapter = httpAdapter;
@@ -111,6 +105,7 @@ export class MiddlewareModule<
const middlewareBuilder = new MiddlewareBuilder(
this.routesMapper,
this.httpAdapter,
this.routeInfoPathExtractor,
);
try {
await instance.configure(middlewareBuilder);
@@ -307,39 +302,15 @@ export class MiddlewareModule<
private async registerHandler(
applicationRef: HttpServer,
{ path, method, version }: RouteInfo,
routeInfo: RouteInfo,
proxy: <TRequest, TResponse>(
req: TRequest,
res: TResponse,
next: () => void,
) => void,
) {
const prefix = this.config.getGlobalPrefix();
const excludedRoutes = this.config.getGlobalPrefixOptions().exclude;
if (
Array.isArray(excludedRoutes) &&
isRouteExcluded(excludedRoutes, path, method)
) {
path = addLeadingSlash(path);
} else {
const basePath = addLeadingSlash(prefix);
if (basePath?.endsWith('/') && path?.startsWith('/')) {
// strip slash when a wildcard is being used
// and global prefix has been set
path = path?.slice(1);
}
path = basePath + path;
}
const applicationVersioningConfig = this.config.getVersioning();
if (version && applicationVersioningConfig.type === VersioningType.URI) {
const versionPrefix = this.routePathFactory.getVersionPrefix(
applicationVersioningConfig,
);
path = `/${versionPrefix}${version.toString()}${path}`;
}
const { method } = routeInfo;
const paths = this.routeInfoPathExtractor.extractPathsFrom(routeInfo);
const isMethodAll = isRequestMethodAll(method);
const requestMethod = RequestMethod[method];
const router = await applicationRef.createMiddlewareFactory(method);
@@ -355,13 +326,7 @@ export class MiddlewareModule<
}
return next();
};
const isAWildcard = ['*', '/*', '(.*)', '/(.*)'].includes(path);
if (isAWildcard && Array.isArray(excludedRoutes)) {
excludedRoutes.forEach(route => router(route.path, middlewareFunction));
}
router(path, middlewareFunction);
paths.forEach(path => router(path, middlewareFunction));
}
private getContextId(request: unknown, isTreeDurable: boolean): ContextId {

View File

@@ -0,0 +1,87 @@
import { VersioningType } from '@nestjs/common';
import {
RouteInfo,
VersioningOptions,
VersionValue,
} from '@nestjs/common/interfaces';
import {
addLeadingSlash,
stripEndSlash,
} from '@nestjs/common/utils/shared.utils';
import { ApplicationConfig } from '../application-config';
import { ExcludeRouteMetadata } from '../router/interfaces/exclude-route-metadata.interface';
import { isRouteExcluded } from '../router/utils';
import { RoutePathFactory } from './../router/route-path-factory';
export class RouteInfoPathExtractor {
private routePathFactory: RoutePathFactory;
private readonly prefixPath: string;
private readonly excludedGlobalPrefixRoutes: ExcludeRouteMetadata[];
private readonly versioningConfig?: VersioningOptions;
constructor(private readonly applicationConfig: ApplicationConfig) {
this.routePathFactory = new RoutePathFactory(applicationConfig);
this.prefixPath = stripEndSlash(
addLeadingSlash(this.applicationConfig.getGlobalPrefix()),
);
this.excludedGlobalPrefixRoutes =
this.applicationConfig.getGlobalPrefixOptions().exclude;
this.versioningConfig = this.applicationConfig.getVersioning();
}
public extractPathsFrom({ path, method, version }: RouteInfo): string[] {
const versionPath = this.extractVersionPathFrom(version);
if (this.isAWildcard(path)) {
return Array.isArray(this.excludedGlobalPrefixRoutes)
? [
this.prefixPath + versionPath + addLeadingSlash(path),
...this.excludedGlobalPrefixRoutes.map(
route => versionPath + addLeadingSlash(route.path),
),
]
: [this.prefixPath + versionPath + addLeadingSlash(path)];
}
return [this.extractNonWildcardPathFrom({ path, method, version })];
}
public extractPathFrom(route: RouteInfo): string {
if (this.isAWildcard(route.path) && !route.version) {
return addLeadingSlash(route.path);
}
return this.extractNonWildcardPathFrom(route);
}
private isAWildcard(path: string): boolean {
return ['*', '/*', '/*/', '(.*)', '/(.*)'].includes(path);
}
private extractNonWildcardPathFrom({
path,
method,
version,
}: RouteInfo): string {
const versionPath = this.extractVersionPathFrom(version);
if (
Array.isArray(this.excludedGlobalPrefixRoutes) &&
isRouteExcluded(this.excludedGlobalPrefixRoutes, path, method)
) {
return versionPath + addLeadingSlash(path);
}
return this.prefixPath + versionPath + addLeadingSlash(path);
}
private extractVersionPathFrom(version?: VersionValue): string {
if (!version || this.versioningConfig?.type !== VersioningType.URI)
return '';
const versionPrefix = this.routePathFactory.getVersionPrefix(
this.versioningConfig,
);
return addLeadingSlash(versionPrefix + version.toString());
}
}

View File

@@ -1,20 +1,33 @@
import { RequestMethod } from '@nestjs/common';
import { HttpServer, RouteInfo, Type } from '@nestjs/common/interfaces';
import { isFunction } from '@nestjs/common/utils/shared.utils';
import {
addLeadingSlash,
isFunction,
isString,
} from '@nestjs/common/utils/shared.utils';
import { iterate } from 'iterare';
import * as pathToRegexp from 'path-to-regexp';
import { v4 as uuid } from 'uuid';
import { uid } from 'uid';
import { ExcludeRouteMetadata } from '../router/interfaces/exclude-route-metadata.interface';
import { isRouteExcluded } from '../router/utils';
export const mapToExcludeRoute = (
routes: RouteInfo[],
routes: (string | RouteInfo)[],
): ExcludeRouteMetadata[] => {
return routes.map(({ path, method }) => ({
pathRegex: pathToRegexp(path),
requestMethod: method,
path,
}));
return routes.map(route => {
if (isString(route)) {
return {
path: route,
requestMethod: RequestMethod.ALL,
pathRegex: pathToRegexp(addLeadingSlash(route)),
};
}
return {
path: route.path,
requestMethod: route.method,
pathRegex: pathToRegexp(addLeadingSlash(route.path)),
};
});
};
export const filterMiddleware = <T extends Function | Type<any> = any>(
@@ -86,7 +99,7 @@ export function isMiddlewareClass(middleware: any): middleware is Type<any> {
);
}
export function assignToken(metatype: Type<any>, token = uuid()): Type<any> {
export function assignToken(metatype: Type<any>, token = uid(21)): Type<any> {
Object.defineProperty(metatype, 'name', { value: token });
return metatype;
}

View File

@@ -52,7 +52,7 @@ export class NestApplicationContext<
private readonly moduleCompiler = new ModuleCompiler();
private shutdownCleanupRef?: (...args: unknown[]) => unknown;
private _instanceLinksHost: InstanceLinksHost;
private _moduleRefsByDistance?: Array<Module>;
private _moduleRefsForHooksByDistance?: Array<Module>;
protected get instanceLinksHost() {
if (!this._instanceLinksHost) {
@@ -372,10 +372,7 @@ export class NestApplicationContext<
* modules and its children.
*/
protected async callInitHook(): Promise<void> {
if (this.appOptions.preview) {
return;
}
const modulesSortedByDistance = this.getModulesSortedByDistance();
const modulesSortedByDistance = this.getModulesToTriggerHooksOn();
for (const module of modulesSortedByDistance) {
await callModuleInitHook(module);
}
@@ -386,10 +383,7 @@ export class NestApplicationContext<
* modules and its children.
*/
protected async callDestroyHook(): Promise<void> {
if (this.appOptions.preview) {
return;
}
const modulesSortedByDistance = this.getModulesSortedByDistance();
const modulesSortedByDistance = this.getModulesToTriggerHooksOn();
for (const module of modulesSortedByDistance) {
await callModuleDestroyHook(module);
}
@@ -400,10 +394,7 @@ export class NestApplicationContext<
* modules and its children.
*/
protected async callBootstrapHook(): Promise<void> {
if (this.appOptions.preview) {
return;
}
const modulesSortedByDistance = this.getModulesSortedByDistance();
const modulesSortedByDistance = this.getModulesToTriggerHooksOn();
for (const module of modulesSortedByDistance) {
await callModuleBootstrapHook(module);
}
@@ -414,10 +405,7 @@ export class NestApplicationContext<
* modules and children.
*/
protected async callShutdownHook(signal?: string): Promise<void> {
if (this.appOptions.preview) {
return;
}
const modulesSortedByDistance = this.getModulesSortedByDistance();
const modulesSortedByDistance = this.getModulesToTriggerHooksOn();
for (const module of modulesSortedByDistance) {
await callAppShutdownHook(module, signal);
}
@@ -428,10 +416,7 @@ export class NestApplicationContext<
* modules and children.
*/
protected async callBeforeShutdownHook(signal?: string): Promise<void> {
if (this.appOptions.preview) {
return;
}
const modulesSortedByDistance = this.getModulesSortedByDistance();
const modulesSortedByDistance = this.getModulesToTriggerHooksOn();
for (const module of modulesSortedByDistance) {
await callBeforeAppShutdownHook(module, signal);
}
@@ -445,17 +430,20 @@ export class NestApplicationContext<
}
}
private getModulesSortedByDistance(): Module[] {
if (this._moduleRefsByDistance) {
return this._moduleRefsByDistance;
private getModulesToTriggerHooksOn(): Module[] {
if (this._moduleRefsForHooksByDistance) {
return this._moduleRefsForHooksByDistance;
}
const modulesContainer = this.container.getModules();
const compareFn = (a: Module, b: Module) => b.distance - a.distance;
this._moduleRefsByDistance = Array.from(modulesContainer.values()).sort(
const modulesSortedByDistance = Array.from(modulesContainer.values()).sort(
compareFn,
);
return this._moduleRefsByDistance;
this._moduleRefsForHooksByDistance = this.appOptions?.preview
? modulesSortedByDistance.filter(moduleRef => moduleRef.initOnPreview)
: modulesSortedByDistance;
return this._moduleRefsForHooksByDistance;
}
private printInPreviewModeWarning() {

View File

@@ -7,7 +7,6 @@ import {
NestHybridApplicationOptions,
NestInterceptor,
PipeTransform,
RequestMethod,
VersioningOptions,
VersioningType,
WebSocketAdapter,
@@ -15,7 +14,6 @@ import {
import {
GlobalPrefixOptions,
NestApplicationOptions,
RouteInfo,
} from '@nestjs/common/interfaces';
import {
CorsOptions,
@@ -31,7 +29,6 @@ import {
} from '@nestjs/common/utils/shared.utils';
import { iterate } from 'iterare';
import { platform } from 'os';
import * as pathToRegexp from 'path-to-regexp';
import { AbstractHttpAdapter } from './adapters';
import { ApplicationConfig } from './application-config';
import { MESSAGES } from './constants';
@@ -41,10 +38,9 @@ import { Injector } from './injector/injector';
import { GraphInspector } from './inspector/graph-inspector';
import { MiddlewareContainer } from './middleware/container';
import { MiddlewareModule } from './middleware/middleware-module';
import { mapToExcludeRoute } from './middleware/utils';
import { NestApplicationContext } from './nest-application-context';
import { ExcludeRouteMetadata } from './router/interfaces/exclude-route-metadata.interface';
import { Resolver } from './router/interfaces/resolver.interface';
import { RoutePathFactory } from './router/route-path-factory';
import { RoutesResolver } from './router/routes-resolver';
const { SocketModule } = optionalRequire(
@@ -89,9 +85,8 @@ export class NestApplication
this.selectContextModule();
this.registerHttpServer();
this.injector = new Injector({ preview: this.appOptions.preview });
this.middlewareModule = new MiddlewareModule(new RoutePathFactory(config));
this.middlewareModule = new MiddlewareModule();
this.routesResolver = new RoutesResolver(
this.container,
this.config,
@@ -372,22 +367,9 @@ export class NestApplication
public setGlobalPrefix(prefix: string, options?: GlobalPrefixOptions): this {
this.config.setGlobalPrefix(prefix);
if (options) {
const exclude = options?.exclude.map(
(route: string | RouteInfo): ExcludeRouteMetadata => {
if (isString(route)) {
return {
requestMethod: RequestMethod.ALL,
pathRegex: pathToRegexp(addLeadingSlash(route)),
path: route,
};
}
return {
requestMethod: route.method,
pathRegex: pathToRegexp(addLeadingSlash(route.path)),
path: route.path,
};
},
);
const exclude = options?.exclude
? mapToExcludeRoute(options.exclude)
: [];
this.config.setGlobalPrefixOptions({
...options,
exclude,

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "9.3.0-beta.3",
"version": "9.3.10",
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -30,13 +30,12 @@
"@nuxtjs/opencollective": "0.3.2",
"fast-safe-stringify": "2.1.1",
"iterare": "1.2.1",
"object-hash": "3.0.0",
"path-to-regexp": "3.2.0",
"tslib": "2.4.1",
"uuid": "9.0.0"
"tslib": "2.5.0",
"uid": "2.0.1"
},
"devDependencies": {
"@nestjs/common": "^9.3.0-beta.3"
"@nestjs/common": "9.3.10"
},
"peerDependencies": {
"@nestjs/common": "^9.0.0",

View File

@@ -20,9 +20,7 @@ export class MethodsReplFn extends ReplFunction {
? Object.getPrototypeOf(this.ctx.app.get(token))
: token?.prototype;
const methods = new Set(
this.metadataScanner.getAllFilteredMethodNames(proto),
);
const methods = this.metadataScanner.getAllMethodNames(proto);
this.ctx.writeToStdout('\n');
this.ctx.writeToStdout(`${clc.green('Methods')}:\n`);

View File

@@ -127,15 +127,15 @@ export class ReplContext {
this.nativeFunctions.set(nativeFunction.fnDefinition.name, nativeFunction);
nativeFunction.fnDefinition.aliases?.forEach(aliaseName => {
nativeFunction.fnDefinition.aliases?.forEach(aliasName => {
const aliasNativeFunction: InstanceType<ReplFunctionClass> =
Object.create(nativeFunction);
aliasNativeFunction.fnDefinition = {
name: aliaseName,
name: aliasName,
description: aliasNativeFunction.fnDefinition.description,
signature: aliasNativeFunction.fnDefinition.signature,
};
this.nativeFunctions.set(aliaseName, aliasNativeFunction);
this.nativeFunctions.set(aliasName, aliasNativeFunction);
nativeFunctions.push(aliasNativeFunction);
});

View File

@@ -1,7 +1,11 @@
import { RequestMethod } from '@nestjs/common';
export interface ExcludeRouteMetadata {
/**
* Route path.
*/
path: string;
/**
* Regular expression representing the route path.
*/

View File

@@ -33,18 +33,28 @@ export class PathsExplorer {
? Object.getPrototypeOf(instance)
: prototype;
return this.metadataScanner.scanFromPrototype<Controller, RouteDefinition>(
instance,
instancePrototype,
method => this.exploreMethodMetadata(instance, instancePrototype, method),
);
return this.metadataScanner
.getAllMethodNames(instancePrototype)
.reduce((acc, method) => {
const route = this.exploreMethodMetadata(
instance,
instancePrototype,
method,
);
if (route) {
acc.push(route);
}
return acc;
}, []);
}
public exploreMethodMetadata(
instance: Controller,
prototype: object,
methodName: string,
): RouteDefinition {
): RouteDefinition | null {
const instanceCallback = instance[methodName];
const prototypeCallback = prototype[methodName];
const routePath = Reflect.getMetadata(PATH_METADATA, prototypeCallback);

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