Skip to content

Commit ca41f2e

Browse files
chore(deps): upgrade NestJS 10 -> 11 (#754) (#856)
Major version bump of the entire NestJS ecosystem, including required transitive dependencies that the v11 peer dependency tree now mandates. Framework - @nestjs/common, core, platform-express, platform-socket.io, websockets, testing -> ^11.1.27 - @nestjs/cli -> ^11.0.23, @nestjs/schematics -> ^11.1.0 - @nestjs/passport -> ^11.0.5, @nestjs/config -> ^4.0.4 - @nestjs/schedule (kept ^6.1.3, already NestJS 11 compatible) - @nestjs/swagger -> ^11.4.4 - @nestjs/cache-manager -> ^3.1.3 GraphQL/Apollo - @nestjs/apollo -> ^13.4.2 - @nestjs/graphql -> ^13.4.2 - @apollo/server -> ^5.5.1 (forced peer upgrade from @nestjs/apollo@13) Forced transitive deps (NestJS 11 peer requirements) - @nestjs/platform-express@11 now requires express ^5.0.0 -> express -> ^5.2.1, multer -> ^2.2.0, @types/express -> ^5.0.6, @types/multer -> ^2.0.0 - @nestjs/cache-manager@3 requires keyv >=5 -> keyv -> ^5.6.0 - @nestjs/graphql@13 requires ts-morph at the consumer level for code-first schema generation -> ts-morph -> ^28.0.0 Runtime requirements - engines.node: >=18.0.0 -> >=20.0.0 (NestJS 11 requires Node 20+) Source-code adjustments - src/app.module.ts: removed legacy `playground: true` from GraphQLModule.forRoot(...) because Apollo Server v5 (@apollo/server@5, peer dep of @nestjs/apollo@13) drops the classic GraphQL Playground in favour of Apollo Sandbox (default). Re-enabling the legacy plugin would resolve a peer-dep warning, but is unnecessary for this project. - src/main.ts: bumped the runtime Node version guard from `>= 18` to `>= 20` so an old CI image fails fast instead of crashing inside NestFactory.create with an unhandled engine error. Also removed a duplicate `app.useGlobalPipes(new ValidationPipe(...))` call that was silently overridden by a later call (now a single pipe with `transformOptions.enableImplicitConversion: true`). CI - .github/workflows/ci.yml: all five `actions/setup-node` jobs bumped from `node-version: 18` to `node-version: 20` to match the new eng requirement. Notes for reviewers - npm install emits an ERESOLVE warning for `@apollo/server-plugin-landing-page-graphql-playground@4` (a transitive of @nestjs/apollo@13). It is resolved automatically and is harmless because `playground: true` was removed; the plugin is never loaded at runtime. - `cache-manager-redis-store@^3.0.1` is kept for now. It is a cache- manager@5 store and is already incompatible with the cache-manager@7 stack pre-upgrade, so changing it is out of scope for this PR. Validation - npm install: succeeds (auto-overrides playground peer warning) - npm run build: passes (exit 0) - npm test: 224 passed, 2 skipped, 0 failed across 34 suites (+ 1 pre-existing skipped suite) closes #754 Co-authored-by: goodness-cpu <goodness-cpu@users.noreply.github.com> Co-authored-by: nanaf6203-bit <nanaf6203@gmail.com>
1 parent a1b8541 commit ca41f2e

5 files changed

Lines changed: 3136 additions & 2564 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Node.js
1717
uses: actions/setup-node@v3
1818
with:
19-
node-version: '18'
19+
node-version: '20'
2020
cache: 'npm'
2121

2222
- name: Install dependencies
@@ -49,7 +49,7 @@ jobs:
4949
- name: Setup Node.js
5050
uses: actions/setup-node@v3
5151
with:
52-
node-version: '18'
52+
node-version: '20'
5353
cache: 'npm'
5454

5555
- name: Install dependencies
@@ -90,7 +90,7 @@ jobs:
9090
- name: Setup Node.js
9191
uses: actions/setup-node@v3
9292
with:
93-
node-version: '18'
93+
node-version: '20'
9494
cache: 'npm'
9595

9696
- name: Install dependencies

0 commit comments

Comments
 (0)