@systemfsoftware/stryker-ignorer-effect-schema-declarations 0.0.0 → 0.1.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 ADDED
@@ -0,0 +1,27 @@
1
+ # @systemfsoftware/stryker-ignorer-effect-schema-declarations
2
+
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Effect moves to `4.0.0-rc.116` (with `@effect/platform-node`, `@effect/platform-node-shared`, `@effect/vitest` and `@effect/opentelemetry` on the same release), the `@systemfsoftware/*` toolchain pins move to their current releases, and `vitest` 5 with `oxc-parser` 0.150 come along. Both worker bundles (`stryker-js-typescript-checker`, `stryker-js-vitest-runner`) now inline their whole runtime rather than resolving `effect`, `@effect/*` and the sibling packages from the host's tree, so a worker runs on its own copy of the effect that built it; the project's `typescript` and `vitest` remain the only imports beside Node builtins. The filter-level `arbitrary.candidate` generators that the thresholds schemas carried are gone: v4 no longer reads them, so thresholds still reject a `low` above `high` and the property tests generate the pair from the schema again. Log calls inside `Effect.catch*` handlers moved to `Effect.tapError`/`Effect.tapCause` at the same level and message. `@systemfsoftware/stryker-ignorer-interface` re-exports the 0.150 AST, where `FormalParameterRest.decorators` is now `Array<Decorator>`.
8
+
9
+ ## 0.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Removed the `decideSchemaDeclarationIgnore` and `CLASS_FIELDS_IGNORED` exports. The ignorer still
14
+ registers under the name `effect-schema-declarations` with unchanged recognized declaration shapes
15
+ and unchanged ignore reasons. If you called the decision function directly, consult the descriptor
16
+ instead: `strykerIgnorers[0].shouldIgnore(node, ancestors)`.
17
+
18
+ - First release. This ignorer keeps mutants inside Effect Schema declarations out of
19
+ a mutation run: a symbol, a tagged error, an annotation or a class body only
20
+ declares a type, so no run can observe the change.
21
+
22
+ It has no runtime dependencies, and migrating from the plugin you use today is a
23
+ rename in your plugins list — the ignorer keeps the name it already had.
24
+
25
+ ### Patch Changes
26
+
27
+ - Maintenance release. Every published entry point, export, option, and behaviour is exactly as it was.
package/README.md CHANGED
@@ -1,11 +1,13 @@
1
1
  # @systemfsoftware/stryker-ignorer-effect-schema-declarations
2
2
 
