@systemfsoftware/stryker-js-plugin-interface 4.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 ADDED
@@ -0,0 +1,94 @@
1
+ # @systemfsoftware/stryker-js-plugin-interface
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
+
78
+ ## 5.0.0
79
+
80
+ ### Major Changes
81
+
82
+ - 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.
83
+
84
+ - `@systemfsoftware/stryker-js` is renamed to `@systemfsoftware/stryker-js-language`, and the plugin boundary now ships as the two packages `@systemfsoftware/stryker-js-plugin-interface` and `@systemfsoftware/stryker-js-plugin-runtime`.
85
+
86
+ `@systemfsoftware/stryker-js-plugin-interface` owns the contract both sides of the process split agree on: the per-kind `@effect/rpc` groups (`TestRunnerRpcs`, `CheckerRpcs`, `ReporterRpcs`), the boundary payload schemas, the typed boundary errors (`BoundaryPayloadRejected`, `BoundaryUnrecognizedSignal`), the spawn contract (`WorkerPluginKind`, `WorkerPluginSpawnSchema`, `WorkerEntryUrl`), and the trace-context contract (`TraceContextMiddleware`, `PropagatedTrace`, `TracedRpc`, `formatTraceparent`, `parseTraceparent`, `TraceContextReference`, `TRACEPARENT_HEADER`, `TRACESTATE_HEADER`).
87
+
88
+ `@systemfsoftware/stryker-js-plugin-runtime` owns what a plugin process actually runs: the worker server layer a plugin's `main.ts` launches (`workerServerLayer`, `nodeModuleLayer`), the worker and host OTel bootstraps (`startWorkerTelemetry`, `startHostTelemetry`), the worker-options wire codec (`encodeWorkerOptions`, `decodeWorkerOptions`, `readWorkerOptionsFromEnv`), and the trace-context middleware implementations (`layerTraceContextClient`, `layerTraceContextServer`, `withLinkedSpan`, `tracePartsOf`).
89
+
90
+ To migrate, update the package name on every import that is not a plugin symbol to `@systemfsoftware/stryker-js-language`; install `@systemfsoftware/stryker-js-plugin-interface` and import the contract symbols listed above from it, and install `@systemfsoftware/stryker-js-plugin-runtime` for the worker-side symbols. The former in-process surface (`declarePlugin`, `composePlugins`, `PluginContribution`, `PluginLayerContribution`, `PluginKind`, `PluginEnvironment`, `RunConfiguration`, `SandboxDirectory`) no longer exists: a plugin now declares `strykerPlugins: readonly { kind, name }[]` and a worker entry exported under `./worker` (or a `bin`) that serves the per-kind `RpcServer`.
91
+
92
+ ### Patch Changes
93
+
94
+ - Maintenance release. Every published entry point, export, option, and behaviour is exactly as it was.
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