@systemfsoftware/stryker-js-cli 3.2.0 → 4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,86 @@
1
1
  # @systemfsoftware/stryker-js-cli
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - `CliRequest` is a type, not a schema. It described a value the CLI builds in
8
+ memory and hands to its own dispatcher, so nothing ever decoded it, and its
9
+ declared `options` were the fully resolved option set rather than the partial
10
+ overlay a command line actually carries. Import it with `import type`; if you
11
+ were decoding with it, decode the options you have against the language
12
+ package's `Schema` export instead.
13
+
14
+ Captured console output renders objects differently. In machine mode the CLI
15
+ captures what a run writes to the console, and an object now appears as
16
+ `{"a":1}` where it previously appeared as `{ a: 1 }`. Strings, numbers and
17
+ format specifiers such as `%s` and `%d` are unchanged.
18
+
19
+ - Three packages are renamed. `plugin-api` is now `@systemfsoftware/stryker-js`, the
20
+ language every plugin is written against. `mutation-run` is now
21
+ `@systemfsoftware/stryker-js-platform-node`, the Node host that runs a mutation
22
+ test. `mutation-report` is now `@systemfsoftware/stryker-js-html-reporter`.
23
+ Install the new names and change your imports.
24
+
25
+ Options types moved. `StrykerOptions`, `PartialStrykerOptions` and `LogLevel` are
26
+ imported from the `Schema` export; `Mutant`, `MutantStatus`, `Position` and
27
+ `Location` from the `Mutant` export. Point a config's `extends` at the language
28
+ package's `Schema` export.
29
+
30
+ `MutantStatus` accepts one spelling per outcome: `Killed`, `Survived`,
31
+ `NoCoverage`, `Timeout`, `CompileError`, `RuntimeError`, `Ignored` and `Pending`.
32
+ The lowercase and abbreviated forms — `killed`, `timedOut`, `noCoverage` and the
33
+ rest — are gone. A comparison against a removed spelling never matched the value
34
+ the reporter actually produced, so check any status comparison you wrote.
35
+
36
+ Statuses, plugin kinds, exit classes and AST formats are string literal unions
37
+ rather than enums, so read them as their string values. Member access such as
38
+ `ExitClass.VerdictFail` no longer resolves.
39
+
40
+ A plugin no longer receives a logger, and the logger port is gone. Plugins log
41
+ through Effect, and the host decides where that output goes.
42
+
43
+ The bundled base preset is gone. A config inherits from the language package's
44
+ `Schema` export and states the thresholds, reporters and plugins it wants; you no
45
+ longer silently inherit a package manager, a plugin list or a break threshold.
46
+
47
+ ### Minor Changes
48
+
49
+ - Machine-readable mutation progress is a newline-delimited JSON file next to the HTML and JSON reports, not the console.
50
+
51
+ 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.
52
+
53
+ 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.
54
+
55
+ ### Patch Changes
56
+
57
+ - 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.
58
+
59
+ 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.
60
+
61
+ - 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.
62
+
63
+ 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.
64
+
65
+ - Asking the tool for help, asking which version it is, or invoking it with no arguments at all, now prints something. All three were silent: no text on a terminal, and no closing line for a consumer parsing the output. Asking for the version was additionally reported as a usage mistake and exited non-zero.
66
+
67
+ Each now renders its text to a terminal as prose, and to a parsed stream as the run's final `help` line carrying exit code 0 and the rendered text. An undeclared option is still refused.
68
+
69
+ - 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.
70
+
71
+ 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.
72
+
73
+ - A mutation run writes the JSON report the `json` reporter is configured to produce.
74
+
75
+ Vitest no longer reprints its full summary for every mutant.
76
+
77
+ - 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.
78
+
79
+ The verdict now states the thresholds, the report path, and every surviving mutant with its file, position, mutator and replacement.
80
+
81
+ - Updated dependencies:
82
+ - @systemfsoftware/effect-cell-types@5.0.0
83
+
3
84
  ## 3.2.0
4
85
 
5
86
  ### Minor Changes
package/README.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  # stryker
6
6
 
7
- The `stryker` command for the [System F Software][repo] StrykerJS fork a
8
- mutation test runner whose output is meant to be read by a program.
7
+ The `stryker` command for the [System F Software][repo] mutation engine
8
+ output meant to be read by a program.
9
9
 
10
10
  Every run writes one NDJSON event per line to stdout and exits with a code that
11
11
  says _which_ thing went wrong, so CI steps and coding agents can act on a run
@@ -37,7 +37,7 @@ $ npx stryker <command> [options]
37
37
  ```
38
38
 
39
39
  Mutation testing concepts, the supported mutators, and every `run` option are
40
- the upstream ones — see [stryker-mutator.io][upstream-docs]. `stryker --llms`
40
+ the ones [stryker-mutator.io][docs] documents. `stryker --llms`
41
41
  prints the whole command surface as one JSON object, walked from the command
42
42
  descriptors rather than hand-maintained.
43
43
 
@@ -84,8 +84,9 @@ The highest pending class wins; a terminating signal outranks all of them.
84
84
 
85
85
  ## Related
86
86
 
87
- The mutation engine is [`@systemfsoftware/stryker-js-core`][core]. This package
88
- is the terminal-facing half and reaches it through an injected run-event sink;
87
+ The mutation engine is [`@systemfsoftware/stryker-js-platform-node`][engine].
88
+ This package is the terminal-facing half and reaches it through an injected
89
+ run-event sink;
89
90
  it ships a command and exposes no importable API.
90
91
 
91
92
  ## License
@@ -99,5 +100,5 @@ Licensed under [Apache 2.0][license-url].
99
100
  [license-badge]: https://img.shields.io/badge/license-Apache_2.0-blue?style=flat-square
100
101
  [license-url]: https://github.com/systemfsoftware/systemfsoftware/blob/main/LICENSE
101
102
  [repo]: https://github.com/systemfsoftware/systemfsoftware
102
- [core]: https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/stryker-js/core
103
- [upstream-docs]: https://stryker-mutator.io/docs/stryker-js/configuration/
103
+ [engine]: https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/testing/mutation/stryker-js/platform-node
104
+ [docs]: https://stryker-mutator.io/docs/stryker-js/configuration/