@systemfsoftware/stryker-js-plugin-interface 5.0.0 → 6.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,80 @@
1
1
  # @systemfsoftware/stryker-js-plugin-interface
2
2
 
3
+ ## 6.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - `testRunner`, `checkers`, and `ignorers` now carry the plugin and its options together.
8
+
9
+ - `testRunner` is `'command'`, `'vm'`, or `{ plugin, options?, nodeArgs? }`.
10
+ - `checkers` is `{ plugin, options?, nodeArgs? }[]`. Each checker is its own plugin.
11
+ - `ignorers` is plugin file URLs. Every ignorer those modules export runs. There is no separate name list.
12
+ - Put Vitest settings on `testRunner.options` (`configFile`, `dir`, `related`). There is no `vitest` block.
13
+ - Put TypeScript checker settings on that checker's `options` (`prioritizePerformanceOverAccuracy`). There is no `typescriptChecker` block.
14
+
15
+ Before:
16
+
17
+ ```ts
18
+ export default defineConfig({
19
+ testRunner: 'vitest',
20
+ checkers: ['typescript'],
21
+ plugins: [
22
+ import.meta.resolve('@systemfsoftware/stryker-js-vitest-runner'),
23
+ import.meta.resolve('@systemfsoftware/stryker-js-typescript-checker'),
24
+ import.meta.resolve('@systemfsoftware/stryker-ignorer-effect-schema-declarations'),
25
+ ],
26
+ vitest: { configFile: 'vitest.config.ts' },
27
+ typescriptChecker: { prioritizePerformanceOverAccuracy: true },
28
+ ignorers: ['effect-schema-declarations'],
29
+ })
30
+ ```
31
+
32
+ After:
33
+
34
+ ```ts
35
+ export default defineConfig({
36
+ testRunner: {
37
+ plugin: import.meta.resolve('@systemfsoftware/stryker-js-vitest-runner'),
38
+ options: { configFile: 'vitest.config.ts' },
39
+ },
40
+ checkers: [
41
+ {
42
+ plugin: import.meta.resolve('@systemfsoftware/stryker-js-typescript-checker'),
43
+ options: { prioritizePerformanceOverAccuracy: true },
44
+ },
45
+ ],
46
+ ignorers: [
47
+ import.meta.resolve('@systemfsoftware/stryker-ignorer-effect-schema-declarations'),
48
+ ],
49
+ })
50
+ ```
51
+
52
+ - Plugin entries in `plugins` and `appendPlugins` are now the entrypoints
53
+ themselves, as `file:` URLs, instead of package names Stryker resolved for you.
54
+
55
+ Stryker resolved every specifier against its own module before, so a plugin the
56
+ project had installed was only found when Node happened to walk to the right
57
+ `node_modules` from Stryker's location — which is not the project's location for
58
+ a global install, an `npx` run, or a strict isolated store. The project now
59
+ resolves each plugin itself, in the config module where the project's own
60
+ dependencies are visible:
61
+
62
+ ```ts
63
+ import { defineConfig } from '@systemfsoftware/stryker-js/config'
64
+
65
+ export default defineConfig({
66
+ plugins: [import.meta.resolve('@acme/stryker-runner')],
67
+ })
68
+ ```
69
+
70
+ The `--plugins` and `--appendPlugins` flags take the same resolved URLs. A value
71
+ that is not a `file:` URL is refused with the entry named.
72
+
73
+ Stryker no longer reports an unresolved specifier as a warning it can continue
74
+ past, because it no longer resolves one: a plugin that cannot be loaded stops
75
+ the run and names the entry, and a plugin that loads but contributes nothing is
76
+ still reported as before.
77
+
3
78
  ## 5.0.0
4
79
 
5
80
  ### Major Changes
package/README.md CHANGED
@@ -5,8 +5,8 @@ checker, or reporter — ships a spawn entrypoint whose target hosts an `RpcServ
5
5
  for its kind's `@effect/rpc` group; the host resolves that entrypoint from the
6
6
  project's config, spawns it, and drives it over NDJSON. Every payload crossing
7
7
  the boundary is a schema this package owns, and every failure is a typed variant.
8
- The concept modules a plugin implements live in
9
- `@systemfsoftware/stryker-js-language`.
8
+ The concept modules a plugin implements the test-runner and checker services and
9
+ the schemas they carry — ship from this package too.
10
10
 
11
11
  The boundary ships as two packages:
12
12