Skip to content

chore: TypeScript 5.9 (nodenext), NestJS 11, Jest 30 - #59

Open
jrhender wants to merge 2 commits into
chore/pnpm-workspaces-node22from
chore/ts5-nestjs11-jest30
Open

chore: TypeScript 5.9 (nodenext), NestJS 11, Jest 30#59
jrhender wants to merge 2 commits into
chore/pnpm-workspaces-node22from
chore/ts5-nestjs11-jest30

Conversation

@jrhender

@jrhender jrhender commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Second of five stacked PRs for #57 (stacked on #58).

  • TypeScript 4.8 → 5.9 with module/moduleResolution: nodenext and target: es2022. nodenext is what later allows type-checked require() of the ESM-only Credo 0.6+ packages. skipLibCheck added to the root tsconfig (the app and e2e tsconfigs already had it), which also makes the @peculiar/* pins from chore: replace Rush with pnpm workspaces and move to Node 22 #58 unnecessary — removed.
  • NestJS 10 → 11 (Express 5): @nestjs/config ^4, @nestjs/typeorm ^11, @nestjs/swagger ^11, @nestjs/axios ^4, @nestjs/serve-static ^5, reflect-metadata ^0.2. Express 5 needs the '{*splat}' middleware wildcard instead of '*', and ConfigModule.forRoot can now return a Promise<DynamicModule>.
  • @nestjs/swagger 11 requires additionalProperties on 'object'-typed @ApiProperty declarations; openapi.json regenerated (operationIds gain a _v1 suffix; no path or schema changes).
  • Jest 29 → 30 (ts-jest 29.4, @types/jest 30), supertest 7, @types/node 24 declared explicitly in every package to keep a single hoisted copy.

Known follow-up: @nestjs/swagger warns about the duplicate ExchangeResponseDto class name (exchanges vs workflows modules); it becomes an error in swagger v12.

Verification

  • Workspace builds; all 68 unit tests and the e2e project pass; app boots, seeds, serves Swagger; middleware wildcard verified against an unknown route (404 logged by HttpLoggerMiddleware)

Part of #57

🤖 Generated with Claude Code

- TypeScript 4.8 -> 5.9 with module/moduleResolution 'nodenext' and
  target es2022. nodenext is what later allows type-checked require()
  of the ESM-only Credo 0.6+ packages. skipLibCheck added to the root
  tsconfig (the app and e2e tsconfigs already had it), which also makes
  the @peculiar/* and webcrypto-core version pins from the workspace
  migration unnecessary - removed.
- NestJS 10 -> 11 (Express 5): @nestjs/config ^4, @nestjs/typeorm ^11,
  @nestjs/swagger ^11, @nestjs/axios ^4, @nestjs/serve-static ^5,
  reflect-metadata ^0.2. Express 5 requires the middleware wildcard
  route '{*splat}' instead of '*', and @nestjs/config's forRoot can now
  return a Promise<DynamicModule>.
- @nestjs/swagger 11 requires additionalProperties on 'object' typed
  @ApiProperty declarations; openapi.json regenerated (operationIds now
  carry a _v1 suffix, no path/schema changes).
- Jest 29 -> 30 (ts-jest 29.4, @types/jest 30), supertest 7,
  @types/node 24 declared explicitly in every package to keep a single
  hoisted copy.

Verified: workspace builds, all unit tests (68) and the e2e project
pass on Node 22; the 4 Resident Card e2e tests that need to fetch the
w3id.org JSON-LD context are environment-limited locally and covered
in CI. App boots, seeds DIDs, serves Swagger, 404 middleware wildcard
works on Express 5.

Known follow-up: @nestjs/swagger warns about the duplicate
ExchangeResponseDto class name (exchanges vs workflows modules); it
becomes an error in swagger v12.

Part of #57

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: John Henderson <jrhender@users.noreply.github.com>
@jrhender
jrhender force-pushed the chore/pnpm-workspaces-node22 branch from 57f8efe to 354d97e Compare July 3, 2026 13:18
@jrhender
jrhender force-pushed the chore/ts5-nestjs11-jest30 branch from a7d0da9 to 5d25207 Compare July 3, 2026 13:18
Express 5 no longer defaults req.body to {} for bodyless requests (the
behaviour also varies with the Node version of the HTTP client). The VC
API spec allows starting/re-entering an exchange by posting an empty
body, which crashed the exchange participation endpoints with
"Cannot read properties of undefined" (caught by the Resident Card
workflow e2e test in CI on Node 22).

Registered as an AppModule middleware so it applies to the production
app and to test apps built directly from AppModule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: John Henderson <jrhender@users.noreply.github.com>
@jrhender
jrhender force-pushed the chore/ts5-nestjs11-jest30 branch from 5d25207 to a3e8ce4 Compare July 3, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant