npm / @nestjs/config
@nestjs/config
What changed in @nestjs/config 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
9 breaking2 new APIs and options2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@nestjs/config 1213 changes
Breaking changes 9
The explicit type parameter is constrained to the value at the given path, so types inconsistent with the config shape fail to compile.
The explicit type parameter is constrained to the value at the given path, so types inconsistent with the config shape fail to compile.
The lodash runtime dependency is removed and replaced by es-toolkit; this matters if you relied on lodash being installed transitively.
The peer dependency range is now ^11.0.0 || ^12.0.0; Nest 10 is no longer supported.
The package is published as pure ESM with an exports map; CommonJS apps can continue using require on Node 20.19+ or 22.12+.
Deep imports into build internals are no longer resolvable; import from the package root instead.
Validation issues are formatted as path: message, with issues separated by newlines, rather than using the schema library's format.
Library-specific validation settings now belong under libraryOptions in the Standard Schema Options object.
Accepts schemas implementing Standard Schema, including Zod, Valibot, ArkType, and Joi 18+; schemas not implementing the spec are compile-time errors.
New APIs and options 2
When true, values from .env files take precedence over existing process.env variables; the default remains false.
Accepts a function that parses a Buffer into an object, allowing .env files in formats such as YAML, TOML, or JSON; it is used at bootstrap and during variable re-interpolation.
Fixes and other changes 2
Prevents prefix corruption and escapes propertyPath during environment interpolation updates.
Variables omitted by object schemas are merged back into the validated result, keeping unrelated variables reachable through process.env and ConfigService.