npm / @nestjs/schematics
@nestjs/schematics
What changed in @nestjs/schematics 9 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-26.
22 breaking1 deprecations8 new APIs and options8 behavior and defaults28 tooling19 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@nestjs/schematics 1279 changes
Breaking changes 22
Prefers the module file whose name matches the element name.
The Node.js engine requirement is aligned with @angular-devkit/schematics, affecting which Node.js versions developers can use.
The angular schematic has been removed.
@nestjs/schematics requires Node.js v22.22.3+, v24.15+, or v26+ to run generators and upgrades.
Jest can require Nest 12 ESM-only packages only on Node.js 24.9+; older versions fail with this error.
The upgrade renames the removed GraphQL playground option to graphiql.
The upgrade switches subscriptions from subscriptions-transport-ws to graphql-ws and updates package.json.
The upgrade raises Jest to version 30.
The upgrade raises Joi to ^18 for its Standard Schema support.
The upgrade warns that the JSONCodec helper has been dropped.
The upgrade warns that lifecycle hook ordering now changes by component hierarchy level.
The generated lint script runs oxlint on src/ and test/ instead of using the ESLint config and plugin chain.
The upgrade rewrites nats imports to the v3 @nats-io packages.
Custom deserializers now receive the full NATS message; read it with msg.json().
The package is now published as pure ESM, with NodeNext compilation and explicit .js extensions on internal imports.
The package now requires Node.js >= 22.12.0.
In v12.0.x, a subclass that declares its own constructor no longer inherits optional markers from its parent's constructor; declare the markers again to avoid an UnknownDependenciesException.
The upgrade warns that the StringCodec helper has been dropped.
The package declares TypeScript >= 6.0.0 as a peer dependency.
The upgrade moves library-specific @nestjs/config validation options, such as Joi allowUnknown and abortEarly, under validationOptions.libraryOptions.
The upgrade migrates nest-cli.json builders from webpack to Rspack and updates affected package.json scripts.
The upgrade drops the deprecated webpack: false option.
Deprecations 1
The upgrade diagnoses projects affected by the refined transform signature.
New APIs and options 6
Adds a minimal option for generating a one-file application.
Libraries can now be generated without a prefix.
The observe integration adds the dependency and wires createObserveModule() into the root module for tracing, correlated logs, metrics, and alarms.
nest new and nest upgrade can use this opt-in flag to preconfigure @nestjs/observe.
ConsoleLogger's new structured-params behavior can be opted out of with structuredParams: false.
The application schematic adds a type option to choose esm or cjs; it defaults to esm.
Behavior and default changes 8
Generated TypeScript configuration enables isolatedModules.
Generated projects set module to nodenext.
Generated projects set moduleResolution to nodenext.
Rspack replaces webpack as the default builder in generated CLI configuration.
All generated projects use oxlint by default.
Generated TypeScript configuration targets ES2023.
Generated projects now use TypeScript 6.
Generated ESM projects use Vitest by default.
Tooling 27
Generated applications now tell coding agents about Nest's documentation and packages.
The observe prompt around the upgrade was reworded.
Coding agents are told where the production data is.
The upgrade guidance points to npx @nestjs/observe to connect Observe.
CLI config file names now align with the CLI.
ESM Vitest configs use native tsconfig paths.
Pins LF line endings via .gitattributes.
Formatting now honors the project Prettier config.
E2e tests now run for every CommonJS app.
Generated ESM e2e tests now resolve supertest types.
The schematics now read the oxlint config and run the rule it declares.
Generated application tsconfig files now set an explicit rootDir.
Vite is now declared explicitly for generated tests.
The upgrade diagnoses projects affected by generic ArgumentMetadata.
The CLI supports bun as a package manager.
Custom webpack configuration files are not migrated automatically; the upgrade asks developers to port them by hand.
Generators detect ESM projects and append .js to generated relative imports, including imports injected into existing modules; CJS projects are unaffected.
CJS-generated projects keep Jest, with its configuration moved from package.json into this dedicated file.
Prompts users to choose a CommonJS or ESM project layout.
This alias runs the new v11-to-v12 upgrade schematic.
A new schematic migrates Nest v11 projects to v12, refuses other versions, and reports changes, follow-up actions, and warnings.
The upgrade schematic raises known Nest packages to v12 and reports packages without a known v12-compatible release.
The observe integration reminds developers to set this environment variable.
The decorator schematic now generates decorators in the Reflector.createDecorator() form.
Generated TypeScript configuration enables resolvePackageJsonExports.
ESM-generated projects include this Vitest end-to-end configuration file.
ESM-generated projects include Vitest configuration in this file.
Fixes and other changes 15
The resource schematic installs @nestjs/mapped-types using the project's package manager.
The upgrade schematic now bumps companion packages to their v12 majors.
The JavaScript application template is updated for Babel 8.
The upgrade schematic now runs Jest with --experimental-vm-modules, matching new projects.
Switching to Rspack now adds the builder packages.
The upgrade schematic now reports tsconfig.json changes needed for TypeScript 6.
Reads the key pair from the environment before using placeholders.
Monorepo updates now target the CLI config file that is in use.
Avoids duplicating a shorthand metadata property.
Comments are preserved when JSON files are updated.
Scaffolded projects now use @nestjs/observe 0.3.
Monorepo schematics now resolve ESM path aliases and the project rootDir.
Generated test configuration now follows the inherited root dir.
CommonJS consumers can continue using require('@nestjs/schematics') on supported Node versions through Node's require(esm) support.
In v12.0.x, a subclass without its own constructor also loses its parent's optional markers; starting with v12.1, those markers are kept.
@nestjs/schematics 113 changes
New APIs and options 1
Adds an option to run Prettier before writing generated files.
Tooling 1
Library and sub-app names are sorted to reduce git merge conflicts.
Fixes and other changes 1
The e2e template adds an after hook for app.close().
@nestjs/schematics 102 changes
Fixes and other changes 2
JSON parsing is fixed for commented JSON files.
Fixes updating a non-existing NestJS module.
@nestjs/schematics 92 changes
New APIs and options 1
Generators support a custom suffix for spec files, letting developers choose the naming convention for generated tests.
Fixes and other changes 1
Fixes generated import formatting when the imports list has no indentation.