Compare commits

...

752 Commits

Author SHA1 Message Date
Kamil Myśliwiec
99b9dda0cf chore(): minor formatting changes 2022-03-01 13:51:33 +01:00
Kamil Myśliwiec
aa0c73fd45 chore(): merge conflicts 2022-03-01 13:45:36 +01:00
Kamil Mysliwiec
874344c60e Merge pull request #9271 from micalevisk/fix/issue-9245
fix(core): use class refs as keys (container)
2022-03-01 13:01:38 +01:00
Kamil Mysliwiec
7df7e3ac47 Merge pull request #9270 from davidschuette/kafka-commit-offsets
feat(microservices): add commit-offsets function to clientkafka
2022-03-01 13:01:27 +01:00
Kamil Mysliwiec
e832503dba Merge pull request #9209 from jeean/feat/catch-decorator
feat(common): add abstract type to catch decorator
2022-03-01 13:00:49 +01:00
Kamil Mysliwiec
aad9137fc6 Merge pull request #9227 from nestjs/feat/optional-factory-deps
feat(core): support optional dependencies in factory providers
2022-03-01 13:00:40 +01:00
Kamil Mysliwiec
c653ed597e Merge pull request #9240 from davidschuette/streamable-file-update
feat(common): extend streamable-file header support
2022-03-01 13:00:26 +01:00
Kamil Mysliwiec
74789fd5c8 Merge pull request #9247 from brian-pinwheel/brian-tq-fix-middleware
fix(common): Providing typing for optional error handling in middleware
2022-03-01 13:00:20 +01:00
Kamil Mysliwiec
9911e0fb8b Merge pull request #9200 from guiruiz/kafka-serializer-input
feat(microservices): Add options param to serializer
2022-03-01 12:59:52 +01:00
Kamil Mysliwiec
5ede2867e6 Merge pull request #9274 from nestjs/dependabot/npm_and_yarn/mongoose-6.2.4
chore(deps-dev): bump mongoose from 6.2.3 to 6.2.4
2022-03-01 12:48:58 +01:00
Kamil Mysliwiec
350d4cf743 Merge pull request #9275 from nestjs/dependabot/npm_and_yarn/types/cache-manager-3.4.3
chore(deps-dev): bump @types/cache-manager from 3.4.2 to 3.4.3
2022-03-01 12:48:44 +01:00
dependabot[bot]
23d034f7b7 chore(deps-dev): bump @types/cache-manager from 3.4.2 to 3.4.3
Bumps [@types/cache-manager](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/cache-manager) from 3.4.2 to 3.4.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/cache-manager)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 00:09:11 +00:00
dependabot[bot]
7378a7d4e1 chore(deps-dev): bump mongoose from 6.2.3 to 6.2.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.2.3...6.2.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 00:07:56 +00:00
Micael Levi (@micalevisk)
d38a592ef0 test(integration): add tests for self-injections providers 2022-02-28 18:21:26 -04:00
Micael Levi L. Cavalcante
6e1243951f fix(core): use class refs as keys (container)
Refs: commit cc6d48b4c
2022-02-28 12:33:39 -04:00
David Schütte
2ff8f702d8 feat(microservices): add commit-offsets function to clientkafka
This commit closes issue #9258.
2022-02-28 14:50:35 +01:00
Kamil Mysliwiec
342649a0f5 Merge pull request #9250 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.5
chore(deps-dev): bump @nestjs/apollo from 10.0.4 to 10.0.5
2022-02-28 13:12:04 +01:00
dependabot[bot]
ce5cbba47e chore(deps-dev): bump @nestjs/apollo from 10.0.4 to 10.0.5
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.4 to 10.0.5.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.4...v10.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 09:23:53 +00:00
Kamil Mysliwiec
8e2ce7103c Merge pull request #9251 from nestjs/dependabot/npm_and_yarn/types/node-17.0.21
chore(deps-dev): bump @types/node from 17.0.18 to 17.0.21
2022-02-28 10:16:11 +01:00
Kamil Mysliwiec
0c83078e0c Merge pull request #9252 from nestjs/dependabot/npm_and_yarn/fastify-cors-6.0.3
chore(deps): bump fastify-cors from 6.0.2 to 6.0.3
2022-02-28 10:16:06 +01:00
Kamil Mysliwiec
38ed8175f9 Merge pull request #9253 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.5
chore(deps-dev): bump @nestjs/graphql from 10.0.4 to 10.0.5
2022-02-28 10:15:33 +01:00
Kamil Mysliwiec
3a3a29438e Merge pull request #9254 from nestjs/dependabot/npm_and_yarn/typeorm-0.2.44
chore(deps-dev): bump typeorm from 0.2.43 to 0.2.44
2022-02-28 10:15:23 +01:00
Kamil Mysliwiec
1ade6f30c3 Merge pull request #9259 from nestjs/dependabot/npm_and_yarn/types/ws-8.5.1
chore(deps-dev): bump @types/ws from 8.2.3 to 8.5.1
2022-02-28 10:15:19 +01:00
Kamil Mysliwiec
559bf7d7b0 Merge pull request #9260 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.5.7
chore(deps-dev): bump @grpc/grpc-js from 1.5.5 to 1.5.7
2022-02-28 10:15:13 +01:00
Kamil Mysliwiec
afd4413cae Merge pull request #9267 from nestjs/dependabot/npm_and_yarn/url-parse-1.5.10
chore(deps): bump url-parse from 1.5.6 to 1.5.10
2022-02-28 10:15:06 +01:00
Kamil Mysliwiec
9a78617503 Merge pull request #9249 from nestjs/renovate/nestjs-schematics-8.x
chore(deps): update dependency @nestjs/schematics to v8.0.7
2022-02-28 10:14:52 +01:00
dependabot[bot]
7b0d79f3fe chore(deps): bump url-parse from 1.5.6 to 1.5.10
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.6 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.6...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 04:17:03 +00:00
Renovate Bot
410fa966ce chore(deps): update dependency @nestjs/schematics to v8.0.7 2022-02-28 02:03:58 +00:00
dependabot[bot]
ecce78a1a8 chore(deps-dev): bump @grpc/grpc-js from 1.5.5 to 1.5.7
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.5.5 to 1.5.7.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.5.5...@grpc/grpc-js@1.5.7)

