@systemfsoftware/stryker-js 11.0.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 +21 -0
- package/README.md +18 -18
- package/dist/{dist-ClUhPgb6.mjs → Run.schema-BxsyHwHr.mjs} +2941 -2700
- package/dist/{Run.schema-CUpTIyrj.d.mts → Run.schema-D43Nx5kI.d.mts} +1 -1
- package/dist/{RunEnvironment.service-zgwzyXpO.d.mts → RunEnvironment.service-pCzdC0Sy.d.mts} +51 -43
- package/dist/config.d.mts +15 -3
- package/dist/config.mjs +7 -2
- package/dist/events.d.mts +1 -1
- package/dist/events.mjs +1 -1
- package/dist/{index-CMCCQdTd.d.mts → index-f-U3oZaJ.d.mts} +4 -5
- package/dist/index.d.mts +22 -20
- package/dist/index.mjs +4 -4
- package/dist/main.mjs +6940 -6391
- package/dist/merge-config-ByZJPeQZ.mjs +32 -0
- package/dist/promises.d.mts +2 -2
- package/dist/promises.mjs +1 -1
- package/dist/{run-stages.cell-CPpkn7og.mjs → run-stages.cell-MyhsNxH2.mjs} +605 -424
- package/dist/stryker-config.schema-GS_4_5gX.d.mts +18 -0
- package/package.json +15 -20
- package/dist/Run.schema-B_qdjbe9.mjs +0 -226
- package/dist/stryker-config.schema-CCnDtVuW.mjs +0 -82
- package/dist/stryker-config.schema-lr7GMjpY.d.mts +0 -35
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
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
|
+
|
|
3
24
|
## 11.0.0
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -24,9 +24,9 @@ pnpm add -D @systemfsoftware/stryker-js \
|
|
|
24
24
|
Create `stryker.config.ts` in your project root:
|
|
25
25
|
|
|
26
26
|
```ts
|
|
27
|
-
import {
|
|
27
|
+
import { defineConfig } from '@systemfsoftware/stryker-js/config'
|
|
28
28
|
|
|
29
|
-
export default
|
|
29
|
+
export default defineConfig({
|
|
30
30
|
testRunner: 'vitest',
|
|
31
31
|
checkers: ['typescript'],
|
|
32
32
|
plugins: [
|
|
@@ -64,9 +64,9 @@ Set `testFiles` explicitly, or pick one of the runners below, to take control.
|
|
|
64
64
|
Execute any test suite without extra plugins:
|
|
65
65
|
|
|
66
66
|
```ts
|
|
67
|
-
import {
|
|
67
|
+
import { defineConfig } from '@systemfsoftware/stryker-js/config'
|
|
68
68
|
|
|
69
|
-
export default
|
|
69
|
+
export default defineConfig({
|
|
70
70
|
testRunner: 'command',
|
|
71
71
|
commandRunner: {
|
|
72
72
|
command: 'npm test',
|
|
@@ -80,9 +80,9 @@ export default StrykerConfig.define({
|
|
|
80
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.
|
|
81
81
|
|
|
82
82
|
```ts
|
|
83
|
-
import {
|
|
83
|
+
import { defineConfig } from '@systemfsoftware/stryker-js/config'
|
|
84
84
|
|
|
85
|
-
export default
|
|
85
|
+
export default defineConfig({
|
|
86
86
|
testRunner: 'vm',
|
|
87
87
|
testFiles: ['test/**/*.test.ts'],
|
|
88
88
|
mutate: ['src/**/*.ts', '!src/**/*.test.ts'],
|
|
@@ -91,18 +91,18 @@ export default StrykerConfig.define({
|
|
|
91
91
|
|
|
92
92
|
## Configuration API (`@systemfsoftware/stryker-js/config`)
|
|
93
93
|
|
|
94
|
-
The `./config` subpath exports the typed configuration authoring surface:
|
|
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.
|
|
95
95
|
|
|
96
96
|
```ts
|
|
97
|
-
import { StrykerConfig } from '@systemfsoftware/stryker-js/config'
|
|
97
|
+
import { defineConfig, type StrykerConfig } from '@systemfsoftware/stryker-js/config'
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
### `
|
|
100
|
+
### `defineConfig(options | configFactory)`
|
|
101
101
|
|
|
102
102
|
Identity function providing strict autocompletion and type checking without runtime dependencies. Can take a configuration object or a factory receiving `ConfigEnv`:
|
|
103
103
|
|
|
104
104
|
```ts
|
|
105
|
-
export default
|
|
105
|
+
export default defineConfig(({ isCi, command }) => ({
|
|
106
106
|
testRunner: 'vitest',
|
|
107
107
|
plugins: ['@systemfsoftware/stryker-js-vitest-runner'],
|
|
108
108
|
mutate: ['src/**/*.ts', '!src/**/*.test.ts'],
|
|
@@ -110,15 +110,15 @@ export default StrykerConfig.define(({ isCi, command }) => ({
|
|
|
110
110
|
}))
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
### `
|
|
113
|
+
### `mergeConfig(base, overrides)`
|
|
114
114
|
|
|
115
115
|
Deeply merges configuration presets. Keys in records merge recursively; scalar values and arrays in `overrides` completely replace base values:
|
|
116
116
|
|
|
117
117
|
```ts
|
|
118
|
-
import {
|
|
118
|
+
import { mergeConfig } from '@systemfsoftware/stryker-js/config'
|
|
119
119
|
import baseConfig from './stryker.base.config.ts'
|
|
120
120
|
|
|
121
|
-
export default
|
|
121
|
+
export default mergeConfig(baseConfig, {
|
|
122
122
|
concurrency: 8,
|
|
123
123
|
mutate: ['packages/core/src/**/*.ts'],
|
|
124
124
|
})
|
|
@@ -180,11 +180,11 @@ console.log(`Mutation score: ${verdict.score}%`)
|
|
|
180
180
|
|
|
181
181
|
## Published Subpaths
|
|
182
182
|
|
|
183
|
-
| Subpath | Description
|
|
184
|
-
| ------------ |
|
|
185
|
-
| `.` | Main entry point: `strykerCell`, runtime layers, and error schemas
|
|
186
|
-
| `./config` |
|
|
187
|
-
| `./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 |
|
|
188
188
|
|
|
189
189
|
## License
|
|
190
190
|
|