@systemfsoftware/stryker-plugins 0.7.0 → 0.9.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.
Files changed (2) hide show
  1. package/README.md +32 -24
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,32 +1,13 @@
1
1
  # @systemfsoftware/stryker-plugins
2
2
 
3
- [Stryker](https://stryker-mutator.io) mutation-testing plugins for [Effect](https://effect.website).
3
+ ![version](https://img.shields.io/npm/v/@systemfsoftware/stryker-plugins)
4
+ ![license](https://img.shields.io/npm/l/@systemfsoftware/stryker-plugins)
4
5
 
5
- ## `effect-schema-ignorer`
6
+ > Stop Effect `Schema` declarations from dragging your Stryker score below 100%.
6
7
 
7
- A Stryker **Ignore** plugin (`effect-schema-declarations`) that skips the _equivalent_ mutants on Effect `Schema` declarations mutations that change source without changing behaviour, so no test can ever kill them. It recognizes and ignores:
8
+ A brand description, a `_tag`, a `title` mutate any of them and the source changes but the behaviour does not, so no test can ever kill the mutant. Those unkillable mutants sit in your report forever, indistinguishable from real coverage gaps. This [Stryker](https://stryker-mutator.io) Ignore plugin removes them, so the score that remains is behaviour.
8
9
 
9
- - brand descriptions in `Symbol.for('…')`,
10
- - `Schema.TaggedClass` / `Schema.TaggedError` `_tag` identifiers,
11
- - the field schemas of those declarations,
12
- - `optionalWith` default values,
13
- - the documentation entries of an `annotations({…})` call — `identifier`, `description`, `title`, `documentation`, `examples`,
14
- - an `annotations({…})` object whose entries are _all_ documentation.
15
-
16
- The last two are deliberately asymmetric. Replacing a `title` cannot change what a
17
- schema does, so it is ignored wherever it appears. Emptying the whole object can —
18
- `annotations({ arbitrary })` holds the generator the property tests draw from, and
19
- dropping it silently changes what gets generated. So an object is ignored only when
20
- every entry in it documents; one behaviour-bearing sibling keeps the object mutated
21
- while its documentation entries stay ignored.
22
-
23
- `arbitrary`, `pretty`, `equivalence`, `message`, `jsonSchema` and `parseIssueTitle`
24
- are absent from the documentation set by design: each alters observable behaviour, so
25
- a surviving mutant of one is a test gap to close, never an equivalent mutant to hide.
26
-
27
- Schema declarations are **data, not behaviour** (Constitution Article III §4) — mutating them produces unkillable equivalent mutants that drag a mutation score below 100% for no real coverage gap. This plugin removes that noise so the score reflects logic.
28
-
29
- ## Usage
10
+ ## Install
30
11
 
31
12
  ```bash
32
13
  pnpm add -D @systemfsoftware/stryker-plugins
@@ -45,5 +26,32 @@ In `stryker.config.json`:
45
26
  }
46
27
  ```
47
28
 
29
+ Mutants it recognizes are reported as `Ignored`, each carrying the reason it was safe to skip.
30
+
48
31
  > [!NOTE]
49
32
  > `@stryker-mutator/api` is a peer dependency — your Stryker install provides it. `effect` is a direct dependency (the plugin decodes AST nodes with `Schema`).
33
+
34
+ ## What it ignores
35
+
36
+ | Declaration | Example |
37
+ | --------------------------------------------------------- | ----------------------------------------------------------------- |
38
+ | Brand descriptions | `Symbol.for('UserId')` |
39
+ | `TaggedClass` / `TaggedError` tags | `S.TaggedClass<A>()('Placed', {…})` |
40
+ | The field schemas of those declarations | the `{…}` above |
41
+ | `optionalWith` defaults | `S.optionalWith(S.Number, { default: () => 0 })` |
42
+ | Documentation annotations | `identifier`, `description`, `title`, `documentation`, `examples` |
43
+ | An `annotations({…})` object that is _only_ documentation | `S.annotations({ title: 'Amount' })` |
44
+
45
+ ## Where the line is
46
+
47
+ Every ignore is proven redundant, never merely assumed — anything a test could observe keeps its mutants.
48
+
49
+ `arbitrary`, `pretty`, `equivalence`, `message`, `jsonSchema` and `parseIssueTitle` are **not** documentation: each changes what the schema does, so a survivor there is a test gap to close. That is why the two `annotations` rules differ — a `title` is ignored wherever it appears, but the enclosing object is ignored only when every entry documents, since emptying an object holding an `arbitrary` would silently change what your property tests generate.
50
+
51
+ ## Contributing
52
+
53
+ Development setup and workflow: [AGENTS.md](AGENTS.md).
54
+
55
+ ## License
56
+
57
+ [MIT](LICENSE)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-plugins",
3
3
  "license": "MIT",
4
- "version": "0.7.0",
4
+ "version": "0.9.0",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -56,9 +56,9 @@
56
56
  "@systemfsoftware/effect-schema-vite": "^1.4.0",
57
57
  "@systemfsoftware/oxlint-config": "^0.1.0",
58
58
  "@systemfsoftware/stryker-js-core": "^1.1.6",
59
+ "@systemfsoftware/stryker-js-typescript-checker": "^1.1.6",
59
60
  "@systemfsoftware/tsconfig": "^1.2.6",
60
- "@systemfsoftware/vitest-config": "^0.1.0",
61
- "@systemfsoftware/stryker-js-typescript-checker": "^1.1.6"
61
+ "@systemfsoftware/vitest-config": "^0.1.0"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@stryker-mutator/api": "^9.6.1",