@systemfsoftware/stryker-js-cli 5.0.0 → 6.0.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +195 -0
  2. package/README.md +1 -1
  3. package/package.json +17 -17
package/CHANGELOG.md CHANGED
@@ -1,5 +1,200 @@
1
1
  # @systemfsoftware/stryker-js-cli
2
2
 
3
+ ## 6.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - The packages are renamed. `plugin-api` is now `@systemfsoftware/stryker-js`, the
8
+ language every plugin is written against. `mutation-run` is split: the run
9
+ itself is `@systemfsoftware/stryker-js-engine`
10
+ (host-neutral, no Node on its manifest) and the Node process entries are
11
+ `@systemfsoftware/stryker-js-cli`, which owns the worker files and the runtime
12
+ gate. `mutation-report` is now `@systemfsoftware/stryker-js-html-reporter`.
13
+ `@systemfsoftware/stryker-js-platform-node` is never published — do not install
14
+ it. Install the new names and change your imports.
15
+
16
+ Options types moved. `StrykerOptions`, `PartialStrykerOptions` and `LogLevel` are
17
+ imported from the `Schema` export; `Mutant`, `MutantStatus`, `Position` and
18
+ `Location` from the `Mutant` export. Point a config's `extends` at the language
19
+ package's `Schema` export.
20
+
21
+ `MutantStatus` accepts one spelling per outcome: `Killed`, `Survived`,
22
+ `NoCoverage`, `Timeout`, `CompileError`, `RuntimeError`, `Ignored` and `Pending`.
23
+ The lowercase and abbreviated forms — `killed`, `timedOut`, `noCoverage` and the
24
+ rest — are gone. A comparison against a removed spelling never matched the value
25
+ the reporter actually produced, so check any status comparison you wrote.
26
+
27
+ Statuses, plugin kinds, exit classes and AST formats are string literal unions
28
+ rather than enums, so read them as their string values. Member access such as
29
+ `ExitClass.VerdictFail` no longer resolves.
30
+
31
+ A plugin no longer receives a logger, and the logger port is gone. Plugins log
32
+ through Effect, and the host decides where that output goes.
33
+
34
+ The bundled base preset is gone. A config inherits from the language package's
35
+ `Schema` export and states the thresholds, reporters and plugins it wants; you no
36
+ longer silently inherit a package manager, a plugin list or a break threshold.
37
+
38
+ - The Node host package `@systemfsoftware/stryker-js-platform-node` is gone: the engine (`@systemfsoftware/stryker-js-engine`) is the host-neutral mutation run, and the `stryker` CLI owns the Node composition roots and worker entries. Depend on the engine for the run and the CLI for process entries; install the new names.
39
+
40
+ ### Minor Changes
41
+
42
+ - Asking for human output now produces some.
43
+
44
+ A run told to address a person wrote nothing at all to standard output: the
45
+ progress prose went to standard error, and the machine stream reporter — which
46
+ exists to feed the machine-readable channel — stayed selected even though no
47
+ such channel was open. Human runs now print the progress prose and the score
48
+ table where you would expect to read them, and the machine stream reporter is
49
+ selected only for the machine channel; any other reporter you configured, such
50
+ as `html` or `json`, still runs in both.
51
+
52
+ Colour follows the `NO_COLOR` convention: set it to any non-empty value and
53
+ neither descriptor receives an escape sequence. The machine channel is never
54
+ coloured.
55
+
56
+ Machine output is unchanged — standard output remains the newline-delimited
57
+ stream and nothing else, with the engine's log lines on standard error.
58
+
59
+ - Machine-readable mutation progress is a newline-delimited JSON file next to the HTML and JSON reports, not the console.
60
+
61
+ The console prints bounded progress prose: phase names, a count line, at most twenty surviving mutants, and a verdict. Killed mutants now advance that count. Child test runs during mutation no longer print per-test output or GitHub workflow commands.
62
+
63
+ If you parsed the console as JSON lines, read the stream file instead. A hard kill can leave that file without a closing verdict line.
64
+
65
+ - cut over to effect v4 (4.0.0-rc.108): public surface derives from effect types; peers flip effect ^3→^4
66
+
67
+ - A run's verdict now reaches the exit code, and an interrupted run reports the
68
+ signal that stopped it.
69
+
70
+ - A score below the breaking threshold printed the score, said it was too low,
71
+ and exited `0`, so a step that checked the status passed no matter how low the
72
+ score fell. A failing verdict now fails the command.
73
+ - A run stopped with `Ctrl-C` or `SIGTERM` reported the interruption and then
74
+ exited `1` anyway. The status is now `128 + n` for the signal that ended the
75
+ run — `130` for `SIGINT`, `143` for `SIGTERM`.
76
+ - Every mutant you can act on — survived, uncovered, timed out, errored — is
77
+ announced as it is found, not only in the closing summary.
78
+
79
+ - The Workflow brand: `make` is the only door to a decide slot.
80
+
81
+ `Workflow<C, D, E>` and `Cell.DecidePhase<P>` carry a phantom `WorkflowBrand` conjunct applied
82
+ solely by `Workflow.make` through the existing assertion narrowing — no runtime property, `make`
83
+ stays the identity it always was. The consumer's signature is the forcing function: a bare
84
+ function handed where a decide run is demanded is now a compile error naming the brand, so a
85
+ decision cannot reach production without passing through the constructor every gate keys on.
86
+
87
+ Breaking by design (`REPO-R1`): the two inline adapter sites (cli's admission adapter,
88
+ claude-compat's submit-hook adapter) become `make`-wrapped, and the cell-gen either-pass
89
+ fixture reshapes to one exhaustive path with the failure injection decided before the boundary.
90
+
91
+ ### Patch Changes
92
+
93
+ - The shared base preset is importable again at `./config/base`, so a config file can inherit it with `"extends"` instead of restating every setting. The entry had stopped being published, which silently broke any config that inherited from it.
94
+
95
+ The command manifest now lists the entry points the installed package actually declares, rather than a list written by hand that could disagree with it.
96
+
97
+ - A setting given a value it does not allow now says which setting and what it accepts, and stops the run before anything is instrumented. It used to surface the raw decode failure with an internal stack trace, point the reader at a report the run never wrote, and exit as though the run itself had failed rather than the configuration.
98
+
99
+ The message names the option and its accepted form, the remediation points at the config file, and the exit code is the one reserved for a configuration mistake.
100
+
101
+ - A mutation run that is killed mid-way keeps every completed mutant: the JSONL progress stream is flushed after each result, and incremental mode writes remembered verdicts as they finish so the next run continues instead of starting over.
102
+
103
+ Remembered killed mutants still name the tests that killed them, so a resumed run's report matches a complete run.
104
+
105
+ The progress stream path is progressStreamFile (default reports/mutation-stream.jsonl) and can be set in config or with --progressStreamFile.
106
+
107
+ - New version is published through npm trusted publishing, so it carries a provenance attestation you can verify.
108
+
109
+ - Peer Effect requirement advances to 4.0.0-rc.112. No API changes.
110
+
111
+ - Express each executor's sandwich as a `Cell` description.
112
+
113
+ Every call site that previously sequenced the phases by hand now builds one description and hands it to the interpreter, so the order these executors run in is carried by the phase types instead of by the order the statements happen to appear in. Behaviour is preserved and no public surface moves: the change is confined to `src/internal/*.executor.ts`, and each package's golden API report is unchanged.
114
+
115
+ One site needed a real fix rather than a translation. `supervisor-body.executor.ts` wrote before it could classify — it recorded a restart, then read the resulting rate — which is a read that depends on an earlier decision. Its read now gathers the restart record and the resulting rate as one product, which keeps that site a single layer, with the intensity tracker passed as the read's command rather than captured from the surrounding scope.
116
+
117
+ - A failed run now says what failed.
118
+
119
+ Every stage failure previously reported an empty message, so a run that could
120
+ not start your test runner, could not read your config, or found no tests exited
121
+ non-zero and told you nothing. The reported error now names the failure and the
122
+ one beneath it, down to the fault that actually happened — including a failure
123
+ raised inside a worker process, whose description used to be replaced with a
124
+ fixed string before it reached you.
125
+
126
+ - Asking for a run addressed to a person now gets prose. Every stage, the plan and the closing verdict were written as machine lines whatever the mode, so a reader got a stream of JSON and the count of files being mutated was reported to nobody at all.
127
+
128
+ A run addressed to a person reports how many of its files it is about to mutate and writes no machine lines; a run addressed to a program is unchanged.
129
+
130
+ - A mutation run writes the JSON report the `json` reporter is configured to produce.
131
+
132
+ Vitest no longer reprints its full summary for every mutant.
133
+
134
+ - Mutants are tested against your real test runner.
135
+
136
+ The command line interface supplied placeholder checker, reporter and test
137
+ runner implementations to its own run: the placeholder runner answered
138
+ `Survived` with zero tests for every mutant, so a run reported a mutation score
139
+ that had nothing to do with your tests, and no reporter output was produced. It
140
+ now supplies only the capabilities a host owns, and your configured plugins
141
+ provide the rest.
142
+
143
+ If you have a recorded score from an earlier release, discard it and measure
144
+ again.
145
+
146
+ - The shared helpers package is gone. Nothing installs it any more, and the
147
+ handful of helpers worth sharing now live in the plugin contract next to the
148
+ types they serve:
149
+
150
+ - `strykerReportBugUrl`, `normalizeFileName`, `propertyPath`, `errorToString`
151
+ and `isErrnoException` from `@systemfsoftware/stryker-js/core`
152
+ - `noopLogger` from `@systemfsoftware/stryker-js/logging`
153
+ - `testFilesProvided` from `@systemfsoftware/stryker-js/test-runner`
154
+
155
+ If you imported any of those, change the specifier. Everything else it exported
156
+ had no consumer and is removed: use `Predicate.isNotNullish` from Effect in place
157
+ of `notEmpty`, and `RegExp.escape` in place of `escapeRegExp`.
158
+
159
+ - These packages no longer install dependencies they never imported, so installing them pulls less into your tree.
160
+
161
+ `tslib` is gone from all six. The mutation runner additionally stops installing `lodash.groupby`, `semver` and `source-map`, and the command line interface stops installing `@effect/platform-node-shared`. Nothing exported changes.
162
+
163
+ - Published packages no longer carry build artifacts left over from earlier builds. One package was shipping about a megabyte of bundled test-runner internals this way.
164
+
165
+ - The closing verdict line carries its findings again. It had shrunk to the score alone, so a consumer reading the stream could no longer see the score limits the run was held to, where the report was written, or which mutants survived — the survivors were reported while the run was in flight and then absent from the summary that closes it.
166
+
167
+ The verdict now states the thresholds, the report path, and every surviving mutant with its file, position, mutator and replacement.
168
+
169
+ - Produce every workflow through `Workflow.make`.
170
+
171
+ `decideRestart`, `interpretHookResult`, and `admitSurvivorsRun` are now built by the constructor rather
172
+ than annotated with `Workflow<Command, Decision, Error>`. Each decision is behaviourally identical —
173
+ `make` is the identity at runtime — but the channels are now inferred from the decider instead of
174
+ asserted by hand, so a total decision resolves to `UninhabitedError` and becomes uncallable rather than
175
+ compiling as a workflow that cannot fail.
176
+
177
+ `effect-daemon-spec` takes a minor bump because the change is consumer-visible beyond its own source:
178
+ `@systemfsoftware/effect-cell-types` moves from `devDependencies` to `dependencies`, so installing this
179
+ package now installs it. That reclassification is required, not incidental — `make` is a runtime call,
180
+ and `scripts/guards/check-runtime-deps.mjs` fails a runtime import declared only as a dev dependency.
181
+ `omp-claude-compat` gains the same dependency; `stryker-js-cli` already declared it.
182
+
183
+ `RestartDecisionWorkflow` survives as a type-only export: one in-repo consumer, its own property test,
184
+ references it through `ReturnType<…>`.
185
+
186
+ - Updated dependencies:
187
+ - @systemfsoftware/stryker-js@2.0.0
188
+ - @systemfsoftware/stryker-js-engine@1.0.0
189
+ - @systemfsoftware/stryker-js-html-reporter@2.0.0
190
+
191
+ ## 5.0.1
192
+
193
+ ### Patch Changes
194
+
195
+ - Updated dependencies:
196
+ - @systemfsoftware/stryker-js-engine@0.3.0
197
+
3
198
  ## 5.0.0
4
199
 
5
200
  ### Major Changes
package/README.md CHANGED
@@ -100,5 +100,5 @@ Licensed under [Apache 2.0][license-url].
100
100
  [license-badge]: https://img.shields.io/badge/license-Apache_2.0-blue?style=flat-square
101
101
  [license-url]: https://github.com/systemfsoftware/systemfsoftware/blob/main/LICENSE
102
102
  [repo]: https://github.com/systemfsoftware/systemfsoftware
103
- [engine]: https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/testing/mutation/stryker-js/engine
103
+ [engine]: https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/stryker-js/stryker-js-engine
104
104
  [docs]: https://stryker-mutator.io/docs/stryker-js/configuration/
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-js-cli",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
7
- "directory": "packages/testing/mutation/stryker-js/cli"
7
+ "directory": "packages/stryker-js/stryker-js-cli"
8
8
  },
