@dotenvx/dotenvx 1.24.0 → 1.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/package.json +1 -1
- package/src/lib/helpers/parse.js +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.24.
|
|
5
|
+
## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.24.1...main)
|
|
6
|
+
|
|
7
|
+
## 1.24.1
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* bump `cross-spawn` to prevent potential ReDoS [CVE-2024-21538](https://github.com/advisories/ghsa-3xgq-45jj-v275) ([#449](https://github.com/dotenvx/dotenvx/pull/449))
|
|
6
12
|
|
|
7
13
|
## 1.24.0
|
|
8
14
|
|
package/package.json
CHANGED
package/src/lib/helpers/parse.js
CHANGED
|
@@ -157,16 +157,21 @@ class Parse {
|
|
|
157
157
|
|
|
158
158
|
const r = expression.split(splitter)
|
|
159
159
|
|
|
160
|
-
let key
|
|
161
160
|
let defaultValue
|
|
162
161
|
let value
|
|
163
162
|
|
|
163
|
+
const key = r.shift()
|
|
164
|
+
|
|
165
|
+
// short-circuit if exact value already in process.env already
|
|
166
|
+
// const inProcessEnv = Object.prototype.hasOwnProperty.call(this.processEnv, key)
|
|
167
|
+
// if (!this.overload && !!this.processEnv[key] && (env[key] === this.processEnv[key])) {
|
|
168
|
+
// return this.processEnv[key]
|
|
169
|
+
// }
|
|
170
|
+
|
|
164
171
|
if ([':+', '+'].includes(splitter)) {
|
|
165
|
-
key = r.shift()
|
|
166
172
|
defaultValue = env[key] ? r.join(splitter) : ''
|
|
167
173
|
value = null
|
|
168
174
|
} else {
|
|
169
|
-
key = r.shift()
|
|
170
175
|
defaultValue = r.join(splitter)
|
|
171
176
|
value = env[key]
|
|
172
177
|
}
|