# NestJS v12.0.0 - Product: NestJS (https://whatsnew.fyi/product/nestjs) - Vendor: NestJS - Date: 2026-08-27 - Version: v12.0.0 - Original notes: https://github.com/nestjs/nest/releases/tag/v12.0.0 - Permalink: https://whatsnew.fyi/product/nestjs/releases/v12.0.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **added** — ESM packages for all core Nest packages with CommonJS compatibility through require(esm) in Node.js v20.19+ or v22.12+ - **added** — Standard Schema validation support via schema option in @Body(), @Query(), @Param(), and @RawBody() decorators - **added** — StandardSchemaValidationPipe for validating requests against Standard Schema compatible libraries - **added** — StandardSchemaSerializerInterceptor for validating and transforming outgoing responses with Standard Schema - **added** — @nestjs/observe SDK for native observability with automatic instrumentation of HTTP, GraphQL, gRPC, microservice transports, queue consumers, and cron runs - **added** — Route conflict diagnostics with routeConflictPolicy and routeResolutionStrategy options to detect duplicate and shadow routes - **added** — Machine-readable error codes via errorCode option in HttpExceptionOptions - **added** — Structured logging params in ConsoleLogger treating plain objects after messages as structured fields - **changed** — @nestjs/config validation now accepts Standard Schema compatible schemas via validationSchema option - **changed** — nest new command now offers choice to scaffold CommonJS or ESM projects - **changed** — nest upgrade command applies mechanical migrations including webpack options, GraphQL playground to graphiql rename, NATS package replacement, and Jest and Joi bumps - **changed** — Node.js minimum requirement is v20.19+ or v22.12+ - **removed** — Implicit CommonJS-only packages support removed in favor of ESM-ready packages #### NestJS v12.0.0 NestJS 12 is centered around **ESM-ready packages**, **first-class [Standard Schema](https://standardschema.dev/) 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. 📖 Full [migration guide](https://docs.nestjs.com/migration-guide) --- ##### Upgrading Upgrade the CLI first, since the upgrade command ships with it: ```bash npm i -g @nestjs/cli@latest ``` Then, from the root of your project: ```bash 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: ```ts @Post() create(@Body({ schema: createUserSchema }) body: CreateUserDto) { return this.usersService.create(body); } @Get(':id') findOne(@Param('id', { schema: z.coerce.number().int().positive() }) id: number) { return this.usersService.findOne(id); } ``` The decorator only attaches metadata; register the new `StandardSchemaValidationPipe` to validate against it: ```ts app.useGlobalPipes(new StandardSchemaValidationPipe()); ``` The same schemas feed OpenAPI generation. The decorator-based `class-validator` workflow remains fully supported, with no plan to remove it. ###### Standard Schema serialization `StandardSchemaSerializerInterceptor` validates and transforms outgoing responses with the same ecosystem: ```ts @UseInterceptors(StandardSchemaSerializerInterceptor) @SerializeOptions({ schema: userResponseSchema }) @Get(':id') findOne(@Param('id') id: string) { return this.usersService.findOne(id); } ``` Pick per use case: `ValidationPipe` / `ClassSerializerInterceptor` for class-based DTOs, the Standard Schema variants when your schemas already exist. ###### Native observability — `@nestjs/observe` The official [NestJS Observe](https://observe.nestjs.com) SDK plugs into Nest's own request lifecycle through the `instrument` application option, rather than patching the HTTP server like a generic APM agent. Requests, jobs, errors, and traces are reported in terms of your controllers, providers, resolvers, and queue consumers: ```ts export const { ObserveModule, ObserveInstrument } = createObserveModule(); const app = await NestFactory.create(AppModule, { instrument: ObserveInstrument, }); ``` Auto-instrumentation covers HTTP, GraphQL, gRPC, and microservice transports, plus queue _[Truncated at 4000 characters — full notes: https://github.com/nestjs/nest/releases/tag/v12.0.0]_