release: v12.0.0 major release (approx. Q3 2026)#16391
release: v12.0.0 major release (approx. Q3 2026)#16391kamilmysliwiec wants to merge 166 commits intomasterfrom
Conversation
feat: standard schema validation pipe, and standard serializer, introduce internal export subpath
refactor: minor codebase tweaks
sample: migrate all samples to esm and vitest
refactor: migrate from mocha, chai, sinon to vitest
|
@angelhodar yeah we will just use vitest with oxc instead of vitest + swc. For bundling (monorepos) you could use rspack. For regular apps tsc/swc depending on what you prefer |
|
Hey! In v12 how decorators like
|
|
Nothing changes here @vaskouk, you can still use |
Sorry i didn't phrase it correctly, with class-validator yes, but what if someone wants to switch to zod schema validation. |
|
If you want to use zod, you need to use zod schemas, not classes with annotations. |
Yes got it, so the same like |
|
See 35-zod-validation sample in this PR |
Great! So for bundling its not possible to use Vite too? I was thinking if Vite could be the underlying tool for everything in nest (dev server + bundling + vitest), but as far as I understand from your answer its not possible right now with vite 8? |
In theory yes it is possible (I tried it a couple of months ago and for an hello world app it worked) using the environment API at least for production bundling, the big problem is the dev server because it is tailor made for the browser and always expect to inject into an html page, you can probably do something with a script that runs build in watch mode + nodemon or something similar to restart the server every time but it sounds hackish to me. It would be great to have a consistent environment for everything indeed (another nice thing would be to be able to create a single executable for distroless containers) but probably it is up to Kamil if he wants to try to reach to voidzero and figure out if it would indeed be possible to use Vite for everything in the nest cli. |
|
Vite is great but i dont think it's really necessary for a Nest app.
|
|
@kamilmysliwiec it's definitely not necessary and both Nevertheless i'm quite excited about v12 and looking forward to try it, thanks a lot for your effort improving Nestjs! |
So rspack will be come integated in v12? For example i am using rspack with my own config in v11, this will become obsolete or i missunderstood? |
|
As I see you NestJS is going to use Vite and Oxc stuff by default for ESM, wasn't you thinking about integration with Vite+ somehow? |
|
Amazing. What would be the best way to migrate a large codebase to v12? |
You should find solutions in the ORM's official docs that depend on the ORM you are using |
|
Hey! When can we have alpha version for all packages (specially swagger etc) to test the new versions? |
|
Hi there Excited to see lots of great things coming in NestJS v12 🚀
Wanted to share use case of our monorepo and NestJS-related issue with it. In a hope that things become smoother in v12 or future releases. Our monorepo uses pnpm workspaces + Turborepo(NestJS monorepo library mode is not used). We have a couple of internal packages referenced by NextJS frontend and NestJS backend apps. A difficulty is that while NextJS supports direct transpilation using Not a blocker as Compiled Packages serve good enough but still our monorepo setup would be even simpler if NestJS supported some equivalent to NextJS P.S. I'm not very familiar with rspack, could be that it supports such configuration Apologize upfront if this is a wrong place to post my feedback. |
chore: upgrade to vitest 4 with oxc
chore: upgrade typescript (v6)
chore: migrate to oxlint from eslint


PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Description
Approximate release window: early Q3 2026
Overview
ESM migration
require(esm)support.require(esm)was the missing piece that made the move to ESM practical - without it, the migration wouldn't have made much sense. https://joyeecheung.github.io/blog/2024/03/18/require-esm-in-node-js/ https://nodejs.org/api/esm.html#requireCLI (ESM/CJS)
Testing stack changes
Linter
Website redesign
Minor breaking changes
Schema support in route decorators
@Body,@Query, etc.) will support a newschemaoption that accepts a Standard Schema–compatible object. https://standardschema.dev/)class-validator.PRs:
transformsignatures for improved type safety #16147isHttpErrorcheck stricter #14753Packages will soon (possibly in Q2) be released under the
nexttag to let everyone play with them before they make it to the officiallatesttag.Does this PR introduce a breaking change?
Other information