@dotenvx/dotenvx 1.22.0 → 1.22.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 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.22.0...main)
5
+ ## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.22.1...main)
6
+
7
+ ## 1.22.1
8
+
9
+ ### Changed
10
+
11
+ * 🐞 patch loading order issue with single quotes ([#436](https://github.com/dotenvx/dotenvx/pull/436))
6
12
 
7
13
  ## 1.22.0
8
14
 
package/README.md CHANGED
@@ -867,7 +867,7 @@ More examples
867
867
 
868
868
  ```sh
869
869
  $ touch .env.ci
870
- $ dotenvx set HELLO "ci encrypted" -f .env.production
870
+ $ dotenvx set HELLO "ci encrypted" -f .env.ci
871
871
  $ echo "console.log('Hello ' + process.env.HELLO)" > index.js
872
872
 
873
873
  # check .env.keys for your privateKey
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.22.0",
2
+ "version": "1.22.1",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a better dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -20,6 +20,7 @@ function parseDecryptEvalExpand (src, privateKey = null, processEnv = process.en
20
20
  const parsed = dotenv.parse(src)
21
21
  const _quotes = quotes(src)
22
22
  const originalParsed = { ...parsed }
23
+ const originalProcessEnv = { ...processEnv }
23
24
  for (const key in parsed) {
24
25
  try {
25
26
  const decryptedValue = decryptValue(parsed[key], privateKey)
@@ -56,10 +57,11 @@ function parseDecryptEvalExpand (src, privateKey = null, processEnv = process.en
56
57
  warnings.push(warning(e, key, privateKey))
57
58
  }
58
59
  }
60
+
59
61
  for (const key in processEnv) {
60
62
  // unset eval and expansion for single quotes
61
63
  if (_quotes[key] === "'") {
62
- processEnv[key] = originalParsed[key] // reset to original
64
+ processEnv[key] = originalProcessEnv[key] || originalParsed[key] // reset to original
63
65
  }
64
66
 
65
67
  try {