9
- "homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/testing/mutation/stryker-js/cli#readme",
9
+ "homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/stryker-js/stryker-js-cli#readme",
10
10
  "bugs": "https://github.com/systemfsoftware/systemfsoftware/issues",
11
11
  "description": "The stryker command-line interface — terminal framing, run-event stream, and exit handling for the @systemfsoftware mutation engine.",
12
12
  "type": "module",
@@ -18,10 +18,10 @@
18
18
  "@effect/platform-node-shared": "^4.0.0-rc.112",
19
19
  "@noble/hashes": "1.8.0",
20
20
  "effect": "^4.0.0-rc.112",
21
- "@systemfsoftware/effect-cell-types": "^6.0.0",
22
- "@systemfsoftware/stryker-js-engine": "^0.2.0",
23
- "@systemfsoftware/stryker-js": "^1.0.0",
24
- "@systemfsoftware/stryker-js-html-reporter": "^1.0.0"
21
+ "@systemfsoftware/stryker-js": "^2.0.0",
22
+ "@systemfsoftware/effect-cell-types": "^6.0.1",
23
+ "@systemfsoftware/stryker-js-html-reporter": "^2.0.0",
24
+ "@systemfsoftware/stryker-js-engine": "^1.0.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
@@ -34,17 +34,17 @@
34
34
  "tsdown": "^0.22.14",
