fix(deps): update nest monorepo to v12 - #788
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
11.0.24→12.0.011.2.1→12.0.14.0.4→12.0.011.2.1→12.0.111.2.1→12.0.111.1.0→12.0.011.2.1→12.0.1Release Notes
nestjs/nest-cli (@nestjs/cli)
v12.0.0Compare Source
nestjs/nest (@nestjs/common)
v12.0.1Compare Source
v12.0.0Compare Source
v11.2.3Compare Source
v11.2.2Compare Source
What's changed
nestjs/config (@nestjs/config)
v12.0.0Compare Source
What's Changed
@nestjs/configis now a native ES module, environment validation is built on Standard Schema instead of Joi-specific code, and the major version is aligned with the Nest 12 release line (there is no5.x—4.0.4goes straight to12.0.0).ESM migration
The package is published as pure ESM (
"type": "module", compiled withNodeNext) behind a properexportsmap. The legacy rootindex.js/index.d.tsshims are gone, and deep imports into build internals are no longer resolvable — import from the package root.require(esm)— CommonJS still worksYou do not need to convert your app to ESM. Thanks to Node's
require(esm)support (Node 20.19+ / 22.12+), a CommonJS app can keep usingrequire('@nestjs/config')unchanged.Validation is now Standard Schema based
validationSchemaaccepts any schema implementing the Standard Schema spec — Zod (v3, v4, v4-mini), Valibot, ArkType, Joi 18+, and anything else that adopts it. There is no longer any Joi-specific code path in the module, and Joi is no longer implied as the validation library.Joi keeps working — it implements Standard Schema as of v18 — and the historical
abortEarly: false/allowUnknown: truedefaults are still applied automatically for Joi schemas, so existing Joi setups behave as before.Breaking:
validationOptionsshapeOptions are now the Standard Schema
Optionsobject, and library-specific settings move underlibraryOptions:The generic parameter changed accordingly:
ConfigModuleOptions<ValidationOptions extends StandardSchemaV1.Options>, andvalidationSchemais typed asStandardSchemaV1rather thanany— a schema that does not implement the spec is now a compile-time error instead of a runtime one.Breaking: validation error format
Issues are formatted by this package rather than by the schema library. Each issue is rendered as
path: messageand issues are newline-separated:Anything asserting on the old single-line Joi message string needs updating.
Object schemas no longer strip your environment
Schemas like Zod's
z.object()drop undeclared keys. Those variables are now merged back into the validated result, so unrelated variables stay reachable through bothprocess.envandConfigServiceinstead of disappearing after validation.Breaking: peer dependencies
@nestjs/commonis now^11.0.0 || ^12.0.0. Nest 10 is no longer supported — stay on@nestjs/config@4if you are still on Nest 10.Breaking:
lodashreplaced withes-toolkitThe
lodashruntime dependency is gone, replaced byes-toolkit. This is transparent unless you relied on the transitivelodashinstall.Breaking: stricter
ConfigService.get()inferenceThe explicit-type parameter on
get()/getOrThrow()is now constrained to the value at the given path (R extends PathValue<T, P>), fixing the long-standing bug where an unrelated type could be asserted for a key. Call sites that passed a type inconsistent with the config shape will now fail to compile — that mismatch was always a latent bug.New:
overrideValues from
.envfiles can now take precedence over pre-existingprocess.envvariables:Default remains
false— the existing "process.env wins" behavior.New: custom
parser.envfiles no longer have to be dotenv-formatted. Supply any function that turns aBufferinto an object — YAML, TOML, JSON, whatever:The parser is used both at bootstrap and for variable re-interpolation inside
ConfigService.Other changes
dotenv17.4.2,dotenv-expand13.ConditionalModuletimeout error message ("Bause" → "Because").nestjs/nest (@nestjs/core)
v12.0.1Compare Source
v12.0.0Compare Source
v11.2.3Compare Source
v11.2.2Compare Source
What's changed
nestjs/nest (@nestjs/platform-express)
v12.0.1Compare Source
v12.0.0Compare Source
v11.2.3Compare Source
What's Changed
Full Changelog: nestjs/nest@v11.2.2...v11.2.3
v11.2.2Compare Source
What's changed
nestjs/schematics (@nestjs/schematics)
v12.0.0Compare Source
What's Changed
@nestjs/schematicsis now a native ES module, and the major version is aligned with the Nest 12 release line. Beyond the package itself going ESM, the bigger change is what it generates:nest newnow scaffolds ESM applications by default, and a brand-newnest upgradeschematic migrates existing v11 projects to v12.ESM migration
The package is published as pure ESM (
"type": "module", compiled with NodeNext). All internal imports carry explicit.jsextensions and the build output is ESM-only.The package now requires Node.js >= 22.12.0 and declares a
typescript >= 6.0.0peer dependency.prettier ^3remains an optional peer, used only when--formatis passed.require(esm) — CommonJS still works
You do not need to convert your tooling to ESM. Thanks to Node's
require(esm)support, CommonJS consumers can stillrequire('@nestjs/schematics')on the supported Node versions, so custom collections and CJS scripts that drive the schematics programmatically keep working unchanged.nest newgenerates ESM by defaultThe
applicationschematic gained atypeoption (esm|cjs) that defaults toesm:"type": "module", Vitest as the test runner (vitest.config.ts/vitest.config.e2e.ts), and"types": ["vitest/globals", "node"].package.jsoninto a dedicatedjest.config.ts.Pass
--type cjs(or answer the prompt) to keep the classic CommonJS layout.Generated project defaults
module/moduleResolutionset tonodenext,resolvePackageJsonExports: true,isolatedModules: true, andtarget: ES2023.oxlint.jsonand a"lint": "oxlint src/ test/"script instead of the ESLint config and its plugin chain.nest-cli.json.@nestjs/common,@nestjs/core,@nestjs/platform-express,@nestjs/testing).ESM-aware generators
Every element generator (
module,controller,service,resource,middleware,pipe, …) now detects whether the target project is ESM and appends.jsto generated relative imports accordingly — including the imports it injects into an existing@Module()when wiring up a newly generated element. CJS projects are unaffected.New:
nest upgradeA new schematic (aliased
nest update) migrates a Nest v11 project to v12. It refuses to run on anything that isn't v11, then applies the migration in steps and prints a report of every change, every follow-up action, and every warning.Dependencies — bumps all known
@nestjs/*packages to^12.0.0(GraphQL packages to^14.0.0), raisestypescriptto^6.0.0andengines.nodeto>=20.19.0, and reports any@nestjs/*package whose v12-compatible release it doesn't know about.tsconfig — flags
module: commonjswith legacy module resolution and anymoduleResolutionthat TypeScript 6 dropped, and points out a missingrootDirintsconfig.build.json(TS6error TS5011).@nestjs/config— moves library-specificvalidationOptions(Joi'sallowUnknown,abortEarly, …) undervalidationOptions.libraryOptions, and raisesjoito^18for its Standard Schema support.GraphQL — renames the removed
playgroundoption tographiql, and switchessubscriptions-transport-wsover tographql-ws, updatingpackage.jsonto match.NATS — rewrites
natsimports to the v3@nats-iopackages and warns about the droppedStringCodec/JSONCodechelpers and the new packet serialization (custom deserializers now receive the full NATS message; read it withmsg.json()).Testing — raises
jest,@types/jest, andts-jestto Jest 30, and warns that because the Nest 12 packages are ESM-only, Jest can onlyrequire()them on Node.js 24.9+ (older versions fail withERR_REQUIRE_ASYNC_MODULE).CLI config — migrates
nest-cli.jsonbuilders from webpack to Rspack, drops the deprecatedwebpack: falseoption, updates affectedpackage.jsonscripts, and asks you to port any custom webpack config file by hand.Diagnostics — scans the project and warns about the refined
PipeTransform#transformsignature and genericArgumentMetadata, the newConsoleLoggerstructured-params behaviour (opt out withstructuredParams: false), and the change to lifecycle hook ordering by component hierarchy level.Options:
--observe,--skip-install,--tag <dist-tag>,--format.@nestjs/observeintegrationBoth
nest new --observeandnest upgrade --observecan preconfigure the application with@nestjs/observe— distributed tracing, auto-correlated logs, metrics, and alarms. The schematic adds the dependency and wirescreateObserveModule()into the root module, then reminds you to setOBSERVE_APP_KEYandOBSERVE_APP_SECRET. It is opt-in and skipped when the package is already installed.See the migration guide for the full picture.
nestjs/nest (@nestjs/testing)
v12.0.1Compare Source
v12.0.0Compare Source
v11.2.3Compare Source
What's Changed
Full Changelog: nestjs/nest@v11.2.2...v11.2.3
v11.2.2Compare Source
What's changed
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.