@dotenvx/dotenvx
Advanced tools
Comparing version 1.30.0 to 1.30.1
@@ -5,4 +5,10 @@ # Changelog | ||
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.30.0...main) | ||
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.30.1...main) | ||
## [1.30.1](https://github.com/dotenvx/dotenvx/compare/v1.30.0...v1.30.1) | ||
### Added | ||
* support complex command substitution combining variable expansion ([#490](https://github.com/dotenvx/dotenvx/pull/490)) | ||
## [1.30.0](https://github.com/dotenvx/dotenvx/compare/v1.29.0...v1.30.0) | ||
@@ -14,3 +20,3 @@ | ||
This is great for monorepos. Maintain one `.env.keys` file across multiple monorepos `.env*` files. | ||
This is great for monorepos. Maintain one `.env.keys` file across all your apps. | ||
@@ -17,0 +23,0 @@ ```sh |
{ | ||
"version": "1.30.0", | ||
"version": "1.30.1", | ||
"name": "@dotenvx/dotenvx", | ||
@@ -4,0 +4,0 @@ "description": "a better dotenv–from the creator of `dotenv`", |
@@ -139,6 +139,5 @@ const chomp = require('./chomp') | ||
const matches = value.match(/\$\(([^)]+(?:\)[^(]*)*)\)/g) || [] | ||
return matches.reduce(function (newValue, match) { | ||
return matches.reduce((newValue, match) => { | ||
const command = match.slice(2, -1) // Extract command by removing $() wrapper | ||
const result = chomp(execSync(command).toString()) // execute command | ||
const result = chomp(execSync(command, { env: { ...this.processEnv, ...this.runningParsed } }).toString()) // execute command (including runningParsed) | ||
return newValue.replace(match, result) // Replace match with result | ||
@@ -145,0 +144,0 @@ }, value) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
237315