@systemfsoftware/stryker-js-cli 8.0.0 → 9.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,47 @@
1
1
  # @systemfsoftware/stryker-js-cli
2
2
 
3
+ ## 9.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - The plugin system now runs each configured TestRunner/Checker/Reporter plugin in its own spawned process over an @effect/rpc wire: plugins load from the project's config-declared specifiers (no glob discovery), boundary failures are typed errors, and plugin spans link into the host trace. Breaking: the in-process plugin Layer contract is removed.
8
+
9
+ - Configuration is now a TypeScript or ECMAScript module — `stryker.config.ts`, `.mts`, `.js`, `.mjs`, or their `stryker.conf.*` twins — default-exporting the options object, and `--configFile` accepts only those extensions. JSON and CommonJS configs are no longer read: when one exists with no supported config file present, the run exits with the config error class naming the file and the supported extensions instead of running on defaults. `.ts`/`.mts` load through native type stripping, so a config must be erasable syntax — no `enum`, runtime `namespace`, parameter properties, or decorators. Node.js 22.18.0 or later is required (`>=22.18.0`).
10
+
11
+ To migrate, rename the file and convert the JSON object to a default export. From:
12
+
13
+ ```jsonc
14
+ {
15
+ "testRunner": "vitest",
16
+ "mutate": ["src/**/*.ts"]
17
+ }
18
+ ```
19
+
20
+ to:
21
+
22
+ ```ts
23
+ export default {
24
+ testRunner: 'vitest',
25
+ mutate: ['src/**/*.ts'],
26
+ }
27
+ ```
28
+
29
+ ### Minor Changes
30
+
31
+ - Exit codes are now published through the runtime's default teardown: interrupt runs exit 130, and classed failures carry their code on the failure. Runs stopped by SIGTERM now exit 130 instead of 143.
32
+
33
+ - The CLI now exports OpenTelemetry traces when `OTEL_ENABLED=true`: one `stryker.cli.run` span per run, annotated with the outcome (`stryker.run.outcome`), the process exit code (`stryker.run.exit_code`), and the failure text (`stryker.run.error`). Spans export over OTLP/HTTP to `OTEL_EXPORTER_OTLP_ENDPOINT` (default `http://127.0.0.1:4318`) under `OTEL_SERVICE_NAME` (default `stryker-js`); with `OTEL_ENABLED` unset or false, the CLI emits nothing and takes no exporter dependency at runtime.
34
+
35
+ ### Patch Changes
36
+
37
+ - chore(release): force patch release for @systemfsoftware/stryker-js-cli via workflow dispatch
38
+
39
+ ## 8.0.1
40
+
41
+ ### Patch Changes
42
+
43
+ - Imports rewired to the collapsed `@systemfsoftware/stryker-js` root entry; each package now co-releases against the root-entry major.
44
+
3
45
  ## 8.0.0
4
46
 
5
47
  ### Major Changes
package/README.md CHANGED
@@ -18,17 +18,17 @@ npm install --save-dev @systemfsoftware/stryker-js-cli
18
18
  npx stryker run
19
19
  ```
20
20
 
21
- With a `stryker.config.json`:
21
+ With a `stryker.config.ts`:
22
22
 
23
- ```json
24
- {
25
- "testRunner": "command",
26
- "mutate": ["src/**/*.js"],
27
- "thresholds": { "high": 100, "low": 80, "break": 0 }
23
+ ```ts
24
+ export default {
25
+ testRunner: 'command',
26
+ mutate: ['src/**/*.js'],
27
+ thresholds: { high: 100, low: 80, break: 0 },
28
28
  }
29
29
  ```
30
30
 
31
- Requires Node.js 20 or later.
31
+ Requires Node.js 22.18.0 or later (`>=22.18.0`).
32
32
 
33
33
  ## Usage
34
34
 
@@ -69,16 +69,16 @@ human path.
69
69
 
70
70
  ## Exit codes
71
71
 
72
- The highest pending class wins; a terminating signal outranks all of them.
72
+ The highest pending class wins; an interrupt outranks all of them.
73
73
 
74
- | Code | Meaning |
75
- | --------- | -------------------------------------------- |
76
- | `0` | Score cleared the `break` threshold |
77
- | `1` | Verdict failed |
78
- | `2` | Config error |
79
- | `3` | Runtime error |
80
- | `4` | Internal error |
81
- | `128 + n` | Terminated by signal `n` — `SIGINT` is `130` |
74
+ | Code | Meaning |
75
+ | ----- | ----------------------------------- |
76
+ | `0` | Score cleared the `break` threshold |
77
+ | `1` | Verdict failed |
78
+ | `2` | Config error |
79
+ | `3` | Runtime error |
80
+ | `4` | Internal error |
81
+ | `130` | Interrupted (SIGINT/SIGTERM) |
82
82
 
83
83
  ## Related
84
84
 
@@ -93,10 +93,10 @@ Licensed under [Apache 2.0][license-url].
93
93
 
94
94
  [npm-badge]: https://img.shields.io/npm/v/@systemfsoftware/stryker-js-cli?style=flat-square
95
95
  [npm-url]: https://www.npmjs.com/package/@systemfsoftware/stryker-js-cli
96
- [ci-badge]: https://img.shields.io/github/actions/workflow/status/systemfsoftware/systemfsoftware/release.yml?branch=main&style=flat-square&label=CI
97
- [ci-url]: https://github.com/systemfsoftware/systemfsoftware/actions
98
- [license-badge]: https://img.shields.io/badge/license-Apache_2.0-blue?style=flat-square
99
- [license-url]: https://github.com/systemfsoftware/systemfsoftware/blob/main/LICENSE
100
- [repo]: https://github.com/systemfsoftware/systemfsoftware
101
- [engine]: https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/stryker-js/stryker-js-engine
96
+ [ci-badge]: https://img.shields.io/github/actions/workflow/status/systemfsoftware/stryker-js-effect/release.yml?branch=main&style=flat-square&label=CI
97
+ [ci-url]: https://github.com/systemfsoftware/stryker-js-effect/actions
98
+ [license-badge]: https://img.shields.io/badge/License-Apache_2.0-blue?style=flat-square
99
+ [license-url]: https://github.com/systemfsoftware/stryker-js-effect/blob/main/LICENSE
100
+ [repo]: https://github.com/systemfsoftware/stryker-js-effect
101
+ [engine]: https://github.com/systemfsoftware/stryker-js-effect/tree/main/packages/stryker-js-engine
102
102
  [docs]: https://stryker-mutator.io/docs/stryker-js/configuration/