Is there an existing issue for this?
Current behavior
Line 68 in config.module.ts has a bug. It says:
if (!options.ignoreEnvVars || options.validatePredefined) {
config = {
...config,
...process.env,
};
}
But the docs say that ignoreEnvVars is deprecated, and one should use validatePredefined instead. But if we do that, then ignoreEnvVars will be unset and thus falsey. Meaning validatePredefined has no effect.
Minimum reproduction code
|
if (!options.ignoreEnvVars || options.validatePredefined) { |
Steps to reproduce
No response
Expected behavior
Correct code should be
if (!options.ignoreEnvVars && (options.validatePredefined !== false)) {
config = {
...config,
...process.env,
};
}
Package version
11
NestJS version
11
Node.js version
No response
In which operating systems have you tested?
Other
No response
Is there an existing issue for this?
Current behavior
Line 68 in
config.module.tshas a bug. It says:But the docs say that
ignoreEnvVarsis deprecated, and one should usevalidatePredefinedinstead. But if we do that, thenignoreEnvVarswill be unset and thus falsey. MeaningvalidatePredefinedhas no effect.Minimum reproduction code
config/lib/config.module.ts
Line 68 in 1694ea6
Steps to reproduce
No response
Expected behavior
Correct code should be
Package version
11
NestJS version
11
Node.js version
No response
In which operating systems have you tested?
Other
No response