Skip to content

release: v12.0.0 major release (approx. Q3 2026) - #16391

Merged
kamilmysliwiec merged 219 commits into
masterfrom
v12.0.0
Aug 14, 2026
Merged

release: v12.0.0 major release (approx. Q3 2026)#16391
kamilmysliwiec merged 219 commits into
masterfrom
v12.0.0

Conversation

@kamilmysliwiec

@kamilmysliwiec kamilmysliwiec commented Feb 19, 2026

Copy link
Copy Markdown
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe: v12.0.0 release

Description

Approximate release window: early Q3 2026

Overview

  1. ESM migration

  2. CLI (ESM/CJS)

    • The NestJS CLI will prompt users to choose whether to generate a CJS or ESM project (ESM projects will use vitest + oxlint by default)
    • Webpack -> Rspack ✅ (webpack is now deprecated)
  3. Testing stack changes

  4. Linter

  5. Website redesign

    • A complete redesign of the NestJS websites is coming soon - we're taking them to the next level.
  6. Minor breaking changes

    • There will be a few minor breaking changes across other NestJS packages, but nothing significant.
  7. Schema support in route decorators

    • All route decorators (e.g., @Body, @Query, etc.) will support a new schema option that accepts a Standard Schema–compatible object. https://standardschema.dev/)
    • This enables the use of modern validation libraries such as Zod, Valibot, ArkType, and others, as an alternative to class-validator.
    • The same capability will also be available in the serializer interceptor.

PRs:

Packages will soon (possibly in Q2) be released under the next tag to let everyone play with them before they make it to the official latest tag.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

glebbash and others added 30 commits March 4, 2025 12:52
feat: standard schema validation pipe, and standard serializer, introduce internal export subpath
sample: migrate all samples to esm and vitest
refactor: migrate from mocha, chai, sinon to vitest
@kraikov

kraikov commented Jul 31, 2026

Copy link
Copy Markdown

Any plans for TypeScript 7?

@pasha-vuiko

Copy link
Copy Markdown

Any plans for TypeScript 7?

@kraikov currently it is not possible to integrate as TS 7 lacks programmatic API which NestJS CLI relies on, it will be needed to wait till TS 7.1 lands with the new programmatic API support

@kraikov

kraikov commented Jul 31, 2026

Copy link
Copy Markdown

Any plans for TypeScript 7?

@kraikov currently it is not possible to integrate as TS 7 lacks programmatic API which NestJS CLI relies on, it will be needed to wait till TS 7.1 lands with the new programmatic API support

Hm, you could still use NestJS 12 with TS7, however, you won't be able to use the CLI, right?

@wonderbeel

Copy link
Copy Markdown

Any plans for TypeScript 7?

@kraikov currently it is not possible to integrate as TS 7 lacks programmatic API which NestJS CLI relies on, it will be needed to wait till TS 7.1 lands with the new programmatic API support

Hm, you could still use NestJS 12 with TS7, however, you won't be able to use the CLI, right?

You can use tsc instead of nest build to build directly but if you rely on a CLI plugin (eg, swagger to generate the openapi spec) that part will not work; you can already check this today, review your usage of the CLI and if you don't use it too much you can probably find alternative solutions/workaround (eg, you aren't using any CLI plugin, you can probably directly compile with tsc and do tsc + node -w for dev mode) but if you are deep into it your best bet will be to wait for typescript 7.1+.
Typechecking on the other hand should already be possible to do but just be careful that you have the 2 versions of typescript (typescript 7 that you install and typescript 5/6 for nest cli) not clashing by accident, depending on your package manager it could be simple to solve or way more involved.

@kraikov

kraikov commented Jul 31, 2026

Copy link
Copy Markdown

Any plans for TypeScript 7?

@kraikov currently it is not possible to integrate as TS 7 lacks programmatic API which NestJS CLI relies on, it will be needed to wait till TS 7.1 lands with the new programmatic API support

Hm, you could still use NestJS 12 with TS7, however, you won't be able to use the CLI, right?

You can use tsc instead of nest build to build directly but if you rely on a CLI plugin (eg, swagger to generate the openapi spec) that part will not work; you can already check this today, review your usage of the CLI and if you don't use it too much you can probably find alternative solutions/workaround (eg, you aren't using any CLI plugin, you can probably directly compile with tsc and do tsc + node -w for dev mode) but if you are deep into it your best bet will be to wait for typescript 7.1+. Typechecking on the other hand should already be possible to do but just be careful that you have the 2 versions of typescript (typescript 7 that you install and typescript 5/6 for nest cli) not clashing by accident, depending on your package manager it could be simple to solve or way more involved.