3
- ![version](https://img.shields.io/npm/v/@systemfsoftware/stryker-ignorer-effect-schema-declarations)
4
- ![license](https://img.shields.io/npm/l/@systemfsoftware/stryker-ignorer-effect-schema-declarations)
3
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](../../../LICENSE)
4
+ [![npm version](https://img.shields.io/npm/v/@systemfsoftware/stryker-ignorer-effect-schema-declarations.svg)](https://www.npmjs.com/package/@systemfsoftware/stryker-ignorer-effect-schema-declarations)
5
5
 
6
- > Stop Effect `Schema` declarations from dragging your Stryker score below 100%.
6
+ > Stop Effect `Schema` declarations from dragging your Stryker mutation score below 100%.
7
7
 
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) ignorer removes them, so the score that remains is behaviour.
8
+ A brand description, a `_tag`, a schema `title` — mutate any of them and the source changes but runtime behavior does not, so no test assertion can ever kill the mutant. Those unkillable mutants sit in your report forever, indistinguishable from real coverage gaps.
9
+
10
+ This Stryker ignorer filters them out at the AST level, so the score that remains reflects actual executable behavior.
9
11
 
10
12
  ## Install
11
13
 
@@ -13,60 +15,36 @@ A brand description, a `_tag`, a `title` — mutate any of them and the source c
13
15
  pnpm add -D @systemfsoftware/stryker-ignorer-effect-schema-declarations
14
16
  ```
15
17
 
16
- In `stryker.config.ts`, the plugin module and the ignorer name travel as a pair:
18
+ ## Setup in `stryker.config.ts`
17
19
 
18
- | Config key | Value |
19
- | ---------- | ------------------------------------------------------------- |
20
- | `plugins` | `@systemfsoftware/stryker-ignorer-effect-schema-declarations` |
21
- | `ignorers` | `effect-schema-declarations` |
20
+ Add the plugin URL to `ignorers`. Every ignorer the module exports is then active.
22
21
 
23
22
  ```ts
24
- export default {
25
- plugins: [
26
- '@systemfsoftware/stryker-js-vitest-runner',
27
- '@systemfsoftware/stryker-js-typescript-checker',
28
- '@systemfsoftware/stryker-ignorer-effect-schema-declarations',
23
+ import { defineConfig } from '@systemfsoftware/stryker-js/config'
24
+
25
+ export default defineConfig({
26
+ testRunner: {
27
+ plugin: import.meta.resolve('@systemfsoftware/stryker-js-vitest-runner'),
28
+ },
29
+ ignorers: [
30
+ import.meta.resolve('@systemfsoftware/stryker-ignorer-effect-schema-declarations'),
29
31
  ],
30
- ignorers: ['effect-schema-declarations'],
31
- }
32
+ })
32
33
  ```
33
34
 
34
- Mutants it recognizes are reported as `Ignored`, each carrying the reason it was safe to skip.
35
-
36
- > [!WARNING]
37
- > A name in `ignorers` that no loaded plugin answers is silently skipped — the run proceeds and the mutants stay in your score. Copy the name from the table, not from memory.
38
-
39
- > [!NOTE]
40
- > Requires `@systemfsoftware/stryker-js-engine` 4.1.0 or later (the first version whose plugin loader speaks the plain ignorer protocol). The package has no peer dependencies, no Effect anywhere — not in `dependencies`, not in `devDependencies`, and not on its published surface — and two dependencies: `@systemfsoftware/stryker-ignorer-interface`, whose node types declare the AST shapes the visitors read, and `@systemfsoftware/stryker-ignorer-kit`, which compiles the visitor declaration to the wire contract and verifies it from source snippets.
41
-
42
- ## Migrating from `@systemfsoftware/stryker-plugins`
43
-
44
- | Before | After |
45
- | ------------------------------------------------- | ---------------------------------------------------------------------------- |
46
- | `"plugins": ["@systemfsoftware/stryker-plugins"]` | `"plugins": ["@systemfsoftware/stryker-ignorer-effect-schema-declarations"]` |
47
- | `"ignorers": ["effect-schema-declarations"]` | unchanged |
48
-
49
- ## What it ignores
50
-
51
- | Declaration | Example |
52
- | --------------------------------------------------------- | ----------------------------------------------------------------- |
53
- | Brand descriptions | `Symbol.for('UserId')` |
54
- | `TaggedClass` / `TaggedError` tags | `S.TaggedClass<A>()('Placed', {…})` |
55
- | The field schemas of those declarations | the `{…}` above |
56
- | `optionalWith` defaults | `S.optionalWith(S.Number, { default: () => 0 })` |
57
- | Documentation annotations | `identifier`, `description`, `title`, `documentation`, `examples` |
58
- | An `annotations({…})` object that is _only_ documentation | `S.annotations({ title: 'Amount' })` |
59
-
60
- ## Where the line is
61
-
62
- Every ignore is proven redundant, never merely assumed — anything a test could observe keeps its mutants.
63
-
64
- `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.
35
+ Mutants recognized by the ignorer are reported with status `Ignored`, carrying the exact reason why skipping is safe.
65
36
 
66
- ## Contributing
37
+ ## What It Ignores
67
38
 
68
- Development setup and workflow: [AGENTS.md](AGENTS.md).
39
+ | Declaration | Example |
40
+ | ----------------------------------------- | ----------------------------------------------------------------- |
41
+ | Brand descriptions | `Symbol.for('UserId')` |
42
+ | `TaggedClass` / `TaggedError` tag strings | `S.TaggedClass<A>()('Placed', { ... })` |
43
+ | Schema property declarations | Property definition schema trees in tagged classes |
44
+ | `optionalWith` default values | `S.optionalWith(S.Number, { default: () => 0 })` |
45
+ | Documentation annotations | `identifier`, `description`, `title`, `documentation`, `examples` |
46
+ | Pure documentation `annotations({ ... })` | `S.annotations({ title: 'Amount' })` |
69
47
 
70
48
  ## License
71
49
 
72
- [Apache 2.0](LICENSE)
50
+ [Apache-2.0](../../../LICENSE)
package/dist/index.d.ts CHANGED
@@ -1,12 +1,21 @@
1
- import { Ignorer } from "@systemfsoftware/stryker-ignorer-interface";
2
- //#region src/SchemaDeclarationIgnore.d.ts
3
- export declare const SYMBOL_DESCRIPTION_IGNORED: 'Symbol.for() brand description is identity-only data, not behaviour';
4
- export declare const TAGGED_TAG_IGNORED: 'TaggedClass/TaggedError _tag is a declaration discriminant, not behaviour';
5
- export declare const TAGGED_FIELDS_IGNORED: 'TaggedClass/TaggedError field schema is a declaration, not behaviour';
6
- export declare const CLASS_ID_IGNORED: 'Schema.Class identifier is a declaration name, not behaviour';
7
- export declare const BRAND_NAME_IGNORED: 'Schema.brand name is identity-only data, not behaviour';
8
- export declare const OPTIONAL_DEFAULT_IGNORED: 'optionalWith default value is config, not behaviour';
9
- export declare const ANNOTATION_OBJECT_IGNORED: 'annotations object holding only documentation is a declaration, not behaviour';
10
- export declare const ANNOTATION_TEXT_IGNORED: 'annotation documentation value is declaration data, not behaviour';
11
- export declare const strykerIgnorers: readonly Ignorer[];
12
- //#endregion
1
+ import { Ignorer } from '@systemfsoftware/stryker-ignorer-interface';
2
+
3
+ export declare const ANNOTATION_OBJECT_IGNORED: 'annotations object holding only documentation is a declaration, not behaviour';
4
+
5
+ export declare const ANNOTATION_TEXT_IGNORED: 'annotation documentation value is declaration data, not behaviour';
6
+
7
+ export declare const BRAND_NAME_IGNORED: 'Schema.brand name is identity-only data, not behaviour';
8
+
9
+ export declare const CLASS_ID_IGNORED: 'Schema.Class identifier is a declaration name, not behaviour';
10
+
11
+ export declare const OPTIONAL_DEFAULT_IGNORED: 'optionalWith default value is config, not behaviour';
12
+
13
+ export declare const strykerIgnorers: readonly Ignorer[];
14
+
15
+ export declare const SYMBOL_DESCRIPTION_IGNORED: 'Symbol.for() brand description is identity-only data, not behaviour';
16
+
17
+ export declare const TAGGED_FIELDS_IGNORED: 'TaggedClass/TaggedError field schema is a declaration, not behaviour';
18
+
19
+ export declare const TAGGED_TAG_IGNORED: 'TaggedClass/TaggedError _tag is a declaration discriminant, not behaviour';
20
+
21
+ export { }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-ignorer-effect-schema-declarations",
3
3
  "license": "Apache-2.0",
4
- "version": "0.0.0",
4
+ "version": "0.1.1",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -32,23 +32,23 @@
32
32
  "./package.json": "./package.json"
33
33
  },
34
34
  "dependencies": {
35
- "@systemfsoftware/stryker-ignorer-interface": "^0.0.0",
36
- "@systemfsoftware/stryker-ignorer-kit": "^0.0.0"
35
+ "@systemfsoftware/stryker-ignorer-interface": "^0.1.1",
36
+ "@systemfsoftware/stryker-ignorer-kit": "^0.1.1"
37
37
  },
38
38
  "devDependencies": {
39
+ "@effect/tsgo": "^0.45.0",
39
40
  "@microsoft/api-extractor": "^7",
40
- "@systemfsoftware/arethetypeswrong-cli": "^4",
41
- "@systemfsoftware/tsconfig": "^1",
41
+ "@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
42
+ "@systemfsoftware/tsconfig": "^1.3.6",
42
43
  "@types/node": "^24",
43
- "@vitest/coverage-v8": "^4",
44
+ "@vitest/coverage-v8": "^5",
44
45
  "oxlint": "^1",
45
46
  "rimraf": "^6.1.3",
46
47
  "tsdown": "^0.23.0",
47
48
  "typescript": "^7",
48
- "vitest": "^4",
49
- "@effect/tsgo": "^0.45.0",
49
+ "vitest": "^5",
50
50
  "@systemfsoftware/tsdown-config": "^0.1.0",
51
- "@systemfsoftware/oxlint-ignorer-config": "^0.0.0",
51
+ "@systemfsoftware/oxlint-ignorer-config": "^0.1.1",
52
52
  "@systemfsoftware/vitest-config": "^0.1.0"
53
53
  },
54
54
  "publishConfig": {