@systemfsoftware/stryker-js 10.2.0 → 12.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 +27 -0
- package/README.md +27 -19
- package/dist/{Run.schema-Ba34IwAY.mjs → Run.schema-BxsyHwHr.mjs} +4560 -5743
- package/dist/{Run.schema-B-Pi3bCB.d.mts → Run.schema-D43Nx5kI.d.mts} +91 -19
- package/dist/RunEnvironment.service-pCzdC0Sy.d.mts +464 -0
- package/dist/config.d.mts +11 -15
- package/dist/config.mjs +1 -1
- package/dist/{dist-CjdAPjrJ.mjs → dist-DKhCurgc.mjs} +95 -1
- package/dist/events.d.mts +2 -2
- package/dist/events.mjs +2 -2
- package/dist/index-f-U3oZaJ.d.mts +4086 -0
- package/dist/index.d.mts +1086 -3321
- package/dist/index.mjs +116 -3
- package/dist/main.mjs +114818 -87283
- package/dist/merge-config-ByZJPeQZ.mjs +32 -0
- package/dist/promises.d.mts +4 -4
- package/dist/promises.mjs +6 -10
- package/dist/{rolldown-runtime-XITHOX9H.mjs → rolldown-runtime-8H4AJuhK.mjs} +1 -2
- package/dist/run-stages.cell-MyhsNxH2.mjs +8820 -0
- package/dist/stryker-config.schema-GS_4_5gX.d.mts +18 -0
- package/package.json +27 -47
- package/dist/compiler-BTpMWGqK.mjs +0 -48955
- package/dist/compiler-CEwQzMxZ.mjs +0 -48955
- package/dist/dist-Cpq7Esc3.mjs +0 -17404
- package/dist/dist-Dmv1WEP8.mjs +0 -5337
- package/dist/dist-DsmXFb2_.mjs +0 -17404
- package/dist/index-tt2EziOT.d.mts +0 -1216
- package/dist/merge-config-CHZWyvVQ.mjs +0 -19
- package/dist/mutation-test.cell-Dq23b2NP.d.mts +0 -1758
- package/dist/output-mode-CfGHDpi5.d.mts +0 -17
- package/dist/sourcemap-codec-qFD3eFBj.mjs +0 -186
- package/dist/src-CcqEZJIY.mjs +0 -6559
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js
|
|
2
2
|
|
|
3
|
+
## 12.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- Restore `defineConfig` and `mergeConfig` on `@systemfsoftware/stryker-js/config`. `defineConfig` accepts an options object, a promise of one, or a `(env: ConfigEnv) => …` factory, as in 10.1.1, and `mergeConfig(defaults, overrides)` composes presets again. `StrykerConfig` is again the partial-options type, so `const config: StrykerConfig = defineConfig({ … })` typechecks. Config files written against the 10.1.1 `./config` surface load and typecheck without edits.
|
|
8
|
+
|
|
9
|
+
This removes the 11.0.0 `StrykerConfig` class value. If you adopted it:
|
|
10
|
+
|
|
11
|
+
- Replace `StrykerConfig.define(…)` with `defineConfig(…)` and `StrykerConfig.merge(…)` with `mergeConfig(…)`, imported from `@systemfsoftware/stryker-js/config`.
|
|
12
|
+
- Replace `StrykerConfig.createDefaultOptions()` and `StrykerConfig.defaultOptions` with `Configuration.createDefaultOptions()` and `Configuration.defaultOptions` from the package entry point.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- A failed dry run now says which tests broke and why. The refusal names every failing test with its failure message in the error output and in the log at the default level, instead of reporting only how many failed.
|
|
17
|
+
|
|
18
|
+
- Installing `@systemfsoftware/stryker-js` on its own now works. `effect` was declared an optional peer even though Stryker imports it at runtime. Package managers never install optional peers, so a project without `effect` failed with `Failed to read config` before the run started. `effect` is now a required peer: pnpm and npm install it automatically, and a project that already uses Effect shares its own copy with Stryker.
|
|
19
|
+
|
|
20
|
+
- The packages now build on the latest `@systemfsoftware/effect-cell-types` 10.2 cell kinds, with no change to their published behavior.
|
|
21
|
+
|
|
22
|
+
- `@systemfsoftware/stryker-test-contribution` exports its evaluator as `Judge`, `TestContribution`, and `TestContributionEvaluator`, and now depends on `effect` directly.
|
|
23
|
+
|
|
24
|
+
## 11.0.0
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- A mutation run no longer stalls forever when a checker or test-runner worker stops answering its connection. Previously a request that was in flight when the worker's connection dropped kept waiting on the dead connection, freezing progress until the CI timeout killed the run. Such a request now fails with a typed connection error when its connection drops, and the worker is restarted per the existing crash policy. Only requests already sent on the dropped connection fail: the client still reconnects on its own, and requests made while it reconnects, including the first request to a worker that is still booting, wait for the connection instead of failing.
|
|
29
|
+
|
|
3
30
|
## 10.2.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The modern mutation testing framework for JavaScript and TypeScript.
|
|
4
4
|
A ground-up, breaking-change fork of `@stryker-mutator/core` built with Effect 4:
|
|
5
|
-
provides the `stryker` executable, in-
|
|
5
|
+
provides the `stryker` executable, in-process `vm` and isolated Vitest runners,
|
|
6
6
|
and the typed `./config` authoring surface.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
@@ -30,8 +30,8 @@ export default defineConfig({
|
|
|
30
30
|
testRunner: 'vitest',
|
|
31
31
|
checkers: ['typescript'],
|
|
32
32
|
plugins: [
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
'@systemfsoftware/stryker-js-vitest-runner',
|
|
34
|
+
'@systemfsoftware/stryker-js-typescript-checker',
|
|
35
35
|
],
|
|
36
36
|
mutate: [
|
|
37
37
|
'src/**/*.ts',
|
|
@@ -54,6 +54,11 @@ pnpm exec stryker run
|
|
|
54
54
|
|
|
55
55
|
## Zero-Plugin Built-in Runners
|
|
56
56
|
|
|
57
|
+
The `vm` runner is the default: with no `testRunner` and no `testFiles`
|
|
58
|
+
configured, it discovers `*.test` / `*.spec` files itself and runs them. It loads
|
|
59
|
+
your suites through your project's `vitest`, so `vitest` must be installed.
|
|
60
|
+
Set `testFiles` explicitly, or pick one of the runners below, to take control.
|
|
61
|
+
|
|
57
62
|
### 1. Shell Command Runner (`testRunner: 'command'`)
|
|
58
63
|
|
|
59
64
|
Execute any test suite without extra plugins:
|
|
@@ -70,9 +75,9 @@ export default defineConfig({
|
|
|
70
75
|
})
|
|
71
76
|
```
|
|
72
77
|
|
|
73
|
-
### 2. In-
|
|
78
|
+
### 2. In-Process `vm` Runner (`testRunner: 'vm'`)
|
|
74
79
|
|
|
75
|
-
|
|
80
|
+
Runs Vitest suites in-process, in one worker thread per test runner, loading each test file as native ESM through Node's module hooks. No child process and no bundler step. Each file gets its own module state by default; your `vitest.config.*` (environment, setup files, globals, projects) is picked up through your project's `vitest` install. Vitest browser-mode suites are refused with an error naming `testRunner: 'vitest'`; pick the `vitest` runner for those.
|
|
76
81
|
|
|
77
82
|
```ts
|
|
78
83
|
import { defineConfig } from '@systemfsoftware/stryker-js/config'
|
|
@@ -86,10 +91,10 @@ export default defineConfig({
|
|
|
86
91
|
|
|
87
92
|
## Configuration API (`@systemfsoftware/stryker-js/config`)
|
|
88
93
|
|
|
89
|
-
The `./config` subpath exports
|
|
94
|
+
The `./config` subpath exports the typed configuration authoring surface, including the `StrykerConfig` type naming the partial options a config file writes: a config annotated `const config: StrykerConfig = defineConfig({ ... })` typechecks and loads.
|
|
90
95
|
|
|
91
96
|
```ts
|
|
92
|
-
import { defineConfig,
|
|
97
|
+
import { defineConfig, type StrykerConfig } from '@systemfsoftware/stryker-js/config'
|
|
93
98
|
```
|
|
94
99
|
|
|
95
100
|
### `defineConfig(options | configFactory)`
|
|
@@ -99,7 +104,7 @@ Identity function providing strict autocompletion and type checking without runt
|
|
|
99
104
|
```ts
|
|
100
105
|
export default defineConfig(({ isCi, command }) => ({
|
|
101
106
|
testRunner: 'vitest',
|
|
102
|
-
plugins: [
|
|
107
|
+
plugins: ['@systemfsoftware/stryker-js-vitest-runner'],
|
|
103
108
|
mutate: ['src/**/*.ts', '!src/**/*.test.ts'],
|
|
104
109
|
concurrency: isCi ? 2 : 4,
|
|
105
110
|
}))
|
|
@@ -147,12 +152,15 @@ pnpm exec stryker merge-reports --output reports/mutation/mutation.json "reports
|
|
|
147
152
|
|
|
148
153
|
```ts
|
|
149
154
|
import { NodeRuntime } from '@effect/platform-node'
|
|
150
|
-
import {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
import { Engine } from '@systemfsoftware/stryker-js'
|
|
156
|
+
import * as Effect from 'effect/Effect'
|
|
157
|
+
|
|
158
|
+
NodeRuntime.runMain(
|
|
159
|
+
Engine.strykerCell({
|
|
160
|
+
mutate: ['src/**/*.ts'],
|
|
161
|
+
testRunner: 'command',
|
|
162
|
+
}).pipe(Effect.provide(Engine.nodePlatformLayer)),
|
|
163
|
+
)
|
|
156
164
|
```
|
|
157
165
|
|
|
158
166
|
### Vanilla Promise Interface (`./promises`)
|
|
@@ -172,11 +180,11 @@ console.log(`Mutation score: ${verdict.score}%`)
|
|
|
172
180
|
|
|
173
181
|
## Published Subpaths
|
|
174
182
|
|
|
175
|
-
| Subpath | Description
|
|
176
|
-
| ------------ |
|
|
177
|
-
| `.` | Main entry point: `strykerCell`, runtime layers, and error schemas
|
|
178
|
-
| `./config` | `defineConfig`, `mergeConfig`,
|
|
179
|
-
| `./promises` | `run()` wrapper returning standard JavaScript promises
|
|
183
|
+
| Subpath | Description |
|
|
184
|
+
| ------------ | ------------------------------------------------------------------------- |
|
|
185
|
+
| `.` | Main entry point: `strykerCell`, runtime layers, and error schemas |
|
|
186
|
+
| `./config` | Config authoring surface (`defineConfig`, `mergeConfig`, `StrykerConfig`) |
|
|
187
|
+
| `./promises` | `run()` wrapper returning standard JavaScript promises |
|
|
180
188
|
|
|
181
189
|
## License
|
|
182
190
|
|