---
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>
2022-02-25 00:10:02 +00:00
dependabot[bot]
dcffa9e9e4 chore(deps-dev): bump @types/ws from 8.2.3 to 8.5.1
Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 8.2.3 to 8.5.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 00:07:59 +00:00
dependabot[bot]
4aed61f6dc chore(deps-dev): bump typeorm from 0.2.43 to 0.2.44
Bumps [typeorm](https://github.com/typeorm/typeorm) from 0.2.43 to 0.2.44.
- [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.2.43...0.2.44)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 00:10:56 +00:00
dependabot[bot]
b05dcf2a76 chore(deps-dev): bump @nestjs/graphql from 10.0.4 to 10.0.5
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.4 to 10.0.5.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.4...v10.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 00:09:23 +00:00
dependabot[bot]
e5465a0c49 chore(deps): bump fastify-cors from 6.0.2 to 6.0.3
Bumps [fastify-cors](https://github.com/fastify/fastify-cors) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/fastify/fastify-cors/releases)
- [Commits](https://github.com/fastify/fastify-cors/compare/v6.0.2...v6.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 00:07:32 +00:00
dependabot[bot]
080142d148 chore(deps-dev): bump @types/node from 17.0.18 to 17.0.21
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.18 to 17.0.21.
- [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>
2022-02-24 00:06:06 +00:00
David Schütte
9ca2a9a172 feat(common): add length header to streamable-file
Provide option to specify content-length headers when using StreamableFile.
No need to access the native response object.

BREAKING CHANGE: not specifying content-disposition header and
StreamableFile option disposition would send header value 'null'
instead of not sending the header at all.
This changes to not sending the header if no value is specified.
This commit closes issue #9229.
2022-02-23 11:13:59 +01:00
Brian Bauman
730e497937 fix(common): Providing typing for optional error handling in middleware 2022-02-22 23:58:05 -06:00
Kamil Mysliwiec
a576a0b857 Merge pull request #9244 from nestjs/dependabot/npm_and_yarn/mongoose-6.2.3
chore(deps-dev): bump mongoose from 6.2.2 to 6.2.3
2022-02-22 09:19:37 +01:00
Kamil Mysliwiec
6499c83a0c Merge pull request #9242 from nestjs/renovate/babel-monorepo
chore(deps): update dependency @babel/cli to v7.17.6
2022-02-22 09:19:32 +01:00
Kamil Mysliwiec
392d84e6d6 Merge pull request #9241 from yevgeniypak/websockets-pingtimeout-default-value
docs(websockets): update GatewayMetadata pingTimeout default value to 20000 ms
2022-02-22 09:16:02 +01:00
Yevgeniy
7759ba56ca docs(websockets): add numeric separators to numeric literals 2022-02-22 11:50:16 +06:00
Renovate Bot
4eef8f473c chore(deps): update dependency @babel/cli to v7.17.6 2022-02-22 05:42:45 +00:00
dependabot[bot]
d653236e16 chore(deps-dev): bump mongoose from 6.2.2 to 6.2.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.2.2 to 6.2.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.2.2...6.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-22 00:09:54 +00:00
Yevgeniy
47a1db26c6 docs(websockets): update GatewayMetadata pingTimeout default value to 20000 ms 2022-02-22 02:58:55 +06:00
David Schütte
c8ff569985 feat(common): extend streamable-file header support
Provide option to specify additional headers when using StreamableFile.
No need to access the native response option.

BREAKING CHANGE: not specifying content-disposition header and
StreamableFile option disposition would send header value 'null'
instead of not sending the header at all.
This changes to not sending the header if no value is specified.
This commit closes issue #9229.
2022-02-21 17:58:37 +01:00
Kamil Mysliwiec
78ca731631 Merge pull request #9237 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.4
chore(deps-dev): bump @nestjs/graphql from 10.0.3 to 10.0.4
2022-02-21 13:02:32 +01:00
Kamil Myśliwiec
19ea1c2f35 test(): add more tests around optional factory dependency 2022-02-21 10:20:06 +01:00
Kamil Myśliwiec
42861828d9 fix(core): fix optional factory provider condition 2022-02-21 10:19:48 +01:00
dependabot[bot]
038e2146ed chore(deps-dev): bump @nestjs/graphql from 10.0.3 to 10.0.4
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.3 to 10.0.4.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.3...v10.0.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 08:25:27 +00:00
Kamil Mysliwiec
4a45709916 Merge pull request #9233 from nestjs/dependabot/npm_and_yarn/object-hash-3.0.0
chore(deps): bump object-hash from 2.2.0 to 3.0.0
2022-02-21 09:19:19 +01:00
Kamil Mysliwiec
789cb3a2d1 Merge pull request #9238 from nestjs/dependabot/npm_and_yarn/mocha-9.2.1
chore(deps-dev): bump mocha from 9.2.0 to 9.2.1
2022-02-21 09:19:09 +01:00
Kamil Mysliwiec
1287c5cda2 Merge pull request #9236 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.4
chore(deps-dev): bump @nestjs/apollo from 10.0.3 to 10.0.4
2022-02-21 09:18:57 +01:00
Kamil Mysliwiec
2d7192f4c1 Merge pull request #9235 from nestjs/dependabot/npm_and_yarn/fastify-3.27.2
chore(deps): bump fastify from 3.27.1 to 3.27.2
2022-02-21 09:18:51 +01:00
Kamil Mysliwiec
13c998d411 Merge pull request #9234 from nestjs/dependabot/npm_and_yarn/eslint-config-prettier-8.4.0
chore(deps-dev): bump eslint-config-prettier from 8.3.0 to 8.4.0
2022-02-21 09:18:46 +01:00
Kamil Mysliwiec
067cb0e3cb Merge pull request #9232 from nestjs/dependabot/npm_and_yarn/types/ws-8.2.3
chore(deps-dev): bump @types/ws from 8.2.2 to 8.2.3
2022-02-21 09:18:35 +01:00
dependabot[bot]
6d4850762b chore(deps-dev): bump mocha from 9.2.0 to 9.2.1
Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.0 to 9.2.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.2.0...v9.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:24:46 +00:00
dependabot[bot]
50c8f8f092 chore(deps-dev): bump @nestjs/apollo from 10.0.3 to 10.0.4
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.3 to 10.0.4.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.3...v10.0.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:18:19 +00:00
dependabot[bot]
0cd5bb6747 chore(deps): bump fastify from 3.27.1 to 3.27.2
Bumps [fastify](https://github.com/fastify/fastify) from 3.27.1 to 3.27.2.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v3.27.1...v3.27.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:14:11 +00:00
dependabot[bot]
3333e991fa chore(deps-dev): bump eslint-config-prettier from 8.3.0 to 8.4.0
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.3.0 to 8.4.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.3.0...v8.4.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>
2022-02-21 00:12:10 +00:00
dependabot[bot]
55b731070f chore(deps): bump object-hash from 2.2.0 to 3.0.0
Bumps [object-hash](https://github.com/puleos/object-hash) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/puleos/object-hash/releases)
- [Commits](https://github.com/puleos/object-hash/compare/v2.2.0...v3.0.0)

---
updated-dependencies:
- dependency-name: object-hash
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:09:03 +00:00
dependabot[bot]
95cd73cbb4 chore(deps-dev): bump @types/ws from 8.2.2 to 8.2.3
Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 8.2.2 to 8.2.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:06:59 +00:00
Kamil Myśliwiec
6136e46419 feat(core): support optional dependencies in factory providers 2022-02-18 16:59:24 +01:00
Kamil Myśliwiec
722b651228 test(microservices): bump timeouts for mqtt integration tests 2022-02-18 16:58:46 +01:00
Kamil Myśliwiec
9f5c777f7b chore(): cleanup 2022-02-18 13:36:00 +01:00
Kamil Myśliwiec
273670dc90 Merge branch 'master' of https://github.com/nestjs/nest 2022-02-18 13:34:23 +01:00
Kamil Myśliwiec
8481539ef0 chore(): update package.json 2022-02-18 13:34:13 +01:00
Kamil Mysliwiec
2653902cd0 Merge pull request #9219 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.3
chore(deps-dev): bump @nestjs/apollo from 10.0.2 to 10.0.3
2022-02-18 13:13:13 +01:00
Kamil Myśliwiec
4965e6c71e Merge branch 'master' of https://github.com/nestjs/nest 2022-02-18 13:13:00 +01:00
Kamil Myśliwiec
8357bebe5a chore(): update package.json, add new label configuration 2022-02-18 13:12:53 +01:00
Kamil Mysliwiec
87db276afd Merge pull request #9224 from nestjs/renovate/npm-url-parse-vulnerability
chore(deps): update dependency url-parse to 1.5.6 [security]
2022-02-18 11:23:04 +01:00
Kamil Mysliwiec
52c2feacbe Merge pull request #9215 from Parsath/patch-1
docs(): fix grammar typo in readme.md
2022-02-18 10:46:48 +01:00
Renovate Bot
030718b3ca chore(deps): update dependency url-parse to 1.5.6 [security] 2022-02-18 09:43:37 +00:00
Bilel Taktak
c95733b7ea docs(): fix grammar typo in readme.md
docs(): fix grammar typo on readme.md

change sentence in line 57 from:
`It can grow thanks to the sponsors and support **of** the amazing backers`
to
`It can grow thanks to the sponsors and support **from** the amazing backers`
2022-02-18 10:15:10 +01:00
dependabot[bot]
b8ee86ec68 chore(deps-dev): bump @nestjs/apollo from 10.0.2 to 10.0.3
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.2 to 10.0.3.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.2...v10.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>
2022-02-18 08:38:23 +00:00
Kamil Mysliwiec
f3c8c61aea Merge pull request #9221 from nestjs/dependabot/npm_and_yarn/light-my-request-4.8.0
chore(deps): bump light-my-request from 4.7.1 to 4.8.0
2022-02-18 09:32:49 +01:00
Kamil Mysliwiec
0013296335 Merge pull request #9220 from nestjs/dependabot/npm_and_yarn/typeorm-0.2.43
chore(deps-dev): bump typeorm from 0.2.42 to 0.2.43
2022-02-18 09:32:43 +01:00
Kamil Mysliwiec
6c3f63fa38 Merge pull request #9218 from nestjs/dependabot/npm_and_yarn/express-4.17.3
chore(deps): bump express from 4.17.2 to 4.17.3
2022-02-18 09:32:35 +01:00
Kamil Mysliwiec
311aea42d9 Merge pull request #9217 from nestjs/dependabot/npm_and_yarn/mqtt-4.3.6
chore(deps-dev): bump mqtt from 4.3.5 to 4.3.6
2022-02-18 09:32:29 +01:00
Kamil Mysliwiec
1cc3028566 Merge pull request #9216 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.3
chore(deps-dev): bump @nestjs/graphql from 10.0.2 to 10.0.3
2022-02-18 09:32:24 +01:00
Kamil Mysliwiec
89aa2cae59 Merge pull request #9214 from nestjs/renovate/babel-monorepo
chore(deps): update dependency @babel/core to v7.17.5
2022-02-18 09:32:11 +01:00
Renovate Bot
8612121842 chore(deps): update dependency @babel/core to v7.17.5 2022-02-18 06:20:05 +00:00
dependabot[bot]
f40e15051e chore(deps): bump light-my-request from 4.7.1 to 4.8.0
Bumps [light-my-request](https://github.com/fastify/light-my-request) from 4.7.1 to 4.8.0.
- [Release notes](https://github.com/fastify/light-my-request/releases)
- [Commits](https://github.com/fastify/light-my-request/compare/v4.7.1...v4.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 00:15:43 +00:00
dependabot[bot]
3f627298a6 chore(deps-dev): bump typeorm from 0.2.42 to 0.2.43
Bumps [typeorm](https://github.com/typeorm/typeorm) from 0.2.42 to 0.2.43.
- [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.2.42...0.2.43)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 00:13:48 +00:00
dependabot[bot]
82beb6e5a9 chore(deps): bump express from 4.17.2 to 4.17.3
Bumps [express](https://github.com/expressjs/express) from 4.17.2 to 4.17.3.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.2...4.17.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 00:08:45 +00:00
dependabot[bot]
ca83ce4aab chore(deps-dev): bump mqtt from 4.3.5 to 4.3.6
Bumps [mqtt](https://github.com/mqttjs/MQTT.js) from 4.3.5 to 4.3.6.
- [Release notes](https://github.com/mqttjs/MQTT.js/releases)
- [Changelog](https://github.com/mqttjs/MQTT.js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mqttjs/MQTT.js/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 00:07:23 +00:00
dependabot[bot]
5045153d88 chore(deps-dev): bump @nestjs/graphql from 10.0.2 to 10.0.3
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.2 to 10.0.3.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.2...v10.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 00:05:11 +00:00
Bilel Taktak
16a263b998 docs(): fix grammar typo on readme.md
docs(): fix grammar typo on readme.md

change sentence in line 57 from:
`It can grow thanks to the sponsors and support **by** the amazing backers`
to
`It can grow thanks to the sponsors and support **of** the amazing backers`
2022-02-18 00:06:46 +01:00
Kamil Mysliwiec
d5eb20b73c Merge pull request #9210 from nestjs/dependabot/npm_and_yarn/mongoose-6.2.2
chore(deps-dev): bump mongoose from 6.2.1 to 6.2.2
2022-02-17 13:34:54 +01:00
Kamil Mysliwiec
e61df94d7c Merge pull request #9211 from nestjs/dependabot/npm_and_yarn/core-js-3.21.1
chore(deps-dev): bump core-js from 3.21.0 to 3.21.1
2022-02-17 13:34:34 +01:00
Kamil Mysliwiec
06e78d1699 Merge pull request #9212 from nestjs/dependabot/npm_and_yarn/typeorm-0.2.42
chore(deps-dev): bump typeorm from 0.2.41 to 0.2.42
2022-02-17 13:34:29 +01:00
Kamil Mysliwiec
0a7244095b Merge pull request #9213 from nestjs/dependabot/npm_and_yarn/body-parser-1.19.2
chore(deps): bump body-parser from 1.19.1 to 1.19.2
2022-02-17 13:34:26 +01:00
Kamil Mysliwiec
2be79b278f Merge pull request #9204 from TomerRon/sample(02-gateways)/fix-redis-adapter
sample(02-gateways): Fix Redis adapter
2022-02-17 13:33:38 +01:00
Tomer Ron
ff66f4cf8e docs(sample-02-gateways): remove redis adapter, add documentation on how to add the redis adapter 2022-02-17 13:07:33 +01:00
dependabot[bot]
bc06b6f813 chore(deps): bump body-parser from 1.19.1 to 1.19.2
Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.19.1 to 1.19.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.19.1...1.19.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>
2022-02-17 00:16:59 +00:00
dependabot[bot]
09277ada56 chore(deps-dev): bump typeorm from 0.2.41 to 0.2.42
Bumps [typeorm](https://github.com/typeorm/typeorm) from 0.2.41 to 0.2.42.
- [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.2.41...0.2.42)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 00:12:23 +00:00
dependabot[bot]
d568de3627 chore(deps-dev): bump core-js from 3.21.0 to 3.21.1
Bumps [core-js](https://github.com/zloirock/core-js) from 3.21.0 to 3.21.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/compare/v3.21.0...v3.21.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 00:10:26 +00:00
dependabot[bot]
58aeccf607 chore(deps-dev): bump mongoose from 6.2.1 to 6.2.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.2.1 to 6.2.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.2.1...6.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 00:08:37 +00:00
Jeean
60c2551b42 feat(common): add abstract type to catch decorator 2022-02-17 02:09:23 +09:00
Kamil Myśliwiec
33b601cf0f build(): remove useUnknownInCatchVariables flag 2022-02-16 14:11:38 +01:00
Kamil Myśliwiec
813feec8c9 chore(@nestjs) publish v8.3.1 release 2022-02-16 13:49:13 +01:00
Kamil Myśliwiec
53df661a85 build(): remove useUnknownInCatchVariables flag 2022-02-16 13:48:01 +01:00
Kamil Myśliwiec
33cfad478a chore(): downgrade typescript version #8320 2022-02-16 13:47:16 +01:00
Kamil Mysliwiec
f9f8a1a8de Merge pull request #9207 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo
2022-02-16 13:45:22 +01:00
Kamil Mysliwiec
5544fb05e9 Merge pull request #9206 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.25
2022-02-16 13:45:10 +01:00
Renovate Bot
246d217e67 chore(deps): update dependency @types/node to v16.11.25 2022-02-16 11:25:38 +00:00
Renovate Bot
457caa0b84 chore(deps): update babel monorepo 2022-02-16 10:58:54 +00:00
Tomer Ron
52d47f8459 docs(sample-02-gateways): fix redis adapter 2022-02-15 12:11:12 +01:00
Kamil Mysliwiec
d295f1c572 Merge pull request #9202 from nestjs/renovate/bull-3.x
chore(deps): update dependency @types/bull to v3.15.8
2022-02-15 11:22:25 +01:00
Renovate Bot
0fecd7f1c6 chore(deps): update dependency @types/bull to v3.15.8 2022-02-15 10:04:23 +00:00
Kamil Mysliwiec
07e52a9df1 Update Readme.md 2022-02-15 10:48:26 +01:00
Guilherme Ruiz
518c5d8b15 feat(microservices): Add options param to serializer 2022-02-15 20:33:28 +11:00
Kamil Mysliwiec
092da8c721 Merge pull request #9197 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.2
chore(deps-dev): bump @nestjs/apollo from 10.0.0 to 10.0.2
2022-02-15 09:46:03 +01:00
Kamil Mysliwiec
a681cf1f87 Merge pull request #9196 from nestjs/dependabot/npm_and_yarn/nats-2.6.1
chore(deps-dev): bump nats from 2.6.0 to 2.6.1
2022-02-15 09:45:55 +01:00
Kamil Mysliwiec
e80e687010 Merge pull request #9195 from nestjs/dependabot/npm_and_yarn/types/node-17.0.18
chore(deps-dev): bump @types/node from 17.0.17 to 17.0.18
2022-02-15 09:45:46 +01:00
dependabot[bot]
12c317a421 chore(deps-dev): bump @nestjs/apollo from 10.0.0 to 10.0.2
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.0 to 10.0.2.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.0...v10.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-15 00:09:58 +00:00
dependabot[bot]
5d73eed928 chore(deps-dev): bump nats from 2.6.0 to 2.6.1
Bumps [nats](https://github.com/nats-io/nats.js) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/nats-io/nats.js/releases)
- [Commits](https://github.com/nats-io/nats.js/compare/v2.6.0...v2.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-15 00:06:37 +00:00
dependabot[bot]
6e5092b410 chore(deps-dev): bump @types/node from 17.0.17 to 17.0.18
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.17 to 17.0.18.
- [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>
2022-02-15 00:03:55 +00:00
Kamil Mysliwiec
ea4e4ecdfb Merge pull request #9189 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.24
2022-02-14 15:04:11 +01:00
Renovate Bot
1777c3dcdb chore(deps): update dependency @types/node to v16.11.24 2022-02-14 12:45:25 +00:00
Kamil Myśliwiec
0fd12438df chore(@nestjs) publish v8.3.0 release 2022-02-14 12:57:55 +01:00
Kamil Myśliwiec
603ff45495 chore(): downgrade lerna version 2022-02-14 12:56:50 +01:00
Kamil Myśliwiec
e4098e6c39 test(microservices): update broken mqtt integration test (record builder) 2022-02-14 12:42:58 +01:00
Kamil Myśliwiec
6ebce649d8 fix(microservices): tcp server should reconnect to the appropriate host 2022-02-14 12:06:14 +01:00
Kamil Myśliwiec
6be906724c Merge branch 'guiruiz-kafka-async-serializer' 2022-02-14 11:59:46 +01:00
Kamil Myśliwiec
c26fa108f9 style(microservices): minor formatting and naming changes 2022-02-14 11:59:36 +01:00
Kamil Myśliwiec
343877d861 Merge branch 'kafka-async-serializer' of https://github.com/guiruiz/nest into guiruiz-kafka-async-serializer 2022-02-14 11:57:42 +01:00
Kamil Myśliwiec
f252a0ce04 Merge branch 'dependabot/npm_and_yarn/types/node-17.0.17' 2022-02-14 11:57:26 +01:00
Kamil Myśliwiec
71c0af6f10 test(core): address type errors in tests 2022-02-14 11:57:12 +01:00
Kamil Mysliwiec
71584e6178 Merge pull request #9115 from nestjs/dependabot/npm_and_yarn/mqtt-4.3.5
chore(deps-dev): bump mqtt from 4.3.4 to 4.3.5
2022-02-14 11:48:30 +01:00
Kamil Mysliwiec
ace3e861ae Merge pull request #9167 from nestjs/renovate/lint-staged-12.x
chore(deps): update dependency lint-staged to v12.3.4
2022-02-14 11:47:52 +01:00
Kamil Myśliwiec
ba8a4e92ac Merge branch 'EugeneKorshenko-feature/package_microservices/add_extras_to_pattern_decorators' 2022-02-14 11:45:13 +01:00
dependabot[bot]
6c3697dd57 chore(deps-dev): bump @types/node from 16.11.21 to 17.0.17
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.21 to 17.0.17.
- [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-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 10:42:54 +00:00
Kamil Myśliwiec
0a69e9a6e0 Merge branch 'feature/package_microservices/add_extras_to_pattern_decorators' of https://github.com/EugeneKorshenko/nest into EugeneKorshenko-feature/package_microservices/add_extras_to_pattern_decorators 2022-02-14 11:39:29 +01:00
Kamil Myśliwiec
c4b2be06df Merge branch 'master' of https://github.com/nestjs/nest 2022-02-14 11:39:22 +01:00
Kamil Mysliwiec
baa72c1a75 Merge pull request #8916 from StevenGBrown/convert-urierror
fix(core): convert URIError thrown by the HTTP platform to BadRequestException
2022-02-14 11:39:07 +01:00
Kamil Myśliwiec
f3884219ea fix(platform-fastify): fallback to (.*) in middleware factory 2022-02-14 11:38:38 +01:00
Kamil Mysliwiec
536d0ac41c Merge pull request #9188 from nestjs/renovate/pin-dependencies
fix(deps): pin dependencies
2022-02-14 11:37:32 +01:00
Guilherme Ruiz
364b58df0c refactor(microservices): remove unnecessary import 2022-02-14 21:31:18 +11:00
Kamil Mysliwiec
2b212eb348 Merge pull request #9103 from jonahsnider/feat/streamable-file-uint8array
feat(common): broaden types in StreamableFile constructor
2022-02-14 11:27:02 +01:00
Kamil Mysliwiec
7f170d26e6 Merge pull request #9052 from TomChv/fix/gprc-service-method-case
fix(microservices): generate service method in lower and uppercase
2022-02-14 11:26:23 +01:00
Kamil Mysliwiec
35090f8420 Merge pull request #9000 from thiagomini/hotfix/sse-stream-sink-content
fix(sse): stream sink content
2022-02-14 11:25:10 +01:00
Kamil Mysliwiec
50a847e665 Merge pull request #8800 from ZanMinKian/refactor/remove_duplicate_function
refactor(): remove duplicate function `getClassScope`
2022-02-14 11:23:50 +01:00
Renovate Bot
1d6ccf9c51 fix(deps): pin dependencies 2022-02-14 10:21:52 +00:00
Kamil Mysliwiec
848c655f00 Merge pull request #9147 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.2
chore(deps-dev): bump @nestjs/apollo from 10.0.0 to 10.0.2
2022-02-14 11:19:37 +01:00
Kamil Mysliwiec
480f48529f Merge pull request #9184 from nestjs/dependabot/npm_and_yarn/commitlint/cli-16.2.1
chore(deps-dev): bump @commitlint/cli from 16.1.0 to 16.2.1
2022-02-14 11:19:29 +01:00
Kamil Mysliwiec
cf2c2df92a Merge pull request #9185 from nestjs/dependabot/npm_and_yarn/fast-json-stringify-3.0.3
chore(deps): bump fast-json-stringify from 3.0.2 to 3.0.3
2022-02-14 11:19:24 +01:00
dependabot[bot]
ea8e35051d chore(deps-dev): bump @commitlint/cli from 16.1.0 to 16.2.1
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 16.1.0 to 16.2.1.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v16.2.1/@commitlint/cli)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 09:53:33 +00:00
dependabot[bot]
f672b7020a chore(deps): bump fast-json-stringify from 3.0.2 to 3.0.3
Bumps [fast-json-stringify](https://github.com/fastify/fast-json-stringify) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/fastify/fast-json-stringify/releases)
- [Commits](https://github.com/fastify/fast-json-stringify/commits)

---
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>
2022-02-14 09:53:20 +00:00
Kamil Mysliwiec
32531f41c4 Merge pull request #9186 from nestjs/renovate/nestjs-schematics-8.x
chore(deps): update dependency @nestjs/schematics to v8.0.6
2022-02-14 10:50:50 +01:00
Kamil Mysliwiec
7bd86ea947 Merge pull request #9187 from nestjs/renovate/npm-follow-redirects-vulnerability
chore(deps): update dependency follow-redirects to 1.14.8 [security]
2022-02-14 10:50:43 +01:00
Renovate Bot
24c79a81f3 chore(deps): update dependency follow-redirects to 1.14.8 [security] 2022-02-14 09:49:15 +00:00
Renovate Bot
1b4285a50c chore(deps): update dependency lint-staged to v12.3.4 2022-02-14 08:43:52 +00:00
Renovate Bot
d76a681089 chore(deps): update dependency @nestjs/schematics to v8.0.6 2022-02-14 08:42:36 +00:00
dependabot[bot]
5c60b6b283 chore(deps-dev): bump mqtt from 4.3.4 to 4.3.5
Bumps [mqtt](https://github.com/mqttjs/MQTT.js) from 4.3.4 to 4.3.5.
- [Release notes](https://github.com/mqttjs/MQTT.js/releases)
- [Changelog](https://github.com/mqttjs/MQTT.js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mqttjs/MQTT.js/compare/v4.3.4...v4.3.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 08:27:14 +00:00
dependabot[bot]
7f6d0f7f6f chore(deps-dev): bump @nestjs/apollo from 10.0.0 to 10.0.2
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.0 to 10.0.2.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.0...v10.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 08:21:48 +00:00
Kamil Mysliwiec
ee02a5fb3d Merge pull request #9171 from nestjs/dependabot/npm_and_yarn/lint-staged-12.3.4
chore(deps-dev): bump lint-staged from 12.3.3 to 12.3.4
2022-02-14 09:18:59 +01:00
Kamil Mysliwiec
cf3799c366 Merge pull request #9172 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.2
chore(deps-dev): bump @nestjs/graphql from 10.0.0 to 10.0.2
2022-02-14 09:18:54 +01:00
Kamil Mysliwiec
efa6c5a584 Merge pull request #9173 from nestjs/dependabot/npm_and_yarn/axios-0.26.0
chore(deps): bump axios from 0.25.0 to 0.26.0
2022-02-14 09:18:43 +01:00
Kamil Mysliwiec
72db7f7fbc Merge pull request #9170 from nestjs/dependabot/npm_and_yarn/commitlint/config-angular-16.2.1
chore(deps-dev): bump @commitlint/config-angular from 16.0.0 to 16.2.1
2022-02-14 09:18:37 +01:00
Kamil Mysliwiec
e6334e9f51 Merge pull request #9166 from nestjs/dependabot/npm_and_yarn/sample/13-mongo-typeorm/follow-redirects-1.14.8
chore(deps): bump follow-redirects from 1.14.7 to 1.14.8 in /sample/13-mongo-typeorm
2022-02-14 09:18:33 +01:00
Kamil Mysliwiec
8e7dde192e Merge pull request #9165 from nestjs/renovate/npm-follow-redirects-vulnerability
chore(deps): update dependency follow-redirects [security]
2022-02-14 09:18:27 +01:00
Kamil Mysliwiec
b984742c0f Merge pull request #9164 from nestjs/dependabot/npm_and_yarn/sample/01-cats-app/follow-redirects-1.14.8
chore(deps): bump follow-redirects from 1.14.7 to 1.14.8 in /sample/01-cats-app
2022-02-14 09:18:22 +01:00
Kamil Mysliwiec
f6a55e53a5 Merge pull request #9161 from nestjs/dependabot/npm_and_yarn/fastify-multipart-5.3.1
chore(deps-dev): bump fastify-multipart from 5.3.0 to 5.3.1
2022-02-14 09:18:16 +01:00
dependabot[bot]
492c462fb5 chore(deps-dev): bump @nestjs/graphql from 10.0.0 to 10.0.2
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.0 to 10.0.2.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.0...v10.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 08:18:05 +00:00
Kamil Mysliwiec
589bd0089c Merge pull request #9160 from nestjs/renovate/jest-monorepo
chore(deps): update jest monorepo
2022-02-14 09:17:59 +01:00
Kamil Mysliwiec
57f9fc4de8 Merge pull request #9169 from Tony133/sample/update-dependencies
sample(33-graphql-mercurius): update dependecies
2022-02-14 09:13:20 +01:00
Renovate Bot
f5efd94cc1 chore(deps): update dependency follow-redirects [security] 2022-02-14 05:06:56 +00:00
dependabot[bot]
40d8d4ad09 chore(deps): bump axios from 0.25.0 to 0.26.0
Bumps [axios](https://github.com/axios/axios) from 0.25.0 to 0.26.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.25.0...v0.26.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 00:15:54 +00:00
dependabot[bot]
28a1edd708 chore(deps-dev): bump lint-staged from 12.3.3 to 12.3.4
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.3.3 to 12.3.4.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.3.3...v12.3.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 00:09:17 +00:00
dependabot[bot]
b131dd3a66 chore(deps-dev): bump @commitlint/config-angular from 16.0.0 to 16.2.1
Bumps [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular) from 16.0.0 to 16.2.1.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-angular/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v16.2.1/@commitlint/config-angular)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 00:05:47 +00:00
Tony133
e47d1ff35e sample(33-graphql-mercurius): update dependecies 2022-02-13 22:06:45 +01:00
dependabot[bot]
35267ee5ab chore(deps): bump follow-redirects in /sample/13-mongo-typeorm
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 08:07:19 +00:00
dependabot[bot]
3f4039503a chore(deps): bump follow-redirects in /sample/01-cats-app
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-12 18:54:16 +00:00
Renovate Bot
696590d3ec chore(deps): update jest monorepo 2022-02-12 00:24:08 +00:00
dependabot[bot]
25b038c443 chore(deps-dev): bump fastify-multipart from 5.3.0 to 5.3.1
Bumps [fastify-multipart](https://github.com/fastify/fastify-multipart) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/fastify/fastify-multipart/releases)
- [Commits](https://github.com/fastify/fastify-multipart/compare/v5.3.0...v5.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 21:31:13 +00:00
Kamil Myśliwiec
329b083119 chore(): update typescript version 2022-02-11 14:22:23 +01:00
Kamil Mysliwiec
27d46936bd Merge pull request #9158 from Tony133/sample-02-gateways/update-dependencies
sample(02-gateways): update dependencies
2022-02-11 14:15:09 +01:00
Kamil Mysliwiec
21cbf08f0f Merge pull request #9155 from Tony133/sample/update-version-graphql
sample(23-graphql-code-first): update dependencies
2022-02-11 12:50:37 +01:00
Tony
d022824875 Merge branch 'master' into sample-02-gateways/update-dependencies 2022-02-11 12:44:42 +01:00
Tony133
c704a8609a sample(02-gateways): update package.json 2022-02-11 12:40:19 +01:00
Tony133
2f439b6f38 sample(02-gateways): update dependencies 2022-02-11 12:38:45 +01:00
Tony133
ab0f9f9e91 sample(23-graphql-code-first): remove yarn.lock 2022-02-11 12:11:30 +01:00
Kamil Mysliwiec
6015d81490 Merge pull request #9153 from nestjs/dependabot/npm_and_yarn/sample/22-graphql-prisma/browserslist-4.19.1
chore(deps): bump browserslist from 4.16.3 to 4.19.1 in /sample/22-graphql-prisma
2022-02-11 12:05:49 +01:00
Kamil Mysliwiec
a7f13759a6 Merge pull request #9154 from nestjs/dependabot/npm_and_yarn/sample/22-graphql-prisma/glob-parent-5.1.2
chore(deps): bump glob-parent from 5.1.1 to 5.1.2 in /sample/22-graphql-prisma
2022-02-11 12:05:40 +01:00
Tony133
8207287d61 sample(23-graphql-code-first): update dependencies 2022-02-11 11:57:15 +01:00
Kamil Mysliwiec
1a47e41ef7 Merge pull request #9135 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/gateway/follow-redirects-1.14.8
chore(deps): bump follow-redirects from 1.14.5 to 1.14.8 in /sample/32-graphql-federation-schema-first/gateway
2022-02-11 11:52:03 +01:00
Kamil Mysliwiec
ffe42a915e Merge pull request #9133 from nestjs/renovate/npm-engine.io-vulnerability
chore(deps): update dependency engine.io [security]
2022-02-11 11:51:53 +01:00
dependabot[bot]
3bf6edb263 chore(deps): bump glob-parent in /sample/22-graphql-prisma
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 10:51:48 +00:00
dependabot[bot]
9a530505ff chore(deps): bump browserslist in /sample/22-graphql-prisma
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.16.3 to 4.19.1.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.16.3...4.19.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 10:51:47 +00:00
dependabot[bot]
e4b2196815 chore(deps): bump follow-redirects
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 10:51:37 +00:00
Kamil Mysliwiec
2d09b69a7c Merge pull request #9130 from nestjs/dependabot/npm_and_yarn/rxjs-7.5.4
chore(deps): bump rxjs from 7.5.3 to 7.5.4
2022-02-11 11:51:17 +01:00
Kamil Mysliwiec
8f3d8ed8f8 Merge pull request #9146 from nestjs/dependabot/npm_and_yarn/class-transformer-0.5.1
chore(deps): bump class-transformer from 0.4.0 to 0.5.1
2022-02-11 11:50:58 +01:00
Kamil Mysliwiec
3be8a2c543 Merge pull request #9148 from nestjs/dependabot/npm_and_yarn/types/chai-as-promised-7.1.5
chore(deps-dev): bump @types/chai-as-promised from 7.1.4 to 7.1.5
2022-02-11 11:50:49 +01:00
Kamil Mysliwiec
d0a72872a0 Merge pull request #9149 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.5.5
chore(deps-dev): bump @grpc/grpc-js from 1.5.4 to 1.5.5
2022-02-11 11:50:46 +01:00
Kamil Mysliwiec
a96f0999cf Merge pull request #9150 from nestjs/dependabot/npm_and_yarn/sample/33-graphql-mercurius/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/33-graphql-mercurius
2022-02-11 11:50:39 +01:00
Kamil Mysliwiec
fd16c4c815 Merge pull request #9151 from nestjs/dependabot/npm_and_yarn/sample/33-graphql-mercurius/ansi-regex-5.0.1
chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/33-graphql-mercurius
2022-02-11 11:50:33 +01:00
Kamil Mysliwiec
0cf5429be4 Merge pull request #9152 from nestjs/dependabot/npm_and_yarn/sample/33-graphql-mercurius/follow-redirects-1.14.8
chore(deps): bump follow-redirects from 1.14.5 to 1.14.8 in /sample/33-graphql-mercurius
2022-02-11 11:50:26 +01:00
Renovate Bot
c1a2519613 chore(deps): update dependency engine.io [security] 2022-02-11 10:40:01 +00:00
dependabot[bot]
21939c8a09 chore(deps): bump follow-redirects in /sample/33-graphql-mercurius
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 08:27:32 +00:00
dependabot[bot]
0240432907 chore(deps): bump ansi-regex in /sample/33-graphql-mercurius
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 08:27:25 +00:00
dependabot[bot]
1fdce3036f chore(deps): bump path-parse in /sample/33-graphql-mercurius
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 08:27:12 +00:00
Kamil Mysliwiec
2ee4108bcc Merge pull request #9136 from nestjs/dependabot/npm_and_yarn/sample/33-graphql-mercurius/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.1 to 2.6.7 in /sample/33-graphql-mercurius
2022-02-11 09:26:09 +01:00
Kamil Mysliwiec
f741b9c9ac Merge pull request #9137 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/users-application/follow-redirects-1.14.8
chore(deps): bump follow-redirects from 1.14.5 to 1.14.8 in /sample/32-graphql-federation-schema-first/users-application
2022-02-11 09:26:05 +01:00
Kamil Mysliwiec
e4a647175a Merge pull request #9138 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/posts-application/follow-redirects-1.14.8
chore(deps): bump follow-redirects from 1.14.5 to 1.14.8 in /sample/32-graphql-federation-schema-first/posts-application
2022-02-11 09:26:01 +01:00
Kamil Mysliwiec
34ae02716e Merge pull request #9145 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/posts-application/ansi-regex-5.0.1
chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/32-graphql-federation-schema-first/posts-application
2022-02-11 09:25:50 +01:00
dependabot[bot]
988b6d4799 chore(deps-dev): bump @grpc/grpc-js from 1.5.4 to 1.5.5
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.5.4...@grpc/grpc-js@1.5.5)

---
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>
2022-02-11 08:06:52 +00:00
dependabot[bot]
6692f2209c chore(deps-dev): bump @types/chai-as-promised from 7.1.4 to 7.1.5
Bumps [@types/chai-as-promised](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai-as-promised) from 7.1.4 to 7.1.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai-as-promised)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 08:05:48 +00:00
dependabot[bot]
b7b629453f chore(deps): bump rxjs from 7.5.3 to 7.5.4
Bumps [rxjs](https://github.com/reactivex/rxjs) from 7.5.3 to 7.5.4.
- [Release notes](https://github.com/reactivex/rxjs/releases)
- [Changelog](https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reactivex/rxjs/compare/7.5.3...7.5.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 08:02:04 +00:00
dependabot[bot]
3a743d3bb4 chore(deps): bump class-transformer from 0.4.0 to 0.5.1
Bumps [class-transformer](https://github.com/typestack/class-transformer) from 0.4.0 to 0.5.1.
- [Release notes](https://github.com/typestack/class-transformer/releases)
- [Changelog](https://github.com/typestack/class-transformer/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/typestack/class-transformer/compare/v0.4.0...v0.5.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 08:01:52 +00:00
dependabot[bot]
dbaa75fda3 chore(deps): bump node-fetch in /sample/33-graphql-mercurius
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 08:00:08 +00:00
dependabot[bot]
9528bc6aa2 chore(deps): bump follow-redirects
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 08:00:05 +00:00
Kamil Mysliwiec
d40efc4de5 Merge pull request #9062 from nestjs/renovate/npm-minimist-vulnerability
chore(deps): update dependency minimist [security]
2022-02-11 09:00:00 +01:00
dependabot[bot]
5ddaf64857 chore(deps): bump follow-redirects
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 07:59:55 +00:00
dependabot[bot]
c4370c36a7 chore(deps): bump ansi-regex
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 07:59:08 +00:00
Kamil Mysliwiec
2f2f941051 Merge pull request #9142 from nestjs/dependabot/npm_and_yarn/tar-4.4.19
chore(deps): bump tar from 4.4.8 to 4.4.19
2022-02-11 08:58:15 +01:00
Kamil Mysliwiec
c00077ca6f Merge pull request #9141 from nestjs/dependabot/npm_and_yarn/ini-1.3.8
chore(deps): bump ini from 1.3.5 to 1.3.8
2022-02-11 08:58:02 +01:00
Kamil Mysliwiec
95712fba2c Merge pull request #9140 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/users-application/ansi-regex-5.0.1
chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/32-graphql-federation-schema-first/users-application
2022-02-11 08:57:58 +01:00
Kamil Mysliwiec
71ae5e8e67 Merge pull request #9122 from nestjs/dependabot/npm_and_yarn/apollo-server-core-3.6.3
chore(deps-dev): bump apollo-server-core from 3.6.2 to 3.6.3
2022-02-11 08:57:48 +01:00
Kamil Myśliwiec
dad534d0a2 perf(core): minor performance improvements 2022-02-10 15:22:19 +01:00
dependabot[bot]
a3f82da216 chore(deps): bump tar from 4.4.8 to 4.4.19
Bumps [tar](https://github.com/npm/node-tar) from 4.4.8 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.8...v4.4.19)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-10 13:30:57 +00:00
dependabot[bot]
9ec55fe17d chore(deps): bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-10 13:30:44 +00:00
dependabot[bot]
41d72f06d5 chore(deps): bump ansi-regex
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-10 13:29:59 +00:00
Kamil Myśliwiec
ae4005b8f1 test(): update integration tests (graphql) 2022-02-10 14:27:31 +01:00
Kamil Mysliwiec
edc35bf43f Merge pull request #9131 from nestjs/dependabot/npm_and_yarn/kafkajs-1.16.0
chore(deps-dev): bump kafkajs from 1.15.0 to 1.16.0
2022-02-10 12:14:04 +01:00
Kamil Mysliwiec
d704c40d4b Merge pull request #9134 from nestjs/samples/update-graphql-samples
Samples/update graphql samples
2022-02-10 12:13:28 +01:00
Kamil Myśliwiec
61118165d3 chore(): resolve conflicts 2022-02-10 12:12:37 +01:00
dependabot[bot]
a472d047c4 chore(deps-dev): bump kafkajs from 1.15.0 to 1.16.0
Bumps [kafkajs](https://github.com/tulios/kafkajs) from 1.15.0 to 1.16.0.
- [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/v1.15.0...v1.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-10 00:15:46 +00:00
dependabot[bot]
1a5f86e6f4 chore(deps-dev): bump apollo-server-core from 3.6.2 to 3.6.3
Bumps [apollo-server-core](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-core) from 3.6.2 to 3.6.3.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-core@3.6.3/packages/apollo-server-core)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-09 13:22:04 +00:00
Kamil Mysliwiec
6e1a5d2559 Merge pull request #9121 from nestjs/dependabot/npm_and_yarn/types/sinon-10.0.11
chore(deps-dev): bump @types/sinon from 10.0.10 to 10.0.11
2022-02-09 14:17:48 +01:00
Kamil Mysliwiec
ba0ed1753b Merge pull request #9120 from nestjs/dependabot/npm_and_yarn/rxjs-7.5.3
chore(deps): bump rxjs from 7.5.2 to 7.5.3
2022-02-09 14:17:41 +01:00
Kamil Mysliwiec
a908bfd3c2 Merge pull request #9123 from nestjs/renovate/nestjs-schematics-8.x
chore(deps): update dependency @nestjs/schematics to v8.0.6
2022-02-09 14:17:31 +01:00
Renovate Bot
88cdbdc26d chore(deps): update dependency @nestjs/schematics to v8.0.6 2022-02-09 10:57:38 +00:00
dependabot[bot]
e8b28caed6 chore(deps-dev): bump @types/sinon from 10.0.10 to 10.0.11
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 10.0.10 to 10.0.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-09 09:30:19 +00:00
dependabot[bot]
6a221bab71 chore(deps): bump rxjs from 7.5.2 to 7.5.3
Bumps [rxjs](https://github.com/reactivex/rxjs) from 7.5.2 to 7.5.3.
- [Release notes](https://github.com/reactivex/rxjs/releases)
- [Changelog](https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reactivex/rxjs/compare/7.5.2...7.5.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-09 09:27:05 +00:00
Kamil Mysliwiec
92cf7933b6 Merge pull request #9108 from nestjs/dependabot/npm_and_yarn/amqp-connection-manager-4.1.1
chore(deps-dev): bump amqp-connection-manager from 4.1.0 to 4.1.1
2022-02-09 10:17:02 +01:00
Kamil Mysliwiec
51d845caf4 Merge pull request #9113 from nestjs/dependabot/npm_and_yarn/mongoose-6.2.1
chore(deps-dev): bump mongoose from 6.2.0 to 6.2.1
2022-02-09 10:16:54 +01:00
Kamil Mysliwiec
fe48b1555f Merge pull request #9116 from nestjs/dependabot/npm_and_yarn/ts-node-10.5.0
chore(deps-dev): bump ts-node from 10.4.0 to 10.5.0
2022-02-09 10:16:47 +01:00
Kamil Mysliwiec
d347ff9268 Merge pull request #9118 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo to v7.17.2
2022-02-09 10:16:43 +01:00
Kamil Mysliwiec
0f3f65445e Merge pull request #9119 from nestjs/dependabot/npm_and_yarn/apollo-server-express-3.6.3
chore(deps-dev): bump apollo-server-express from 3.6.2 to 3.6.3
2022-02-09 10:16:32 +01:00
Renovate Bot
5999207081 chore(deps): update babel monorepo to v7.17.2 2022-02-09 06:08:32 +00:00
dependabot[bot]
3107934ed7 chore(deps-dev): bump apollo-server-express from 3.6.2 to 3.6.3
Bumps [apollo-server-express](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-express) from 3.6.2 to 3.6.3.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-express@3.6.3/packages/apollo-server-express)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-09 00:03:37 +00:00
dependabot[bot]
d8cee5e9ca chore(deps-dev): bump ts-node from 10.4.0 to 10.5.0
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.4.0 to 10.5.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.4.0...v10.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-08 00:16:57 +00:00
dependabot[bot]
5d0cfe0e96 chore(deps-dev): bump mongoose from 6.2.0 to 6.2.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.2.0 to 6.2.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.2.0...6.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-08 00:03:51 +00:00
dependabot[bot]
daeb80b088 chore(deps-dev): bump amqp-connection-manager from 4.1.0 to 4.1.1
Bumps [amqp-connection-manager](https://github.com/jwalton/node-amqp-connection-manager) from 4.1.0 to 4.1.1.
- [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.0...v4.1.1)

---
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>
2022-02-07 00:16:39 +00:00
Jonah Snider
4fe4ed6270 style(common): run format 2022-02-06 12:14:07 -08:00
Renovate Bot
b01bca704a chore(deps): update dependency minimist to 1.2.3 [security] 2022-02-05 08:00:29 +00:00
Jonah Snider
f9ad1b48ef test(common): fix Uint8Array assertion 2022-02-04 21:09:04 -08:00
Jonah Snider
506b8f9159 feat(common): broaden types in StreamableFile constructor 2022-02-04 20:48:04 -08:00
Kamil Myśliwiec
d8ba5d16e6 sample(): migrate graphql samples to the latest version of @nestjs/graphql 2022-02-04 12:17:40 +01:00
Kamil Mysliwiec
cd52c2886f Merge pull request #9050 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/gateway/ansi-regex-5.0.1
chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/32-graphql-federation-schema-first/gateway
2022-02-04 09:04:03 +01:00
Kamil Mysliwiec
38a5b6940f Merge pull request #9099 from nestjs/dependabot/npm_and_yarn/fastify-3.27.1
chore(deps): bump fastify from 3.27.0 to 3.27.1
2022-02-04 09:03:52 +01:00
Kamil Mysliwiec
c134fa6f97 Merge pull request #9100 from nestjs/dependabot/npm_and_yarn/types/sinon-10.0.10
chore(deps-dev): bump @types/sinon from 10.0.9 to 10.0.10
2022-02-04 09:03:45 +01:00
dependabot[bot]
aab2a2dc19 chore(deps-dev): bump @types/sinon from 10.0.9 to 10.0.10
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 10.0.9 to 10.0.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-04 00:16:39 +00:00
dependabot[bot]
fb48e090d4 chore(deps): bump fastify from 3.27.0 to 3.27.1
Bumps [fastify](https://github.com/fastify/fastify) from 3.27.0 to 3.27.1.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v3.27.0...v3.27.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-04 00:10:26 +00:00
Kamil Mysliwiec
13cefb0582 Merge pull request #9091 from nestjs/dependabot/npm_and_yarn/mongoose-6.2.0
chore(deps-dev): bump mongoose from 6.1.10 to 6.2.0
2022-02-03 08:49:29 +01:00
Kamil Mysliwiec
f2167c31f4 Merge pull request #9090 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo to v7.17.0
2022-02-03 08:49:23 +01:00
Kamil Mysliwiec
9b6287b8b9 Merge pull request #9093 from Ashish2097/patch-1
Removed extra space
2022-02-03 08:22:08 +01:00
Renovate Bot
2c1facdca4 chore(deps): update babel monorepo to v7.17.0 2022-02-03 06:18:18 +00:00
DA
a0651dc47b Removed extra space 2022-02-03 09:07:51 +05:30
dependabot[bot]
e6d9cbf8e7 chore(deps-dev): bump mongoose from 6.1.10 to 6.2.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.1.10 to 6.2.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.1.10...6.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-03 00:05:56 +00:00
Kamil Mysliwiec
25689a1fd2 Merge pull request #9072 from nestjs/dependabot/npm_and_yarn/light-my-request-4.7.1
chore(deps): bump light-my-request from 4.7.0 to 4.7.1
2022-02-02 15:43:44 +01:00
Kamil Mysliwiec
0ed4880a50 Merge pull request #9083 from nestjs/dependabot/npm_and_yarn/amqp-connection-manager-4.1.0
chore(deps-dev): bump amqp-connection-manager from 4.0.1 to 4.1.0
2022-02-02 15:43:38 +01:00
Kamil Mysliwiec
ac5ffeeec9 Merge pull request #9085 from nestjs/dependabot/npm_and_yarn/sinon-13.0.1
chore(deps-dev): bump sinon from 13.0.0 to 13.0.1
2022-02-02 15:43:32 +01:00
Kamil Mysliwiec
e886962ecb Merge pull request #9086 from nestjs/dependabot/npm_and_yarn/core-js-3.21.0
chore(deps-dev): bump core-js from 3.20.3 to 3.21.0
2022-02-02 15:43:04 +01:00
Kamil Mysliwiec
fddbb80432 Merge pull request #9084 from nestjs/dependabot/npm_and_yarn/nats-2.6.0
chore(deps-dev): bump nats from 2.5.0 to 2.6.0
2022-02-02 15:43:00 +01:00
Kamil Mysliwiec
ed1440b9c2 Update Readme.md 2022-02-02 15:42:49 +01:00
dependabot[bot]
a2435e7d11 chore(deps-dev): bump core-js from 3.20.3 to 3.21.0
Bumps [core-js](https://github.com/zloirock/core-js) from 3.20.3 to 3.21.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/compare/v3.20.3...v3.21.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-02 14:18:41 +00:00
dependabot[bot]
843cd4157e chore(deps): bump light-my-request from 4.7.0 to 4.7.1
Bumps [light-my-request](https://github.com/fastify/light-my-request) from 4.7.0 to 4.7.1.
- [Release notes](https://github.com/fastify/light-my-request/releases)
- [Commits](https://github.com/fastify/light-my-request/compare/v4.7.0...v4.7.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-02 14:16:18 +00:00
dependabot[bot]
9b30f146be chore(deps-dev): bump sinon from 13.0.0 to 13.0.1
Bumps [sinon](https://github.com/sinonjs/sinon) from 13.0.0 to 13.0.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v13.0.0...v13.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-02 14:14:28 +00:00
dependabot[bot]
6ccd5e1711 chore(deps-dev): bump nats from 2.5.0 to 2.6.0
Bumps [nats](https://github.com/nats-io/nats.js) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/nats-io/nats.js/releases)
- [Commits](https://github.com/nats-io/nats.js/compare/v2.5.0...v2.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-02 14:13:30 +00:00
Kamil Mysliwiec
3e0379f737 Merge pull request #9069 from nestjs/dependabot/npm_and_yarn/sample/08-webpack/minimist-1.2.5
chore(deps): bump minimist from 1.2.0 to 1.2.5 in /sample/08-webpack
2022-02-02 15:11:17 +01:00
Kamil Mysliwiec
7a4597f4c3 Merge pull request #9073 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.5.4
chore(deps-dev): bump @grpc/grpc-js from 1.5.3 to 1.5.4
2022-02-02 15:10:57 +01:00
Kamil Mysliwiec
34116a4113 Merge pull request #9082 from nestjs/dependabot/npm_and_yarn/lint-staged-12.3.3
chore(deps-dev): bump lint-staged from 12.3.2 to 12.3.3
2022-02-02 15:10:53 +01:00
Kamil Mysliwiec
9e76c46d2d Merge pull request #9080 from nestjs/dependabot/npm_and_yarn/mongoose-6.1.10
chore(deps-dev): bump mongoose from 6.1.8 to 6.1.10
2022-02-02 15:10:43 +01:00
dependabot[bot]
98ce3dcb48 chore(deps-dev): bump amqp-connection-manager from 4.0.1 to 4.1.0
Bumps [amqp-connection-manager](https://github.com/jwalton/node-amqp-connection-manager) from 4.0.1 to 4.1.0.
- [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.0.1...v4.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-02 00:10:33 +00:00
dependabot[bot]
085024c437 chore(deps-dev): bump lint-staged from 12.3.2 to 12.3.3
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.3.2 to 12.3.3.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.3.2...v12.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-02 00:08:52 +00:00
dependabot[bot]
a0b895696c chore(deps-dev): bump mongoose from 6.1.8 to 6.1.10
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.1.8 to 6.1.10.
- [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.1.8...6.1.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-02 00:03:42 +00:00
dependabot[bot]
156dc43695 chore(deps-dev): bump @grpc/grpc-js from 1.5.3 to 1.5.4
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.5.3...@grpc/grpc-js@1.5.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-01 00:11:44 +00:00
dependabot[bot]
85a256b71b chore(deps): bump minimist from 1.2.0 to 1.2.5 in /sample/08-webpack
Bumps [minimist](https://github.com/substack/minimist) from 1.2.0 to 1.2.5.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.0...1.2.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 07:28:27 +00:00
Kamil Mysliwiec
2df2cff34f Merge pull request #9058 from nestjs/dependabot/npm_and_yarn/sample/22-graphql-prisma/ws-5.2.3
chore(deps): bump ws from 5.2.2 to 5.2.3 in /sample/22-graphql-prisma
2022-01-31 08:27:44 +01:00
Kamil Mysliwiec
6149b2c8bb Merge pull request #9063 from nestjs/renovate/npm-tar-vulnerability
chore(deps): update dependency tar to 4.4.18 [security]
2022-01-31 08:27:29 +01:00
Kamil Mysliwiec
ec716efd6d Merge pull request #9065 from nestjs/renovate/npm-yargs-parser-vulnerability
chore(deps): update dependency yargs-parser to 13.1.2 [security]
2022-01-31 08:27:22 +01:00
Kamil Mysliwiec
cbd8a1986f Merge pull request #9067 from nestjs/dependabot/npm_and_yarn/point-of-view-5.1.0
chore(deps-dev): bump point-of-view from 5.0.0 to 5.1.0
2022-01-31 08:27:18 +01:00
Kamil Mysliwiec
609a335209 Merge pull request #9068 from nestjs/dependabot/npm_and_yarn/sinon-13.0.0
chore(deps-dev): bump sinon from 12.0.1 to 13.0.0
2022-01-31 08:27:09 +01:00
Renovate Bot
e3e6edb9b6 chore(deps): update dependency yargs-parser to 13.1.2 [security] 2022-01-31 05:14:05 +00:00
Renovate Bot
6d506308ad chore(deps): update dependency tar to 4.4.18 [security] 2022-01-31 05:02:33 +00:00
dependabot[bot]
dd40b2d7fc chore(deps-dev): bump sinon from 12.0.1 to 13.0.0
Bumps [sinon](https://github.com/sinonjs/sinon) from 12.0.1 to 13.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v12.0.1...v13.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 00:26:32 +00:00
dependabot[bot]
be79be51f2 chore(deps-dev): bump point-of-view from 5.0.0 to 5.1.0
Bumps [point-of-view](https://github.com/fastify/point-of-view) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/fastify/point-of-view/releases)
- [Commits](https://github.com/fastify/point-of-view/compare/v5.0.0...v5.1.0)

---
updated-dependencies:
- dependency-name: point-of-view
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 00:15:42 +00:00
dependabot[bot]
702c2a6755 chore(deps): bump ws from 5.2.2 to 5.2.3 in /sample/22-graphql-prisma
Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-30 10:59:14 +00:00
Kamil Mysliwiec
8f3a5b1959 Update Readme.md 2022-01-30 11:59:07 +01:00
Kamil Mysliwiec
fc373a261f Merge pull request #9051 from nestjs/renovate/bytes-3.x
chore(deps): update dependency bytes to v3.1.2
2022-01-30 11:58:13 +01:00
Renovate Bot
9c823b5e7e chore(deps): update dependency bytes to v3.1.2 2022-01-30 09:23:34 +00:00
Tom Chauveau
23170cf1c8 fix(microservices): generate service method in lower and uppercase
RPC methods in protobuf are commonly declare in PascalCase, but they were generated lowercase
by ClientGrpcProxy.getService method.
Protobuf and gRPC have tools to generate interface and message in Typescript directly from
protobuf. It's a powerful feature that's helping to maintain only one source of truth.
But with that lowercase method generation, developers were forced to define their own interface
which can be painful to maintain.
This commit fix that issue by generating methods both in lowercase and in uppercase.

Solves #9047

Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
2022-01-29 01:15:49 +01:00
dependabot[bot]
00a3653d91 chore(deps): bump ansi-regex
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-28 10:21:44 +00:00
Kamil Mysliwiec
e80407a549 Merge pull request #9022 from nestjs/dependabot/npm_and_yarn/ts-morph-13.0.3
chore(deps-dev): bump ts-morph from 13.0.2 to 13.0.3
2022-01-28 11:20:12 +01:00
Kamil Mysliwiec
bf203bdf23 Merge pull request #9032 from nestjs/dependabot/npm_and_yarn/middie-6.0.0
chore(deps): bump middie from 5.3.0 to 6.0.0
2022-01-28 11:20:06 +01:00
Kamil Mysliwiec
f1c9a856df Merge pull request #9042 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/gateway/follow-redirects-1.14.7
chore(deps): bump follow-redirects from 1.14.5 to 1.14.7 in /sample/32-graphql-federation-schema-first/gateway
2022-01-28 11:20:02 +01:00
Kamil Mysliwiec
a53a7c4c58 Merge pull request #9043 from nestjs/dependabot/npm_and_yarn/lint-staged-12.3.2
chore(deps-dev): bump lint-staged from 12.3.1 to 12.3.2
2022-01-28 11:19:58 +01:00
Kamil Mysliwiec
5821ab158a Merge pull request #9045 from nestjs/renovate/lint-staged-12.x
chore(deps): update dependency lint-staged to v12.3.2
2022-01-28 11:19:52 +01:00
Kamil Mysliwiec
d337c7996c Merge pull request #9048 from nestjs/dependabot/npm_and_yarn/types/sinon-10.0.9
chore(deps-dev): bump @types/sinon from 10.0.8 to 10.0.9
2022-01-28 11:19:47 +01:00
Kamil Mysliwiec
0c6933a802 Merge pull request #8992 from asyncfinkd/master
Add new Feature for Crud Application in Mongoose
2022-01-28 11:19:25 +01:00
Renovate Bot
69f04f4923 chore(deps): update dependency lint-staged to v12.3.2 2022-01-28 09:36:45 +00:00
dependabot[bot]
93e0e4b817 chore(deps-dev): bump @types/sinon from 10.0.8 to 10.0.9
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 10.0.8 to 10.0.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-28 00:08:09 +00:00
asyncfinkd
df2acda531 fix: parameter name 2022-01-27 17:42:29 +04:00
dependabot[bot]
0e536c3ab7 chore(deps-dev): bump lint-staged from 12.3.1 to 12.3.2
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.3.1 to 12.3.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.3.1...v12.3.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>
2022-01-27 09:05:21 +00:00
dependabot[bot]
a66e9dcd50 chore(deps): bump middie from 5.3.0 to 6.0.0
Bumps [middie](https://github.com/fastify/middleman) from 5.3.0 to 6.0.0.
- [Release notes](https://github.com/fastify/middleman/releases)
- [Commits](https://github.com/fastify/middleman/compare/v5.3.0...v6.0.0)

---
updated-dependencies:
- dependency-name: middie
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-27 09:03:40 +00:00
dependabot[bot]
f444650cb3 chore(deps): bump follow-redirects
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-27 09:02:14 +00:00
Kamil Mysliwiec
89124ad6d3 Merge pull request #9029 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/posts-application/ansi-regex-5.0.1
chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/32-graphql-federation-schema-first/posts-application
2022-01-27 10:01:03 +01:00
Kamil Mysliwiec
a256b3b6c4 Merge pull request #9028 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/users-application/ansi-regex-5.0.1
chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/32-graphql-federation-schema-first/users-application
2022-01-27 10:00:57 +01:00
Kamil Mysliwiec
b35e293ec3 Merge pull request #9026 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/posts-application/follow-redirects-1.14.7
chore(deps): bump follow-redirects from 1.14.5 to 1.14.7 in /sample/32-graphql-federation-schema-first/posts-application
2022-01-27 10:00:52 +01:00
Kamil Mysliwiec
70376cb94b Merge pull request #9027 from nestjs/dependabot/npm_and_yarn/sample/32-graphql-federation-schema-first/users-application/follow-redirects-1.14.7
chore(deps): bump follow-redirects from 1.14.5 to 1.14.7 in /sample/32-graphql-federation-schema-first/users-application
2022-01-27 10:00:48 +01:00
Kamil Mysliwiec
0d6665280a Merge pull request #9038 from nestjs/dependabot/npm_and_yarn/chai-4.3.6
chore(deps-dev): bump chai from 4.3.4 to 4.3.6
2022-01-27 10:00:43 +01:00
Kamil Mysliwiec
f0025162e6 Merge pull request #9034 from nestjs/dependabot/npm_and_yarn/mongoose-6.1.8
chore(deps-dev): bump mongoose from 6.1.7 to 6.1.8
2022-01-27 10:00:36 +01:00
Kamil Mysliwiec
65779f144e Merge pull request #9033 from nestjs/dependabot/npm_and_yarn/amqp-connection-manager-4.0.1
chore(deps-dev): bump amqp-connection-manager from 3.7.0 to 4.0.1
2022-01-27 10:00:31 +01:00
Kamil Mysliwiec
39d3622726 Merge pull request #9030 from nestjs/renovate/chai-4.x
chore(deps): update dependency chai to v4.3.6
2022-01-27 10:00:25 +01:00
Kamil Mysliwiec
ec0bd6b74e Merge pull request #9039 from nestjs/renovate/npm-y18n-vulnerability
chore(deps): update dependency y18n to 4.0.1 [security]
2022-01-27 10:00:16 +01:00
Renovate Bot
bbf527fd6a chore(deps): update dependency chai to v4.3.6 2022-01-27 04:48:23 +00:00
Renovate Bot
e153efaf3e chore(deps): update dependency y18n to 4.0.1 [security] 2022-01-27 04:46:09 +00:00
dependabot[bot]
1aadaa4e7b chore(deps-dev): bump chai from 4.3.4 to 4.3.6
Bumps [chai](https://github.com/chaijs/chai) from 4.3.4 to 4.3.6.
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/4.x.x/History.md)
- [Commits](https://github.com/chaijs/chai/compare/v4.3.4...v4.3.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 15:01:55 +00:00
dependabot[bot]
0ca57076c4 chore(deps-dev): bump amqp-connection-manager from 3.7.0 to 4.0.1
Bumps [amqp-connection-manager](https://github.com/jwalton/node-amqp-connection-manager) from 3.7.0 to 4.0.1.
- [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/v3.7.0...v4.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 15:01:46 +00:00
dependabot[bot]
21afd7d363 chore(deps-dev): bump mongoose from 6.1.7 to 6.1.8
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.1.7 to 6.1.8.
- [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.1.7...6.1.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 15:01:42 +00:00
Kamil Mysliwiec
02ebd8edfb Merge pull request #9035 from nestjs/renovate/npm-browserslist-vulnerability
chore(deps): update dependency browserslist to 4.16.5 [security]
2022-01-26 15:59:02 +01:00
Kamil Mysliwiec
a58ae2e60a Merge pull request #9036 from nestjs/renovate/npm-glob-parent-vulnerability
chore(deps): update dependency glob-parent to 5.1.2 [security]
2022-01-26 15:58:54 +01:00
Renovate Bot
a02c39fca9 chore(deps): update dependency glob-parent to 5.1.2 [security] 2022-01-26 14:54:24 +00:00
Renovate Bot
4cfbf2d1f4 chore(deps): update dependency browserslist to 4.16.5 [security] 2022-01-26 14:52:11 +00:00
dependabot[bot]
22af8a481a chore(deps-dev): bump ts-morph from 13.0.2 to 13.0.3
Bumps [ts-morph](https://github.com/dsherret/ts-morph) from 13.0.2 to 13.0.3.
- [Release notes](https://github.com/dsherret/ts-morph/releases)
- [Commits](https://github.com/dsherret/ts-morph/compare/13.0.2...13.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 09:21:37 +00:00
dependabot[bot]
4599719227 chore(deps): bump ansi-regex
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 09:20:47 +00:00
dependabot[bot]
281e417ac9 chore(deps): bump ansi-regex
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 09:19:58 +00:00
dependabot[bot]
b9c22c3b73 chore(deps): bump follow-redirects
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 09:19:38 +00:00
dependabot[bot]
0304433b31 chore(deps): bump follow-redirects
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 09:19:26 +00:00
Kamil Mysliwiec
be15af4eb9 Merge pull request #9020 from nestjs/dependabot/npm_and_yarn/rxjs-7.5.2
chore(deps): bump rxjs from 7.4.0 to 7.5.2
2022-01-26 10:17:43 +01:00
Kamil Mysliwiec
222654257c Merge pull request #9021 from nestjs/dependabot/npm_and_yarn/supertest-6.2.2
chore(deps-dev): bump supertest from 6.1.6 to 6.2.2
2022-01-26 10:17:38 +01:00
Kamil Mysliwiec
b1edfc6cc0 Merge pull request #9019 from nestjs/dependabot/npm_and_yarn/types/mocha-9.1.0
chore(deps-dev): bump @types/mocha from 9.0.0 to 9.1.0
2022-01-26 10:17:33 +01:00
Kamil Mysliwiec
0217ac0578 Merge pull request #9018 from nestjs/dependabot/npm_and_yarn/nats-2.5.0
chore(deps-dev): bump nats from 2.4.0 to 2.5.0
2022-01-26 10:17:28 +01:00
Kamil Mysliwiec
028a0a9461 Merge pull request #9016 from nestjs/renovate/npm-nanoid-vulnerability
chore(deps): update dependency nanoid to 3.1.31 [security]
2022-01-26 10:16:44 +01:00
Kamil Mysliwiec
94dcbf649e Update Readme.md 2022-01-26 10:16:25 +01:00
Renovate Bot
4e6f07e62e chore(deps): update dependency nanoid to 3.1.31 [security] 2022-01-26 05:48:57 +00:00
asyncfinkd
c8ca60b61f fix: function parameter & variables name 2022-01-25 16:37:35 +04:00
zmj
bc8b9e8d03 refactor(): remove duplicate function getClassScope 2022-01-25 17:00:32 +08:00
dependabot[bot]
1cb9be5a94 chore(deps-dev): bump supertest from 6.1.6 to 6.2.2
Bumps [supertest](https://github.com/visionmedia/supertest) from 6.1.6 to 6.2.2.
- [Release notes](https://github.com/visionmedia/supertest/releases)
- [Commits](https://github.com/visionmedia/supertest/compare/v6.1.6...v6.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-25 00:10:46 +00:00
dependabot[bot]
1c5b3d7a9b chore(deps): bump rxjs from 7.4.0 to 7.5.2
Bumps [rxjs](https://github.com/reactivex/rxjs) from 7.4.0 to 7.5.2.
- [Release notes](https://github.com/reactivex/rxjs/releases)
- [Changelog](https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/reactivex/rxjs/compare/7.4.0...7.5.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-25 00:07:59 +00:00
dependabot[bot]
7b50fa28e2 chore(deps-dev): bump @types/mocha from 9.0.0 to 9.1.0
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 9.0.0 to 9.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-25 00:05:08 +00:00
dependabot[bot]
ad188bd2bf chore(deps-dev): bump nats from 2.4.0 to 2.5.0
Bumps [nats](https://github.com/nats-io/nats.js) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/nats-io/nats.js/releases)
- [Commits](https://github.com/nats-io/nats.js/compare/v2.4.0...v2.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-25 00:03:39 +00:00
Eugene Korshenko
a0f148df3b chore(microservices): correct argument naming on pattern decorators 2022-01-24 21:17:47 +02:00
asyncfinkd
5097284a21 Merge branch 'master' of https://github.com/asyncfinkd/nest 2022-01-24 23:08:19 +04:00
asyncfinkd
754064481f format 2022-01-24 23:07:52 +04:00
Nika Shamiladze
38de21b3fc Update sample/06-mongoose/src/cats/cats.controller.ts
Co-authored-by: Kamil Mysliwiec <mail@kamilmysliwiec.com>
2022-01-24 22:42:55 +04:00
Kamil Mysliwiec
027403c3a7 Merge pull request #9015 from nestjs/renovate/npm-node-fetch-vulnerability
chore(deps): update dependency node-fetch to 2.6.7 [security]
2022-01-24 13:36:39 +01:00
Renovate Bot
4614a0cd59 chore(deps): update dependency node-fetch to 2.6.7 [security] 2022-01-24 11:40:58 +00:00
Kamil Mysliwiec
248a14519d Update Readme.md 2022-01-24 11:25:20 +01:00
Kamil Mysliwiec
536fcb687b Merge pull request #9010 from nestjs/dependabot/npm_and_yarn/sample/02-gateways/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/02-gateways
2022-01-24 09:13:29 +01:00
Kamil Mysliwiec
abb7628d7e Merge pull request #9011 from nestjs/dependabot/npm_and_yarn/sample/05-sql-typeorm/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/05-sql-typeorm
2022-01-24 09:13:26 +01:00
Kamil Mysliwiec
e9568166c0 Merge pull request #9012 from nestjs/dependabot/npm_and_yarn/sample/04-grpc/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/04-grpc
2022-01-24 09:13:22 +01:00
Kamil Mysliwiec
6421c7af82 Merge pull request #9014 from nestjs/dependabot/npm_and_yarn/sample/13-mongo-typeorm/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/13-mongo-typeorm
2022-01-24 09:13:16 +01:00
Kamil Mysliwiec
ea2d595b98 Merge pull request #9009 from nestjs/dependabot/npm_and_yarn/sample/01-cats-app/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/01-cats-app
2022-01-24 09:13:13 +01:00
Kamil Mysliwiec
a1d72b1dcc Merge pull request #9013 from nestjs/dependabot/npm_and_yarn/sample/03-microservices/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/03-microservices
2022-01-24 09:13:00 +01:00
Kamil Mysliwiec
698c6ef925 Merge pull request #9007 from nestjs/dependabot/npm_and_yarn/lint-staged-12.3.1
chore(deps-dev): bump lint-staged from 12.2.1 to 12.3.1
2022-01-24 09:12:52 +01:00
dependabot[bot]
8183ec6f18 chore(deps): bump node-fetch in /sample/13-mongo-typeorm
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 08:12:39 +00:00
Kamil Mysliwiec
194dd316cb Merge pull request #8980 from nestjs/dependabot/npm_and_yarn/fancy-log-2.0.0
chore(deps-dev): bump fancy-log from 1.3.3 to 2.0.0
2022-01-24 09:12:25 +01:00
Kamil Mysliwiec
52b2dc7904 Merge pull request #8982 from nestjs/renovate/npm-trim-off-newlines-vulnerability
chore(deps): update dependency trim-off-newlines to 1.0.3 [security]
2022-01-24 09:12:21 +01:00
dependabot[bot]
7787012d3e chore(deps): bump node-fetch in /sample/03-microservices
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 08:12:12 +00:00
Kamil Mysliwiec
b0489f69d1 Merge pull request #8997 from nestjs/dependabot/npm_and_yarn/nestjs/mongoose-9.0.2
chore(deps-dev): bump @nestjs/mongoose from 9.0.1 to 9.0.2
2022-01-24 09:12:12 +01:00
dependabot[bot]
c2cc31242d chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/04-grpc
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 08:12:10 +00:00
dependabot[bot]
98b5ce4bfd chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/02-gateways
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 08:12:09 +00:00
dependabot[bot]
a03835aa5b chore(deps): bump node-fetch in /sample/05-sql-typeorm
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 08:12:09 +00:00
dependabot[bot]
c6e788a183 chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/01-cats-app
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 08:12:07 +00:00
Kamil Mysliwiec
3b4d5352d3 Merge pull request #8995 from nestjs/dependabot/npm_and_yarn/socket.io-client-4.4.1
chore(deps-dev): bump socket.io-client from 4.4.0 to 4.4.1
2022-01-24 09:12:06 +01:00
Kamil Mysliwiec
41e3adb500 Merge pull request #8994 from nestjs/dependabot/npm_and_yarn/fastify-multipart-5.3.0
chore(deps-dev): bump fastify-multipart from 5.2.1 to 5.3.0
2022-01-24 09:12:00 +01:00
Kamil Mysliwiec
b164fd9aa6 Merge pull request #8993 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.21
2022-01-24 09:11:55 +01:00
Kamil Mysliwiec
1734a3215e Merge pull request #9002 from nestjs/renovate/babel-monorepo
chore(deps): update dependency @babel/core to v7.16.12
2022-01-24 09:11:21 +01:00
Renovate Bot
b61700007e chore(deps): update dependency @types/node to v16.11.21 2022-01-24 05:31:53 +00:00
Renovate Bot
98112a5984 chore(deps): update dependency @babel/core to v7.16.12 2022-01-24 05:06:11 +00:00
dependabot[bot]
f8106fb7e5 chore(deps-dev): bump lint-staged from 12.2.1 to 12.3.1
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.2.1 to 12.3.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.2.1...v12.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 00:33:23 +00:00
Thiago Valentim
3dafe28ad4 fix(sse): stream sink content
closes #8877
2022-01-21 16:03:24 -03:00
asyncfinkd
40a5e6c207 Fix Params Error 2022-01-21 20:21:05 +04:00
dependabot[bot]
60b3e653c3 chore(deps-dev): bump @nestjs/mongoose from 9.0.1 to 9.0.2
Bumps [@nestjs/mongoose](https://github.com/nestjs/mongoose) from 9.0.1 to 9.0.2.
- [Release notes](https://github.com/nestjs/mongoose/releases)
- [Changelog](https://github.com/nestjs/mongoose/blob/master/.release-it.json)
- [Commits](https://github.com/nestjs/mongoose/compare/9.0.1...9.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 15:00:12 +00:00
dependabot[bot]
263433ed2f chore(deps-dev): bump socket.io-client from 4.4.0 to 4.4.1
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/4.4.0...4.4.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>
2022-01-21 14:55:40 +00:00
dependabot[bot]
774e501c76 chore(deps-dev): bump fastify-multipart from 5.2.1 to 5.3.0
Bumps [fastify-multipart](https://github.com/fastify/fastify-multipart) from 5.2.1 to 5.3.0.
- [Release notes](https://github.com/fastify/fastify-multipart/releases)
- [Commits](https://github.com/fastify/fastify-multipart/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 14:54:42 +00:00
Kamil Mysliwiec
8673b82863 Merge pull request #8991 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.5.3
chore(deps-dev): bump @grpc/grpc-js from 1.5.0 to 1.5.3
2022-01-21 15:51:34 +01:00
Kamil Mysliwiec
ba7ea704d7 Merge pull request #8988 from nestjs/dependabot/npm_and_yarn/types/sinon-10.0.8
chore(deps-dev): bump @types/sinon from 10.0.7 to 10.0.8
2022-01-21 15:51:25 +01:00
Kamil Mysliwiec
01f850e901 Merge pull request #8989 from nestjs/dependabot/npm_and_yarn/commitlint/cli-16.1.0
chore(deps-dev): bump @commitlint/cli from 15.0.0 to 16.1.0
2022-01-21 15:51:20 +01:00
Kamil Mysliwiec
e5f56d4b2f Merge pull request #8990 from nestjs/dependabot/npm_and_yarn/concurrently-7.0.0
chore(deps-dev): bump concurrently from 6.4.0 to 7.0.0
2022-01-21 15:51:11 +01:00
asyncfinkd
1a425bf4af Add new Feature for Crud Application 2022-01-21 17:25:20 +04:00
dependabot[bot]
b41bb581cd chore(deps-dev): bump @grpc/grpc-js from 1.5.0 to 1.5.3
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.5.0 to 1.5.3.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.5.0...@grpc/grpc-js@1.5.3)

---
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>
2022-01-21 12:33:41 +00:00
dependabot[bot]
787bdf73d7 chore(deps-dev): bump concurrently from 6.4.0 to 7.0.0
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 6.4.0 to 7.0.0.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v6.4.0...v7.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 12:31:57 +00:00
dependabot[bot]
7d92e76ef7 chore(deps-dev): bump fancy-log from 1.3.3 to 2.0.0
Bumps [fancy-log](https://github.com/gulpjs/fancy-log) from 1.3.3 to 2.0.0.
- [Release notes](https://github.com/gulpjs/fancy-log/releases)
- [Changelog](https://github.com/gulpjs/fancy-log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/fancy-log/compare/v1.3.3...v2.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 12:31:34 +00:00
dependabot[bot]
1c637dc6ff chore(deps-dev): bump @commitlint/cli from 15.0.0 to 16.1.0
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 15.0.0 to 16.1.0.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v16.1.0/@commitlint/cli)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 12:30:59 +00:00
dependabot[bot]
3627993b79 chore(deps-dev): bump @types/sinon from 10.0.7 to 10.0.8
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 10.0.7 to 10.0.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 12:29:43 +00:00
Kamil Mysliwiec
247a3ae04c Update Readme.md 2022-01-21 13:28:43 +01:00
Kamil Mysliwiec
99724ac072 Merge pull request #8979 from nestjs/dependabot/npm_and_yarn/trim-off-newlines-1.0.3
chore(deps): bump trim-off-newlines from 1.0.1 to 1.0.3
2022-01-21 13:26:38 +01:00
Kamil Mysliwiec
3c4dcd1537 Merge pull request #8981 from nestjs/dependabot/npm_and_yarn/axios-0.25.0
chore(deps): bump axios from 0.24.0 to 0.25.0
2022-01-21 13:26:19 +01:00
Kamil Mysliwiec
434392074a Merge pull request #8983 from nestjs/dependabot/npm_and_yarn/fast-json-stringify-3.0.2
chore(deps): bump fast-json-stringify from 3.0.1 to 3.0.2
2022-01-21 13:26:08 +01:00
Kamil Mysliwiec
9296cf47de Merge pull request #8984 from nestjs/dependabot/npm_and_yarn/eslint-plugin-import-2.25.4
chore(deps-dev): bump eslint-plugin-import from 2.25.3 to 2.25.4
2022-01-21 13:26:03 +01:00
Kamil Mysliwiec
2aa611b2ee Merge pull request #8985 from nestjs/renovate/babel-monorepo
chore(deps): update dependency @babel/preset-env to v7.16.11
2022-01-21 13:25:53 +01:00
Renovate Bot
21a92c0aaa chore(deps): update dependency @babel/preset-env to v7.16.11 2022-01-21 12:11:50 +00:00
Renovate Bot
3438b6a4b3 chore(deps): update dependency trim-off-newlines to 1.0.3 [security] 2022-01-21 12:10:07 +00:00
dependabot[bot]
23dffd137a chore(deps-dev): bump eslint-plugin-import from 2.25.3 to 2.25.4
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.25.3 to 2.25.4.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.25.3...v2.25.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-20 13:38:23 +00:00
dependabot[bot]
b3b6c3defb chore(deps): bump fast-json-stringify from 3.0.1 to 3.0.2
Bumps [fast-json-stringify](https://github.com/fastify/fast-json-stringify) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/fastify/fast-json-stringify/releases)
- [Commits](https://github.com/fastify/fast-json-stringify/compare/v3.0.1...v3.0.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>
2022-01-20 13:37:13 +00:00
dependabot[bot]
644e0467ea chore(deps): bump axios from 0.24.0 to 0.25.0
Bumps [axios](https://github.com/axios/axios) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.24.0...v0.25.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-20 13:34:22 +00:00
Kamil Myśliwiec
6ffdef14bc chore(@nestjs) publish v8.2.6 release 2022-01-20 14:29:57 +01:00
dependabot[bot]
485a2a2660 chore(deps): bump trim-off-newlines from 1.0.1 to 1.0.3
Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/stevemao/trim-off-newlines/releases)
- [Commits](https://github.com/stevemao/trim-off-newlines/compare/v1.0.1...v1.0.3)

---
updated-dependencies:
- dependency-name: trim-off-newlines
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-20 13:29:26 +00:00
Kamil Mysliwiec
22602a415a Merge pull request #8937 from nestjs/dependabot/npm_and_yarn/sample/07-sequelize/follow-redirects-1.14.7
chore(deps): bump follow-redirects from 1.14.6 to 1.14.7 in /sample/07-sequelize
2022-01-20 14:28:11 +01:00
Kamil Mysliwiec
9497ae7e15 Merge pull request #8930 from nestjs/dependabot/npm_and_yarn/sample/17-mvc-fastify/follow-redirects-1.14.7
chore(deps): bump follow-redirects from 1.14.5 to 1.14.7 in /sample/17-mvc-fastify
2022-01-20 14:27:57 +01:00
Kamil Mysliwiec
100dcd139e Merge pull request #8951 from nestjs/renovate/eslint-plugin-import-2.x
chore(deps): update dependency eslint-plugin-import to v2.25.4
2022-01-20 14:27:19 +01:00
Kamil Mysliwiec
60079f141f Merge pull request #8967 from nestjs/dependabot/npm_and_yarn/types/sinon-10.0.7
chore(deps-dev): bump @types/sinon from 10.0.6 to 10.0.7
2022-01-20 14:27:15 +01:00
Kamil Mysliwiec
c3a7fb934e Merge pull request #8969 from nestjs/dependabot/npm_and_yarn/lint-staged-12.2.1
chore(deps-dev): bump lint-staged from 12.1.7 to 12.2.1
2022-01-20 14:27:06 +01:00
Kamil Mysliwiec
bc3da7cc08 Merge pull request #8970 from nestjs/dependabot/npm_and_yarn/fastify-3.27.0
chore(deps): bump fastify from 3.24.1 to 3.27.0
2022-01-20 14:26:58 +01:00
Kamil Mysliwiec
13c975fffb Merge pull request #8966 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo to v7.16.10
2022-01-20 14:26:54 +01:00
Kamil Mysliwiec
eba2da437f Merge pull request #8961 from nestjs/renovate/apollo-graphql-packages
fix(deps): update apollo graphql packages to v3.6.2
2022-01-20 14:26:47 +01:00
Renovate Bot
40d1235be9 chore(deps): update dependency eslint-plugin-import to v2.25.4 2022-01-20 12:49:34 +00:00
Renovate Bot
7a327bc1b7 chore(deps): update babel monorepo to v7.16.10 2022-01-20 12:26:01 +00:00
Renovate Bot
483b9a5fe4 fix(deps): update apollo graphql packages to v3.6.2 2022-01-20 10:00:28 +00:00
dependabot[bot]
9479e5b26e chore(deps): bump fastify from 3.24.1 to 3.27.0
Bumps [fastify](https://github.com/fastify/fastify) from 3.24.1 to 3.27.0.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v3.24.1...v3.27.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-20 00:09:19 +00:00
dependabot[bot]
e2461bb72b chore(deps-dev): bump lint-staged from 12.1.7 to 12.2.1
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.1.7 to 12.2.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.1.7...v12.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-20 00:07:19 +00:00
dependabot[bot]
9e01cf8a3d chore(deps-dev): bump @types/sinon from 10.0.6 to 10.0.7
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 10.0.6 to 10.0.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-20 00:03:46 +00:00
Kamil Mysliwiec
8d3aea00dd Merge pull request #8945 from nestjs/dependabot/npm_and_yarn/mocha-9.1.4
chore(deps-dev): bump mocha from 9.1.3 to 9.1.4
2022-01-19 11:36:30 +01:00
Kamil Mysliwiec
b50d188f59 Merge pull request #8957 from nestjs/dependabot/npm_and_yarn/express-4.17.2
chore(deps): bump express from 4.17.1 to 4.17.2
2022-01-19 11:36:26 +01:00
Kamil Mysliwiec
065295652d Merge pull request #8958 from nestjs/dependabot/npm_and_yarn/core-js-3.20.3
chore(deps-dev): bump core-js from 3.19.3 to 3.20.3
2022-01-19 11:36:18 +01:00
Kamil Mysliwiec
cab28aee9d Merge pull request #8959 from nestjs/dependabot/npm_and_yarn/socket.io-4.4.1
chore(deps): bump socket.io from 4.4.0 to 4.4.1
2022-01-19 11:36:12 +01:00
Kamil Mysliwiec
084eb1aca7 Merge pull request #8960 from nestjs/dependabot/npm_and_yarn/mqtt-4.3.4
chore(deps-dev): bump mqtt from 4.2.8 to 4.3.4
2022-01-19 11:36:00 +01:00
Guilherme Ruiz
a6a5a985de fix(microservices): Fix client-kafka serializer call 2022-01-19 17:24:44 +11:00
Guilherme Ruiz
f30040052a refactor(microservices): drop serialize return type 2022-01-19 15:37:30 +11:00
Guilherme Ruiz
11d4612ff1 fix(microservices): fix serialize return type 2022-01-19 15:35:55 +11:00
Guilherme Ruiz
2cb359dda5 refactor(microservices): remove 3 unnecessary async 2022-01-19 15:16:45 +11:00
dependabot[bot]
662de010eb chore(deps-dev): bump mqtt from 4.2.8 to 4.3.4
Bumps [mqtt](https://github.com/mqttjs/MQTT.js) from 4.2.8 to 4.3.4.
- [Release notes](https://github.com/mqttjs/MQTT.js/releases)
- [Changelog](https://github.com/mqttjs/MQTT.js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mqttjs/MQTT.js/compare/v4.2.8...v4.3.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-19 00:08:04 +00:00
dependabot[bot]
8b56c53782 chore(deps): bump socket.io from 4.4.0 to 4.4.1
Bumps [socket.io](https://github.com/socketio/socket.io) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/master/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.4.0...4.4.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>
2022-01-19 00:06:25 +00:00
dependabot[bot]
1c07cdd45a chore(deps-dev): bump core-js from 3.19.3 to 3.20.3
Bumps [core-js](https://github.com/zloirock/core-js) from 3.19.3 to 3.20.3.
- [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/compare/v3.19.3...v3.20.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-19 00:04:56 +00:00
dependabot[bot]
ba6d63a614 chore(deps): bump express from 4.17.1 to 4.17.2
Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.17.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.17.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-19 00:03:49 +00:00
dependabot[bot]
33549ccb38 chore(deps-dev): bump mocha from 9.1.3 to 9.1.4
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.3 to 9.1.4.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.1.3...v9.1.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-18 08:39:39 +00:00
Kamil Mysliwiec
28e3769625 Merge pull request #8943 from nestjs/dependabot/npm_and_yarn/lint-staged-12.1.7
chore(deps-dev): bump lint-staged from 12.1.3 to 12.1.7
2022-01-18 09:36:54 +01:00
Kamil Mysliwiec
f09bbbd2a1 Merge pull request #8940 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.20
2022-01-18 09:36:46 +01:00
Kamil Mysliwiec
5e45a89120 Merge pull request #8946 from nestjs/dependabot/npm_and_yarn/nestjs/typeorm-8.0.3
chore(deps-dev): bump @nestjs/typeorm from 8.0.2 to 8.0.3
2022-01-18 09:36:39 +01:00
Kamil Mysliwiec
bb40d63015 Merge pull request #8947 from nestjs/dependabot/npm_and_yarn/mongoose-6.1.7
chore(deps-dev): bump mongoose from 6.1.6 to 6.1.7
2022-01-18 09:36:35 +01:00
Kamil Mysliwiec
6435c05e19 Merge pull request #8944 from nestjs/dependabot/npm_and_yarn/fast-json-stringify-3.0.1
chore(deps): bump fast-json-stringify from 2.7.12 to 3.0.1
2022-01-18 09:36:24 +01:00
Renovate Bot
bc88386a08 chore(deps): update dependency @types/node to v16.11.20 2022-01-18 05:06:53 +00:00
dependabot[bot]
fc79d94b4a chore(deps-dev): bump mongoose from 6.1.6 to 6.1.7
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.1.6 to 6.1.7.
- [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.1.6...6.1.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-18 00:09:23 +00:00
dependabot[bot]
6088e38612 chore(deps-dev): bump @nestjs/typeorm from 8.0.2 to 8.0.3
Bumps [@nestjs/typeorm](https://github.com/nestjs/typeorm) from 8.0.2 to 8.0.3.
- [Release notes](https://github.com/nestjs/typeorm/releases)
- [Changelog](https://github.com/nestjs/typeorm/blob/master/.release-it.json)
- [Commits](https://github.com/nestjs/typeorm/compare/8.0.2...8.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-18 00:07:53 +00:00
dependabot[bot]
0e1dc70cf7 chore(deps): bump fast-json-stringify from 2.7.12 to 3.0.1
Bumps [fast-json-stringify](https://github.com/fastify/fast-json-stringify) from 2.7.12 to 3.0.1.
- [Release notes](https://github.com/fastify/fast-json-stringify/releases)
- [Commits](https://github.com/fastify/fast-json-stringify/compare/v2.7.12...v3.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-18 00:05:12 +00:00
dependabot[bot]
4409362369 chore(deps-dev): bump lint-staged from 12.1.3 to 12.1.7
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.1.3 to 12.1.7.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.1.3...v12.1.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-18 00:04:13 +00:00
Eugene Korshenko
95643fc40a chore(): import shared utils from a proper location 2022-01-17 23:58:17 +02:00
Eugene Korshenko
27a1321bda refactor(microservices): utilize shared utils at pattern decorators 2022-01-17 23:51:22 +02:00
Eugene Korshenko
8a81f5e45b test(microservices): add tests for overloads of pattern decorators 2022-01-17 23:37:03 +02:00
Eugene Korshenko
d1e6e9b587 feat(microservices): add overloads for pattern decorators 2022-01-17 23:33:08 +02:00
Kamil Mysliwiec
83ff7ff8c7 Merge pull request #8938 from nestjs/renovate/conventional-changelog-3.x
chore(deps): update dependency conventional-changelog to v3.1.25
2022-01-17 14:28:31 +01:00
Renovate Bot
0ab56a288a chore(deps): update dependency conventional-changelog to v3.1.25 2022-01-17 11:22:44 +00:00
dependabot[bot]
0f01cad8e4 chore(deps): bump follow-redirects in /sample/17-mvc-fastify
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 08:10:49 +00:00
dependabot[bot]
c263b278aa chore(deps): bump follow-redirects in /sample/07-sequelize
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.6 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.6...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 08:09:47 +00:00
Kamil Mysliwiec
cb4bc12e06 Merge pull request #8759 from nestjs/dependabot/npm_and_yarn/types/ws-8.2.2
chore(deps-dev): bump @types/ws from 8.2.0 to 8.2.2
2022-01-17 09:09:37 +01:00
Kamil Mysliwiec
50016582a7 Merge pull request #8926 from nestjs/dependabot/npm_and_yarn/sample/09-babel-example/follow-redirects-1.14.7
chore(deps): bump follow-redirects from 1.14.5 to 1.14.7 in /sample/09-babel-example
2022-01-17 09:09:33 +01:00
Kamil Mysliwiec
a9e6dcd21e Merge pull request #8927 from nestjs/dependabot/npm_and_yarn/sample/06-mongoose/follow-redirects-1.14.7
chore(deps): bump follow-redirects from 1.14.6 to 1.14.7 in /sample/06-mongoose
2022-01-17 09:09:29 +01:00
Kamil Mysliwiec
d7fc9a86b2 Merge pull request #8928 from nestjs/dependabot/npm_and_yarn/sample/10-fastify/follow-redirects-1.14.7
chore(deps): bump follow-redirects from 1.14.5 to 1.14.7 in /sample/10-fastify
2022-01-17 09:09:25 +01:00
Kamil Mysliwiec
0868b5e00a Merge pull request #8929 from nestjs/dependabot/npm_and_yarn/sample/08-webpack/follow-redirects-1.14.7
chore(deps): bump follow-redirects from 1.14.5 to 1.14.7 in /sample/08-webpack
2022-01-17 09:08:52 +01:00
Kamil Mysliwiec
d183f0e72f Merge pull request #8921 from nestjs/renovate/http-errors-1.x
chore(deps): update dependency @types/http-errors to v1.8.2
2022-01-17 09:08:28 +01:00
Kamil Mysliwiec
780188d2e1 Merge pull request #8923 from nestjs/renovate/npm-shelljs-vulnerability
chore(deps): update dependency shelljs to 0.8.5 [security]
2022-01-17 09:08:23 +01:00
Kamil Mysliwiec
904cb9b190 Merge pull request #8922 from nestjs/renovate/apollo-graphql-packages
fix(deps): update apollo graphql packages
2022-01-17 09:08:17 +01:00
Kamil Mysliwiec
555e1e20f2 Merge pull request #8935 from nestjs/dependabot/npm_and_yarn/commitlint/config-angular-16.0.0
chore(deps-dev): bump @commitlint/config-angular from 15.0.0 to 16.0.0
2022-01-17 09:05:45 +01:00
Renovate Bot
09bd2a2009 fix(deps): update apollo graphql packages 2022-01-17 05:12:45 +00:00
Renovate Bot
014126c45f chore(deps): update dependency @types/http-errors to v1.8.2 2022-01-17 05:02:27 +00:00
Renovate Bot
a128d40a7b chore(deps): update dependency shelljs to 0.8.5 [security] 2022-01-17 05:00:34 +00:00
dependabot[bot]
04733b97c6 chore(deps-dev): bump @commitlint/config-angular from 15.0.0 to 16.0.0
Bumps [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular) from 15.0.0 to 16.0.0.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-angular/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v16.0.0/@commitlint/config-angular)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 00:10:24 +00:00
Eugene Korshenko
26e9ed63bf feat(microservices): add extras param to pattern decorators
Add optional "extras" parameter for MessagePattern and
EventPattern decorators. Allow embedding extra params into
each message handler method and improve an experience of
creating custom microservice transports
2022-01-16 22:11:16 +02:00
dependabot[bot]
f4316d303b chore(deps): bump follow-redirects in /sample/10-fastify
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-16 01:45:20 +00:00
dependabot[bot]
257b8fc8b2 chore(deps): bump follow-redirects in /sample/08-webpack
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-16 01:45:20 +00:00
dependabot[bot]
b9030e53ac chore(deps): bump follow-redirects in /sample/06-mongoose
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.6 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.6...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-16 01:45:17 +00:00
dependabot[bot]
5748e746a0 chore(deps): bump follow-redirects in /sample/09-babel-example
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-16 00:58:10 +00:00
Steven Brown
68918a4915 fix(core): convert URIError thrown by the HTTP platform to BadRequestException
When given a path parameter with an invalid percent encoding, Express throws a URIError with the
statusCode field set to 400 (bad request):
https://github.com/expressjs/express/blob/4.17.1/lib/router/layer.js#L166

Convert this URIError to a BadRequestException before providing it to the exception filters.
Therefore the exception filters will handle this error in the same way as other bad requests.

Note that this only applies to errors thrown directly from Express or Fastify. A URIError thrown
from a NestJS construct such as a controller or validation pipe will continue to be provided to the
exception filters as is.

Closes #8915
2022-01-15 10:59:55 +08:00
Kamil Mysliwiec
b01afec1b9 Merge pull request #8920 from nestjs/renovate/grpc-proto-loader-0.x
chore(deps): update dependency @grpc/proto-loader to v0.6.9
2022-01-14 12:35:47 +01:00
Kamil Mysliwiec
4301b616f7 Merge pull request #8919 from nestjs/renovate/npm-engine.io-vulnerability
chore(deps): update dependency engine.io to 6.1.1 [security]
2022-01-14 12:35:40 +01:00
Kamil Mysliwiec
2ad6d343f3 Merge pull request #8918 from nestjs/dependabot/npm_and_yarn/engine.io-6.1.1
chore(deps): bump engine.io from 6.1.0 to 6.1.1
2022-01-14 12:35:15 +01:00
Renovate Bot
2f8131bcf9 chore(deps): update dependency @grpc/proto-loader to v0.6.9 2022-01-14 11:20:36 +00:00
Renovate Bot
f3709c3571 chore(deps): update dependency engine.io to 6.1.1 [security] 2022-01-14 11:18:28 +00:00
dependabot[bot]
37fc18cd14 chore(deps-dev): bump @types/ws from 8.2.0 to 8.2.2
Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 8.2.0 to 8.2.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-14 11:14:37 +00:00
dependabot[bot]
88846b8d0e chore(deps): bump engine.io from 6.1.0 to 6.1.1
Bumps [engine.io](https://github.com/socketio/engine.io) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/master/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.1.0...6.1.1)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-14 11:11:59 +00:00
Kamil Mysliwiec
a35a76bb82 Merge pull request #8897 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.5.0
chore(deps-dev): bump @grpc/grpc-js from 1.4.4 to 1.5.0
2022-01-14 12:06:35 +01:00
Kamil Mysliwiec
046323a030 Merge pull request #8911 from nestjs/renovate/npm-follow-redirects-vulnerability
chore(deps): update dependency follow-redirects to 1.14.7 [security]
2022-01-14 12:06:11 +01:00
Kamil Mysliwiec
02613e9066 Merge pull request #8888 from Tony133/samples/remove-dependecies-not-used
samples(): removed unused dependencies
2022-01-14 12:05:43 +01:00
Tony
dd078de350 Merge branch 'master' into samples/remove-dependecies-not-used 2022-01-14 11:43:26 +01:00
Renovate Bot
0cca7c21b9 chore(deps): update dependency follow-redirects to 1.14.7 [security] 2022-01-14 09:11:10 +00:00
Kamil Mysliwiec
521bc2b1bd Merge pull request #8899 from nestjs/dependabot/npm_and_yarn/mongoose-6.1.6
chore(deps-dev): bump mongoose from 6.1.5 to 6.1.6
2022-01-13 10:30:50 +01:00
Kamil Mysliwiec
d8c7fe8bcc Merge pull request #8910 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo
2022-01-13 10:30:42 +01:00
Renovate Bot
9beec5c73a chore(deps): update babel monorepo 2022-01-13 08:05:29 +00:00
Kamil Mysliwiec
59dce0494b Merge pull request #8892 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.19
2022-01-13 08:59:07 +01:00
Renovate Bot
85fdbee00f chore(deps): update dependency @types/node to v16.11.19 2022-01-13 06:04:52 +00:00
dependabot[bot]
0d4a515d4a chore(deps-dev): bump @grpc/grpc-js from 1.4.4 to 1.5.0
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.4.4 to 1.5.0.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.4.4...@grpc/grpc-js@1.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-12 10:16:42 +00:00
Kamil Myśliwiec
1d820d0ca1 chore(@nestjs) publish v8.2.5 release 2022-01-12 11:10:30 +01:00
Kamil Mysliwiec
75463fccfc Merge pull request #8896 from nestjs/dependabot/npm_and_yarn/http-errors-2.0.0
chore(deps-dev): bump http-errors from 1.8.1 to 2.0.0
2022-01-12 11:09:04 +01:00
Kamil Mysliwiec
102576f85a Merge pull request #8895 from nestjs/fix/amqp-v4-compatibility
fix(microservices): fix amqp v4 incompatibility issue
2022-01-12 11:08:25 +01:00
Kamil Myśliwiec
4be4a0ab5f chore(): sync deps 2022-01-12 10:46:58 +01:00
Kamil Myśliwiec
1d929e2c93 chore(): revert package-lock.json changes 2022-01-12 10:39:40 +01:00
Kamil Myśliwiec
6647bed019 chore(): revert package.json changes 2022-01-12 10:36:21 +01:00
Kamil Myśliwiec
d3b627fa00 fix(microservices): rmq should merge both disconnect and connect failed events 2022-01-12 10:23:29 +01:00
dependabot[bot]
85c0af71e2 chore(deps-dev): bump mongoose from 6.1.5 to 6.1.6
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.1.5 to 6.1.6.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.1.5...6.1.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-12 00:09:00 +00:00
dependabot[bot]
55b9dec462 chore(deps-dev): bump http-errors from 1.8.1 to 2.0.0
Bumps [http-errors](https://github.com/jshttp/http-errors) from 1.8.1 to 2.0.0.
- [Release notes](https://github.com/jshttp/http-errors/releases)
- [Changelog](https://github.com/jshttp/http-errors/blob/master/HISTORY.md)
- [Commits](https://github.com/jshttp/http-errors/compare/1.8.1...v2.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-12 00:03:49 +00:00
Kamil Mysliwiec
12badd45af Merge pull request #8768 from nestjs/dependabot/npm_and_yarn/types/redis-4.0.11
chore(deps-dev): bump @types/redis from 2.8.32 to 4.0.11
2022-01-11 15:45:38 +01:00
Kamil Mysliwiec
fb71093ed7 Merge pull request #8778 from nestjs/dependabot/npm_and_yarn/body-parser-1.19.1
chore(deps): bump body-parser from 1.19.0 to 1.19.1
2022-01-11 15:45:34 +01:00
Kamil Mysliwiec
1d487eda85 Merge pull request #8847 from nestjs/dependabot/npm_and_yarn/point-of-view-5.0.0
chore(deps-dev): bump point-of-view from 4.15.3 to 5.0.0
2022-01-11 15:45:29 +01:00
Kamil Mysliwiec
dd670fe8bc Merge pull request #8856 from nestjs/renovate/sequelize-4.x
chore(deps): update dependency @types/sequelize to v4.28.11
2022-01-11 15:45:24 +01:00
Kamil Mysliwiec
1cc92c1dbd Merge pull request #8873 from nestjs/dependabot/npm_and_yarn/mongoose-6.1.5
build(deps-dev): bump mongoose from 6.0.15 to 6.1.5
2022-01-11 15:45:20 +01:00
Kamil Mysliwiec
3416baf6b5 Merge pull request #8890 from nestjs/dependabot/npm_and_yarn/copy-props-2.0.5
chore(deps): bump copy-props from 2.0.4 to 2.0.5
2022-01-11 15:45:07 +01:00
Kamil Myśliwiec
1839187b75 refactor(microservice): make condition more self descriptive 2022-01-11 15:39:30 +01:00
Kamil Myśliwiec
cd3a9d6721 fix(microservices): fix amqp v4 incompatibility issue 2022-01-11 14:30:52 +01:00
Renovate Bot
0029f52d77 chore(deps): update dependency @types/sequelize to v4.28.11 2022-01-11 13:21:57 +00:00
dependabot[bot]
1b77d86a3e chore(deps): bump copy-props from 2.0.4 to 2.0.5
Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/gulpjs/copy-props/releases)
- [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5)

---
updated-dependencies:
- dependency-name: copy-props
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-10 07:37:16 +00:00
Kamil Mysliwiec
30b75a55d9 Merge pull request #8886 from Tony133/sample-17-mvc-fastify/remove-dependecies-not-used
sample(17-mvc-fastify): removed unused dependencies
2022-01-10 08:36:22 +01:00
Kamil Mysliwiec
2122d8dfec Merge pull request #8885 from Tony133/sample-10/remove-dependecies-not-used
sample(10-fastify): removed unused dependencies
2022-01-10 08:35:51 +01:00
Kamil Mysliwiec
d883db811d Merge pull request #8884 from Tony133/sample-05/remove-dependecies-not-used
sample(05-sql-typeorm): removed unused dependencies
2022-01-10 08:35:31 +01:00
Tony133
772020a567 samples(): removed dependecies for types sequelize 2022-01-09 23:12:04 +01:00
Tony133
f722b0e742 samples(): removed unused dependencies 2022-01-09 11:47:41 +01:00
Tony133
46a92869e2 sample(17-mvc-fastify): removed unused dependencies 2022-01-08 23:31:22 +01:00
Tony133
8729500ee3 sample(10-fastify): removed unused dependencies 2022-01-08 23:20:52 +01:00
Tony133
230302da60 sample(05-sql-typeorm): removed unused dependencies 2022-01-08 21:48:53 +01:00
Kamil Mysliwiec
178ce1cfc3 Merge pull request #8879 from thiagomini/patch-1
chore(license)
2022-01-07 10:40:05 +01:00
Thiago Valentim
4421532279 chore(license)
update for 2022
2022-01-06 18:00:43 -03:00
dependabot[bot]
02aeab0907 build(deps-dev): bump mongoose from 6.0.15 to 6.1.5
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.0.15 to 6.1.5.
- [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.0.15...6.1.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-05 00:14:00 +00:00
Kamil Mysliwiec
0e7107d0e3 Merge pull request #8864 from micalevisk/master
Minor improvements on issue templates, and add tests to cover few missing cases
2022-01-03 10:09:26 +01:00
Kamil Mysliwiec
c0092190b6 Update .github/ISSUE_TEMPLATE/Bug_report.yml 2022-01-03 10:08:54 +01:00
Kamil Mysliwiec
8ef2461eef Merge pull request #8866 from Tony133/sample-06/update-dependencies
sample(06-mongoose): removed duplicate dependencie  and not useds
2022-01-03 09:54:30 +01:00
Tony133
9530b11a5a sample(06-mongoose): removeds dependencie not used 2022-01-02 21:30:57 +01:00
Tony133
a6e8cebe9a sample(06-mongoose): removed duplicate dependencie 2022-01-02 16:51:57 +01:00
Micael Levi (@micalevisk)
621b20bf0a test(core,common): add missing unit tests on utils/injector/services 2021-12-31 19:17:50 -04:00
Micael Levi (@micalevisk)
f4610301d5 test(core): add missing call to ExceptionsHandler#next 2021-12-31 19:17:50 -04:00
Micael Levi (@micalevisk)
303c5faed7 chore: minor improvements to github issue templates 2021-12-31 19:17:47 -04:00
Kamil Mysliwiec
28516d739d Merge pull request #8851 from micalevisk/fix-issue-8595
Use `isObervable` from `rxjs` instead of our own implementation. Drop few deprecated APIs from 3rd-party libs. And other minor refactorings
2021-12-27 10:44:16 +01:00
dependabot[bot]
af72111e9e chore(deps-dev): bump @types/redis from 2.8.32 to 4.0.11
Bumps [@types/redis](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/redis) from 2.8.32 to 4.0.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/redis)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 09:29:57 +00:00
Kamil Mysliwiec
14a111f637 Merge pull request #8848 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.17
2021-12-27 10:26:29 +01:00
Renovate Bot
d34bd9a4ae chore(deps): update dependency @types/node to v16.11.17 2021-12-27 06:33:51 +00:00
Micael Levi (lab)
de83c0c960 feat(common,microservices): add isNumber shared util
Also, add another test for `isString` utility, to clarify that it must
return `false` for strings made by `String` constructor.
2021-12-26 18:39:56 -04:00
Micael Levi (lab)
f54741d232 refactor(microservices): use isObject shared util 2021-12-26 17:33:32 -04:00
Micael Levi (lab)
97f2969b33 fix(microservices): right return type when input is observable
Before this change, when supplying an observable to
`Server#transformToObservable` method, the return type was wrongly inferred as
`Observable<Observable<X>>` while the real return is
`Observable<X>`
This commits fix this return type.
2021-12-24 20:33:57 -04:00
Micael Levi (lab)
fd720e899d refactor: remove deprecated apis from 3rd-party deps
Replacie old and deprecated APIs from `rxjs`, `body-parser`
and NodeJS core (read this guide https://nodejs.org/en/docs/guides/buffer-constructor-deprecation).
Do notice that the later only touches test files, thus doesn't affect
production code.
2021-12-24 20:30:33 -04:00
Micael Levi (lab)
f1b9b636a5 refactor(microservices): drop useless type assertion on server
on every type assertion for `Observable<any>` that is not needed anymore.
2021-12-23 22:38:42 -04:00
Micael Levi (lab)
cbec376216 feat: use isObervable from rxjs instead of our own version
Relying on `isObservable` type guard from RxJS is better as it has less
false-positives.
2021-12-23 22:38:42 -04:00
Kamil Mysliwiec
7825c02160 Merge pull request #8845 from Tony133/sample/update-dependecie-mysql8
sample(05-sql-typeorm): update dependecie for mysql 8.x and some improvements
2021-12-23 09:44:50 +01:00
Kamil Mysliwiec
fc4be02fba Update sample/05-sql-typeorm/src/main.ts 2021-12-23 09:44:33 +01:00
dependabot[bot]
5e1333b27f chore(deps-dev): bump point-of-view from 4.15.3 to 5.0.0
Bumps [point-of-view](https://github.com/fastify/point-of-view) from 4.15.3 to 5.0.0.
- [Release notes](https://github.com/fastify/point-of-view/releases)
- [Commits](https://github.com/fastify/point-of-view/compare/v4.15.3...v5.0.0)

---
updated-dependencies:
- dependency-name: point-of-view
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-23 00:09:36 +00:00
Tony133
0fb3233e57 sample(05-sql-typeorm): update dependecie for mysql 8.x and some improvements 2021-12-22 11:49:44 +01:00
Kamil Mysliwiec
411ef5e237 Merge pull request #8841 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.15
2021-12-22 11:10:38 +01:00
Renovate Bot
b4a9e11aeb chore(deps): update dependency @types/node to v16.11.15 2021-12-22 09:27:53 +00:00
Guilherme Ruiz
01d2469e27 fix(microservices): delete yarn.lock 2021-12-22 16:34:29 +11:00
Guilherme Ruiz
f51377a034 feat(microservices): simplify memory leak fix and add a test 2021-12-22 15:43:44 +11:00
Kamil Mysliwiec
775a34853a Merge pull request #8810 from nestjs/renovate/lint-staged-12.x
chore(deps): update dependency lint-staged to v12.1.3
2021-12-21 08:46:37 +01:00
Renovate Bot
04ae702704 chore(deps): update dependency lint-staged to v12.1.3 2021-12-20 14:31:46 +00:00
Kamil Mysliwiec
124dbf3a19 Merge pull request #8803 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.14
2021-12-20 15:24:19 +01:00
Renovate Bot
9eb1274f7e chore(deps): update dependency @types/node to v16.11.14 2021-12-17 09:34:40 +00:00
Kamil Myśliwiec
0036779042 chore(@nestjs) publish v8.2.4 release 2021-12-17 10:01:56 +01:00
Kamil Myśliwiec
a3766df110 chore(): update readme 2021-12-17 09:59:19 +01:00
Kamil Mysliwiec
b7378ad088 Merge pull request #8740 from wSedlacek/feat/handle-observable-stream-errors
feat(core): handle errors in observable streams
2021-12-17 09:58:33 +01:00
wSedlacek
b7f368006a feat(core): handle errors in sse streams 2021-12-17 00:30:46 -08:00
Kamil Mysliwiec
f704a43be9 Merge pull request #8735 from micalevisk/fix-duplicated-versions
feat(core,common): fix ignore duplicated versions and support an array containing VERSION_NEUTRAL
2021-12-17 09:25:04 +01:00
Guilherme Ruiz
d21df1018a fix(microservices): fix memory leak 2021-12-17 18:02:14 +11:00
Guilherme Ruiz
58950a0dee refactor(microservices): remove 3 unnecessary await 2021-12-17 10:31:56 +11:00
Micael Levi (lab)
094704f9bc feat(core,common): add array support for VERSION_NEUTRAL 2021-12-16 10:54:32 -04:00
Micael Levi (lab)
9683ac2502 test(core,common): add unit tests for duplicated versions scenario 2021-12-16 10:54:31 -04:00
Micael Levi (lab)
68a66757bb fix(core,common): ignore duplicated versions 2021-12-16 10:52:44 -04:00
Kamil Mysliwiec
ffc0389d7b Merge pull request #8738 from micalevisk/fix-issue-8733
fix(common,core): auto flush logs after `useLogger` call
2021-12-16 14:11:21 +01:00
Kamil Mysliwiec
0ae6f0ea03 Update packages/core/nest-application-context.ts 2021-12-16 14:11:02 +01:00
Kamil Mysliwiec
0ae4b617b8 Update packages/core/nest-application-context.ts 2021-12-16 14:10:44 +01:00
Kamil Mysliwiec
bda3c647bc Merge pull request #8787 from micalevisk/feat-issue-8302
feat(core,common): raise warnings when an injectable/controller/filter is imported as a module
2021-12-16 14:09:48 +01:00
Kamil Mysliwiec
ab235a98c6 Update packages/core/scanner.ts 2021-12-16 14:09:24 +01:00
Kamil Mysliwiec
bd36f6ee75 Update packages/core/scanner.ts 2021-12-16 14:08:29 +01:00
Kamil Mysliwiec
11ae6e11e2 Update packages/core/errors/messages.ts 2021-12-16 14:08:09 +01:00
Kamil Mysliwiec
472cb251d7 Update packages/core/errors/messages.ts 2021-12-16 14:07:40 +01:00
Kamil Mysliwiec
52381b0fba Merge pull request #8797 from micalevisk/master
refactor(common,core): use shared utils whenever possible
2021-12-16 14:05:02 +01:00
Kamil Mysliwiec
be6c741457 Merge pull request #8784 from ZanMinKian/refactor/replace_indexOf
refactor(): replace `indexOf` with `includes`
2021-12-16 14:01:31 +01:00
Kamil Mysliwiec
80aaecb26b Merge pull request #8791 from nestjs/renovate/confluentinc-cp-zookeeper-7.x
chore(deps): update confluentinc/cp-zookeeper docker tag to v7.0.1
2021-12-16 08:36:17 +01:00
Micael Levi (lab)
82adb3c101 refactor(common,core): use shared utils from common whenever possible
Use every util defined at `shared.utils.ts` from `@nestjs/common`, when
possible. Only spec files aren't touched.
2021-12-16 02:54:06 -04:00
Guilherme Ruiz
01daeb441f feat(microservices): allow kafka serializer to be async and await result 2021-12-16 17:31:53 +11:00
Renovate Bot
85a42cdfa9 chore(deps): update confluentinc/cp-zookeeper docker tag to v7.0.1 2021-12-15 10:35:03 +00:00
Kamil Mysliwiec
939f2d56d1 Update Readme.md 2021-12-15 10:52:27 +01:00
Kamil Mysliwiec
4a2f694534 Merge pull request #8783 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo to v7.16.5
2021-12-15 09:19:05 +01:00
Micael Levi (lab)
99cca56055 test(core): add tests to cover the new feature 2021-12-14 23:18:38 -04:00
Micael Levi (lab)
b995c22528 feat(core): add warn when importing a controller/filter as well 2021-12-14 23:18:34 -04:00
Renovate Bot
bfc1737098 chore(deps): update babel monorepo to v7.16.5 2021-12-15 00:39:41 +00:00
Micael Levi (lab)
0f99d70f09 feat(common,core): add tags for controllers and exception filters 2021-12-14 18:27:37 -04:00
Micael Levi (lab)
3d69b73987 test(core,common): add test to ensure the new feat is working 2021-12-14 18:27:37 -04:00
Micael Levi (lab)
17e4ca7407 feat(core,common): add warn when importing an injectable 2021-12-14 18:27:32 -04:00
Micael Levi (lab)
05167dbad0 refactor(core): use isForwardReference whenever possible 2021-12-14 10:56:36 -04:00
zmj
4621fad49b refactor(): replace indexOf with includes 2021-12-14 20:45:31 +08:00
Kamil Mysliwiec
259b6fb46c Merge pull request #8779 from nestjs/renovate/confluentinc-cp-kafka-7.x
chore(deps): update confluentinc/cp-kafka docker tag to v7.0.1
2021-12-14 09:17:30 +01:00
Kamil Mysliwiec
09ad99bea7 Merge pull request #8782 from micalevisk/master
fix(core): `getInstanceName` wrong return when passing a dynamic module
2021-12-14 09:01:50 +01:00
wiltshir
6ec6f3535e feat(common): Add custom versioning support
Specifically, addes a 'Custom' VersioningType that allows for an
extractor function to be provided that receives the Request object
(either Express or Fastify) and returns a string or array of strings
pulled from said request. Examples include extracting custom header
values, URL params, POST request bodies, and more.

Fixes #8441
2021-12-13 18:39:37 -08:00
Micael Levi (lab)
5b104f3962 fix(core): getInstanceName wrong return when passing a dynamic module 2021-12-13 20:49:48 -04:00
Renovate Bot
7ed90c4fe0 chore(deps): update confluentinc/cp-kafka docker tag to v7.0.1 2021-12-13 08:33:25 +00:00
Kamil Mysliwiec
9dbf1d2dbc Merge pull request #8720 from nestjs/renovate/npm-json-schema-vulnerability
chore(deps): update dependency json-schema to 0.4.0 [security]
2021-12-13 09:28:26 +01:00
dependabot[bot]
89b2afbf24 chore(deps): bump body-parser from 1.19.0 to 1.19.1
Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.19.0...1.19.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 00:09:08 +00:00
Renovate Bot
f296d45489 chore(deps): update dependency json-schema to 0.4.0 [security] 2021-12-09 12:03:34 +00:00
Kamil Mysliwiec
8d20e65e7b Merge pull request #8751 from nestjs/renovate/mongoose-6.x
fix(deps): update dependency mongoose to v6.0.15
2021-12-09 12:52:31 +01:00
Kamil Mysliwiec
454f6cf04e Merge pull request #8753 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.12
2021-12-09 12:52:27 +01:00
Kamil Mysliwiec
9287a5a16a Merge pull request #8754 from nestjs/renovate/multer-1.x
fix(deps): update dependency multer to v1.4.4
2021-12-09 12:52:21 +01:00
Kamil Mysliwiec
ffbefa30c2 Merge pull request #8755 from nestjs/renovate/chai-4.x
chore(deps): update dependency @types/chai to v4.3.0
2021-12-09 12:52:16 +01:00
Kamil Mysliwiec
845097cb40 Merge pull request #8762 from nestjs/renovate/fastify-multipart-5.x
chore(deps): update dependency fastify-multipart to v5.2.1
2021-12-09 12:52:11 +01:00
Kamil Mysliwiec
1aec2f07a3 Merge pull request #8763 from nestjs/renovate/bull-3.x
chore(deps): update dependency @types/bull to v3.15.7
2021-12-09 12:52:03 +01:00
Renovate Bot
21bb6d96d4 chore(deps): update dependency @types/chai to v4.3.0 2021-12-09 10:25:09 +00:00
Renovate Bot
23fa477d6b fix(deps): update dependency multer to v1.4.4 2021-12-09 10:23:18 +00:00
Renovate Bot
499952c60d chore(deps): update dependency fastify-multipart to v5.2.1 2021-12-09 10:21:30 +00:00
Renovate Bot
6c9842102a chore(deps): update dependency @types/node to v16.11.12 2021-12-09 10:19:36 +00:00
Renovate Bot
096ab81a69 chore(deps): update dependency @types/bull to v3.15.7 2021-12-09 09:52:21 +00:00
Kamil Mysliwiec
d8c2a4eb0d Update Readme.md 2021-12-09 10:04:15 +01:00
Micael Levi (lab)
bf0e07457a fix(common,core): auto flush logs after useLogger call if enabled
When using `NestApplicationContext` app and `autoFlushLogs` is on,
invoking `useLogger` method on it must flushes its logs.
2021-12-07 07:03:42 -04:00
Renovate Bot
4f97acb550 fix(deps): update dependency mongoose to v6.0.15 2021-12-07 00:36:13 +00:00
Kamil Mysliwiec
1ce8320ec8 Merge pull request #8739 from nestjs/renovate/prettier-2.x
chore(deps): update dependency prettier to v2.5.1
2021-12-06 12:41:09 +01:00
Kamil Mysliwiec
2eb4bcecaa Merge pull request #8743 from nestjs/renovate/fastify-multipart-5.x
chore(deps): update dependency fastify-multipart to v5.2.0
2021-12-06 12:41:02 +01:00
Kamil Mysliwiec
9e05ebad67 Merge pull request #8748 from nestjs/renovate/core-js-3.x
chore(deps): update dependency core-js to v3.19.3
2021-12-06 12:40:58 +01:00
Kamil Mysliwiec
ef12ab32ce Merge pull request #8729 from wSedlacek/fix/sse-headers
fix(core): apply existing headers to sse responses
2021-12-06 12:40:14 +01:00
Renovate Bot
ad0d51f37c chore(deps): update dependency core-js to v3.19.3 2021-12-06 09:36:48 +00:00
Renovate Bot
d3d079783c chore(deps): update dependency fastify-multipart to v5.2.0 2021-12-05 23:47:36 +00:00
Renovate Bot
60103c183e chore(deps): update dependency prettier to v2.5.1 2021-12-04 17:02:00 +00:00
Kamil Mysliwiec
9aa9d0ee24 Merge pull request #8728 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.11
2021-11-30 08:37:20 +01:00
Kamil Mysliwiec
71d715b8d4 Merge pull request #8723 from nestjs/renovate/mongoose-6.x
fix(deps): update dependency mongoose to v6.0.14
2021-11-30 08:37:02 +01:00
Kamil Mysliwiec
1652a45df4 Merge pull request #8722 from nestjs/renovate/core-js-3.x
chore(deps): update dependency core-js to v3.19.2
2021-11-30 08:36:54 +01:00
Kamil Mysliwiec
e38bae9410 Merge pull request #8718 from nestjs/renovate/fastify-3.x
fix(deps): update dependency fastify to v3.24.1
2021-11-30 08:36:49 +01:00
Kamil Mysliwiec
f978794a15 Merge pull request #8705 from nestjs/renovate/prettier-2.x
chore(deps): update dependency prettier to v2.5.0
2021-11-30 08:36:41 +01:00
wSedlacek
14e7e0b478 fix(core): apply existing headers to sse responses 2021-11-29 20:18:44 -08:00
Renovate Bot
eba3380b24 chore(deps): update dependency @types/node to v16.11.11 2021-11-30 02:21:06 +00:00
Renovate Bot
cd20bb05b4 fix(deps): update dependency mongoose to v6.0.14 2021-11-29 23:50:59 +00:00
Renovate Bot
60aa45b1ac chore(deps): update dependency core-js to v3.19.2 2021-11-29 21:45:48 +00:00
Renovate Bot
4ee9f21901 fix(deps): update dependency fastify to v3.24.1 2021-11-29 15:08:44 +00:00
Renovate Bot
b232c2d75a chore(deps): update dependency prettier to v2.5.0 2021-11-29 09:00:59 +00:00
Kamil Mysliwiec
d9a0e4f66c Merge pull request #8706 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.64.4
2021-11-29 09:28:24 +01:00
Kamil Mysliwiec
9c2fa4f153 Merge pull request #8713 from WikiRik/fix-husky
build(common): fix husky scripts
2021-11-29 09:12:30 +01:00
Rik Smale
965bc842c8 build(common): fix husky scripts 2021-11-28 11:53:53 +00:00
Renovate Bot
14be1e6b8a chore(deps): update dependency webpack to v5.64.4 2021-11-25 16:40:44 +00:00
Kamil Mysliwiec
f65903770b Merge pull request #8701 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v8.2.3
2021-11-25 15:02:25 +01:00
Renovate Bot
aafd49a7d7 fix(deps): update nest monorepo to v8.2.3 2021-11-25 10:29:46 +00:00
Kamil Mysliwiec
b245710a20 Merge pull request #8700 from nestjs/revert-8687-dependabot/npm_and_yarn/ws-8.3.0
Revert "chore(deps): bump ws from 7.5.5 to 8.3.0"
2021-11-25 09:56:47 +01:00
Kamil Mysliwiec
e50ff6a1fb Revert "chore(deps): bump ws from 7.5.5 to 8.3.0" 2021-11-25 09:56:39 +01:00
Kamil Mysliwiec
1a86adb261 Merge pull request #8627 from nestjs/dependabot/npm_and_yarn/socket.io-client-4.4.0
chore(deps-dev): bump socket.io-client from 4.3.2 to 4.4.0
2021-11-25 08:48:50 +01:00
Kamil Mysliwiec
bdfab41cca Merge pull request #8689 from nestjs/dependabot/npm_and_yarn/light-my-request-4.7.0
chore(deps): bump light-my-request from 4.6.0 to 4.7.0
2021-11-25 08:48:45 +01:00
Kamil Mysliwiec
9eb798d401 Merge pull request #8687 from nestjs/dependabot/npm_and_yarn/ws-8.3.0
chore(deps): bump ws from 7.5.5 to 8.3.0
2021-11-25 08:48:35 +01:00
Kamil Mysliwiec
e7fc3782a8 Merge pull request #8648 from nestjs/dependabot/npm_and_yarn/sample/05-sql-typeorm/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/05-sql-typeorm
2021-11-25 08:48:23 +01:00
Kamil Mysliwiec
5248f39486 Merge pull request #8647 from nestjs/dependabot/npm_and_yarn/sample/04-grpc/ansi-regex-5.0.1
chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/04-grpc
2021-11-25 08:48:15 +01:00
dependabot[bot]
7400b9c7e2 chore(deps): bump ws from 7.5.5 to 8.3.0
Bumps [ws](https://github.com/websockets/ws) from 7.5.5 to 8.3.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.5...8.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-25 07:46:50 +00:00
dependabot[bot]
39d63c71fb chore(deps-dev): bump socket.io-client from 4.3.2 to 4.4.0
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.3.2 to 4.4.0.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/4.3.2...4.4.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>
2021-11-25 07:46:36 +00:00
dependabot[bot]
6f04fd0313 chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/04-grpc
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-25 07:45:25 +00:00
dependabot[bot]
1d123ef6b4 chore(deps): bump path-parse in /sample/05-sql-typeorm
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-25 07:45:06 +00:00
Kamil Mysliwiec
30fd4cea8d Merge pull request #8646 from nestjs/dependabot/npm_and_yarn/sample/04-grpc/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/04-grpc
2021-11-25 08:44:28 +01:00
Kamil Mysliwiec
8c5d63a66b Merge pull request #8651 from nestjs/dependabot/npm_and_yarn/sample/05-sql-typeorm/ansi-regex-5.0.1
chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/05-sql-typeorm
2021-11-25 08:44:23 +01:00
Kamil Mysliwiec
e0862e5c28 Merge pull request #8674 from nestjs/dependabot/npm_and_yarn/sample/03-microservices/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/03-microservices
2021-11-25 08:44:17 +01:00
Kamil Mysliwiec
e1908422ca Merge pull request #8676 from nestjs/dependabot/npm_and_yarn/sample/02-gateways/ansi-regex-5.0.1
chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/02-gateways
2021-11-25 08:44:08 +01:00
Kamil Mysliwiec
26028fc207 Merge pull request #8677 from nestjs/dependabot/npm_and_yarn/sample/03-microservices/ansi-regex-5.0.1
chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/03-microservices
2021-11-25 08:44:01 +01:00
Kamil Mysliwiec
3dbc1457fa Merge pull request #8679 from nestjs/dependabot/npm_and_yarn/sample/02-gateways/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/02-gateways
2021-11-25 08:43:57 +01:00
Kamil Mysliwiec
f57bfc356f Merge pull request #8629 from nestjs/dependabot/npm_and_yarn/socket.io-4.4.0
chore(deps): bump socket.io from 4.3.2 to 4.4.0
2021-11-25 08:43:53 +01:00
Kamil Mysliwiec
ea47a5f4e5 Merge pull request #8693 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.64.3
2021-11-25 08:43:35 +01:00
Kamil Mysliwiec
efc366b569 Merge pull request #8697 from nestjs/renovate/nestjs-graphql-9.x
fix(deps): update dependency @nestjs/graphql to v9.1.2
2021-11-25 08:43:29 +01:00
Kamil Mysliwiec
408923dc8a Merge pull request #8691 from nestjs/dependabot/npm_and_yarn/ts-morph-13.0.2
chore(deps-dev): bump ts-morph from 12.2.0 to 13.0.2
2021-11-25 08:43:24 +01:00
Kamil Mysliwiec
e29c838d0b Merge pull request #8680 from nestjs/dependabot/npm_and_yarn/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7
2021-11-25 08:43:15 +01:00
Renovate Bot
76c7274ed1 fix(deps): update dependency @nestjs/graphql to v9.1.2 2021-11-24 11:39:17 +00:00
Renovate Bot
2333e407ad chore(deps): update dependency webpack to v5.64.3 2021-11-24 09:37:32 +00:00
Kamil Mysliwiec
c7056d121f Merge pull request #8614 from nestjs/renovate/hbs-4.x
fix(deps): update dependency hbs to v4.2.0
2021-11-24 09:49:05 +01:00
Kamil Mysliwiec
c54b88abd1 Merge pull request #8681 from nestjs/renovate/bull-3.x
chore(deps): update dependency @types/bull to v3.15.6
2021-11-24 09:48:53 +01:00
Kamil Mysliwiec
de766d0db7 Merge pull request #8682 from nestjs/renovate/apollo-graphql-packages
fix(deps): update apollo graphql packages
2021-11-24 09:48:47 +01:00
Kamil Mysliwiec
e72716264b Merge pull request #8684 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.10
2021-11-24 09:48:40 +01:00
Kamil Mysliwiec
b511b3e196 Merge pull request #8685 from nestjs/renovate/point-of-view-4.x
fix(deps): update dependency point-of-view to v4.15.3
2021-11-24 09:48:30 +01:00
Kamil Mysliwiec
f2168fe5bf Merge pull request #8686 from nestjs/renovate/ws-7.x
fix(deps): update dependency ws to v7.5.6
2021-11-24 09:48:23 +01:00
Kamil Mysliwiec
0f1d26055e Merge pull request #8496 from nestjs/renovate/confluentinc-cp-zookeeper-7.x
chore(deps): update confluentinc/cp-zookeeper docker tag to v7
2021-11-24 09:48:12 +01:00
dependabot[bot]
f2d1d724c9 chore(deps-dev): bump ts-morph from 12.2.0 to 13.0.2
Bumps [ts-morph](https://github.com/dsherret/ts-morph) from 12.2.0 to 13.0.2.
- [Release notes](https://github.com/dsherret/ts-morph/releases)
- [Commits](https://github.com/dsherret/ts-morph/compare/12.2.0...13.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-24 00:21:44 +00:00
dependabot[bot]
2eb485f184 chore(deps): bump light-my-request from 4.6.0 to 4.7.0
Bumps [light-my-request](https://github.com/fastify/light-my-request) from 4.6.0 to 4.7.0.
- [Release notes](https://github.com/fastify/light-my-request/releases)
- [Commits](https://github.com/fastify/light-my-request/compare/v4.6.0...v4.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-24 00:14:48 +00:00
Renovate Bot
cc92ceeaec fix(deps): update dependency ws to v7.5.6 2021-11-23 22:19:57 +00:00
Renovate Bot
d9075dc655 fix(deps): update dependency point-of-view to v4.15.3 2021-11-23 22:17:46 +00:00
Renovate Bot
b3bf493de9 chore(deps): update dependency @types/node to v16.11.10 2021-11-23 20:34:59 +00:00
Renovate Bot
657ac58183 chore(deps): update confluentinc/cp-zookeeper docker tag to v7 2021-11-23 10:42:58 +00:00
Renovate Bot
f89ab83d51 fix(deps): update dependency hbs to v4.2.0 2021-11-23 10:42:49 +00:00
Renovate Bot
b44d313d4a fix(deps): update apollo graphql packages 2021-11-23 10:23:36 +00:00
Renovate Bot
a791d48ccf chore(deps): update dependency @types/bull to v3.15.6 2021-11-23 10:16:19 +00:00
dependabot[bot]
62eafaa92a chore(deps): bump socket.io from 4.3.2 to 4.4.0
Bumps [socket.io](https://github.com/socketio/socket.io) from 4.3.2 to 4.4.0.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/master/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.3.2...4.4.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>
2021-11-23 10:15:02 +00:00
dependabot[bot]
403d14d7f5 chore(deps): bump path-parse from 1.0.6 to 1.0.7
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-23 10:08:45 +00:00
Kamil Mysliwiec
44bfeba882 Merge pull request #8665 from nestjs/renovate/npm-url-parse-vulnerability
chore(deps): update dependency url-parse to 1.5.2 [security]
2021-11-23 11:08:28 +01:00
Kamil Mysliwiec
58aa96f7db Merge pull request #8667 from nestjs/renovate/npm-y18n-vulnerability
chore(deps): update dependency y18n to 3.2.2 [security]
2021-11-23 11:06:00 +01:00
Kamil Mysliwiec
2f1635803b Merge pull request #8666 from nestjs/renovate/npm-ws-vulnerability
chore(deps): update dependency ws to 7.4.6 [security]
2021-11-23 11:05:52 +01:00
Kamil Mysliwiec
b320e2d95e Merge pull request #8663 from nestjs/renovate/npm-postcss-vulnerability
chore(deps): update dependency postcss to 7.0.36 [security]
2021-11-23 11:05:46 +01:00
Kamil Mysliwiec
d6c9723941 Merge pull request #8664 from nestjs/renovate/npm-set-value-vulnerability
chore(deps): update dependency set-value to 2.0.1 [security]
2021-11-23 11:05:38 +01:00
dependabot[bot]
78e9db7d4a chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/02-gateways
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-23 10:05:37 +00:00
Kamil Mysliwiec
1127fc320d Merge pull request #8661 from nestjs/renovate/npm-lodash.template-vulnerability
chore(deps): update dependency lodash.template to 4.5.0 [security]
2021-11-23 11:05:29 +01:00
Kamil Mysliwiec
78b628fc7d Merge pull request #8662 from nestjs/renovate/npm-minimist-vulnerability
chore(deps): update dependency minimist to 0.2.1 [security]
2021-11-23 11:05:14 +01:00
dependabot[bot]
9fe95f111c chore(deps): bump ansi-regex in /sample/03-microservices
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-23 10:04:52 +00:00
Kamil Mysliwiec
57a069bb23 Merge pull request #8660 from nestjs/renovate/npm-lodash-vulnerability
chore(deps): update dependency lodash to 4.17.21 [security]
2021-11-23 11:04:48 +01:00
dependabot[bot]
7c50236014 chore(deps): bump ansi-regex from 5.0.0 to 5.0.1 in /sample/02-gateways
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-23 10:04:46 +00:00
dependabot[bot]
6d3339bf54 chore(deps): bump path-parse in /sample/03-microservices
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-23 10:04:42 +00:00
Kamil Mysliwiec
88b34dd6d4 Merge pull request #8659 from nestjs/renovate/npm-kind-of-vulnerability
chore(deps): update dependency kind-of to 6.0.3 [security]
2021-11-23 11:04:41 +01:00
Kamil Mysliwiec
2b258a9181 Merge pull request #8658 from nestjs/renovate/npm-ini-vulnerability
chore(deps): update dependency ini to 1.3.6 [security]
2021-11-23 11:04:24 +01:00
Kamil Mysliwiec
a269275b54 Merge pull request #8657 from nestjs/renovate/npm-hosted-git-info-vulnerability
chore(deps): update dependency hosted-git-info to 2.8.9 [security]
2021-11-23 11:04:18 +01:00
Kamil Mysliwiec
71b6d663b1 Merge pull request #8656 from nestjs/renovate/npm-handlebars-vulnerability
chore(deps): update dependency handlebars to 4.7.7 [security]
2021-11-23 11:04:11 +01:00
Kamil Mysliwiec
46e339aedd Merge pull request #8654 from nestjs/renovate/class-validator-0.x
fix(deps): update dependency class-validator to v0.13.2
2021-11-23 11:04:05 +01:00
Kamil Mysliwiec
ed3f991296 Merge pull request #8655 from nestjs/renovate/lint-staged-12.x
chore(deps): update dependency lint-staged to v12.1.2
2021-11-23 11:03:42 +01:00
Kamil Mysliwiec
99032bd4d5 Merge pull request #8634 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.9
2021-11-23 11:03:36 +01:00
Kamil Mysliwiec
82fd2b6fb5 Merge pull request #8668 from nestjs/renovate/npm-yargs-parser-vulnerability
chore(deps): update dependency yargs-parser to 5.0.1 [security]
2021-11-23 11:03:27 +01:00
Renovate Bot
4780c6da21 chore(deps): update dependency yargs-parser to 5.0.1 [security] 2021-11-23 09:53:22 +00:00
Renovate Bot
c1e78100e9 chore(deps): update dependency y18n to 3.2.2 [security] 2021-11-23 09:51:35 +00:00
Renovate Bot
b2e6cd739c chore(deps): update dependency ws to 7.4.6 [security] 2021-11-23 09:49:50 +00:00
Renovate Bot
c0463c2d1e chore(deps): update dependency url-parse to 1.5.2 [security] 2021-11-23 09:48:19 +00:00
Renovate Bot
86fe3e1d3a chore(deps): update dependency set-value to 2.0.1 [security] 2021-11-23 09:46:27 +00:00
Renovate Bot
53fe5de3f8 chore(deps): update dependency postcss to 7.0.36 [security] 2021-11-23 09:44:43 +00:00
Renovate Bot
50a67b491c chore(deps): update dependency minimist to 0.2.1 [security] 2021-11-23 09:43:02 +00:00
Renovate Bot
791c86c1a2 chore(deps): update dependency lodash.template to 4.5.0 [security] 2021-11-23 09:41:19 +00:00
Renovate Bot
c498eda753 chore(deps): update dependency lodash to 4.17.21 [security] 2021-11-23 09:39:30 +00:00
Renovate Bot
6d2a6467b2 chore(deps): update dependency kind-of to 6.0.3 [security] 2021-11-23 09:35:15 +00:00
Renovate Bot
e2cc4edbf1 chore(deps): update dependency ini to 1.3.6 [security] 2021-11-23 09:33:25 +00:00
Renovate Bot
cdda257cad chore(deps): update dependency hosted-git-info to 2.8.9 [security] 2021-11-23 09:31:38 +00:00
Renovate Bot
600a5ac72a chore(deps): update dependency handlebars to 4.7.7 [security] 2021-11-23 09:29:56 +00:00
Kamil Mysliwiec
6b6cd7e156 Merge pull request #8636 from ABNG/patch-1
Patch 1
2021-11-23 09:52:13 +01:00
Abu Bakar Nawaz Ghumman
bfe4868557 Update main.ts
remove enableCors() line.
2021-11-22 23:09:55 +05:00
Renovate Bot
7ca8b19a54 chore(deps): update dependency @types/node to v16.11.9 2021-11-22 11:23:59 +00:00
Renovate Bot
105268bf00 chore(deps): update dependency lint-staged to v12.1.2 2021-11-22 10:16:01 +00:00
Renovate Bot
82560ac985 fix(deps): update dependency class-validator to v0.13.2 2021-11-22 10:14:07 +00:00
Kamil Myśliwiec
21d5b6acbc chore(): update readme 2021-11-22 10:42:30 +01:00
Kamil Myśliwiec
a78e5ae94a chore(@nestjs) publish v8.2.3 release 2021-11-22 10:41:58 +01:00
Kamil Myśliwiec
689fb6aff9 refactor(testing): minor style improvements 2021-11-22 10:39:50 +01:00
Kamil Mysliwiec
b913927e06 Merge pull request #6277 from jmcdo29/feat/testing-auto-mock
feat(testing): add auto-mocking capabilities
2021-11-22 10:37:06 +01:00
dependabot[bot]
374f045893 chore(deps): bump ansi-regex in /sample/05-sql-typeorm
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 09:36:46 +00:00
Kamil Mysliwiec
09bb380cc7 Merge pull request #8635 from nestjs/renovate/webpack-5.x
chore(deps): update dependency webpack to v5.64.2
2021-11-22 10:36:42 +01:00
dependabot[bot]
cdd16154ef chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/04-grpc
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 09:36:40 +00:00
Kamil Mysliwiec
0506c0d9df Merge pull request #8633 from nestjs/renovate/typeorm-0.x
fix(deps): update dependency typeorm to v0.2.41
2021-11-22 10:36:29 +01:00
Kamil Mysliwiec
11d38274d1 Merge pull request #8632 from nestjs/renovate/nestjs-swagger-5.x
fix(deps): update dependency @nestjs/swagger to v5.1.5
2021-11-22 10:36:22 +01:00
Kamil Mysliwiec
8ab2b13477 Merge pull request #8623 from nestjs/renovate/jest-monorepo
chore(deps): update dependency @types/jest to v27.0.3
2021-11-22 10:36:18 +01:00
Kamil Mysliwiec
19bfa24f63 Merge pull request #8611 from nestjs/renovate/apollo-graphql-packages
fix(deps): update apollo graphql packages
2021-11-22 10:36:03 +01:00
Kamil Mysliwiec
17b5b6cb56 Merge pull request #8609 from nestjs/renovate/nestjs-schedule-1.x
fix(deps): update dependency @nestjs/schedule to v1.0.2
2021-11-22 10:35:57 +01:00
Kamil Mysliwiec
6b6528d28d Merge pull request #8606 from caucik/fix-imports
refactor: update integration imports to reference top level index.ts
2021-11-22 10:35:50 +01:00
Kamil Myśliwiec
b23ce5bcb0 Merge branch 'master' of https://github.com/nestjs/nest 2021-11-22 10:34:42 +01:00
Kamil Myśliwiec
97f9348ce5 fix(common): app context should accept function as a token 2021-11-22 10:34:37 +01:00
Abu Bakar Nawaz Ghumman
1a35773d4e Update main.ts
added cors
2021-11-20 21:11:44 +05:00
Abu Bakar Nawaz Ghumman
0818a56a57 Update events.gateway.ts
"Since Socket.IO v3, you need to explicitly enable Cross-Origin Resource Sharing (CORS).".

updated WebSocketGateway() with cors. otherwise, client always get error like below

"Access to XMLHttpRequest at 'http://localhost:3000/socket.io/?EIO=4&transport=polling&t=Nq-4zs6' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
2021-11-20 21:07:18 +05:00
Renovate Bot
8fc03b8039 chore(deps): update dependency webpack to v5.64.2 2021-11-20 15:11:45 +00:00
Renovate Bot
adcc4dc546 fix(deps): update dependency typeorm to v0.2.41 2021-11-19 09:05:14 +00:00
Renovate Bot
35a22f31cc fix(deps): update dependency @nestjs/swagger to v5.1.5 2021-11-19 09:02:09 +00:00
Renovate Bot
0ea5aa92a1 fix(deps): update dependency @nestjs/schedule to v1.0.2 2021-11-19 09:00:49 +00:00
Renovate Bot
8abcc4c34d fix(deps): update apollo graphql packages 2021-11-19 08:59:26 +00:00
Renovate Bot
84ea5deede chore(deps): update dependency @types/jest to v27.0.3 2021-11-19 08:51:43 +00:00
Kamil Mysliwiec
344c390753 Merge pull request #8624 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.8
2021-11-19 08:26:03 +01:00
Kamil Mysliwiec
aa176858c1 Merge pull request #8631 from nestjs/renovate/lint-staged-12.x
chore(deps): update dependency lint-staged to v12.0.3
2021-11-19 08:25:56 +01:00
Kamil Mysliwiec
5b26c21a4b Merge pull request #8622 from nestjs/renovate/nest-monorepo
chore(deps): update nest monorepo
2021-11-19 08:25:37 +01:00
Renovate Bot
421aa32f42 chore(deps): update dependency lint-staged to v12.0.3 2021-11-19 02:44:29 +00:00
Renovate Bot
0967247916 chore(deps): update dependency @types/node to v16.11.8 2021-11-18 21:32:18 +00:00
Renovate Bot
bd64fee6b3 chore(deps): update nest monorepo 2021-11-18 13:27:33 +00:00
Kamil Mysliwiec
35baf7a077 Update Readme.md 2021-11-18 13:33:55 +01:00
Kamil Mysliwiec
a2a86a4c92 Merge pull request #8610 from nestjs/renovate/grpc-proto-loader-0.x
chore(deps): update dependency @grpc/proto-loader to v0.6.7
2021-11-18 12:37:36 +01:00
Renovate Bot
c299e4f29f chore(deps): update dependency @grpc/proto-loader to v0.6.7 2021-11-18 11:09:55 +00:00
Kamil Mysliwiec
bdc28092af Merge pull request #8608 from nestjs/renovate/nestjs-schematics-8.x
chore(deps): update dependency @nestjs/schematics to v8.0.5
2021-11-18 12:00:14 +01:00
Renovate Bot
0af9eddcc8 chore(deps): update dependency @nestjs/schematics to v8.0.5 2021-11-18 10:49:19 +00:00
caucik
7990535298 revert: refactor: update integration imports to reference top level index.ts
this reverts changes to package-lock.json from commit e7f1f10423
2021-11-18 10:55:55 +01:00
Kamil Mysliwiec
37a0389775 Merge pull request #8616 from nestjs/renovate/major-commitlint-monorepo
chore(deps): update commitlint monorepo to v15 (major)
2021-11-18 10:21:17 +01:00
Kamil Mysliwiec
c4fa73242e Merge pull request #8612 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo to v7.16.4
2021-11-18 10:21:07 +01:00
Kamil Mysliwiec
26939b07d3 Merge pull request #8607 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v8.2.1
2021-11-18 10:20:31 +01:00
Renovate Bot
21c66dbacc chore(deps): update babel monorepo to v7.16.4 2021-11-18 09:09:10 +00:00
Kamil Myśliwiec
8694dcc1ed chore(): update readme 2021-11-18 10:03:23 +01:00
Renovate Bot
3cfdceb912 chore(deps): update commitlint monorepo to v15 2021-11-17 16:42:36 +00:00
Renovate Bot
12d0b9a7b9 fix(deps): update nest monorepo to v8.2.1 2021-11-16 10:28:08 +00:00
caucik
e7f1f10423 refactor: update integration imports to reference top level index.ts 2021-11-16 02:47:26 +01:00
Jay McDoniel
1a36c49325 fix(test): fix the mock factory token type 2021-11-10 13:56:24 -08:00
Jay McDoniel
60feebc31c feat: update code for nest v8 2021-11-10 13:35:29 -08:00
Jay McDoniel
c47c269986 feat: add ability to pass a token to the mock factory 2021-11-10 13:01:27 -08:00
Jay McDoniel
d23801d51d fix: changed from instance to instance wrapper 2021-11-10 13:01:26 -08:00
Jay McDoniel
6b180398f3 fix: allow for module.get of mocked providers
The providers are still coming back `undefined` so there's still
some work to be done, but it's on it's way to being fully implemented
2021-11-10 13:01:26 -08:00
Jay McDoniel
b059754b9c feat(testing): add auto-mocking capabilities
In the current `Test` module there isn't an easy way to say "If this
dependency doesn't exist use this mock function instead." With this new
`useMocker` fluent function it becomes possible to tell the `TestingInjector`
to replace the undefined dependency with the automocking function. In doing so
classes that have a large number of dependencies no longer must be mocked one-by-one
. This is especially great when it comes to packages like `@golevelup/ts-jest`
which can create mocked dependencies of interfaces and classes with a single function.
I'm sure I've probably missed an edge case in here, so please let me know if you have
any major concerns.
2021-11-10 13:01:24 -08:00
303 changed files with 73920 additions and 52430 deletions

View File

@@ -9,6 +9,7 @@ body:
If you are not sure that your issue is a bug, you could:
- read the [FAQ's common errors](https://docs.nestjs.com/faq/common-errors) page
- use our [Discord community](https://discord.gg/NestJS)
- use [StackOverflow using the tag `nestjs`](https://stackoverflow.com/questions/tagged/nestjs)
- If it's just a quick question you can ping [our Twitter](https://twitter.com/nestframework)
@@ -20,7 +21,7 @@ body:
- type: checkboxes
attributes:
label: "Is there an existing issue for this?"
description: "Please search [here](https://github.com/nestjs/nest/issues?q=is%3Aissue) to see if an issue already exists for the bug you encountered"
description: "Please search [here](../issues?q=is%3Aissue) to see if an issue already exists for the bug you encountered"
options:
- label: "I have searched the existing issues"
required: true
@@ -37,7 +38,7 @@ body:
required: true
attributes:
label: "Minimum reproduction code"
description: "An URL to some git repository that reproduces this issue. [Wtf is a minimum reproduction?](https://jmcdo29.github.io/wtf-is-a-minimum-reproduction)"
description: "An URL to some Git repository/[StackBlitz](https://stackblitz.com/fork/github/nestjs/typescript-starter)/[CodeSandbox](https://codesandbox.io/s/github/nestjs/typescript-starter/tree/master) project that reproduces your issue. [Wtf is a minimum reproduction?](https://jmcdo29.github.io/wtf-is-a-minimum-reproduction)"
placeholder: "https://github.com/..."
- type: textarea
@@ -47,7 +48,7 @@ body:
How the issue manifests?
You could leave this blank if you alread write this in your reproduction code
placeholder: |
1. `npm i`
1. `npm ci`
2. `npm start:dev`
3. See error...
@@ -104,10 +105,13 @@ body:
required: true
attributes:
label: "Packages versions"
description: "You could leave your whole `package.json` dependencies list here, or just indicates which version of `@nestjs/*` are you using"
placeholder: |
- `@nestjs/common`: 8.1.3
- `@nestjs/platform-express`: 8.1.3
description: |
You could leave your whole `package.json` dependencies list here, or just indicate which version of `@nestjs/*` you are using
**Tip**: run _npx nest info_
value: |
```json
```
- type: input
attributes:

View File

@@ -9,6 +9,7 @@ body:
If you are not sure that your issue is a bug, you could:
- read the [FAQ's common errors](https://docs.nestjs.com/faq/common-errors) page
- use our [Discord community](https://discord.gg/NestJS)
- use [StackOverflow using the tag `nestjs`](https://stackoverflow.com/questions/tagged/nestjs)
- If it's just a quick question you can ping [our Twitter](https://twitter.com/nestframework)
@@ -18,7 +19,7 @@ body:
- type: checkboxes
attributes:
label: "Is there an existing issue that is already proposing this?"
description: "Please search [here](https://github.com/nestjs/nest/issues?q=is%3Aissue) to see if an issue already exists for the feature you are requesting"
description: "Please search [here](../issues?q=is%3Aissue) to see if an issue already exists for the feature you are requesting"
options:
- label: "I have searched the existing issues"
required: true

View File

@@ -9,6 +9,7 @@ body:
If you are not sure that your issue is a bug, you could:
- read the [FAQ's common errors](https://docs.nestjs.com/faq/common-errors) page
- use our [Discord community](https://discord.gg/NestJS)
- use [StackOverflow using the tag `nestjs`](https://stackoverflow.com/questions/tagged/nestjs)
- If it's just a quick question you can ping [our Twitter](https://twitter.com/nestframework)
@@ -28,7 +29,7 @@ body:
- type: checkboxes
attributes:
label: "Is there an existing issue that is already proposing this?"
description: "Please search [here](https://github.com/nestjs/nest/issues?q=is%3Aissue) to see if an issue already exists for the feature you are requesting"
description: "Please search [here](../issues?q=is%3Aissue) to see if an issue already exists for the feature you are requesting"
options:
- label: "I have searched the existing issues"
required: true

View File

@@ -6,7 +6,7 @@ body:
- type: checkboxes
attributes:
label: "Is there an existing issue that is already proposing this?"
description: "Please search [here](https://github.com/nestjs/nest/issues?q=is%3Aissue) to see if an issue already exists for this"
description: "Please search [here](../issues?q=is%3Aissue) to see if an issue already exists for this"
options:
- label: "I have searched the existing issues"
required: true
@@ -34,7 +34,7 @@ body:
- type: textarea
validations:
required: true
required: true
attributes:
label: "Benchmarks result or another proof (eg: POC)"
description: |

View File

@@ -2,6 +2,9 @@
blank_issues_enabled: false
contact_links:
- name: "\u2049 FAQ"
url: "https://docs.nestjs.com/faq"
about: "Make sure you have read the Frequently Asked Questions page."
- name: "\u2753 Discord Community of NestJS"
url: "https://discord.gg/NestJS"
about: "Please ask support questions or discuss suggestions/enhancements here."

4
.husky/commit-msg Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install commitlint --edit $1

4
.husky/pre-commit Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged

View File

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

View File

@@ -54,13 +54,16 @@ With official support, you can get expert help straight from Nest core team. We
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsors
<table style="text-align:center;"><tr><td>
<table style="text-align:center;"><tr>
<td><a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
<td><a href="https://www.redhat.com" target="_blank"><img src="https://nestjs.com/img/red-hat-logo.svg" width="200" valign="middle" /></a></td>
<td>
<a href="https://github.com/Sanofi-IADC" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/sanofi.png" width="180" valign="middle" /></a></td>
<td>
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
<a href="https://nx.dev" target="_blank"><img src="https://nestjs.com/img/nx-logo.png" height="45" valign="middle" /></a></td>
</tr></table>
#### Gold Sponsors
@@ -78,10 +81,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<table style="text-align:center;"><tr><td>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> </td><td>
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" width="100" /></a> </td><td>
<a href="http://www.leogistics.com" target="_blank"><img src="https://nestjs.com/img/leogistics-logo.jpeg" width="150" valign="middle" /></td><td>
<a href="https://www.myleodsc.com/" target="_blank"><img src="https://nestjs.com/img/myleo-logo.png" width="180" valign="middle" /></td><td>
<a href="https://careers.meetdandy.com/?gh_src=063ba61e3us" target="_blank"><img src="https://nestjs.com/img/dandy-roles-logo.svg" width="150" valign="middle" /></td><td>
<a href="https://www.castlecraft.in" target="_blank"><img src="https://nestjs.com/img/castlecraft-logo.png" width="150" valign="middle" /></td>
<td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td></tr></table>
<td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td>
<td><a href="https://n.inc" target="_blank"><img src="https://nestjs.com/img/n-inc-logo.svg" width="120" valign="middle" /></td></tr></table>
#### Sponsors
@@ -115,6 +119,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://www.naologic.com/" target="_blank"><img src="https://nestjs.com/img/naologic-logo.svg" width="125" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://messaged.com/" target="_blank"><img src="https://nestjs.com/img/messaged-logo.png" width="50" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://triplecore.io" target="_blank"><img src="https://nestjs.com/img/triplecore-logo.svg" width="50" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<td align="center" valign="middle"><a href="https://polygon-software.ch/" target="_blank"><img src="https://nestjs.com/img/polygon-logo.svg" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://mobilereality.pl/" target="_blank"><img src="https://nestjs.com/img/mobile-reality-logo.png" width="45" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -0,0 +1,12 @@
import { Injectable } from '@nestjs/common';
import { FooService } from './foo.service';
@Injectable()
export class BarService {
constructor(private readonly foo: FooService) {}
bar() {
this.foo.foo();
}
}

View File

@@ -0,0 +1,8 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class FooService {
foo() {
console.log('foo called');
}
}

View File

@@ -0,0 +1,63 @@
import { Test } from '@nestjs/testing';
import * as chai from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import * as sinon from 'sinon';
import { BarService } from '../src/bar.service';
import { FooService } from '../src/foo.service';
chai.use(chaiAsPromised);
const { expect } = chai;
describe('Auto-Mocking Bar Deps', () => {
let service: BarService;
let fooService: FooService;
const stub = sinon.stub();
beforeEach(async () => {
const moduleRef = await Test.createTestingModule({
providers: [BarService],
})
.useMocker(() => ({ foo: stub }))
.compile();
service = moduleRef.get(BarService);
fooService = moduleRef.get(FooService);
});
it('should be defined', () => {
expect(service).not.to.be.undefined;
expect(fooService).not.to.be.undefined;
});
it('should call bar.bar', () => {
service.bar();
expect(stub.called);
});
});
describe('Auto-Mocking with token in factory', () => {
it('can mock the dependencies', async () => {
const moduleRef = await Test.createTestingModule({
providers: [BarService],
})
.useMocker((token) => {
if (token === FooService) {
return { foo: sinon.stub };
}
})
.compile();
const service = moduleRef.get(BarService);
const fooServ = moduleRef.get<{ foo: sinon.SinonStub }>(FooService as any);
service.bar();
expect(fooServ.foo.called);
});
it('cannot mock the dependencies', async () => {
const moduleRef = Test.createTestingModule({
providers: [BarService],
})
.useMocker((token) => {
if (token === FooService.name + 'something that fails the token') {
return { foo: sinon.stub };
}
})
.compile;
expect(moduleRef()).to.eventually.throw()
});
});

View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es6",
"sourceMap": true,
"allowJs": true,
"outDir": "./dist"
},
"include": [
"src/**/*",
"e2e/**/*"
],
"exclude": [
"node_modules",
]
}

View File

@@ -48,7 +48,7 @@ services:
zookeeper:
container_name: test-zookeeper
hostname: zookeeper
image: confluentinc/cp-zookeeper:6.2.1
image: confluentinc/cp-zookeeper:7.0.1
ports:
- "2181:2181"
environment:
@@ -57,7 +57,7 @@ services:
kafka:
container_name: test-kafka
hostname: kafka
image: confluentinc/cp-kafka:7.0.0
image: confluentinc/cp-kafka:7.0.1
depends_on:
- zookeeper
ports:

View File

@@ -1,3 +1,4 @@
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { join } from 'path';
@@ -6,7 +7,8 @@ import { RecipesModule } from './recipes/recipes.module';
@Module({
imports: [
RecipesModule,
GraphQLModule.forRoot({
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
debug: false,
installSubscriptionHandlers: true,
autoSchemaFile: join(

View File

@@ -1,3 +1,4 @@
import { ApolloDriver } from '@nestjs/apollo';
import { INestApplication } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { Test } from '@nestjs/testing';
@@ -15,6 +16,7 @@ describe('GraphQL request scoped', () => {
imports: [
CatsModule.enableRequestScope(),
GraphQLModule.forRoot({
driver: ApolloDriver,
typePaths: [join(__dirname, '..', 'src', '**', '*.graphql')],
}),
],

View File

@@ -1,3 +1,4 @@
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { join } from 'path';
@@ -6,7 +7,8 @@ import { CatsModule } from './cats/cats.module';
@Module({
imports: [
CatsModule,
GraphQLModule.forRoot({
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
typePaths: [join(__dirname, '**', '*.graphql')],
}),
],

View File

@@ -1,14 +1,11 @@
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { Module } from '@nestjs/common';
import {
GqlModuleOptions,
GqlOptionsFactory,
GraphQLModule,
} from '@nestjs/graphql';
import { GqlOptionsFactory, GraphQLModule } from '@nestjs/graphql';
import { join } from 'path';
import { CatsModule } from './cats/cats.module';
class ConfigService implements GqlOptionsFactory {
createGqlOptions(): GqlModuleOptions {
createGqlOptions(): ApolloDriverConfig {
return {
typePaths: [join(__dirname, '**', '*.graphql')],
};
@@ -18,7 +15,8 @@ class ConfigService implements GqlOptionsFactory {
@Module({
imports: [
CatsModule,
GraphQLModule.forRootAsync({
GraphQLModule.forRootAsync<ApolloDriverConfig>({
driver: ApolloDriver,
useClass: ConfigService,
}),
],

View File

@@ -1,3 +1,4 @@
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { CatsModule } from './cats/cats.module';
@@ -7,7 +8,8 @@ import { ConfigService } from './config.service';
@Module({
imports: [
CatsModule,
GraphQLModule.forRootAsync({
GraphQLModule.forRootAsync<ApolloDriverConfig>({
driver: ApolloDriver,
imports: [ConfigModule],
useExisting: ConfigService,
}),

View File

@@ -1,3 +1,4 @@
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { join } from 'path';
@@ -6,7 +7,8 @@ import { CatsModule } from './cats/cats.module';
@Module({
imports: [
CatsModule,
GraphQLModule.forRootAsync({
GraphQLModule.forRootAsync<ApolloDriverConfig>({
driver: ApolloDriver,
useFactory: async () => ({
typePaths: [join(__dirname, '**', '*.graphql')],
}),

View File

@@ -1,4 +1,4 @@
import { Scalar } from '@nestjs/graphql/dist/decorators/resolvers.decorators';
import { Scalar } from '@nestjs/graphql';
import { Kind } from 'graphql';
@Scalar('Date')

View File

@@ -1,7 +1,10 @@
import { RuntimeException } from '@nestjs/core/errors/exceptions/runtime.exception';
import { UnknownDependenciesException } from '@nestjs/core/errors/exceptions/unknown-dependencies.exception';
import { UnknownExportException } from '@nestjs/core/errors/exceptions/unknown-export.exception';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as chai from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import {
DYNAMIC_TOKEN,
DYNAMIC_VALUE,
@@ -9,6 +12,13 @@ import {
} from '../src/dynamic/dynamic.module';
import { ExportsModule } from '../src/exports/exports.module';
import { InjectModule } from '../src/inject/inject.module';
import { InjectSameNameModule } from '../src/inject/inject-same-name.module';
import {
SelfInjectionProviderModule,
SelfInjectionProviderCustomTokenModule,
SelfInjectionForwardProviderModule,
} from '../src/self-injection/self-injection-provider.module';
chai.use(chaiAsPromised);
describe('Injector', () => {
describe('when "providers" and "exports" properties are inconsistent', () => {
@@ -24,6 +34,16 @@ describe('Injector', () => {
});
});
describe("When class injects a provider with the same as class's name", () => {
it('should compile with success', async () => {
const builder = Test.createTestingModule({
imports: [InjectSameNameModule],
});
await expect(builder.compile()).to.eventually.be.fulfilled;
});
});
describe('when Nest cannot resolve dependencies', () => {
it(`should fail with "RuntimeException"`, async () => {
try {
@@ -35,6 +55,42 @@ describe('Injector', () => {
expect(err).to.be.instanceof(RuntimeException);
}
});
describe('due to self-injection providers', () => {
it('should fail with "UnknownDependenciesException" due to self-injection via same class reference', async () => {
const builder = Test.createTestingModule({
imports: [SelfInjectionProviderModule],
});
await expect(
builder.compile(),
).to.eventually.be.rejected.and.be.an.instanceOf(
UnknownDependenciesException,
);
});
it('should fail with "UnknownDependenciesException" due to self-injection via forwardRef to the same class reference', async () => {
const builder = Test.createTestingModule({
imports: [SelfInjectionForwardProviderModule],
});
await expect(
builder.compile(),
).to.eventually.be.rejected.and.be.an.instanceOf(
UnknownDependenciesException,
);
});
it('should fail with "UnknownDependenciesException" due to self-injection via custom provider', async () => {
const builder = Test.createTestingModule({
imports: [SelfInjectionProviderCustomTokenModule],
});
await expect(
builder.compile(),
).to.eventually.be.rejected.and.be.an.instanceOf(
UnknownDependenciesException,
);
});
});
});
describe('when dynamic module', () => {

View File

@@ -0,0 +1,96 @@
import { UnknownDependenciesException } from '@nestjs/core/errors/exceptions/unknown-dependencies.exception';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
describe('Optional factory provider deps', () => {
describe('when dependency is optional', () => {
describe('and it is available', () => {
it('then it should be injected into the factory function', async () => {
const defaultValue = 'DEFAULT_VALUE';
const moduleRef = await Test.createTestingModule({
providers: [
{
provide: 'FACTORY',
useFactory: dep => dep ?? defaultValue,
inject: [{ token: 'MISSING_DEP', optional: true }],
},
{ provide: 'MISSING_DEP', useValue: 'OPTIONAL_DEP_VALUE' },
],
}).compile();
const factoryProvider = moduleRef.get('FACTORY');
expect(factoryProvider).to.equal('OPTIONAL_DEP_VALUE');
});
});
describe('otherwise', () => {
it('"undefined" should be injected into the factory function', async () => {
const defaultValue = 'DEFAULT_VALUE';
const moduleRef = await Test.createTestingModule({
providers: [
{
provide: 'FACTORY',
useFactory: dep => dep ?? defaultValue,
inject: [{ token: 'MISSING_DEP', optional: true }],
},
],
}).compile();
const factoryProvider = moduleRef.get('FACTORY');
expect(factoryProvider).to.equal(defaultValue);
});
});
});
describe('otherwise', () => {
describe('and dependency is not registered', () => {
it('should error out', async () => {
try {
const builder = Test.createTestingModule({
providers: [
{
provide: 'FACTORY',
useFactory: () => 'RETURNED_VALUE',
inject: ['MISSING_DEP'],
},
],
});
await builder.compile();
} catch (err) {
expect(err).to.be.instanceOf(UnknownDependenciesException);
}
});
});
});
describe('and dependency is registered but it cannot be instantiated', () => {
it('should error out', async () => {
try {
const builder = Test.createTestingModule({
providers: [
{
provide: 'POSSIBLY_MISSING_DEP',
useFactory: () => null,
inject: ['MISSING_DEP'],
},
{
provide: 'FACTORY',
useFactory: () => 'RETURNED_VALUE',
inject: [{ token: 'POSSIBLY_MISSING_DEP', optional: false }],
},
],
});
await builder.compile();
} catch (err) {
expect(err).to.be.instanceOf(UnknownDependenciesException);
expect(err.message).to
.equal(`Nest can't resolve dependencies of the POSSIBLY_MISSING_DEP (?). Please make sure that the argument MISSING_DEP at index [0] is available in the RootTestModule context.
Potential solutions:
- If MISSING_DEP is a provider, is it part of the current RootTestModule?
- If MISSING_DEP is exported from a separate @Module, is that module imported within RootTestModule?
@Module({
imports: [ /* the Module containing MISSING_DEP */ ]
})
`);
}
});
});
});

View File

@@ -0,0 +1,16 @@
import { Module, Injectable, Inject } from '@nestjs/common';
@Injectable()
class CoreService {
constructor(@Inject(CoreService.name) private readonly coreService: any) {}
}
@Module({
providers: [
{
provide: CoreService.name,
useValue: 'anything',
},
],
})
export class InjectSameNameModule {}

View File

@@ -0,0 +1,40 @@
import { Module, Injectable, Inject, forwardRef } from '@nestjs/common';
@Injectable()
class ServiceInjectingItself {
constructor(private readonly coreService: ServiceInjectingItself) {}
}
@Injectable()
class ServiceInjectingItselfForwared {
constructor(
@Inject(forwardRef(() => ServiceInjectingItself))
private readonly coreService: ServiceInjectingItself,
) {}
}
@Injectable()
class ServiceInjectingItselfViaCustomToken {
constructor(@Inject('AnotherToken') private readonly coreService: any) {}
}
@Module({
providers: [ServiceInjectingItself],
})
export class SelfInjectionProviderModule {}
@Module({
providers: [ServiceInjectingItselfForwared],
})
export class SelfInjectionForwardProviderModule {}
@Module({
providers: [
ServiceInjectingItselfViaCustomToken,
{
provide: 'AnotherToken',
useClass: ServiceInjectingItselfViaCustomToken,
},
],
})
export class SelfInjectionProviderCustomTokenModule {}

View File

@@ -65,6 +65,19 @@ describe('Disconnected client', () => {
.expect(408);
});
it(`RMQ`, () => {
return request(server)
.post('/')
.send({
transport: Transport.RMQ,
options: {
urls: [`amqp://0.0.0.0:3333`],
queue: 'test',
},
})
.expect(408);
});
afterEach(async () => {
await app.close();
});

View File

@@ -134,7 +134,7 @@ describe('Advanced GRPC transport', () => {
callHandler.on('error', (err: any) => {
// We want to fail only on real errors while Cancellation error
// is expected
if (String(err).toLowerCase().indexOf('cancelled') === -1) {
if (!String(err).toLowerCase().includes('cancelled')) {
fail('gRPC Stream error happened, error: ' + err);
}
});
@@ -166,7 +166,7 @@ describe('Advanced GRPC transport', () => {
callHandler.on('error', (err: any) => {
// We want to fail only on real errors while Cancellation error
// is expected
if (String(err).toLowerCase().indexOf('cancelled') === -1) {
if (!String(err).toLowerCase().includes('cancelled')) {
fail('gRPC Stream error happened, error: ' + err);
}
});

View File

@@ -48,11 +48,16 @@ describe('GRPC transport', () => {
);
});
it(`GRPC Sending and Receiving HTTP POST`, () => {
return request(server)
it(`GRPC Sending and Receiving HTTP POST`, async () => {
await request(server)
.post('/sum')
.send([1, 2, 3, 4, 5])
.expect(200, { result: 15 });
await request(server)
.post('/upperMethod/sum')
.send([1, 2, 3, 4, 5])
.expect(200, { result: 15 });
});
it(`GRPC Sending and Receiving HTTP POST (multiple proto)`, async () => {
@@ -78,7 +83,7 @@ describe('GRPC transport', () => {
callHandler.on('error', (err: any) => {
// We want to fail only on real errors while Cancellation error
// is expected
if (String(err).toLowerCase().indexOf('cancelled') === -1) {
if (!String(err).toLowerCase().includes('cancelled')) {
fail('gRPC Stream error happened, error: ' + err);
}
});
@@ -100,7 +105,7 @@ describe('GRPC transport', () => {
callHandler.on('error', (err: any) => {
// We want to fail only on real errors while Cancellation error
// is expected
if (String(err).toLowerCase().indexOf('cancelled') === -1) {
if (!String(err).toLowerCase().includes('cancelled')) {
fail('gRPC Stream error happened, error: ' + err);
}
});

View File

@@ -47,7 +47,7 @@ describe('MQTT transport', () => {
.post('/?command=streamSum')
.send([1, 2, 3, 4, 5])
.expect(200, '15');
});
}).timeout(5000);
it(`/POST (concurrent)`, function () {
return request(server)
@@ -72,7 +72,7 @@ describe('MQTT transport', () => {
.post('/stream')
.send([1, 2, 3, 4, 5])
.expect(200, '15');
});
}).timeout(5000);
it(`/POST (event notification)`, done => {
request(server)

View File

@@ -15,12 +15,12 @@ export class DisconnectedClientController {
call(@Body() options): Observable<number> {
const client = ClientProxyFactory.create(options);
return client.send<number, number[]>({ cmd: 'none' }, [1, 2, 3]).pipe(
/*tap(
console.log.bind(console, 'data'),
console.error.bind(console, 'error'),
),*/
// tap(
// console.log.bind(console, 'data'),
// console.error.bind(console, 'error'),
// ),
catchError(error => {
const { code } = error || { code: 'CONN_ERR' };
const { code } = error?.err ?? error ?? { code: 'CONN_ERR' };
return throwError(() =>
code === 'ECONNREFUSED' ||
code === 'CONN_ERR' ||

View File

@@ -134,8 +134,8 @@ export class AdvancedGrpcController {
async streamReq(messages: Observable<any>): Promise<any> {
const s = new Subject();
const o = s.asObservable();
messages.subscribe(
msg => {
messages.subscribe({
next: () => {
s.next({
id: 1,
itemTypes: [1],
@@ -146,9 +146,8 @@ export class AdvancedGrpcController {
},
});
},
null,
() => s.complete(),
);
complete: () => s.complete(),
});
return o;
}

View File

@@ -40,6 +40,14 @@ export class GrpcController {
return svc.sum({ data });
}
// Test that getService generate both lower and uppercase method
@Post('upperMethod/sum')
@HttpCode(200)
callWithOptions(@Body() data: number[]): Observable<number> {
const svc = this.client.getService<any>('Math');
return svc.Sum({ data });
}
@GrpcMethod('Math')
async sum({ data }: { data: number[] }): Promise<any> {
return of({
@@ -50,16 +58,16 @@ export class GrpcController {
@GrpcStreamMethod('Math')
async sumStream(messages: Observable<any>): Promise<any> {
return new Promise<any>((resolve, reject) => {
messages.subscribe(
msg => {
messages.subscribe({
next: msg => {
resolve({
result: msg.data.reduce((a, b) => a + b),
});
},
err => {
error: err => {
reject(err);
},
);
});
});
}

View File

@@ -2,11 +2,11 @@ import {
Body,
Controller,
HttpCode,
Logger,
OnModuleDestroy,
OnModuleInit,
Post,
} from '@nestjs/common';
import { Logger } from '@nestjs/common/services/logger.service';
import { Client, ClientKafka, Transport } from '@nestjs/microservices';
import { PartitionerArgs } from 'kafkajs';
import { Observable } from 'rxjs';

View File

@@ -2,11 +2,11 @@ import {
Body,
Controller,
HttpCode,
Logger,
OnModuleDestroy,
OnModuleInit,
Post,
} from '@nestjs/common';
import { Logger } from '@nestjs/common/services/logger.service';
import { Client, ClientKafka, Transport } from '@nestjs/microservices';
import { lastValueFrom, Observable } from 'rxjs';
import { BusinessDto } from './dtos/business.dto';

View File

@@ -1,5 +1,4 @@
import { Controller } from '@nestjs/common';
import { Logger } from '@nestjs/common/services/logger.service';
import { Controller, Logger } from '@nestjs/common';
import { EventPattern, MessagePattern } from '@nestjs/microservices';
import { BusinessDto } from './dtos/business.dto';
import { UserDto } from './dtos/user.dto';

View File

@@ -93,7 +93,7 @@ export class MqttController {
@Post('record-builder-duplex')
@HttpCode(200)
useRecordBuilderDuplex(@Body() data: Record<string, any>) {
const record = new MqttRecordBuilder(data).setQoS(2).build();
const record = new MqttRecordBuilder(data).setQoS(1).build();
return this.client.send('record-builder-duplex', record);
}

View File

@@ -1,5 +1,4 @@
import { INestApplication } from '@nestjs/common';
import { RequestMethod } from '@nestjs/common/enums/request-method.enum';
import { INestApplication, RequestMethod } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import {

View File

@@ -1,4 +1,4 @@
import { FactoryProvider } from '@nestjs/common/interfaces';
import { FactoryProvider } from '@nestjs/common';
export const LOGGER_PROVIDER = 'LOGGER_PROVIDER';
export const loggerProvider: FactoryProvider = {

View File

@@ -9,7 +9,8 @@ import { join } from 'path';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
const readmeString = readFileSync(join(process.cwd(), 'Readme.md')).toString();
const readme = readFileSync(join(process.cwd(), 'Readme.md'));
const readmeString = readme.toString();
describe('Express FileSend', () => {
let app: NestExpressApplication;
@@ -53,12 +54,13 @@ describe('Express FileSend', () => {
expect(res.body.toString()).to.be.eq(readmeString);
});
});
it('should return a file with correct content type and disposition', async () => {
it('should return a file with correct headers', async () => {
return request(app.getHttpServer())
.get('/file/with/headers')
.expect(200)
.expect('Content-Type', 'text/markdown')
.expect('Content-Disposition', 'attachment; filename="Readme.md"')
.expect('Content-Length', readme.byteLength.toString())
.expect(res => {
expect(res.text).to.be.eq(readmeString);
});

View File

@@ -8,7 +8,8 @@ import { readFileSync } from 'fs';
import { join } from 'path';
import { AppModule } from '../src/app.module';
const readmeString = readFileSync(join(process.cwd(), 'Readme.md')).toString();
const readme = readFileSync(join(process.cwd(), 'Readme.md'));
const readmeString = readme.toString();
describe('Fastify FileSend', () => {
let app: NestFastifyApplication;
@@ -67,4 +68,17 @@ describe('Fastify FileSend', () => {
expect(payload.toString()).to.be.eq(readmeString);
});
});
it('should return a file with correct headers', async () => {
return app
.inject({ url: '/file/with/headers', method: 'get' })
.then(({ statusCode, headers, payload }) => {
expect(statusCode).to.equal(200);
expect(headers['content-type']).to.equal('text/markdown');
expect(headers['content-disposition']).to.equal(
'attachment; filename="Readme.md"',
);
expect(headers['content-length']).to.equal(readme.byteLength);
expect(payload).to.equal(readmeString);
});
});
});

View File

@@ -25,11 +25,13 @@ export class AppService {
}
getFileWithHeaders(): StreamableFile {
const file = readFileSync(join(process.cwd(), 'Readme.md'));
return new StreamableFile(
createReadStream(join(process.cwd(), 'Readme.md')),
{
type: 'text/markdown',
disposition: 'attachment; filename="Readme.md"',
length: file.byteLength,
},
);
}

View File

@@ -0,0 +1,967 @@
import { INestApplication, VersioningType } from '@nestjs/common';
import {
FastifyAdapter,
NestFastifyApplication,
} from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import { FastifyRequest } from 'fastify';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
describe('Custom Versioning (fastify)', () => {
const extractor = (request: FastifyRequest): string | string[] => {
const versions = [request.headers['accept'] ?? '']
.flatMap(v => v.split(','))
.map(header => header.match(/v(\d+\.?\d*)\+json$/))
.filter(match => match && match.length)
.map(matchArray => matchArray[1])
.sort()
.reverse();
return versions;
};
let app: INestApplication;
// ======================================================================== //
describe('without global default version', () => {
before(async () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleRef.createNestApplication<NestFastifyApplication>(
new FastifyAdapter(),
);
app.enableVersioning({
type: VersioningType.CUSTOM,
extractor,
});
await app.init();
await app.getHttpAdapter().getInstance().ready();
});
describe('GET /', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello World V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /:param', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Parameter V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: '',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /multiple', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/multiple').expect(404);
});
});
describe('GET /neutral', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Neutral');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Neutral');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Neutral');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/neutral')
.expect(200)
.expect('Neutral');
});
});
describe('GET /override', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/override').expect(404);
});
});
describe('GET /override-partial', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Partial Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/override-partial')
.expect(404);
});
});
describe('GET /foo/bar', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v3+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.expect(200)
.expect('Hello FooBar!');
});
});
after(async () => {
await app.close();
});
});
// ======================================================================== //
describe('with the global default version: "1"', () => {
before(async () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleRef.createNestApplication<NestFastifyApplication>(
new FastifyAdapter(),
);
app.enableVersioning({
type: VersioningType.CUSTOM,
extractor,
defaultVersion: '1',
});
await app.init();
await app.getHttpAdapter().getInstance().ready();
});
describe('GET /', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello World V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /:param', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Parameter V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: '',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /multiple', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/multiple').expect(404);
});
});
describe('GET /neutral', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Neutral');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Neutral');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Neutral');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/neutral')
.expect(200)
.expect('Neutral');
});
});
describe('GET /override', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/override').expect(404);
});
});
describe('GET /override-partial', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Partial Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/override-partial')
.expect(404);
});
});
describe('GET /foo/bar', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v2+json',
})
.expect(404);
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect('Hello FooBar!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/foo/bar').expect(404);
});
});
after(async () => {
await app.close();
});
});
});

View File

@@ -0,0 +1,712 @@
import { INestApplication, VersioningType } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import { Request } from 'express';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
describe('Custom Versioning', () => {
const extractor = (request: Request): string | string[] => {
const versions = request
.header('Accept')
?.split(',')
.map(header => header.match(/v(\d+\.?\d*)\+json$/))
.filter(match => match && match.length)
.map(matchArray => matchArray[1])
.sort()
.reverse();
return versions;
};
let app: INestApplication;
// ======================================================================== //
describe('without global default version', () => {
before(async () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleRef.createNestApplication();
app.enableVersioning({
type: VersioningType.CUSTOM,
extractor,
});
await app.init();
});
describe('GET /', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello World V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
// There's a known limitation of the express-adapter, where
// it cannot handle selection of the highest matched version properly.
//
// it('V2, if two versions are requested, select the highest version', () => {
// return request(app.getHttpServer())
// .get('/')
// .set({
// Accept: 'application/foo.v1+json, application/foo.v2+json',
// })
// .expect(200)
// .expect('Hello World V2!');
// });
it('V3', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /:param', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Parameter V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: '',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /multiple', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2, if an unsupported version is specified, select the lower supported version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/multiple').expect(404);
});
});
describe('GET /neutral', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Neutral');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Neutral');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/neutral')
.expect(200)
.expect('Neutral');
});
});
describe('GET /override', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
// There's a known limitation of the express-adapter, where
// it cannot handle selection of the highest matched version properly.
//
// it('V2, if two versions are requested, select the highest version', () => {
// return request(app.getHttpServer())
// .get('/override')
// .set({
// Accept: 'application/foo.v1+json, application/foo.v2+json',
// })
// .expect(200)
// .expect('Override Version 2');
// });
it('V3', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/override').expect(404);
});
});
describe('GET /override-partial', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Partial Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/override-partial')
.expect(404);
});
});
describe('GET /foo/bar', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v3+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.expect(200)
.expect('Hello FooBar!');
});
});
after(async () => {
await app.close();
});
});
// ======================================================================== //
describe('with the global default version: "1"', () => {
before(async () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleRef.createNestApplication();
app.enableVersioning({
type: VersioningType.CUSTOM,
extractor,
defaultVersion: '1',
});
await app.init();
});
describe('GET /', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello World V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /:param', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Parameter V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: '',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /multiple', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/multiple').expect(404);
});
});
describe('GET /neutral', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Neutral');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Neutral');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/neutral')
.expect(200)
.expect('Neutral');
});
});
describe('GET /override', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/override').expect(404);
});
});
describe('GET /override-partial', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Partial Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/override-partial')
.expect(404);
});
});
describe('GET /foo/bar', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v2+json',
})
.expect(404);
});
it('V3', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/foo/bar').expect(404);
});
});
after(async () => {
await app.close();
});
});
});

View File

@@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "8.2.2"
"version": "8.3.1"
}

4126
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "8.2.1",
"version": "8.3.1",
"description": "Modern, fast, powerful node.js web framework",
"homepage": "https://nestjs.com",
"repository": {
@@ -39,13 +39,8 @@
"publish:beta": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=beta --access public -m \"chore(@nestjs) publish %s release\"",
"publish:next": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=next --access public --skip-git -m \"chore(@nestjs) publish %s release\"",
"publish:rc": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=rc --access public -m \"chore(@nestjs) publish %s release\"",
"publish:test": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --force-publish --access public --npm-tag=test --skip-git -m \"chore(@nestjs) publish %s release\""
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
}
"publish:test": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --force-publish --access public --npm-tag=test --skip-git -m \"chore(@nestjs) publish %s release\"",
"prepare": "husky install"
},
"lint-staged": {
"packages/**/*.{ts,json}": [
@@ -54,79 +49,80 @@
},
"dependencies": {
"@nuxtjs/opencollective": "0.3.2",
"axios": "0.24.0",
"class-transformer": "0.4.0",
"class-validator": "0.13.1",
"axios": "0.26.0",
"class-transformer": "0.5.1",
"class-validator": "0.13.2",
"cli-color": "2.0.1",
"cors": "2.8.5",
"express": "4.17.1",
"fast-json-stringify": "2.7.12",
"express": "4.17.3",
"fast-json-stringify": "3.0.3",
"fast-safe-stringify": "2.1.1",
"graphql-subscriptions": "2.0.0",
"iterare": "1.2.1",
"object-hash": "2.2.0",
"object-hash": "3.0.0",
"path-to-regexp": "3.2.0",
"reflect-metadata": "0.1.13",
"rxjs": "7.4.0",
"socket.io": "4.3.2",
"rxjs": "7.5.4",
"socket.io": "4.4.1",
"tslib": "2.3.1",
"uuid": "8.3.2"
},
"devDependencies": {
"@codechecks/client": "0.1.12",
"@commitlint/cli": "14.1.0",
"@commitlint/config-angular": "14.1.0",
"@grpc/grpc-js": "1.4.4",
"@grpc/proto-loader": "0.6.6",
"@nestjs/graphql": "9.1.1",
"@nestjs/mongoose": "9.0.1",
"@nestjs/typeorm": "8.0.2",
"@commitlint/cli": "16.2.1",
"@commitlint/config-angular": "16.2.1",
"@grpc/grpc-js": "1.5.7",
"@grpc/proto-loader": "0.6.9",
"@nestjs/apollo": "10.0.5",
"@nestjs/graphql": "10.0.5",
"@nestjs/mongoose": "9.0.2",
"@nestjs/typeorm": "8.0.3",
"@types/amqplib": "0.8.2",
"@types/bytes": "3.1.1",
"@types/cache-manager": "3.4.2",
"@types/chai": "4.2.22",
"@types/chai-as-promised": "7.1.4",
"@types/cache-manager": "3.4.3",
"@types/chai": "4.3.0",
"@types/chai-as-promised": "7.1.5",
"@types/cors": "2.8.12",
"@types/express": "4.17.13",
"@types/gulp": "4.0.9",
"@types/http-errors": "1.8.1",
"@types/mocha": "9.0.0",
"@types/node": "16.11.7",
"@types/redis": "2.8.32",
"@types/http-errors": "1.8.2",
"@types/mocha": "9.1.0",
"@types/node": "17.0.21",
"@types/redis": "4.0.11",
"@types/reflect-metadata": "0.1.0",
"@types/sinon": "10.0.6",
"@types/sinon": "10.0.11",
"@types/socket.io": "3.0.2",
"@types/ws": "8.2.0",
"@types/ws": "8.5.1",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"amqp-connection-manager": "3.7.0",
"amqp-connection-manager": "4.1.1",
"amqplib": "0.8.0",
"apollo-server-core": "3.5.0",
"apollo-server-express": "3.5.0",
"apollo-server-core": "3.6.3",
"apollo-server-express": "3.6.3",
"artillery": "1.7.9",
"body-parser": "1.19.0",
"bytes": "3.1.1",
"body-parser": "1.19.2",
"bytes": "3.1.2",
"cache-manager": "3.6.0",
"cache-manager-redis-store": "2.0.0",
"chai": "4.3.4",
"chai": "4.3.6",
"chai-as-promised": "7.1.1",
"clang-format": "1.6.0",
"commitlint-circle": "1.0.0",
"concurrently": "6.4.0",
"conventional-changelog": "3.1.24",
"core-js": "3.19.1",
"concurrently": "7.0.0",
"conventional-changelog": "3.1.25",
"core-js": "3.21.1",
"coveralls": "3.1.1",
"delete-empty": "3.0.0",
"engine.io-client": "6.1.1",
"eslint": "7.32.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.25.3",
"eslint-config-prettier": "8.4.0",
"eslint-plugin-import": "2.25.4",
"eventsource": "1.1.0",
"fancy-log": "1.3.3",
"fastify": "3.24.0",
"fastify-cors": "6.0.2",
"fancy-log": "2.0.0",
"fastify": "3.27.2",
"fastify-cors": "6.0.3",
"fastify-formbody": "5.2.0",
"fastify-multipart": "5.1.0",
"fastify-multipart": "5.3.1",
"fastify-static": "4.5.0",
"graphql": "15.7.2",
"graphql-tools": "7.0.5",
@@ -136,41 +132,41 @@
"gulp-sourcemaps": "3.0.0",
"gulp-typescript": "5.0.1",
"gulp-watch": "5.0.1",
"http-errors": "1.8.1",
"http-errors": "2.0.0",
"husky": "7.0.4",
"imports-loader": "3.1.1",
"json-loader": "0.5.7",
"kafkajs": "1.15.0",
"kafkajs": "1.16.0",
"lerna": "2.11.0",
"lerna-changelog": "2.2.0",
"light-my-request": "4.6.0",
"lint-staged": "12.0.2",
"light-my-request": "4.8.0",
"lint-staged": "12.3.4",
"markdown-table": "2.0.0",
"merge-graphql-schemas": "1.7.8",
"middie": "5.3.0",
"mocha": "9.1.3",
"mongoose": "6.0.13",
"mqtt": "4.2.8",
"multer": "1.4.3",
"middie": "6.0.0",
"mocha": "9.2.1",
"mongoose": "6.2.4",
"mqtt": "4.3.6",
"multer": "1.4.4",
"mysql2": "2.3.3",
"nats": "2.4.0",
"nats": "2.6.1",
"nodemon": "2.0.15",
"nyc": "15.1.0",
"point-of-view": "4.15.2",
"prettier": "2.4.1",
"point-of-view": "5.1.0",
"prettier": "2.5.1",
"redis": "3.1.2",
"rxjs-compat": "6.6.7",
"sinon": "12.0.1",
"sinon": "13.0.1",
"sinon-chai": "3.7.0",
"socket.io-client": "4.3.2",
"socket.io-client": "4.4.1",
"subscriptions-transport-ws": "0.11.0",
"supertest": "6.1.6",
"ts-morph": "12.2.0",
"ts-node": "10.4.0",
"typeorm": "0.2.40",
"supertest": "6.2.2",
"ts-morph": "13.0.3",
"ts-node": "10.5.0",
"typeorm": "0.2.44",
"typescript": "4.3.5",
"wrk": "1.2.1",
"ws": "7.5.5"
"ws": "7.5.6"
},
"engines": {
"node": ">= 10.13.0"
@@ -188,6 +184,7 @@
"type: bug :sob:": "Bug fixes",
"type: enhancement :wolf:": "Enhancements",
"type: docs :page_facing_up:": "Docs",
"type: code style": "Code style tweaks",
"dependencies": "Dependencies"
}
},

View File

@@ -1,18 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
### Bug Fixes
* **deps:** update dependency axios to v0.24.0 ([fc77e4f](https://github.com/nestjs/nest/commit/fc77e4f))
### Features
* **common:** add the ability to set some extra metadata about returned files ([5100573](https://github.com/nestjs/nest/commit/5100573))
* **common:** allow to swap out class-validator and class-transformer ([2a1cc62](https://github.com/nestjs/nest/commit/2a1cc62))

View File

@@ -57,10 +57,13 @@ With official support, you can get expert help straight from Nest core team. We
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsors
<table style="text-align:center;"><tr><td>
<table style="text-align:center;"><tr>
<td><a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
<td><a href="https://www.redhat.com" target="_blank"><img src="https://nestjs.com/img/red-hat-logo.svg" width="200" valign="middle" /></a></td>
<td>
<a href="https://github.com/Sanofi-IADC" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/sanofi.png" width="180" valign="middle" /></a></td>
<td>
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
<a href="https://nx.dev" target="_blank"><img src="https://nestjs.com/img/nx-logo.png" height="45" valign="middle" /></a></td>
</tr></table>
#### Gold Sponsors
@@ -78,10 +81,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<table style="text-align:center;"><tr><td>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> </td><td>
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" width="100" /></a> </td><td>
<a href="http://www.leogistics.com" target="_blank"><img src="https://nestjs.com/img/leogistics-logo.jpeg" width="150" valign="middle" /></td><td>
<a href="https://www.myleodsc.com/" target="_blank"><img src="https://nestjs.com/img/myleo-logo.png" width="180" valign="middle" /></td><td>
<a href="https://careers.meetdandy.com/?gh_src=063ba61e3us" target="_blank"><img src="https://nestjs.com/img/dandy-roles-logo.svg" width="150" valign="middle" /></td><td>
<a href="https://www.castlecraft.in" target="_blank"><img src="https://nestjs.com/img/castlecraft-logo.png" width="150" valign="middle" /></td>
<td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td></tr></table>
<td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td>
<td><a href="https://n.inc" target="_blank"><img src="https://nestjs.com/img/n-inc-logo.svg" width="120" valign="middle" /></td></tr></table>
#### Sponsors
@@ -113,6 +117,13 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://studyclerk.com/pay-for-research-paper" target="_blank"><img src="https://nestjs.com/img/studyclerk-logo.png" width="125" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://xyndata.com" target="_blank"><img src="https://nestjs.com/img/xyndata-logo.png" width="125" valign="middle" /></a></td></tr><tr>
<td align="center" valign="middle"><a href="https://www.anonymistic.com/" target="_blank"><img src="https://nestjs.com/img/anonymistic-logo.png" width="125" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://www.naologic.com/" target="_blank"><img src="https://nestjs.com/img/naologic-logo.svg" width="125" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://messaged.com/" target="_blank"><img src="https://nestjs.com/img/messaged-logo.png" width="50" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://triplecore.io" target="_blank"><img src="https://nestjs.com/img/triplecore-logo.svg" width="50" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<td align="center" valign="middle"><a href="https://polygon-software.ch/" target="_blank"><img src="https://nestjs.com/img/polygon-logo.svg" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://mobilereality.pl/" target="_blank"><img src="https://nestjs.com/img/mobile-reality-logo.png" width="45" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -29,3 +29,6 @@ export const REDIRECT_METADATA = '__redirect__';
export const RESPONSE_PASSTHROUGH_METADATA = '__responsePassthrough__';
export const SSE_METADATA = '__sse__';
export const VERSION_METADATA = '__version__';
export const INJECTABLE_WATERMARK = '__injectable__';
export const CONTROLLER_WATERMARK = '__controller__';
export const CATCH_WATERMARK = '__catch__';

View File

@@ -1,5 +1,5 @@
import { FILTER_CATCH_EXCEPTIONS } from '../../constants';
import { Type } from '../../interfaces';
import { CATCH_WATERMARK, FILTER_CATCH_EXCEPTIONS } from '../../constants';
import { Type, Abstract } from '../../interfaces';
/**
* Decorator that marks a class as a Nest exception filter. An exception filter
@@ -18,8 +18,11 @@ import { Type } from '../../interfaces';
*
* @publicApi
*/
export function Catch(...exceptions: Type<any>[]): ClassDecorator {
export function Catch(
...exceptions: Array<Type<any> | Abstract<any>>
): ClassDecorator {
return (target: object) => {
Reflect.defineMetadata(CATCH_WATERMARK, true, target);
Reflect.defineMetadata(FILTER_CATCH_EXCEPTIONS, exceptions, target);
};
}

View File

@@ -1,4 +1,5 @@
import {
CONTROLLER_WATERMARK,
HOST_METADATA,
PATH_METADATA,
SCOPE_OPTIONS_METADATA,
@@ -163,10 +164,13 @@ export function Controller(
prefixOrOptions.path || defaultPath,
prefixOrOptions.host,
{ scope: prefixOrOptions.scope },
prefixOrOptions.version,
Array.isArray(prefixOrOptions.version)
? Array.from(new Set(prefixOrOptions.version))
: prefixOrOptions.version,
];
return (target: object) => {
Reflect.defineMetadata(CONTROLLER_WATERMARK, true, target);
Reflect.defineMetadata(PATH_METADATA, path, target);
Reflect.defineMetadata(HOST_METADATA, host, target);
Reflect.defineMetadata(SCOPE_OPTIONS_METADATA, scopeOptions, target);

View File

@@ -1,5 +1,5 @@
import { v4 as uuid } from 'uuid';
import { SCOPE_OPTIONS_METADATA } from '../../constants';
import { INJECTABLE_WATERMARK, SCOPE_OPTIONS_METADATA } from '../../constants';
import { ScopeOptions } from '../../interfaces/scope-options.interface';
import { Type } from '../../interfaces/type.interface';
@@ -42,6 +42,7 @@ export type InjectableOptions = ScopeOptions;
*/
export function Injectable(options?: InjectableOptions): ClassDecorator {
return (target: object) => {
Reflect.defineMetadata(INJECTABLE_WATERMARK, true, target);
Reflect.defineMetadata(SCOPE_OPTIONS_METADATA, options, target);
};
}

View File

@@ -7,6 +7,11 @@ import { VersionValue } from '../../interfaces/version-options.interface';
* @publicApi
*/
export function Version(version: VersionValue): MethodDecorator {
if (Array.isArray(version)) {
// Drop duplicated versions
version = Array.from(new Set(version));
}
return (
target: any,
key: string | symbol,

View File

@@ -5,7 +5,7 @@ import { validateModuleKeys } from '../../utils/validate-module-keys.util';
* Decorator that marks a class as a [module](https://docs.nestjs.com/modules).
*
* Modules are used by Nest to organize the application structure into scopes. Controllers
* and Providers are scoped by the module they are declared in. Modules and their
* and Providers are scoped by the module they are declared in. Modules and their
* classes (Controllers and Providers) form a graph that determines how Nest
* performs [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection).
*

View File

@@ -5,4 +5,5 @@ export enum VersioningType {
URI,
HEADER,
MEDIA_TYPE,
CUSTOM,
}

View File

@@ -1,23 +1,22 @@
import { Readable } from 'stream';
import { types } from 'util';
import { isFunction } from '../utils/shared.utils';
import { StreamableFileOptions } from './streamable-options.interface';
export class StreamableFile {
private readonly stream: Readable;
constructor(buffer: Buffer, options?: StreamableFileOptions);
constructor(buffer: Uint8Array, options?: StreamableFileOptions);
constructor(readable: Readable, options?: StreamableFileOptions);
constructor(
bufferOrReadStream: Buffer | Readable,
bufferOrReadStream: Uint8Array | Readable,
readonly options: StreamableFileOptions = {},
) {
if (Buffer.isBuffer(bufferOrReadStream)) {
if (types.isUint8Array(bufferOrReadStream)) {
this.stream = new Readable();
this.stream.push(bufferOrReadStream);
this.stream.push(null);
} else if (
bufferOrReadStream.pipe &&
typeof bufferOrReadStream.pipe === 'function'
) {
} else if (bufferOrReadStream.pipe && isFunction(bufferOrReadStream.pipe)) {
this.stream = bufferOrReadStream;
}
}
@@ -27,8 +26,15 @@ export class StreamableFile {
}
getHeaders() {
const { type = 'application/octet-stream', disposition = null } =
this.options;
return { type, disposition };
const {
type = 'application/octet-stream',
disposition = undefined,
length = undefined,
} = this.options;
return {
type,
disposition,
length,
};
}
}

View File

@@ -1,4 +1,5 @@
export interface StreamableFileOptions {
type?: string;
disposition?: string;
}
length?: number;
}

View File

@@ -31,6 +31,7 @@ export {
INestApplication,
INestApplicationContext,
INestMicroservice,
InjectionToken,
IntrospectionResult,
MessageEvent,
MiddlewareConsumer,
@@ -44,6 +45,7 @@ export {
OnApplicationShutdown,
OnModuleDestroy,
OnModuleInit,
OptionalFactoryDependency,
Paramtype,
PipeTransform,
Provider,

View File

@@ -1,3 +1,3 @@
export interface NestMiddleware<TRequest = any, TResponse = any> {
use(req: TRequest, res: TResponse, next: () => void): any;
use(req: TRequest, res: TResponse, next: (error?: Error | any) => void): any;
}

View File

@@ -1,6 +1,8 @@
export * from './dynamic-module.interface';
export * from './forward-reference.interface';
export * from './injection-token.interface';
export * from './introspection-result.interface';
export * from './module-metadata.interface';
export * from './nest-module.interface';
export * from './optional-factory-dependency.interface';
export * from './provider.interface';

View File

@@ -0,0 +1,9 @@
import { Abstract } from '../abstract.interface';
import { Type } from '../type.interface';
export type InjectionToken =
| string
| symbol
| Type<any>
| Abstract<any>
| Function;

View File

@@ -0,0 +1,6 @@
import { InjectionToken } from './injection-token.interface';
export type OptionalFactoryDependency = {
token: InjectionToken;
optional: boolean;
};

View File

@@ -1,6 +1,7 @@
import { Abstract } from '../abstract.interface';
import { Scope } from '../scope-options.interface';
import { Type } from '../type.interface';
import { InjectionToken } from './injection-token.interface';
import { OptionalFactoryDependency } from './optional-factory-dependency.interface';
/**
*
@@ -36,7 +37,7 @@ export interface ClassProvider<T = any> {
/**
* Injection token
*/
provide: string | symbol | Type<any> | Abstract<any> | Function;
provide: InjectionToken;
/**
* Type (class name) of provider (instance to be injected).
*/
@@ -66,7 +67,7 @@ export interface ValueProvider<T = any> {
/**
* Injection token
*/
provide: string | symbol | Type<any> | Abstract<any> | Function;
provide: InjectionToken;
/**
* Instance of a provider to be injected.
*/
@@ -97,7 +98,7 @@ export interface FactoryProvider<T = any> {
/**
* Injection token
*/
provide: string | symbol | Type<any> | Abstract<any> | Function;
provide: InjectionToken;
/**
* Factory function that returns an instance of the provider to be injected.
*/
@@ -105,7 +106,7 @@ export interface FactoryProvider<T = any> {
/**
* Optional list of providers to be injected into the context of the Factory function.
*/
inject?: Array<Type<any> | string | symbol | Abstract<any> | Function>;
inject?: Array<InjectionToken | OptionalFactoryDependency>;
/**
* Optional enum defining lifetime of the provider that is returned by the Factory function.
*/
@@ -131,7 +132,7 @@ export interface ExistingProvider<T = any> {
/**
* Injection token
*/
provide: string | symbol | Type<any> | Abstract<any> | Function;
provide: InjectionToken;
/**
* Provider to be aliased by the Injection token.
*/

View File

@@ -1,6 +1,5 @@
import { ShutdownSignal } from '../enums/shutdown-signal.enum';
import { LoggerService, LogLevel } from '../services/logger.service';
import { Abstract } from './abstract.interface';
import { DynamicModule } from './modules';
import { Type } from './type.interface';
@@ -21,7 +20,7 @@ export interface INestApplicationContext {
* @returns {TResult}
*/
get<TInput = any, TResult = TInput>(
typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol,
typeOrToken: Type<TInput> | Function | string | symbol,
options?: { strict: boolean },
): TResult;
@@ -30,7 +29,7 @@ export interface INestApplicationContext {
* @returns {Promise<TResult>}
*/
resolve<TInput = any, TResult = TInput>(
typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol,
typeOrToken: Type<TInput> | Function | string | symbol,
contextId?: { id: number },
options?: { strict: boolean },
): Promise<TResult>;
@@ -51,7 +50,8 @@ export interface INestApplicationContext {
close(): Promise<void>;
/**
* Sets custom logger service
* Sets custom logger service.
* Flushes buffered logs if auto flush is on.
* @returns {void}
*/
useLogger(logger: LoggerService | LogLevel[] | false): void;

View File

@@ -7,7 +7,10 @@ import { VersioningType } from '../enums/version-type.enum';
*/
export const VERSION_NEUTRAL = Symbol('VERSION_NEUTRAL');
export type VersionValue = string | string[] | typeof VERSION_NEUTRAL;
export type VersionValue =
| string
| typeof VERSION_NEUTRAL
| Array<string | typeof VERSION_NEUTRAL>;
/**
* @publicApi
@@ -55,6 +58,20 @@ export interface MediaTypeVersioningOptions {
key: string;
}
export interface CustomVersioningOptions {
type: VersioningType.CUSTOM;
/**
* A function that accepts a request object (specific to the underlying platform, ie Express or Fastify)
* and returns a single version value or an ordered array of versions, in order from HIGHEST to LOWEST.
*
* Ex. Returned version array = ['3.1', '3.0', '2.5', '2', '1.9']
*
* Use type assertion or narrowing to identify the specific request type.
*/
extractor: (request: unknown) => string | string[];
}
interface VersioningCommonOptions {
/**
* The default version to be used as a fallback when you did not provide some
@@ -67,4 +84,9 @@ interface VersioningCommonOptions {
* @publicApi
*/
export type VersioningOptions = VersioningCommonOptions &
(HeaderVersioningOptions | UriVersioningOptions | MediaTypeVersioningOptions);
(
| HeaderVersioningOptions
| UriVersioningOptions
| MediaTypeVersioningOptions
| CustomVersioningOptions
);

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/common",
"version": "8.2.2",
"version": "8.3.1",
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
"author": "Kamil Mysliwiec",
"homepage": "https://nestjs.com",
@@ -17,7 +17,7 @@
},
"license": "MIT",
"dependencies": {
"axios": "0.24.0",
"axios": "0.26.0",
"iterare": "1.2.1",
"tslib": "2.3.1",
"uuid": "8.3.2"

View File

@@ -3,7 +3,7 @@ import {
ArgumentMetadata,
PipeTransform,
} from '../interfaces/features/pipe-transform.interface';
import { isNil } from '../utils/shared.utils';
import { isNil, isNumber } from '../utils/shared.utils';
/**
* Defines the built-in DefaultValue Pipe
@@ -21,7 +21,7 @@ export class DefaultValuePipe<T = any, R = any>
transform(value?: T, _metadata?: ArgumentMetadata): T | R {
if (
isNil(value) ||
(typeof value === 'number' && isNaN(value as unknown as number))
(isNumber(value) && isNaN(value as unknown as number))
) {
return this.defaultValue;
}

View File

@@ -7,7 +7,7 @@ import {
PipeTransform,
} from '../interfaces/features/pipe-transform.interface';
import { HttpErrorByCode } from '../utils/http-error-by-code.util';
import { isNil, isString } from '../utils/shared.utils';
import { isNil, isUndefined, isString } from '../utils/shared.utils';
import { ValidationPipe, ValidationPipeOptions } from './validation.pipe';
const VALIDATION_ERROR_MESSAGE = 'Validation failed (parsable array expected)';
@@ -141,21 +141,19 @@ export class ParseArrayPipe implements PipeTransform {
originalValue !== null && originalValue !== '' ? +originalValue : NaN;
if (isNaN(value)) {
throw this.exceptionFactory(
`${
typeof index !== 'undefined' ? `[${index}] ` : ''
}item must be a number`,
`${isUndefined(index) ? '' : `[${index}] `}item must be a number`,
);
}
return value;
} else if (this.options.items === String) {
if (typeof originalValue !== 'string') {
if (!isString(originalValue)) {
return `${originalValue}`;
}
} else if (this.options.items === Boolean) {
if (typeof originalValue !== 'boolean') {
throw this.exceptionFactory(
`${
typeof index !== 'undefined' ? `[${index}] ` : ''
isUndefined(index) ? '' : `[${index}] `
}item must be a boolean value`,
);
}

View File

@@ -59,6 +59,6 @@ export class ParseEnumPipe<T = any> implements PipeTransform<T> {
const enumValues = Object.keys(this.enumType).map(
item => this.enumType[item],
);
return enumValues.indexOf(value) >= 0;
return enumValues.includes(value);
}
}

View File

@@ -17,7 +17,7 @@ import {
HttpErrorByCode,
} from '../utils/http-error-by-code.util';
import { loadPackage } from '../utils/load-package.util';
import { isNil } from '../utils/shared.utils';
import { isNil, isObject } from '../utils/shared.utils';
export interface ValidationPipeOptions extends ValidatorOptions {
transform?: boolean;
@@ -194,7 +194,7 @@ export class ValidationPipe implements PipeTransform<any> {
delete value.__proto__;
const keys = Object.keys(value);
iterate(keys)
.filter(key => typeof value[key] === 'object' && value[key])
.filter(key => isObject(value[key]) && value[key])
.forEach(key => this.stripProtoKeys(value[key]));
}

View File

@@ -1,7 +1,7 @@
import { Injectable } from '../decorators/core/injectable.decorator';
import { Optional } from '../decorators/core/optional.decorator';
import { clc, yellow } from '../utils/cli-colors.util';
import { isPlainObject } from '../utils/shared.utils';
import { isPlainObject, isString } from '../utils/shared.utils';
import { LoggerService, LogLevel } from './logger.service';
import { isLogLevelEnabled } from './utils';
@@ -226,7 +226,7 @@ export class ConsoleLogger implements LoggerService {
return { messages: args, context: this.context };
}
const lastElement = args[args.length - 1];
const isContext = typeof lastElement === 'string';
const isContext = isString(lastElement);
if (!isContext) {
return { messages: args, context: this.context };
}
@@ -242,7 +242,7 @@ export class ConsoleLogger implements LoggerService {
return { messages, context };
}
const lastElement = messages[messages.length - 1];
const isStack = typeof lastElement === 'string';
const isStack = isString(lastElement);
if (!isStack) {
return { messages, context };
}

View File

@@ -1,5 +1,5 @@
import { expect } from 'chai';
import { FILTER_CATCH_EXCEPTIONS } from '../../constants';
import { CATCH_WATERMARK, FILTER_CATCH_EXCEPTIONS } from '../../constants';
import { Catch } from '../../decorators/core/catch.decorator';
describe('@Catch', () => {
@@ -8,6 +8,12 @@ describe('@Catch', () => {
@Catch(...exceptions)
class Test {}
it(`should enhance component with "${CATCH_WATERMARK}" metadata`, () => {
const catchWatermark = Reflect.getMetadata(CATCH_WATERMARK, Test);
expect(catchWatermark).to.be.true;
});
it('should enhance class with expected exceptions array', () => {
const metadata = Reflect.getMetadata(FILTER_CATCH_EXCEPTIONS, Test);
expect(metadata).to.be.eql(exceptions);

View File

@@ -1,5 +1,5 @@
import { expect } from 'chai';
import { VERSION_METADATA } from '../../constants';
import { VERSION_METADATA, CONTROLLER_WATERMARK } from '../../constants';
import { Controller } from '../../decorators/core/controller.decorator';
describe('@Controller', () => {
@@ -7,13 +7,15 @@ describe('@Controller', () => {
const reflectedHost = 'api.example.com';
const reflectedHostArray = ['api1.example.com', 'api2.example.com'];
const reflectedVersion = '1';
@Controller(reflectedPath)
class Test {}
const reflectedVersionWithDuplicates = ['1', '2', '2', '1', '2', '1'];
const reflectedVersionWithoutDuplicates = ['1', '2'];
@Controller()
class EmptyDecorator {}
@Controller(reflectedPath)
class Test {}
@Controller({ path: reflectedPath, host: reflectedHost })
class PathAndHostDecorator {}
@@ -33,6 +35,18 @@ describe('@Controller', () => {
@Controller({ version: reflectedVersion })
class VersionOnlyDecorator {}
@Controller({ version: reflectedVersionWithDuplicates })
class VersionOnlyArrayDecorator {}
it(`should enhance component with "${CONTROLLER_WATERMARK}" metadata`, () => {
const controllerWatermark = Reflect.getMetadata(
CONTROLLER_WATERMARK,
EmptyDecorator,
);
expect(controllerWatermark).to.be.true;
});
it('should enhance controller with expected path metadata', () => {
const path = Reflect.getMetadata('path', Test);
expect(path).to.be.eql(reflectedPath);
@@ -64,6 +78,11 @@ describe('@Controller', () => {
VersionOnlyDecorator,
);
expect(version2).to.be.eql(reflectedVersion);
const version3 = Reflect.getMetadata(
VERSION_METADATA,
VersionOnlyArrayDecorator,
);
expect(version3).to.be.eql(reflectedVersionWithoutDuplicates);
});
it('should set default path when no object passed as param', () => {

View File

@@ -1,12 +1,24 @@
import { expect } from 'chai';
import { SCOPE_OPTIONS_METADATA, INJECTABLE_WATERMARK } from '../../constants';
import { Injectable, mixin } from '../../index';
describe('@Injectable', () => {
@Injectable()
const options = {};
@Injectable(options)
class TestMiddleware {
constructor(param: number, test: string) {}
constructor(_param: number, _test: string) {}
}
it(`should enhance component with "${INJECTABLE_WATERMARK}" metadata`, () => {
const injectableWatermark = Reflect.getMetadata(
INJECTABLE_WATERMARK,
TestMiddleware,
);
expect(injectableWatermark).to.be.eql(true);
});
it('should enhance component with "design:paramtypes" metadata', () => {
const constructorParams = Reflect.getMetadata(
'design:paramtypes',
@@ -16,22 +28,33 @@ describe('@Injectable', () => {
expect(constructorParams[0]).to.be.eql(Number);
expect(constructorParams[1]).to.be.eql(String);
});
it(`should enhance component with "${SCOPE_OPTIONS_METADATA}" metadata`, () => {
const constructorParams = Reflect.getMetadata(
SCOPE_OPTIONS_METADATA,
TestMiddleware,
);
expect(constructorParams).to.be.eql(options);
});
});
describe('mixin', () => {
@Injectable()
class Test {
constructor(param: number, test: string) {}
constructor(_param: number, _test: string) {}
}
it('should set name of metatype', () => {
const type = mixin(Test);
expect(type.name).to.not.eql('Test');
});
it('should not lost the design:parmatypes metadata', () => {
const type = mixin(Test);
const constructorParams = Reflect.getMetadata('design:paramtypes', type);
expect(constructorParams[0]).to.be.eql(Number);
expect(constructorParams[1]).to.be.eql(String);
});

View File

@@ -4,14 +4,27 @@ import { Version } from '../../decorators/core/version.decorator';
describe('@Version', () => {
const version = '1';
const versions = ['1', '2', '2', '1', '2', '1'];
const versionsWithoutDuplicates = ['1', '2'];
class Test {
@Version(version)
public static test() {}
public static oneVersion() {}
@Version(versions)
public static multipleVersions() {}
}
it('should enhance method with expected version string', () => {
const metadata = Reflect.getMetadata(VERSION_METADATA, Test.test);
const metadata = Reflect.getMetadata(VERSION_METADATA, Test.oneVersion);
expect(metadata).to.be.eql(version);
});
it('should enhance method with expected version array', () => {
const metadata = Reflect.getMetadata(
VERSION_METADATA,
Test.multipleVersions,
);
expect(metadata).to.be.eql(versionsWithoutDuplicates);
});
});

View File

@@ -17,12 +17,48 @@ describe('StreamableFile', () => {
expect(streamableFile.getStream()).to.equal(stream);
});
});
describe('when options is empty', () => {
it('should return application/octet-stream for type and undefined for others', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
expect(streamableFile.getHeaders()).to.deep.equal({
type: 'application/octet-stream',
disposition: undefined,
length: undefined,
});
});
});
describe('when options is defined', () => {
it('should pass provided headers', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream, {
type: 'application/pdf',
disposition: 'inline',
length: 100,
});
expect(streamableFile.getHeaders()).to.deep.equal({
type: 'application/pdf',
disposition: 'inline',
length: 100,
});
});
});
describe('otherwise', () => {
it('should create a readable straem and push the input buffer', () => {
const buffer = Buffer.from('test');
const streamableFile = new StreamableFile(buffer);
const stream = streamableFile.getStream();
expect(stream.read()).to.equal(buffer);
describe('when input is a Buffer instance', () => {
it('should create a readable stream and push the input buffer', () => {
const buffer = Buffer.from('test');
const streamableFile = new StreamableFile(buffer);
const stream = streamableFile.getStream();
expect(stream.read()).to.equal(buffer);
});
});
describe('when input is a Uint8Array', () => {
it('should create a readable stream and push the input buffer', () => {
const buffer = Uint8Array.from([0xab, 0xcd, 0xef, 0x00]);
const streamableFile = new StreamableFile(buffer);
const stream = streamableFile.getStream();
expect(stream.read()).to.deep.equal(Buffer.from(buffer));
});
});
});
});

View File

@@ -5,9 +5,11 @@ import {
isEmpty,
isFunction,
isNil,
isNumber,
isObject,
isPlainObject,
isString,
isSymbol,
isUndefined,
normalizePath,
stripEndSlash,
@@ -66,15 +68,44 @@ describe('Shared utils', () => {
});
});
describe('isString', () => {
it('should return true when obj is a string', () => {
it('should return true when val is a string', () => {
expect(isString('true')).to.be.true;
});
it('should return false when object is not a string', () => {
it('should return false when val is not a string', () => {
expect(isString(new String('fine'))).to.be.false;
expect(isString(false)).to.be.false;
expect(isString(null)).to.be.false;
expect(isString(undefined)).to.be.false;
});
});
describe('isSymbol', () => {
it('should return true when val is a Symbol', () => {
expect(isSymbol(Symbol())).to.be.true;
});
it('should return false when val is not a symbol', () => {
expect(isSymbol('Symbol()')).to.be.false;
expect(isSymbol(false)).to.be.false;
expect(isSymbol(null)).to.be.false;
expect(isSymbol(undefined)).to.be.false;
});
});
describe('isNumber', () => {
it('should return true when val is a number or NaN', () => {
expect(isNumber(1)).to.be.true;
expect(isNumber(1.23)).to.be.true; // with decimals
expect(isNumber(123e-5)).to.be.true; // scientific (exponent) notation
expect(isNumber(0o1)).to.be.true; // octal notation
expect(isNumber(0b1)).to.be.true; // binary notation
expect(isNumber(0x1)).to.be.true; // hexadecimal notation
expect(isNumber(NaN)).to.be.true;
});
it('should return false when val is not a number', () => {
// expect(isNumber(1n)).to.be.false; // big int (available on ES2020)
expect(isNumber('1')).to.be.false; // string
expect(isNumber(undefined)).to.be.false; // nullish
expect(isNumber(null)).to.be.false; // nullish
});
});
describe('isConstructor', () => {
it('should return true when string is equal to constructor', () => {
expect(isConstructor('constructor')).to.be.true;

View File

@@ -1,4 +1,5 @@
import { BadRequestException } from '../exceptions';
import { isString } from './shared.utils';
const uuid = {
3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
@@ -8,7 +9,7 @@ const uuid = {
};
export function isUUID(str: any, version = 'all') {
if (typeof str !== 'string') {
if (!isString(str)) {
throw new BadRequestException('The value passed as UUID is not a string');
}
const pattern = uuid[version];

View File

@@ -47,10 +47,11 @@ export const normalizePath = (path?: string): string =>
export const stripEndSlash = (path: string) =>
path[path.length - 1] === '/' ? path.slice(0, path.length - 1) : path;
export const isFunction = (fn: any): boolean => typeof fn === 'function';
export const isString = (fn: any): fn is string => typeof fn === 'string';
export const isConstructor = (fn: any): boolean => fn === 'constructor';
export const isNil = (obj: any): obj is null | undefined =>
isUndefined(obj) || obj === null;
export const isFunction = (val: any): boolean => typeof val === 'function';
export const isString = (val: any): val is string => typeof val === 'string';
export const isNumber = (val: any): val is number => typeof val === 'number';
export const isConstructor = (val: any): boolean => val === 'constructor';
export const isNil = (val: any): val is null | undefined =>
isUndefined(val) || val === null;
export const isEmpty = (array: any): boolean => !(array && array.length > 0);
export const isSymbol = (fn: any): fn is symbol => typeof fn === 'symbol';
export const isSymbol = (val: any): val is symbol => typeof val === 'symbol';

View File

@@ -1,12 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
**Note:** Version bump only for package @nestjs/core

View File

@@ -57,10 +57,13 @@ With official support, you can get expert help straight from Nest core team. We
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsors
<table style="text-align:center;"><tr><td>
<table style="text-align:center;"><tr>
<td><a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
<td><a href="https://www.redhat.com" target="_blank"><img src="https://nestjs.com/img/red-hat-logo.svg" width="200" valign="middle" /></a></td>
<td>
<a href="https://github.com/Sanofi-IADC" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/sanofi.png" width="180" valign="middle" /></a></td>
<td>
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
<a href="https://nx.dev" target="_blank"><img src="https://nestjs.com/img/nx-logo.png" height="45" valign="middle" /></a></td>
</tr></table>
#### Gold Sponsors
@@ -78,10 +81,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<table style="text-align:center;"><tr><td>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> </td><td>
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" width="100" /></a> </td><td>
<a href="http://www.leogistics.com" target="_blank"><img src="https://nestjs.com/img/leogistics-logo.jpeg" width="150" valign="middle" /></td><td>
<a href="https://www.myleodsc.com/" target="_blank"><img src="https://nestjs.com/img/myleo-logo.png" width="180" valign="middle" /></td><td>
<a href="https://careers.meetdandy.com/?gh_src=063ba61e3us" target="_blank"><img src="https://nestjs.com/img/dandy-roles-logo.svg" width="150" valign="middle" /></td><td>
<a href="https://www.castlecraft.in" target="_blank"><img src="https://nestjs.com/img/castlecraft-logo.png" width="150" valign="middle" /></td>
<td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td></tr></table>
<td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td>
<td><a href="https://n.inc" target="_blank"><img src="https://nestjs.com/img/n-inc-logo.svg" width="120" valign="middle" /></td></tr></table>
#### Sponsors
@@ -113,6 +117,13 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://studyclerk.com/pay-for-research-paper" target="_blank"><img src="https://nestjs.com/img/studyclerk-logo.png" width="125" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://xyndata.com" target="_blank"><img src="https://nestjs.com/img/xyndata-logo.png" width="125" valign="middle" /></a></td></tr><tr>
<td align="center" valign="middle"><a href="https://www.anonymistic.com/" target="_blank"><img src="https://nestjs.com/img/anonymistic-logo.png" width="125" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://www.naologic.com/" target="_blank"><img src="https://nestjs.com/img/naologic-logo.svg" width="125" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://messaged.com/" target="_blank"><img src="https://nestjs.com/img/messaged-logo.png" width="50" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://triplecore.io" target="_blank"><img src="https://nestjs.com/img/triplecore-logo.svg" width="50" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<td align="center" valign="middle"><a href="https://polygon-software.ch/" target="_blank"><img src="https://nestjs.com/img/polygon-logo.svg" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://mobilereality.pl/" target="_blank"><img src="https://nestjs.com/img/mobile-reality-logo.png" width="45" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -136,6 +136,11 @@ export class ApplicationConfig {
}
public enableVersioning(options: VersioningOptions): void {
if (Array.isArray(options.defaultVersion)) {
// Drop duplicated versions
options.defaultVersion = Array.from(new Set(options.defaultVersion));
}
this.versioningOptions = options;
}

View File

@@ -0,0 +1,10 @@
import { USING_INVALID_CLASS_AS_A_MODULE_MESSAGE } from '../messages';
import { RuntimeException } from './runtime.exception';
export class InvalidClassModuleException extends RuntimeException {
constructor(metatypeUsedAsAModule: any, scope: any[]) {
super(
USING_INVALID_CLASS_AS_A_MODULE_MESSAGE(metatypeUsedAsAModule, scope),
);
}
}

View File

@@ -1,4 +1,4 @@
import { ForwardReference, Type } from '@nestjs/common';
import type { ForwardReference, Type, DynamicModule } from '@nestjs/common';
import { isNil, isSymbol } from '@nestjs/common/utils/shared.utils';
import {
InjectorDependency,
@@ -7,14 +7,19 @@ import {
import { Module } from '../injector/module';
/**
* Returns the name of an instance
* Returns the name of an instance or `undefined`
* @param instance The instance which should get the name from
*/
const getInstanceName = (instance: unknown): string => {
if ((instance as ForwardReference)?.forwardRef) {
return (instance as ForwardReference).forwardRef()?.name;
}
return (instance as Type<any>)?.name;
if ((instance as DynamicModule)?.module) {
return (instance as DynamicModule).module?.name;
}
return (instance as Type)?.name;
};
/**
@@ -97,7 +102,7 @@ export const UNDEFINED_FORWARDREF_MESSAGE = (
(Read more: https://docs.nestjs.com/fundamentals/circular-dependency)
Scope [${stringifyScope(scope)}]
`;
`;
export const INVALID_MODULE_MESSAGE = (
parentModule: any,
@@ -107,11 +112,25 @@ export const INVALID_MODULE_MESSAGE = (
const parentModuleName = parentModule?.name || 'module';
return `Nest cannot create the ${parentModuleName} instance.
Received an unexpected value at index [${index}] of the ${parentModuleName} "imports" array.
Received an unexpected value at index [${index}] of the ${parentModuleName} "imports" array.
Scope [${stringifyScope(scope)}]`;
};
export const USING_INVALID_CLASS_AS_A_MODULE_MESSAGE = (
metatypeUsedAsAModule: Type | ForwardReference,
scope: any[],
) => {
const metatypeName = getInstanceName(metatypeUsedAsAModule) || 'found';
// TODO(v9): Edit the message below:
return `In the next major version, Nest will not allow classes annotated with @Injectable(), @Catch(), and @Controller() decorators to appear in the "imports" array of a module.
Please remove "${metatypeName}" (including forwarded occurrences, if any) from all of the "imports" arrays.
Scope [${stringifyScope(scope)}]
`;
};
export const UNDEFINED_MODULE_MESSAGE = (
parentModule: any,
index: number,

View File

@@ -50,12 +50,15 @@ export class ContextUtils {
}
public getArgumentsLength<T>(keys: string[], metadata: T): number {
return Math.max(...keys.map(key => metadata[key].index)) + 1;
return keys.length
? Math.max(...keys.map(key => metadata[key].index)) + 1
: 0;
}
public createNullArray(length: number): any[] {
// eslint-disable-next-line prefer-spread
return Array.apply(null, { length } as any).fill(undefined);
const a = new Array(length);
for (let i = 0; i < length; ++i) a[i] = undefined;
return a;
}
public mergeParamsMetatypes(

View File

@@ -6,7 +6,7 @@ import {
PipeTransform,
} from '@nestjs/common/interfaces';
import { isEmpty, isFunction } from '@nestjs/common/utils/shared.utils';
import { lastValueFrom } from 'rxjs';
import { lastValueFrom, isObservable } from 'rxjs';
import { ExternalExceptionFilterContext } from '../exceptions/external-exception-filter-context';
import { FORBIDDEN_MESSAGE } from '../guards/constants';
import { GuardsConsumer } from '../guards/guards-consumer';
@@ -329,7 +329,7 @@ export class ExternalContextCreator {
}
public async transformToResult(resultOrDeferred: any) {
if (resultOrDeferred && isFunction(resultOrDeferred.subscribe)) {
if (isObservable(resultOrDeferred)) {
return lastValueFrom(resultOrDeferred);
}
return resultOrDeferred;

View File

@@ -17,10 +17,12 @@ export const VERSIONED_ROUTE_MAPPED_MESSAGE = (
method: string | number,
version: VersionValue,
) => {
if (version === VERSION_NEUTRAL) {
version = 'Neutral';
}
return `Mapped {${path}, ${RequestMethod[method]}} (version: ${version}) route`;
const controllerVersions = Array.isArray(version) ? version : [version];
const versions = controllerVersions
.map(version => (version === VERSION_NEUTRAL ? 'Neutral' : version))
.join(',');
return `Mapped {${path}, ${RequestMethod[method]}} (version: ${versions}) route`;
};
export const CONTROLLER_MAPPING_MESSAGE = (name: string, path: string) =>
@@ -31,10 +33,12 @@ export const VERSIONED_CONTROLLER_MAPPING_MESSAGE = (
path: string,
version: VersionValue,
) => {
if (version === VERSION_NEUTRAL) {
version = 'Neutral';
}
return `${name} {${path}} (version: ${version}):`;
const controllerVersions = Array.isArray(version) ? version : [version];
const versions = controllerVersions
.map(version => (version === VERSION_NEUTRAL ? 'Neutral' : version))
.join(',');
return `${name} {${path}} (version: ${versions}):`;
};
export const INVALID_EXECUTION_CONTEXT = (

View File

@@ -1,4 +1,9 @@
import { Logger, LoggerService } from '@nestjs/common';
import {
InjectionToken,
Logger,
LoggerService,
OptionalFactoryDependency,
} from '@nestjs/common';
import {
OPTIONAL_DEPS_METADATA,
OPTIONAL_PROPERTY_DEPS_METADATA,
@@ -34,7 +39,7 @@ import { InstanceToken, Module } from './module';
/**
* The type of an injectable dependency
*/
export type InjectorDependency = Type<any> | Function | string | symbol;
export type InjectorDependency = InjectionToken;
/**
* The property-based dependency
@@ -119,7 +124,7 @@ export class Injector {
const properties = await this.resolveProperties(
wrapper,
moduleRef,
inject,
inject as InjectionToken[],
contextId,
wrapper,
inquirer,
@@ -137,7 +142,7 @@ export class Injector {
await this.resolveConstructorParams<T>(
wrapper,
moduleRef,
inject,
inject as InjectionToken[],
callback,
contextId,
wrapper,
@@ -246,12 +251,11 @@ export class Injector {
);
return callback(deps);
}
const dependencies = isNil(inject)
? this.reflectConstructorParams(wrapper.metatype as Type<any>)
: inject;
const optionalDependenciesIds = isNil(inject)
? this.reflectOptionalParams(wrapper.metatype as Type<any>)
: [];
const isFactoryProvider = !isNil(inject);
const [dependencies, optionalDependenciesIds] = isFactoryProvider
? this.getFactoryProviderDependencies(wrapper)
: this.getClassDependencies(wrapper);
let isResolved = true;
const resolveParam = async (param: unknown, index: number) => {
@@ -292,6 +296,47 @@ export class Injector {
isResolved && (await callback(instances));
}
public getClassDependencies<T>(
wrapper: InstanceWrapper<T>,
): [InjectorDependency[], number[]] {
const ctorRef = wrapper.metatype as Type<any>;
return [
this.reflectConstructorParams(ctorRef),
this.reflectOptionalParams(ctorRef),
];
}
public getFactoryProviderDependencies<T>(
wrapper: InstanceWrapper<T>,
): [InjectorDependency[], number[]] {
const optionalDependenciesIds = [];
const isOptionalFactoryDep = (
item: InjectionToken | OptionalFactoryDependency,
): item is OptionalFactoryDependency =>
!isUndefined((item as OptionalFactoryDependency).token) &&
!isUndefined((item as OptionalFactoryDependency).optional);
const mapFactoryProviderInjectArray = (
item: InjectionToken | OptionalFactoryDependency,
index: number,
): InjectionToken => {
if (typeof item !== 'object') {
return item;
}
if (isOptionalFactoryDep(item)) {
if (item.optional) {
optionalDependenciesIds.push(index);
}
return item?.token;
}
return item;
};
return [
wrapper.inject?.map?.(mapFactoryProviderInjectArray),
optionalDependenciesIds,
];
}
public reflectConstructorParams<T>(type: Type<T>): any[] {
const paramtypes = Reflect.getMetadata(PARAMTYPES_METADATA, type) || [];
const selfParams = this.reflectSelfParams<T>(type);
@@ -430,8 +475,9 @@ export class Injector {
inquirer?: InstanceWrapper,
keyOrIndex?: string | number,
): Promise<InstanceWrapper<T>> {
const token = wrapper.token || wrapper.name;
const { name } = dependencyContext;
if (wrapper && wrapper.name === name) {
if (wrapper && token === name) {
throw new UnknownDependenciesException(
wrapper.name,
dependencyContext,
@@ -778,7 +824,7 @@ export class Injector {
return param === INQUIRER && parentInquirer;
}
private addDependencyMetadata(
protected addDependencyMetadata(
keyOrIndex: number | string,
hostWrapper: InstanceWrapper,
instanceWrapper: InstanceWrapper,

View File

@@ -8,9 +8,9 @@ import { InternalCoreModule } from './internal-core-module';
import { Module } from './module';
export class InstanceLoader {
private readonly injector = new Injector();
protected readonly injector = new Injector();
constructor(
private readonly container: NestContainer,
protected readonly container: NestContainer,
private readonly logger = new Logger(InstanceLoader.name, {
timestamp: true,
}),

View File

@@ -43,7 +43,7 @@ export class InstanceWrapper<T = any> {
public scope?: Scope = Scope.DEFAULT;
public metatype: Type<T> | Function;
public inject?: (string | symbol | Function | Type<any>)[];
public inject?: FactoryProvider['inject'];
public forwardRef?: boolean;
private readonly values = new WeakMap<ContextId, InstancePerContext<T>>();

View File

@@ -22,11 +22,11 @@ export abstract class ModuleRef {
constructor(protected readonly container: NestContainer) {}
public abstract get<TInput = any, TResult = TInput>(
typeOrToken: Type<TInput> | string | symbol,
typeOrToken: Type<TInput> | Function | string | symbol,
options?: { strict: boolean },
): TResult;
public abstract resolve<TInput = any, TResult = TInput>(
typeOrToken: Type<TInput> | string | symbol,
typeOrToken: Type<TInput> | Function | string | symbol,
contextId?: ContextId,
options?: { strict: boolean },
): Promise<TResult>;

View File

@@ -1,6 +1,7 @@
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 stringify from 'fast-safe-stringify';
import * as hash from 'object-hash';
@@ -46,7 +47,7 @@ export class ModuleTokenFactory {
}
private replacer(key: string, value: any) {
if (typeof value === 'function') {
if (isFunction(value)) {
const funcAsString = value.toString();
const isClass = /^class\s/.test(funcAsString);
if (isClass) {
@@ -54,7 +55,7 @@ export class ModuleTokenFactory {
}
return hash(funcAsString, { ignoreUnknown: true });
}
if (typeof value === 'symbol') {
if (isSymbol(value)) {
return value.toString();
}
return value;

View File

@@ -1,11 +1,11 @@
import {
Abstract,
ClassProvider,
Controller,
DynamicModule,
ExistingProvider,
FactoryProvider,
Injectable,
InjectionToken,
NestModule,
Provider,
ValueProvider,
@@ -31,12 +31,11 @@ import { NestContainer } from './container';
import { InstanceWrapper } from './instance-wrapper';
import { ModuleRef } from './module-ref';
export type InstanceToken =
| string
| symbol
| Type<any>
| Abstract<any>
| Function;
/**
* @note
* Left for backward compatibility
*/
export type InstanceToken = InjectionToken;
export class Module {
private readonly _id: string;

View File

@@ -1,9 +1,9 @@
import { Scope, Type } from '@nestjs/common';
import { SCOPE_OPTIONS_METADATA } from '@nestjs/common/constants';
import { Type } from '@nestjs/common';
import { MiddlewareConfiguration } from '@nestjs/common/interfaces/middleware/middleware-configuration.interface';
import { NestContainer } from '../injector/container';
import { InstanceWrapper } from '../injector/instance-wrapper';
import { InstanceToken } from '../injector/module';
import { getClassScope } from '../helpers/get-class-scope';
export class MiddlewareContainer {
private readonly middleware = new Map<
@@ -44,7 +44,7 @@ export class MiddlewareContainer {
middleware.set(
token,
new InstanceWrapper({
scope: this.getClassScope(metatype),
scope: getClassScope(metatype),
name: token,
metatype,
token,
@@ -66,9 +66,4 @@ export class MiddlewareContainer {
}
return this.configurationSets.get(moduleName);
}
private getClassScope<T = unknown>(type: Type<T>): Scope {
const metadata = Reflect.getMetadata(SCOPE_OPTIONS_METADATA, type);
return metadata && metadata.scope;
}
}

View File

@@ -81,7 +81,7 @@ export function isMiddlewareClass(middleware: any): middleware is Type<any> {
return (
middlewareArr[0] === 'function' &&
/[A-Z]/.test(middlewareArr[1]?.[0]) &&
typeof middleware.prototype?.use === 'function'
isFunction(middleware.prototype?.use)
);
}

View File

@@ -35,6 +35,7 @@ export class NestApplicationContext implements INestApplicationContext {
protected isInitialized = false;
protected readonly injector = new Injector();
private shouldFlushLogsOnOverride = false;
private readonly activeShutdownSignals = new Array<string>();
private readonly moduleCompiler = new ModuleCompiler();
private shutdownCleanupRef?: (...args: unknown[]) => unknown;
@@ -131,12 +132,23 @@ export class NestApplicationContext implements INestApplicationContext {
public useLogger(logger: LoggerService | LogLevel[] | false) {
Logger.overrideLogger(logger);
if (this.shouldFlushLogsOnOverride) {
this.flushLogs();
}
}
public flushLogs() {
Logger.flush();
}
/**
* Define that it must flush logs right after defining a custom logger.
*/
public flushLogsOnOverride() {
this.shouldFlushLogsOnOverride = true;
}
/**
* Enables the usage of shutdown hooks. Will call the
* `onApplicationShutdown` function of a provider if the

View File

@@ -121,8 +121,7 @@ export class NestApplication
return undefined;
}
const passCustomOptions =
isObject(this.appOptions.cors) ||
typeof this.appOptions.cors === 'function';
isObject(this.appOptions.cors) || isFunction(this.appOptions.cors);
if (!passCustomOptions) {
return this.enableCors();
}
@@ -319,13 +318,14 @@ export class NestApplication
}
private formatAddress(address: any): string {
if (typeof address === 'string') {
if (isString(address)) {
if (platform() === 'win32') {
return address;
}
const basePath = encodeURIComponent(address);
return `${this.getProtocol()}+unix://${basePath}`;
}
let host = this.host();
if (address && address.family === 'IPv6') {
if (host === '::') {
@@ -410,7 +410,7 @@ export class NestApplication
}
private host(): string | undefined {
const address = this.httpServer.address();
if (typeof address === 'string') {
if (isString(address)) {
return undefined;
}
return address && address.address;

View File

@@ -142,6 +142,9 @@ export class NestFactoryStatic {
const context = this.createNestInstance<NestApplicationContext>(
new NestApplicationContext(container, [], root),
);
if (this.autoFlushLogs) {
context.flushLogsOnOverride();
}
return context.init();
}

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "8.2.2",
"version": "8.3.1",
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -30,13 +30,13 @@
"@nuxtjs/opencollective": "0.3.2",
"fast-safe-stringify": "2.1.1",
"iterare": "1.2.1",
"object-hash": "2.2.0",
"object-hash": "3.0.0",
"path-to-regexp": "3.2.0",
"tslib": "2.3.1",
"uuid": "8.3.2"
},
"devDependencies": {
"@nestjs/common": "8.2.2"
"@nestjs/common": "8.3.1"
},
"peerDependencies": {
"@nestjs/common": "^8.0.0",

View File

@@ -23,18 +23,30 @@ export class RoutePathFactory {
): string[] {
let paths = [''];
const version = this.getVersion(metadata);
if (version && metadata.versioningOptions?.type === VersioningType.URI) {
const versionOrVersions = this.getVersion(metadata);
if (
versionOrVersions &&
metadata.versioningOptions?.type === VersioningType.URI
) {
const versionPrefix = this.getVersionPrefix(metadata.versioningOptions);
// Version Neutral - Do not include version in URL
if (version !== VERSION_NEUTRAL) {
if (Array.isArray(version)) {
paths = flatten(
paths.map(path => version.map(v => path + `/${versionPrefix}${v}`)),
if (Array.isArray(versionOrVersions)) {
paths = flatten(
paths.map(path =>
versionOrVersions.map(version =>
// Version Neutral - Do not include version in URL
version === VERSION_NEUTRAL
? path
: `${path}/${versionPrefix}${version}`,
),
),
);
} else {
// Version Neutral - Do not include version in URL
if (versionOrVersions !== VERSION_NEUTRAL) {
paths = paths.map(
path => `${path}/${versionPrefix}${versionOrVersions}`,
);
} else {
paths = paths.map(path => path + `/${versionPrefix}${version}`);
}
}
}

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