You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NestJS 12 is centered around ESM-ready packages, first-class Standard Schema support for validation and serialization, a rebuilt CLI, and native observability through the new @nestjs/observe SDK.
Existing CommonJS applications keep working — migrating your own code to ESM is entirely optional.
Upgrade the CLI first, since the upgrade command ships with it:
npm i -g @nestjs/cli@latest
Then, from the root of your project:
nest upgrade
nest upgrade moves every @nestjs/* package to its v12-compatible major at once and applies the mechanical parts of the migration for you — nest-cli.json webpack options, the GraphQL playground → graphiql rename and subscriptions transport swap, the NATS package replacement, @nestjs/config validation options, Jest and Joi bumps — then prints a report of everything it changed and everything you still need to review by hand. Run it with --dry-run first to see that report without touching your files.
It deliberately does not migrate your project to ESM, Vitest, or oxlint. Those are the defaults for newly generated projects; existing projects adopt them on their own schedule.
Node.js: v12 requires Node.js v20.19+ or v22.12+. Both require(esm) and the ESM packages depend on it; the upgrade command refuses to run on older releases (including the 21.x line). The latest active LTS is recommended.
Highlights
ESM packages
All core Nest packages now ship as ESM. Thanks to require(esm) in modern Node.js, most existing CommonJS applications continue to work without a rewrite. Review custom bootstrapping scripts, build tooling, and test runners if they assume CommonJS-only packages.
nest new now asks whether to scaffold a CommonJS or an ESM project.
Standard Schema validation
Route parameter decorators — @Body(), @Query(), @Param(), @RawBody() — accept a new schema option, designed for Standard Schema compatible libraries such as Zod, Valibot, and ArkType:
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
1 paths audited Performance: 10 (🔴 down 31 from production) Accessibility: 88 (no change from production) Best Practices: 92 (🔴 down 8 from production) SEO: 100 (no change from production) PWA: - View the detailed breakdown and full score reports
1 paths audited Performance: 85 (🔴 down 6 from production) Accessibility: 100 (no change from production) Best Practices: 100 (no change from production) SEO: 95 (no change from production) PWA: - View the detailed breakdown and full score reports
1 paths audited Performance: 79 (🔴 down 9 from production) Accessibility: 95 (no change from production) Best Practices: 92 (🔴 down 8 from production) SEO: 75 (no change from production) PWA: - View the detailed breakdown and full score reports
1 paths audited Performance: 39 (🔴 down 45 from production) Accessibility: 97 (no change from production) Best Practices: 92 (🔴 down 8 from production) SEO: 97 (🟢 up 9 from production) PWA: - View the detailed breakdown and full score reports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependenciesPull requests that update a dependency filejavascriptPull requests that update javascript code
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps @nestjs/core from 11.2.1 to 12.0.1.
Release notes
Sourced from @nestjs/core's releases.
... (truncated)
Commits
4c751c5chore(release): publish v12.0.1 release3c25112chore: update peer deps6494a6cchore(release): publish v12.0.0 releasec9d59f2chore: expose missing internals45485b5fix(core): circular durable providers issue #17562f94e9ebfix(core): preserve middleware arity and harden instance decorator1dcbc25fix(core): instrument midldeware issue #17554f5bf4dddocs(core): update Mercure SSE header comment to current pathedb0034Merge branch 'master' into v12.0.0e255755chore: resolve conflicts, minor fixes