35
35
  "vite-tsconfig-paths": "^6.1.1",
36
36
  "vitest": "^4",
37
- "@systemfsoftware/all": "^1.1.2",
38
- "@systemfsoftware/effect-gherkin-spec": "^4.0.0",
39
- "@systemfsoftware/effect-schema-law": "^2.0.1",
40
- "@systemfsoftware/effect-schema-vite": "^2.0.2",
41
- "@systemfsoftware/stryker-js-typescript-checker": "^4.0.0",
42
- "@systemfsoftware/stryker-js-vitest-runner": "^3.0.0",
43
- "@systemfsoftware/stryker-plugins": "^2.0.2",
44
- "@systemfsoftware/stryker-test-contribution": "^1.1.3",
45
- "@systemfsoftware/vitest-config": "^0.1.0",
37
+ "@systemfsoftware/all": "^1.1.3",
38
+ "@systemfsoftware/effect-gherkin-spec": "^4.0.1",
39
+ "@systemfsoftware/effect-schema-law": "^2.0.2",
40
+ "@systemfsoftware/effect-schema-vite": "^2.0.3",
41
+ "@systemfsoftware/oxlint-config": "^0.1.0",
42
+ "@systemfsoftware/stryker-js-typescript-checker": "^5.0.0",
43
+ "@systemfsoftware/stryker-js-vitest-runner": "^4.0.0",
44
+ "@systemfsoftware/stryker-plugins": "^3.0.0",
46
45
  "@systemfsoftware/tsconfig": "^1.3.3",
47
- "@systemfsoftware/oxlint-config": "^0.1.0"
46
+ "@systemfsoftware/vitest-config": "^0.1.0",
47
+ "@systemfsoftware/stryker-test-contribution": "^2.0.0"
48
48
  },
49
49
  "engines": {
50
50
  "node": ">=20.0.0"