Skip to content

Commit

Permalink
chore: resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jun 15, 2023
2 parents abfc4e3 + 6de82f2 commit 21fb852
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
24 changes: 14 additions & 10 deletions lib/config.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,12 @@ export class ConfigModule {
config,
);
if (options.expandVariables) {
const expandOptions: DotenvExpandOptions = typeof options.expandVariables === 'object' ? options.expandVariables : {};
config = expand({ ...expandOptions, parsed: config }).parsed || config;
const expandOptions: DotenvExpandOptions =
typeof options.expandVariables === 'object'
? options.expandVariables
: {};
config =
expand({ ...expandOptions, parsed: config }).parsed || config;
}
}
}
Expand All @@ -197,14 +201,14 @@ export class ConfigModule {
return;
}
const keys = Object.keys(config).filter(key => !(key in process.env));
keys.forEach(
key => {
const value = config[key];
if (typeof value === 'string') {
process.env[key] = value;
}
},
);
keys.forEach(key => {
const value = config[key];
if (typeof value === 'string') {
process.env[key] = value;
} else if (typeof value === 'boolean' || typeof value === 'number') {
process.env[key] = `${value}`;
}
});
}

private static mergePartial(
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestjs/config",
"version": "2.3.3",
"version": "2.3.4",
"description": "Nest - modern, fast, powerful node.js web framework (@config)",
"author": "Kamil Mysliwiec",
"license": "MIT",
Expand Down

0 comments on commit 21fb852

Please sign in to comment.