@dotenvx/dotenvx
Advanced tools
Comparing version
{ | ||
"version": "0.21.0", | ||
"version": "0.22.0", | ||
"name": "@dotenvx/dotenvx", | ||
@@ -35,3 +35,3 @@ "description": "a better dotenv–from the creator of `dotenv`", | ||
"conf": "^10.2.0", | ||
"dotenv": "16.4.5", | ||
"dotenv": "^16.4.5", | ||
"dotenv-expand": "^11.0.6", | ||
@@ -38,0 +38,0 @@ "execa": "^5.1.1", |
const logger = require('./../shared/logger') | ||
const dotenv = require('dotenv') | ||
const dotenvExpand = require('dotenv-expand') | ||
@@ -12,3 +13,11 @@ // services | ||
const config = function (options) { | ||
return dotenv.config(options) | ||
const env = dotenv.config(options) | ||
// if processEnv passed also pass to expand | ||
if (options && options.processEnv) { | ||
env.processEnv = options.processEnv | ||
} | ||
const expanded = dotenvExpand.expand(env) | ||
return expanded | ||
} | ||
@@ -15,0 +24,0 @@ |
89535
0.27%2124
0.33%+ Added
- Removed
Updated