@systemfsoftware/stryker-js 1.0.0 → 2.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 +133 -0
- package/README.md +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,138 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js
|
|
2
2
|
|
|
3
|
+
## 2.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
|
+
- An evaluator now answers with the verdict it reached instead of failing to
|
|
39
|
+
report one.
|
|
40
|
+
|
|
41
|
+
`Evaluator.evaluate` returns `ExitClass | null` on the success channel: the
|
|
42
|
+
class the run should end in, or `null` for nothing to report. `ExitClass` is
|
|
43
|
+
exported from `@systemfsoftware/stryker-js/evaluate`. The error
|
|
44
|
+
channel is for the evaluator itself breaking — a report it cannot read, a
|
|
45
|
+
decision it cannot reach.
|
|
46
|
+
|
|
47
|
+
Previously the only way to report a failed gate was to fail, which a caller
|
|
48
|
+
could not tell apart from the evaluator crashing, so neither the exit code nor
|
|
49
|
+
the message could distinguish them. If you wrote an evaluator that failed to
|
|
50
|
+
signal a verdict, return the class instead.
|
|
51
|
+
|
|
52
|
+
A run's verdict is now the most severe class anyone reported — the score against
|
|
53
|
+
your `break` threshold, plus every evaluator's answer.
|
|
54
|
+
|
|
55
|
+
- Plugins are written against Effect instead of Promise.
|
|
56
|
+
|
|
57
|
+
`Checker`, `TestRunner`, `Reporter`, `Ignorer` and `Evaluator` are capability services whose operations return an `Effect`. Provide your plugin as a `Layer` through `declarePlugin`; the class, factory and value declarations are gone, along with the `typed-inject` dependency. Implement the operations that were optional — return `Effect.void` where there is nothing to do, and one group per mutant from `group` if you have no grouping opinion.
|
|
58
|
+
|
|
59
|
+
Each capability fails with a tagged error. Outcomes are not failures: a killed mutant, a survivor and a compile error in the code under test are successful results.
|
|
60
|
+
|
|
61
|
+
Read the sandbox path from `SandboxDirectory`. `commonTokens`, `tokens` and the plugin context types are removed. `determineHitLimitReached` returns an `Option`.
|
|
62
|
+
|
|
63
|
+
### Minor Changes
|
|
64
|
+
|
|
65
|
+
- `RENDERED_OPTION_DEFAULTS` is exported from the `core` entry point. It carries
|
|
66
|
+
the four option defaults that appear in human-readable help text, so a tool
|
|
67
|
+
printing "the default is X" reads the same value the option schema applies
|
|
68
|
+
instead of restating it.
|
|
69
|
+
|
|
70
|
+
- The shared helpers package is gone. Nothing installs it any more, and the
|
|
71
|
+
handful of helpers worth sharing now live in the plugin contract next to the
|
|
72
|
+
types they serve:
|
|
73
|
+
|
|
74
|
+
- `strykerReportBugUrl`, `normalizeFileName`, `propertyPath`, `errorToString`
|
|
75
|
+
and `isErrnoException` from `@systemfsoftware/stryker-js/core`
|
|
76
|
+
- `noopLogger` from `@systemfsoftware/stryker-js/logging`
|
|
77
|
+
- `testFilesProvided` from `@systemfsoftware/stryker-js/test-runner`
|
|
78
|
+
|
|
79
|
+
If you imported any of those, change the specifier. Everything else it exported
|
|
80
|
+
had no consumer and is removed: use `Predicate.isNotNullish` from Effect in place
|
|
81
|
+
of `notEmpty`, and `RegExp.escape` in place of `escapeRegExp`.
|
|
82
|
+
|
|
83
|
+
- Checker and test-runner workers now talk over Effect's own worker RPC, and every
|
|
84
|
+
call they exchange is a declared operation with a declared result.
|
|
85
|
+
|
|
86
|
+
Before, the parent and its workers spoke a protocol written by hand: messages were
|
|
87
|
+
newline-delimited JSON, arguments were typed as "any JSON value", and each method
|
|
88
|
+
was reached by name through a proxy. Nothing checked that a payload was one the far
|
|
89
|
+
end could serve, so a value it could not read was refused after it arrived, and a
|
|
90
|
+
call whose message never landed was waited on anyway.
|
|
91
|
+
|
|
92
|
+
The six operations that cross that boundary — a checker's `check` and `group`, a
|
|
93
|
+
runner's `capabilities`, `dryRun` and `mutantRun` — now each name what they take
|
|
94
|
+
and what they return, and the options a worker starts from are sent once when it
|
|
95
|
+
starts rather than as a first method call. A payload that does not fit is refused
|
|
96
|
+
where it is built, and a worker that cannot answer fails the call that was waiting.
|
|
97
|
+
|
|
98
|
+
The two worker entry points are no longer importable subpaths of this package.
|
|
99
|
+
They were only ever spawned as processes, and the paths resolved to TypeScript
|
|
100
|
+
sources that could not be executed.
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- 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.
|
|
105
|
+
|
|
106
|
+
Remembered killed mutants still name the tests that killed them, so a resumed run's report matches a complete run.
|
|
107
|
+
|
|
108
|
+
The progress stream path is progressStreamFile (default reports/mutation-stream.jsonl) and can be set in config or with --progressStreamFile.
|
|
109
|
+
|
|
110
|
+
- New version is published through npm trusted publishing, so it carries a provenance attestation you can verify.
|
|
111
|
+
|
|
112
|
+
- Peer Effect requirement advances to 4.0.0-rc.112. No API changes.
|
|
113
|
+
|
|
114
|
+
- An oversized message between the runner and a worker now fails the run with a
|
|
115
|
+
reason instead of exhausting memory. Each side of the connection reads frames
|
|
116
|
+
up to 16 MiB, which leaves headroom over the largest legitimate payload — a dry
|
|
117
|
+
run carrying per-test coverage — and a frame past the limit fails the calls
|
|
118
|
+
waiting on it rather than growing until the process dies.
|
|
119
|
+
|
|
120
|
+
- Each of these packages now has a README, so its registry page says what the package is, how
|
|
121
|
+
to install it, and what to import or register — previously the page was blank. The lint
|
|
122
|
+
plugins show the configuration line that enables what they recommend.
|
|
123
|
+
|
|
124
|
+
`@systemfsoftware/stryker-js-html-reporter` also carries its licence text
|
|
125
|
+
|
|
126
|
+
- These packages no longer install dependencies they never imported, so installing them pulls less into your tree.
|
|
127
|
+
|
|
128
|
+
`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.
|
|
129
|
+
|
|
130
|
+
- 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.
|
|
131
|
+
|
|
132
|
+
- 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.
|
|
133
|
+
|
|
134
|
+
The verdict now states the thresholds, the report path, and every surviving mutant with its file, position, mutator and replacement.
|
|
135
|
+
|
|
3
136
|
## 1.0.0
|
|
4
137
|
|
|
5
138
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -29,4 +29,4 @@ Each concept module is an enumerated specifier:
|
|
|
29
29
|
|
|
30
30
|
## License
|
|
31
31
|
|
|
32
|
-
Apache-2.0. Part of [systemfsoftware](https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/
|
|
32
|
+
Apache-2.0. Part of [systemfsoftware](https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/stryker-js/stryker-js#readme).
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/stryker-js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
|
|
7
|
-
"directory": "packages/
|
|
7
|
+
"directory": "packages/stryker-js/stryker-js"
|
|
8
8
|
},
|
|
9
|
-
"homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/
|
|
9
|
+
"homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/stryker-js/stryker-js#readme",
|
|
10
10
|
"bugs": "https://github.com/systemfsoftware/systemfsoftware/issues",
|
|
11
11
|
"description": "The mutation-testing language — concept modules, no platform.",
|
|
12
12
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"effect": "^4.0.0-rc.112",
|
|
22
22
|
"mutation-testing-report-schema": "3.7.3",
|
|
23
|
-
"@systemfsoftware/effect-cell-types": "^6.0.
|
|
23
|
+
"@systemfsoftware/effect-cell-types": "^6.0.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"tsdown": "^0.22.14",
|
|
32
32
|
"typescript": "^7",
|
|
33
33
|
"vitest": "^4",
|
|
34
|
-
"@systemfsoftware/
|
|
35
|
-
"@systemfsoftware/effect-schema-vite": "^2.0.
|
|
36
|
-
"@systemfsoftware/all": "^1.1.2",
|
|
34
|
+
"@systemfsoftware/all": "^1.1.3",
|
|
35
|
+
"@systemfsoftware/effect-schema-vite": "^2.0.3",
|
|
37
36
|
"@systemfsoftware/tsconfig": "^1.3.3",
|
|
38
|
-
"@systemfsoftware/vitest-config": "^0.1.0"
|
|
37
|
+
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
38
|
+
"@systemfsoftware/effect-schema-law": "^2.0.2"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public",
|