zod-envkit 1.4.0 → 1.5.0
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 +13 -0
- package/README.RU.md +8 -1
- package/README.md +8 -1
- package/dist/cli/index.cjs +2 -2
- package/dist/cli/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# [1.5.0](https://github.com/nxtxe/zod-envkit/compare/v1.4.0...v1.5.0) (2026-06-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **ci:** use npm trusted publishing for semantic-release ([2f05e0b](https://github.com/nxtxe/zod-envkit/commit/2f05e0b9e45c385160bcc42bafbc70db6078b52f))
|
|
7
|
+
* **release:** accept semantic-release changelog heading in hygiene check ([e40a655](https://github.com/nxtxe/zod-envkit/commit/e40a655270798157a2afc4388f9a490576efd12b))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **cli:** fail on unknown dotenv keys in check --production mode ([ff52897](https://github.com/nxtxe/zod-envkit/commit/ff528978966982d0f59530b170d712efb86c09e6))
|
|
13
|
+
|
|
1
14
|
# [1.4.0](https://github.com/nxtxe/zod-envkit/compare/v1.3.5...v1.4.0) (2026-05-19)
|
|
2
15
|
|
|
3
16
|
|
package/README.RU.md
CHANGED
|
@@ -233,8 +233,15 @@ npx zod-envkit check
|
|
|
233
233
|
npx zod-envkit check --strict
|
|
234
234
|
```
|
|
235
235
|
|
|
236
|
+
Production guard (более строгие проверки для deploy/CI; неизвестные ключи из dotenv — как в `--strict`):
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
npx zod-envkit check --production
|
|
240
|
+
```
|
|
241
|
+
|
|
236
242
|
- завершает процесс с кодом `1`, если отсутствуют обязательные переменные
|
|
237
|
-
- в `--strict` режиме также падает при
|
|
243
|
+
- в `--strict` режиме также падает при неизвестных переменных (только ключи из dotenv)
|
|
244
|
+
- с `--production` также падает при неизвестных переменных из dotenv (тот же dotenv-only scope, что у `--strict`)
|
|
238
245
|
|
|
239
246
|
---
|
|
240
247
|
|
package/README.md
CHANGED
|
@@ -230,8 +230,15 @@ Strict mode (fail on unknown variables):
|
|
|
230
230
|
npx zod-envkit check --strict
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
+
Production guard (stricter deploy/CI checks; unknown dotenv keys fail like `--strict`):
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
npx zod-envkit check --production
|
|
237
|
+
```
|
|
238
|
+
|
|
233
239
|
* exits with code `1` if required variables are missing
|
|
234
|
-
* in `--strict` mode also fails on unknown variables
|
|
240
|
+
* in `--strict` mode also fails on unknown variables (dotenv-loaded keys only)
|
|
241
|
+
* with `--production` also fails on unknown dotenv variables (same dotenv-only scope as `--strict`)
|
|
235
242
|
|
|
236
243
|
---
|
|
237
244
|
|
package/dist/cli/index.cjs
CHANGED
|
@@ -648,7 +648,7 @@ function registerCheck(program2, getLang2) {
|
|
|
648
648
|
).action(async (opts) => {
|
|
649
649
|
const lang = getLang2();
|
|
650
650
|
const production = Boolean(opts.production);
|
|
651
|
-
|
|
651
|
+
const strictEffective = Boolean(opts.strict) || production;
|
|
652
652
|
const loaded = loadDotEnv(opts.dotenv);
|
|
653
653
|
const { meta } = loadMeta(lang, opts.config);
|
|
654
654
|
const sections = [];
|
|
@@ -658,7 +658,7 @@ function registerCheck(program2, getLang2) {
|
|
|
658
658
|
missing.forEach((k) => sections.push(`- ${k}`));
|
|
659
659
|
sections.push("");
|
|
660
660
|
}
|
|
661
|
-
if (
|
|
661
|
+
if (strictEffective) {
|
|
662
662
|
const unknown = getUnknownEnv(meta, loaded.env);
|
|
663
663
|
if (unknown.length) {
|
|
664
664
|
sections.push(t(lang, "UNKNOWN_ENV"));
|
package/dist/cli/index.js
CHANGED
|
@@ -427,7 +427,7 @@ function registerCheck(program2, getLang2) {
|
|
|
427
427
|
).action(async (opts) => {
|
|
428
428
|
const lang = getLang2();
|
|
429
429
|
const production = Boolean(opts.production);
|
|
430
|
-
|
|
430
|
+
const strictEffective = Boolean(opts.strict) || production;
|
|
431
431
|
const loaded = loadDotEnv(opts.dotenv);
|
|
432
432
|
const { meta } = loadMeta(lang, opts.config);
|
|
433
433
|
const sections = [];
|
|
@@ -437,7 +437,7 @@ function registerCheck(program2, getLang2) {
|
|
|
437
437
|
missing.forEach((k) => sections.push(`- ${k}`));
|
|
438
438
|
sections.push("");
|
|
439
439
|
}
|
|
440
|
-
if (
|
|
440
|
+
if (strictEffective) {
|
|
441
441
|
const unknown = getUnknownEnv(meta, loaded.env);
|
|
442
442
|
if (unknown.length) {
|
|
443
443
|
sections.push(t(lang, "UNKNOWN_ENV"));
|