NestJS version 12 moves its core packages to ESM, while maintaining compatibility for existing CommonJS applications through Node.js's `require(esm)` support. This change necessitates Node.js 20.19+ or 22.12+. New projects generated with `nest new` can now choose between CJS or ESM, with ESM projects defaulting to Vitest and oxlint. Rspack replaces webpack as the monorepo bundler. Benchmarks indicate this transition is primarily a tooling cleanup rather than a performance gain.
The update significantly improves validation ergonomics. Route decorators like `@Body()`, `@Query()`, and `@Param()` now accept a `schema` option, allowing direct use of any Standard Schema compatible object from libraries such as Zod, Valibot, and ArkType without third-party wrappers. `class-validator` remains the default documented option. This approach allows developers to choose their preferred validation library while reducing boilerplate.
NestJS 12 introduces `@nestjs/observe`, an official observability SDK that integrates with the framework's lifecycle to report traces in terms of controllers and providers. This SDK offers richer context compared to patching the HTTP server. However, it is specific to NestJS, lacks out-of-the-box cross-stack correlation, and may lead to framework-level vendor lock-in. A new `nest deploy` command, which forwards to the Mau platform, also points towards first-party services.
Upgrading from NestJS v11 involves installing the latest CLI and running `nest upgrade`. This command updates all `@nestjs/*` packages to v12, bumps TypeScript to v6, and applies mechanical changes such as switching from GraphQL Playground to GraphiQL and updating to the NATS v3 client.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
NestJS, a TypeScript framework for Node.js, released version 12, which transitions core packages to ESM, adds first-class Standard Schema validation, and introduces an official observability SDK. This update modernizes the framework's tooling and improves developer experience for validation and monitoring.