@dotenvx/dotenvx 1.19.2 → 1.19.3
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/README.md +11 -0
- package/package.json +1 -1
- package/src/lib/helpers/replace.js +6 -0
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.19.
|
|
5
|
+
## [Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.19.3...main)
|
|
6
|
+
|
|
7
|
+
## 1.19.3
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* 🐞 fix decrypt re-encrypt of values containing backslashes ([#406](https://github.com/dotenvx/dotenvx/pull/407))
|
|
6
12
|
|
|
7
13
|
## 1.19.2
|
|
8
14
|
|
package/README.md
CHANGED
|
@@ -431,6 +431,17 @@ More examples
|
|
|
431
431
|
Hello World
|
|
432
432
|
```
|
|
433
433
|
|
|
434
|
+
</details>
|
|
435
|
+
* <details><summary>asdf</summary><br>
|
|
436
|
+
|
|
437
|
+
```sh
|
|
438
|
+
# use dotenvx with asdf
|
|
439
|
+
$ asdf plugin add dotenvx
|
|
440
|
+
$ asdf install dotenvx latest
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
thank you [@jgburet](https://github.com/jgburet/asdf-dotenvx) of Paris 🇫🇷
|
|
444
|
+
|
|
434
445
|
</details>
|
|
435
446
|
* <details><summary>Git</summary><br>
|
|
436
447
|
|
package/package.json
CHANGED
|
@@ -13,6 +13,12 @@ function replace (src, key, replaceValue) {
|
|
|
13
13
|
escapedValue = escapedValue.replace(/\\n/g, '\n') // fix up newlines
|
|
14
14
|
escapedValue = escapedValue.replace(/\\r/g, '\r')
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
// prevents test\test (and similar) from becoming test\\test and then test\\\\test, etc recursively after each encrypt/decrypt combo
|
|
18
|
+
if (replaceValue.includes('\\')) {
|
|
19
|
+
escapedValue = escapedValue.replace(/\\\\/g, '\\')
|
|
20
|
+
}
|
|
21
|
+
|
|
16
22
|
let newPart = `${key}=${escapedValue}`
|
|
17
23
|
|
|
18
24
|
const parsed = dotenv.parse(src)
|