@dotenvx/dotenvx 1.61.2 → 1.61.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 +3 -3
- package/package.json +1 -1
- package/src/lib/helpers/installPrecommitHook.js +12 -6
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.61.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.61.3...main)
|
|
6
|
+
|
|
7
|
+
## [1.61.3](https://github.com/dotenvx/dotenvx/compare/v1.61.2...v1.61.3) (2026-04-21)
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* Tighten up `ext precommit --install` message ([#797](https://github.com/dotenvx/dotenvx/pull/797))
|
|
6
12
|
|
|
7
13
|
## [1.61.2](https://github.com/dotenvx/dotenvx/compare/v1.61.1...v1.61.2) (2026-04-21)
|
|
8
14
|
|
package/README.md
CHANGED
|
@@ -2217,7 +2217,7 @@ Prevent `.env` files from being committed to code.
|
|
|
2217
2217
|
|
|
2218
2218
|
```sh
|
|
2219
2219
|
$ dotenvx ext precommit
|
|
2220
|
-
|
|
2220
|
+
▣ .env files (1) protected (encrypted or gitignored)
|
|
2221
2221
|
```
|
|
2222
2222
|
|
|
2223
2223
|
</details>
|
|
@@ -2227,7 +2227,7 @@ Install a shell script to `.git/hooks/pre-commit` to prevent accidentally commit
|
|
|
2227
2227
|
|
|
2228
2228
|
```sh
|
|
2229
2229
|
$ dotenvx ext precommit --install
|
|
2230
|
-
|
|
2230
|
+
▣ dotenvx ext precommit installed [.git/hooks/pre-commit]
|
|
2231
2231
|
```
|
|
2232
2232
|
|
|
2233
2233
|
</details>
|
|
@@ -2241,7 +2241,7 @@ $ mkdir -p apps/backend
|
|
|
2241
2241
|
$ echo "HELLO=Backend" > apps/backend/.env
|
|
2242
2242
|
|
|
2243
2243
|
$ dotenvx ext precommit apps/backend
|
|
2244
|
-
|
|
2244
|
+
▣ apps/backend/.env not protected (encrypted or gitignored)
|
|
2245
2245
|
```
|
|
2246
2246
|
|
|
2247
2247
|
</details>
|
package/package.json
CHANGED
|
@@ -11,9 +11,15 @@ elif npx dotenvx -V >/dev/null 2>&1
|
|
|
11
11
|
then
|
|
12
12
|
npx dotenvx ext precommit
|
|
13
13
|
else
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
if [ -t 2 ]; then
|
|
15
|
+
RED="$(printf '\\033[31m')"
|
|
16
|
+
RESET="$(printf '\\033[0m')"
|
|
17
|
+
else
|
|
18
|
+
RED=""
|
|
19
|
+
RESET=""
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
printf "%s☠ 'dotenvx ext precommit' command not found (.git/hooks/precommit) fix: [curl -sfS https://dotenvx.sh | sh]%s\n" "$RED" "$RESET" >&2
|
|
17
23
|
exit 1
|
|
18
24
|
fi
|
|
19
25
|
`
|
|
@@ -32,14 +38,14 @@ class InstallPrecommitHook {
|
|
|
32
38
|
// Check if 'dotenvx precommit' already exists in the file
|
|
33
39
|
if (this._currentHook().includes('dotenvx ext precommit')) {
|
|
34
40
|
// do nothing
|
|
35
|
-
successMessage =
|
|
41
|
+
successMessage = `▣ dotenvx ext precommit exists [${this.hookPath}]`
|
|
36
42
|
} else {
|
|
37
43
|
this._appendHook()
|
|
38
|
-
successMessage =
|
|
44
|
+
successMessage = `▣ dotenvx ext precommit appended [${this.hookPath}]`
|
|
39
45
|
}
|
|
40
46
|
} else {
|
|
41
47
|
this._createHook()
|
|
42
|
-
successMessage =
|
|
48
|
+
successMessage = `▣ dotenvx ext precommit installed [${this.hookPath}]`
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
return {
|