@systemfsoftware/stryker-js-cli 3.1.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 +164 -0
- package/README.md +8 -7
- package/dist/main.mjs +1440 -1202
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,169 @@
|
|
|
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
|
+
|
|
84
|
+
## 3.2.0
|
|
85
|
+
|
|
86
|
+
### Minor Changes
|
|
87
|
+
|
|
88
|
+
- Asking for human output now produces some.
|
|
89
|
+
|
|
90
|
+
A run told to address a person wrote nothing at all to standard output: the
|
|
91
|
+
progress prose went to standard error, and the machine stream reporter — which
|
|
92
|
+
exists to feed the machine-readable channel — stayed selected even though no
|
|
93
|
+
such channel was open. Human runs now print the progress prose and the score
|
|
94
|
+
table where you would expect to read them, and the machine stream reporter is
|
|
95
|
+
selected only for the machine channel; any other reporter you configured, such
|
|
96
|
+
as `html` or `json`, still runs in both.
|
|
97
|
+
|
|
98
|
+
Colour follows the `NO_COLOR` convention: set it to any non-empty value and
|
|
99
|
+
neither descriptor receives an escape sequence. The machine channel is never
|
|
100
|
+
coloured.
|
|
101
|
+
|
|
102
|
+
Machine output is unchanged — standard output remains the newline-delimited
|
|
103
|
+
stream and nothing else, with the engine's log lines on standard error.
|
|
104
|
+
|
|
105
|
+
- A run's verdict now reaches the exit code, and an interrupted run reports the
|
|
106
|
+
signal that stopped it.
|
|
107
|
+
|
|
108
|
+
- A score below the breaking threshold printed the score, said it was too low,
|
|
109
|
+
and exited `0`, so a step that checked the status passed no matter how low the
|
|
110
|
+
score fell. A failing verdict now fails the command.
|
|
111
|
+
- A run stopped with `Ctrl-C` or `SIGTERM` reported the interruption and then
|
|
112
|
+
exited `1` anyway. The status is now `128 + n` for the signal that ended the
|
|
113
|
+
run — `130` for `SIGINT`, `143` for `SIGTERM`.
|
|
114
|
+
- Every mutant you can act on — survived, uncovered, timed out, errored — is
|
|
115
|
+
announced as it is found, not only in the closing summary.
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- `--help` reads the four defaults it quotes from the option schema, so a default
|
|
120
|
+
that changes can no longer leave the help text describing the old one.
|
|
121
|
+
|
|
122
|
+
- A failed run now says what failed.
|
|
123
|
+
|
|
124
|
+
Every stage failure previously reported an empty message, so a run that could
|
|
125
|
+
not start your test runner, could not read your config, or found no tests exited
|
|
126
|
+
non-zero and told you nothing. The reported error now names the failure and the
|
|
127
|
+
one beneath it, down to the fault that actually happened — including a failure
|
|
128
|
+
raised inside a worker process, whose description used to be replaced with a
|
|
129
|
+
fixed string before it reached you.
|
|
130
|
+
|
|
131
|
+
- Mutants are tested against your real test runner.
|
|
132
|
+
|
|
133
|
+
The command line interface supplied placeholder checker, reporter and test
|
|
134
|
+
runner implementations to its own run: the placeholder runner answered
|
|
135
|
+
`Survived` with zero tests for every mutant, so a run reported a mutation score
|
|
136
|
+
that had nothing to do with your tests, and no reporter output was produced. It
|
|
137
|
+
now supplies only the capabilities a host owns, and your configured plugins
|
|
138
|
+
provide the rest.
|
|
139
|
+
|
|
140
|
+
If you have a recorded score from an earlier release, discard it and measure
|
|
141
|
+
again.
|
|
142
|
+
|
|
143
|
+
- The shared helpers package is gone. Nothing installs it any more, and the
|
|
144
|
+
handful of helpers worth sharing now live in the plugin contract next to the
|
|
145
|
+
types they serve:
|
|
146
|
+
|
|
147
|
+
- `strykerReportBugUrl`, `normalizeFileName`, `propertyPath`, `errorToString`
|
|
148
|
+
and `isErrnoException` from `@systemfsoftware/stryker-js-plugin-api/core`
|
|
149
|
+
- `noopLogger` from `@systemfsoftware/stryker-js-plugin-api/logging`
|
|
150
|
+
- `testFilesProvided` from `@systemfsoftware/stryker-js-plugin-api/test-runner`
|
|
151
|
+
|
|
152
|
+
If you imported any of those, change the specifier. Everything else it exported
|
|
153
|
+
had no consumer and is removed: use `Predicate.isNotNullish` from Effect in place
|
|
154
|
+
of `notEmpty`, and `RegExp.escape` in place of `escapeRegExp`.
|
|
155
|
+
|
|
156
|
+
- These packages no longer install dependencies they never imported, so installing them pulls less into your tree.
|
|
157
|
+
|
|
158
|
+
`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.
|
|
159
|
+
|
|
160
|
+
- 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.
|
|
161
|
+
|
|
162
|
+
- Updated dependencies:
|
|
163
|
+
- @systemfsoftware/stryker-js-mutation-report@2.0.0
|
|
164
|
+
- @systemfsoftware/stryker-js-mutation-run@5.0.0
|
|
165
|
+
- @systemfsoftware/stryker-js-plugin-api@3.0.0
|
|
166
|
+
|
|
3
167
|
## 3.1.0
|
|
4
168
|
|
|
5
169
|
### 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]
|
|
8
|
-
|
|
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
|
|
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-
|
|
88
|
-
is the terminal-facing half and reaches it through an injected
|
|
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
|
-
[
|
|
103
|
-
[
|
|
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/
|