@bymax-one/nest-config 1.0.1 → 1.0.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 +57 -1
- package/README.md +10 -5
- package/package.json +4 -14
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,60 @@ as the GitHub Release body, so each released version needs a matching
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [1.0.3] - 2026-08-07
|
|
15
|
+
|
|
16
|
+
**Documentation and tooling.** `dist/` differs from `1.0.2` only in the text of the comments
|
|
17
|
+
described below; no runtime code changed.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **Equivalent mutants are documented in the source instead of only in the report.** Ten of
|
|
22
|
+
the eleven now carry `// Stryker disable next-line <Mutator>: <reason>` on the line they
|
|
23
|
+
apply to, which is the convention now shared across the `@bymax-one/nest-*` libraries. The
|
|
24
|
+
measured score moves from **95.74%** to **99.59%** — no test and no production logic
|
|
25
|
+
changed; Stryker excludes an ignored mutant from the denominator instead of counting it as
|
|
26
|
+
one the suite failed to kill.
|
|
27
|
+
|
|
28
|
+
Two needed the block `disable`/`restore` form, because `next-line` binds to the following
|
|
29
|
+
statement and those mutants do not sit on one.
|
|
30
|
+
|
|
31
|
+
The eleventh stays a **counted survivor**. A directive on the line above it was measured,
|
|
32
|
+
not assumed, to do nothing — one does not attach to a `.replace()` inside a method chain,
|
|
33
|
+
and the mutant still reported as surviving. Silencing it would take a block directive
|
|
34
|
+
spanning the neighbouring `.replace()`, whose own regex mutants the suite does kill, and a
|
|
35
|
+
killable mutant is never disabled to raise a number. It is argued in a plain comment at the
|
|
36
|
+
line and counted in the report.
|
|
37
|
+
|
|
38
|
+
- The README claimed **Zero suppressions** as a rule. It states what is true now: every
|
|
39
|
+
suppression carries its reason, in the grammar Stryker parses.
|
|
40
|
+
|
|
41
|
+
### Security
|
|
42
|
+
|
|
43
|
+
- **`js-yaml` is floored at the patched release** (GHSA-5p4m-2wfm-xmqj, CVSS 7.5), which was
|
|
44
|
+
open as a Dependabot alert. It reaches this repo only through `jest` ->
|
|
45
|
+
`babel-plugin-istanbul` -> `@istanbuljs/load-nyc-config`; this package declares
|
|
46
|
+
`"dependencies": {}`, so `js-yaml` is never installed beside it and no consumer was
|
|
47
|
+
exposed. `dist/` is unaffected. (Landed separately, recorded here because it ships in this
|
|
48
|
+
version.)
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- `check:mutants` gate (`scripts/check-mutation-directives.mjs`) — validates every
|
|
53
|
+
`// Stryker` comment against the parser's own regular expression, rejecting a reason
|
|
54
|
+
written after `--` instead of a colon, a reason wrapped onto a second comment line, a
|
|
55
|
+
stray comma in the mutator list, and a mutator name Stryker does not know, which matches
|
|
56
|
+
nothing and so silences nothing. Wired into CI and `prepublishOnly`.
|
|
57
|
+
|
|
58
|
+
## [1.0.2] - 2026-08-06
|
|
59
|
+
|
|
60
|
+
**Documentation only.** `dist/` is byte-identical to `1.0.1`.
|
|
61
|
+
|
|
62
|
+
### Documentation
|
|
63
|
+
|
|
64
|
+
- The mutation badge said **95.72%**; the re-measured score is **95.74%**. The report gains a
|
|
65
|
+
dated re-run recording that three of the eleven documented equivalents were re-verified by
|
|
66
|
+
running the mutants rather than by reading them.
|
|
67
|
+
|
|
14
68
|
## [1.0.1] - 2026-08-04
|
|
15
69
|
|
|
16
70
|
### Security
|
|
@@ -120,5 +174,7 @@ have regressed from. They are kept because the reasoning is worth having.
|
|
|
120
174
|
ever carried the permissive range. No runtime behaviour changed.
|
|
121
175
|
|
|
122
176
|
[1.0.0]: https://github.com/bymaxone/nest-config/releases/tag/v1.0.0
|
|
177
|
+
[1.0.2]: https://github.com/bymaxone/nest-config/compare/v1.0.1...v1.0.2
|
|
123
178
|
[1.0.1]: https://github.com/bymaxone/nest-config/compare/v1.0.0...v1.0.1
|
|
124
|
-
[
|
|
179
|
+
[1.0.3]: https://github.com/bymaxone/nest-config/compare/v1.0.2...v1.0.3
|
|
180
|
+
[Unreleased]: https://github.com/bymaxone/nest-config/compare/v1.0.3...HEAD
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<a href="https://www.npmjs.com/package/@bymax-one/nest-config"><img src="https://img.shields.io/npm/dm/@bymax-one/nest-config?style=flat-square&colorA=000000&colorB=000000" alt="npm downloads" /></a>
|
|
15
15
|
<a href="https://github.com/bymaxone/nest-config/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/bymaxone/nest-config/ci.yml?branch=main&style=flat-square&colorA=000000&label=CI" alt="CI status" /></a>
|
|
16
16
|
<a href="https://github.com/bymaxone/nest-config/actions/workflows/ci.yml"><img src="https://img.shields.io/badge/coverage-100%25-brightgreen?style=flat-square&colorA=000000" alt="coverage" /></a>
|
|
17
|
-
<a href="https://github.com/bymaxone/nest-config/blob/main/docs/mutation_testing_results.md"><img src="https://img.shields.io/badge/mutation-
|
|
17
|
+
<a href="https://github.com/bymaxone/nest-config/blob/main/docs/mutation_testing_results.md"><img src="https://img.shields.io/badge/mutation-99.59%25-brightgreen?style=flat-square&colorA=000000" alt="mutation score" /></a>
|
|
18
18
|
<a href="https://scorecard.dev/viewer/?uri=github.com/bymaxone/nest-config"><img src="https://api.scorecard.dev/projects/github.com/bymaxone/nest-config/badge?style=flat-square" alt="OpenSSF Scorecard" /></a>
|
|
19
19
|
<a href="https://github.com/bymaxone/nest-config/blob/main/LICENSE"><img src="https://img.shields.io/github/license/bymaxone/nest-config?style=flat-square&colorA=000000&colorB=000000" alt="license" /></a>
|
|
20
20
|
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-strict-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" /></a>
|
|
@@ -477,9 +477,10 @@ Configuration decides whether a process may start at all, so the suite is held t
|
|
|
477
477
|
beyond "the tests pass".
|
|
478
478
|
|
|
479
479
|
- ✅ **100% line coverage** — statements, branches, functions and lines, enforced as a gate
|
|
480
|
-
- ✅ **
|
|
481
|
-
`break: 95`;
|
|
482
|
-
|
|
480
|
+
- ✅ **99.59% mutation score** — verified with [Stryker](https://stryker-mutator.io/) at
|
|
481
|
+
`break: 95`; ten provable equivalents carry their reason inline, and the one survivor left
|
|
482
|
+
is an equivalent no directive can reach, so it stays counted rather than silenced
|
|
483
|
+
([report](./docs/mutation_testing_results.md))
|
|
483
484
|
- ✅ **The value-free guarantee is tested, not assumed** — a sentinel secret is placed in a
|
|
484
485
|
source and the assertion is that it appears nowhere in the rendered report or in the thrown
|
|
485
486
|
error, because a guarantee about what is _absent_ is the one thing an ordinary assertion
|
|
@@ -487,7 +488,11 @@ beyond "the tests pass".
|
|
|
487
488
|
- ✅ **Published-artifact gates** — `check:exports` resolves the types the way each module
|
|
488
489
|
system does, `check:runtime` loads every subpath from the packed tarball in ESM and
|
|
489
490
|
CommonJS, and `check:published` compiles this README's snippets against `dist/`
|
|
490
|
-
- ✅ **
|
|
491
|
+
- ✅ **Every suppression carries its reason** — no coverage directives anywhere; each
|
|
492
|
+
`// Stryker disable` in the production source names, after the `:` Stryker reads it from,
|
|
493
|
+
why the mutant it silences is behaviour-preserving, and `check:mutants` proves those
|
|
494
|
+
reasons parse so they reach the mutation report rather than the `Ignored using a comment`
|
|
495
|
+
fallback
|
|
491
496
|
|
|
492
497
|
```bash
|
|
493
498
|
pnpm test # unit suite
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bymax-one/nest-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Typed and validated environment configuration entry point for NestJS 11 applications, built on Zod v4.",
|
|
5
5
|
"author": "Bymax One <support@bymax.one>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "pnpm clean && tsup",
|
|
58
58
|
"check:exports": "attw --pack . --profile strict",
|
|
59
|
+
"check:mutants": "node scripts/check-mutation-directives.mjs",
|
|
59
60
|
"check:published": "node scripts/check-published-surface.mjs",
|
|
60
61
|
"check:runtime": "node scripts/check-consumer-runtime.mjs",
|
|
61
62
|
"clean": "node -e \"const fs=require('node:fs');for(const d of ['dist','coverage'])fs.rmSync(d,{recursive:true,force:true})\"",
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
"mutation:dry-run": "stryker run --dryRunOnly",
|
|
67
68
|
"mutation:incremental": "stryker run --incremental",
|
|
68
69
|
"prepare": "husky",
|
|
69
|
-
"prepublishOnly": "pnpm typecheck && pnpm lint && pnpm test:cov:all && pnpm build && pnpm size && pnpm check:published",
|
|
70
|
+
"prepublishOnly": "pnpm typecheck && pnpm lint && pnpm check:mutants && pnpm test:cov:all && pnpm build && pnpm size && pnpm check:published",
|
|
70
71
|
"release": "npm publish --provenance --access public",
|
|
71
72
|
"size": "node scripts/check-size.mjs",
|
|
72
73
|
"test": "jest",
|
|
@@ -127,17 +128,6 @@
|
|
|
127
128
|
"typescript": "^5.9.3",
|
|
128
129
|
"zod": "^4.0.0"
|
|
129
130
|
},
|
|
130
|
-
"pnpm": {
|
|
131
|
-
"overrides": {
|
|
132
|
-
"brace-expansion@1": "^1.1.17",
|
|
133
|
-
"brace-expansion@2": "^2.1.3",
|
|
134
|
-
"brace-expansion@5": "^5.0.8",
|
|
135
|
-
"esbuild": "^0.28.1",
|
|
136
|
-
"fast-uri": "^3.1.4",
|
|
137
|
-
"protobufjs": "^7.6.5",
|
|
138
|
-
"qs": "^6.15.2"
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
131
|
"keywords": [
|
|
142
132
|
"nestjs",
|
|
143
133
|
"config",
|
|
@@ -150,7 +140,7 @@
|
|
|
150
140
|
"fail-fast",
|
|
151
141
|
"configuration"
|
|
152
142
|
],
|
|
153
|
-
"packageManager": "pnpm@
|
|
143
|
+
"packageManager": "pnpm@11.20.0",
|
|
154
144
|
"engines": {
|
|
155
145
|
"node": ">=24.0.0"
|
|
156
146
|
},
|