@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 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 { StrykerConfig } from '@systemfsoftware/stryker-js/config'
27
+ import { defineConfig } from '@systemfsoftware/stryker-js/config'
28
28
 
29
- export default StrykerConfig.define({
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 { StrykerConfig } from '@systemfsoftware/stryker-js/config'
67
+ import { defineConfig } from '@systemfsoftware/stryker-js/config'
68
68
 
69
- export default StrykerConfig.define({
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 { StrykerConfig } from '@systemfsoftware/stryker-js/config'
83
+ import { defineConfig } from '@systemfsoftware/stryker-js/config'
84
84
 
85
- export default StrykerConfig.define({
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
- ### `StrykerConfig.define(options | configFactory)`
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 StrykerConfig.define(({ isCi, command }) => ({
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
- ### `StrykerConfig.merge(base, overrides)`
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 { StrykerConfig } from '@systemfsoftware/stryker-js/config'
118
+ import { mergeConfig } from '@systemfsoftware/stryker-js/config'
119
119
  import baseConfig from './stryker.base.config.ts'
120
120
 
121
- export default StrykerConfig.merge(baseConfig, {
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` | `StrykerConfig` authoring surface (`define`, `merge`) |
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