Thanks. I'm actually looking to bootstrapping a new project. For swagger I can go with schema-first (zod) so not a problem there.

@gperdomor

Copy link
Copy Markdown
Contributor

Maybe can we use what Nx describe here https://nx.dev/docs/technologies/typescript/guides/typescript-7

feat(microservices): expose transport server getter
Copilot AI review requested due to automatic review settings August 3, 2026 06:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@oxvijay

oxvijay commented Aug 6, 2026

Copy link
Copy Markdown

Can I start new projects using NestJS 12 now?

@vaskouk

vaskouk commented Aug 6, 2026

Copy link
Copy Markdown

Hey. Will we also support bullmq v6 anytime soon ?

@kamilmysliwiec

Copy link
Copy Markdown
Member Author

@vaskouk done
@oxvijay instructions here https://trilon.io/blog/nestjs-12-is-coming

@AbbasSrour

Copy link
Copy Markdown

please don't make us use .js imports, fingers crossed

@ekalkutin

Copy link
Copy Markdown

please don't make us use .js imports, fingers crossed

u better start already using it. a couple of days and u won't feel difference. p.s. i felt the same

@fabian-hiller

Copy link
Copy Markdown

Hey, I am the author of Valibot and co-created Standard Schema. Great to see the new schema option. I am happy to help with the docs for it and can contribute a Valibot example once the docs work starts. Just ping me.

micalevisk and others added 3 commits August 9, 2026 15:52
`useBodyParser<Options = NestExpressBodyParserOptions>()` never checked its options argument.
`Options` occurs only inside `Omit<Options, 'verify'>`, a non-inferrable position, so it always
fell back to its default, and that default carries a `[key: string]: unknown` index signature.
`keyof` on it is `string | number`, `Exclude<string | number, 'verify'>` removes nothing, and the
resulting `Pick<T, string | number>` collapses to bare index signatures. Every call therefore
accepted any key, any value type, and even `verify` (the single option the signature claims to
remove, and the one Nest reserves to capture `rawBody`).

Key the options off the `parser` argument instead. `NestExpressBodyParserOptionsMap` maps each
parser to the options object its Express factory accepts, derived from `express` itself so the two
cannot drift, and `NestExpressBodyParserType` is now `keyof` that map. The type parameter is
inferred from `parser`, a real inference site, so `useBodyParser('json', ...)` accepts only
`express.json` options and now rejects typos, wrong value types, options belonging to a different
parser, and `verify`.

This is a types-only change; no emitted JavaScript differs.

`NestExpressBodyParserOptions` is
deprecated rather than removed, and calls that pass no explicit type argument are unaffected.

BREAKING CHANGE: `useBodyParser` now takes the parser type as its first type argument.
Calls that
pass an explicit options type, such as `app.useBodyParser<OptionsUrlencoded>('urlencoded', {...})`, no longer compile.
Drop the type argument and let it be inferred from the parser argument.
…eBodyParser-express

 feat: narrow body parser options to the selected parser for Express
@snapydziuba

Copy link
Copy Markdown

@stafyniaksacha

Copy link
Copy Markdown

Is there a reflection about making Fastify the default HTTP handler rather than Express?

kamilmysliwiec and others added 2 commits August 14, 2026 16:05
Resolves conflicts between the v12 ESM/vitest migration and master:
- Ported the SseSignal/AbortController SSE feature into the ESM codebase
  (sse-signal.decorator, router-response-controller, router-execution-context,
  interceptors-consumer transformDeferred rewrite)
- Converted master's chai/sinon/mocha test additions to vitest style
- Kept v12 sample structure (oxlint/vitest) while adopting master's
  renovate dependency bumps
- Regenerated package-lock.json

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kamilmysliwiec
kamilmysliwiec merged commit 09dba60 into master Aug 14, 2026
3 checks passed
@nestjs nestjs locked and limited conversation to collaborators Aug 14, 2026
@kamilmysliwiec

Copy link
Copy Markdown
Member Author

once v12 is released, i'll share an article link with the details here!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.