npm / @nestjs/jwt
@nestjs/jwt
What changed in @nestjs/jwt 9 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-27.
3 breaking6 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@nestjs/jwt 128 changes
Breaking changes 3
CommonJS applications can require the package on Node 20.19+, 22.12+, and all of 24.x. On older Node releases, require() throws ERR_REQUIRE_ESM.
The package is published as pure ESM with an exports map. Import from the package root; CommonJS consumers can continue using require on supported Node versions.
Deep imports into build internals are no longer resolvable; import from the package root instead.
Fixes and other changes 5
Async signing now rejects when the secret provider rejects.
Async provider rejection is suppressed when signing fails because the payload is a string.
Adds type overloads for decode when the complete option is used, including a nullable return type.
Fixes ESM imports of jsonwebtoken.
The jsonwebtoken error classes are explicitly re-exported by name so they resolve correctly under ESM interop.
@nestjs/jwt 91 changes
Fixes and other changes 1
Peer dependencies were updated, which may affect package compatibility and installation.