@systemfsoftware/stryker-js-instrumenter 8.1.0 → 9.0.1

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,62 @@
1
1
  # @systemfsoftware/stryker-js-instrumenter
2
2
 
3
+ ## 9.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - The packages now build on the latest `@systemfsoftware/effect-cell-types` 10.2 cell kinds, with no change to their published behavior.
8
+
9
+ - `@systemfsoftware/stryker-test-contribution` exports its evaluator as `Judge`, `TestContribution`, and `TestContributionEvaluator`, and now depends on `effect` directly.
10
+
11
+ ## 9.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - Mutant ids, mutator names and file names are now branded schemas, and the string helpers are replaced by codecs.
16
+
17
+ - Build ids and names with `MutantId`, `MutatorName` and `CanonicalFileName`. Empty values are refused.
18
+ - Replace `errorToString` with `ErrorText.fromCause` and `causeText` with `CauseText.fromCause`. Both return an `Option`.
19
+ - Replace `normalizeFileName` with a `CanonicalFileName` decode, and `isMutant` with `Schema.is(Mutant)`.
20
+ - Read the values formerly in `INSTRUMENTER_CONSTANTS` from the `InstrumenterContext` statics.
21
+
22
+ - Each package's main entry point now groups its exports into namespaces named after a capability, such as `Plugin`, `TestRunner` and `Report`.
23
+
24
+ - Import the namespace and qualify each name, for example `Plugin.TestRunnerRpcs` after importing `Plugin` from the plugin interface.
25
+ - Import instrumenter schemas such as `Location` and `MutantStatus` from the instrumenter's `Mutant` namespace, and plugin-interface names from the plugin interface, instead of through another package's entry point.
26
+ - The engine's `/config`, `/events` and `/promises` entry points are unchanged.
27
+
28
+ - HTML templates and Svelte components are no longer instrumented by this package
29
+ on their own: each format now comes from its framework plugin, the Angular
30
+ plugin for `.html`, `.htm`, and `.vue` and the Svelte plugin for `.svelte`, both
31
+ published alongside this release. Install the plugin whose format your project
32
+ uses and add it to `plugins`. A file whose extension no loaded format claims is
33
+ reported in the run's skipped files instead of being instrumented, and `svelte`
34
+ is no longer an optional peer dependency of this package; the
35
+ `angular-html-parser` dependency moves to the Angular plugin.
36
+
37
+ The Angular signal ignore rule is unaffected and continues to ship in
38
+ `@systemfsoftware/stryker-ignorer-angular`.
39
+
40
+ - The format registry can now be extended with a framework plugin's contribution:
41
+ `frameworkEntryOf` adapts a `Framework` into a registry entry whose parse,
42
+ transform, print, and disable-type-checks hooks delegate to the plugin over its
43
+ embedded document, and the AST union gains the embedded-document variant those
44
+ entries parse to.
45
+
46
+ A registry entry you build yourself must now declare the `owner` module of its
47
+ format, the `ownerVersion` incremental state keys on, and a `transform` hook; an
48
+ entry without them no longer type-checks.
49
+
50
+ ### Patch Changes
51
+
52
+ - Every mutant now reports its position as 1-based coordinates — the base the
53
+ mutation-testing report schema uses, where the first line of a file and the
54
+ first character of a line both sit at the first position.
55
+
56
+ A mutant in a plain TypeScript or JavaScript file previously reported a line one
57
+ below its real position, so pointing a reader at the reported coordinates
58
+ highlighted the wrong line.
59
+
3
60
  ## 8.1.0
4
61
 
5
62
  ### Minor Changes
package/README.md CHANGED
@@ -16,6 +16,8 @@ pnpm add @systemfsoftware/stryker-js-instrumenter
16
16
 
17
17
  The instrumenter is used internally by the Stryker mutation testing framework to instrument source files with mutant coverage and switching logic.
18
18
 
19
+ File formats resolve through a format registry: `coreFormatRegistry` carries the built-in `js`/`ts`/`tsx` entries, `frameworkEntryOf` adapts a framework's `Framework` object into an entry, and `registerEntries` folds additions into a registry (an extension already claimed stays with the earlier entry). `instrument(files, options, registry)` and `disableTypeChecks(file, registry)` accept that registry — defaulting to the core one — and `instrument` returns the files it skipped because no entry claimed their extension.
20
+
19
21
  ## Opt-in mutators
20
22
 
21
23
  Three mutators that plant Effect concurrency faults are available on request and stay out of the default set. Enable any subset in your Stryker config: