@systemfsoftware/stryker-ignorer-kit 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,20 @@
1
+ # @systemfsoftware/stryker-ignorer-kit
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
+ - Debut: authoring and testing kit for the ignorer family. `defineIgnorer` compiles typed
14
+ visitors (visited node narrowed by key, typed ancestor context via `parentIf`/`ancestorIf`)
15
+ into the plain `Ignorer` wire contract; the `./tester` entry's `testIgnorer` verifies any
16
+ compiled ignorer from source snippets, registering one test per case.
17
+
18
+ ### Patch Changes
19
+
20
+ - Maintenance release. Every published entry point, export, option, and behaviour is exactly as it was.
package/README.md CHANGED
@@ -147,7 +147,7 @@ Case semantics:
147
147
  ### 4. Ship it
148
148
 
149
149
  `pnpm --filter <your-package> test` green, `api:update` for the report, a
150
- changeset entry, and the AGENTS/README wording true to what ships. The family
150
+ changeset entry, and the README wording true to what ships. The family
151
151
  rules bind: zero Effect, no type assertions, complexity ≤ 2 per function —
152
152
  narrow with small type-predicate functions, as above.
153
153
 
package/dist/index.d.ts CHANGED
@@ -1,24 +1,30 @@
1
- import { Ignorer, Node } from "@systemfsoftware/stryker-ignorer-interface";
2
- //#region src/mod.d.ts
3
- export interface IgnorerContext {
4
- /** Nearest-first as the host hands it over; the parent is the first element. */
5
- readonly ancestors: readonly Node[];
6
- parentIf<K extends Node['type']>(kind: K): Extract<Node, {
7
- readonly type: K;
8
- }> | undefined;
9
- ancestorIf<K extends Node['type']>(kind: K): Extract<Node, {
10
- readonly type: K;
11
- }> | undefined;
12
- }
13
- export type IgnorerVisitor<K extends Node['type']> = (node: Extract<Node, {
14
- readonly type: K;
15
- }>, ctx: IgnorerContext) => string | undefined;
16
- export type IgnorerVisitors = { readonly [K in Node['type']]?: IgnorerVisitor<K>; } & {
17
- readonly onAnyNode?: (node: Node, ctx: IgnorerContext) => string | undefined;
18
- };
19
- export interface IgnorerDefinition {
20
- readonly name: string;
21
- readonly visitors: IgnorerVisitors;
22
- }
23
- export declare function defineIgnorer(definition: IgnorerDefinition): Ignorer;
24
- //#endregion
1
+ import { Ignorer } from '@systemfsoftware/stryker-ignorer-interface';
2
+ import { Node as Node_2 } from '@systemfsoftware/stryker-ignorer-interface';
3
+
4
+ export declare function defineIgnorer(definition: IgnorerDefinition): Ignorer;
5
+
6
+ export declare interface IgnorerContext {
7
+ /** Nearest-first as the host hands it over; the parent is the first element. */
8
+ readonly ancestors: readonly Node_2[];
9
+ parentIf<K extends Node_2['type']>(kind: K): Extract<Node_2, {
10
+ readonly type: K;
11
+ }> | undefined;
12
+ ancestorIf<K extends Node_2['type']>(kind: K): Extract<Node_2, {
13
+ readonly type: K;
14
+ }> | undefined;
15
+ }
16
+
17
+ export declare interface IgnorerDefinition {
18
+ readonly name: string;
19
+ readonly visitors: IgnorerVisitors;
20
+ }
21
+
22
+ export declare type IgnorerVisitor<K extends Node_2['type']> = (node: Extract<Node_2, {
23
+ readonly type: K;
24
+ }>, ctx: IgnorerContext) => string | undefined;
25
+
26
+ export declare type IgnorerVisitors = { readonly [K in Node_2['type']]?: IgnorerVisitor<K>; } & {
27
+ readonly onAnyNode?: (node: Node_2, ctx: IgnorerContext) => string | undefined;
28
+ };
29
+
30
+ export { }
package/dist/tester.d.ts CHANGED
@@ -1,32 +1,38 @@
1
- import { Ignorer } from "@systemfsoftware/stryker-ignorer-interface";
2
- //#region src/tester.d.ts
3
- export type ScriptLang = 'js' | 'jsx' | 'ts' | 'tsx';
4
- export interface IgnoredSpan {
5
- readonly text: string;
6
- readonly reason?: string;
7
- }
8
- export interface IgnoredCase {
9
- readonly name: string;
10
- readonly code: string;
11
- readonly lang?: ScriptLang;
12
- readonly ignores: readonly (string | IgnoredSpan)[];
13
- readonly keeps?: readonly string[];
14
- }
15
- export interface KeptCase {
16
- readonly name: string;
17
- readonly code: string;
18
- readonly lang?: ScriptLang;
19
- readonly keeps?: readonly string[];
20
- }
21
- export interface IgnorerCases {
22
- readonly ignored?: readonly IgnoredCase[];
23
- readonly kept?: readonly KeptCase[];
24
- }
25
- /**
26
- * Parses each case with the instrumenter's parser convention, walks with host-shaped
27
- * ancestor semantics, and consults the subject at every node. With runner globals present
28
- * this registers one test per case under the subject's name; without them it runs every
29
- * case here and rejects with one error enumerating every failing case.
30
- */
31
- export declare function testIgnorer(subject: Ignorer, cases: IgnorerCases): Promise<void>;
32
- //#endregion
1
+ import { Ignorer } from '@systemfsoftware/stryker-ignorer-interface';
2
+
3
+ export declare interface IgnoredCase {
4
+ readonly name: string;
5
+ readonly code: string;
6
+ readonly lang?: ScriptLang;
7
+ readonly ignores: readonly (string | IgnoredSpan)[];
8
+ readonly keeps?: readonly string[];
9
+ }
10
+
11
+ export declare interface IgnoredSpan {
12
+ readonly text: string;
13
+ readonly reason?: string;
14
+ }
15
+
16
+ export declare interface IgnorerCases {
17
+ readonly ignored?: readonly IgnoredCase[];
18
+ readonly kept?: readonly KeptCase[];
19
+ }
20
+
21
+ export declare interface KeptCase {
22
+ readonly name: string;
23
+ readonly code: string;
24
+ readonly lang?: ScriptLang;
25
+ readonly keeps?: readonly string[];
26
+ }
27
+
28
+ export declare type ScriptLang = 'js' | 'jsx' | 'ts' | 'tsx';
29
+
30
+ /**
31
+ * Parses each case with the instrumenter's parser convention, walks with host-shaped
32
+ * ancestor semantics, and consults the subject at every node. With runner globals present
33
+ * this registers one test per case under the subject's name; without them it runs every
34
+ * case here and rejects with one error enumerating every failing case.
35
+ */
36
+ export declare function testIgnorer(subject: Ignorer, cases: IgnorerCases): Promise<void>;
37
+
38
+ export { }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-ignorer-kit",
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",
@@ -36,26 +36,26 @@
36
36
  "./package.json": "./package.json"
37
37
  },
38
38
  "dependencies": {
39
- "@oxc-project/types": "^0.140.0",
40
- "oxc-parser": "^0.140.0",
39
+ "@oxc-project/types": "^0.150.0",
40
+ "oxc-parser": "^0.150.0",
41
41
  "oxc-walker": "^1",
42
- "@systemfsoftware/stryker-ignorer-interface": "^0.0.0"
42
+ "@systemfsoftware/stryker-ignorer-interface": "^0.1.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@microsoft/api-extractor": "^7",
46
- "@systemfsoftware/arethetypeswrong-cli": "^4",
47
- "@systemfsoftware/tsconfig": "^1",
46
+ "@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
47
+ "@systemfsoftware/tsconfig": "^1.3.6",
48
48
  "@types/node": "^24",
49
- "@vitest/coverage-v8": "^4",
49
+ "@vitest/coverage-v8": "^5",
50
50
  "concurrently": "^10",
51
51
  "oxlint": "^1",
52
52
  "rimraf": "^6.1.3",
53
53
  "tsdown": "^0.23.0",
54
54
  "typescript": "^7",
55
- "vitest": "^4",
56
- "@systemfsoftware/tsdown-config": "^0.1.0",
57
- "@systemfsoftware/oxlint-ignorer-config": "^0.0.0",
58
- "@systemfsoftware/vitest-config": "^0.1.0"
55
+ "vitest": "^5",
56
+ "@systemfsoftware/oxlint-ignorer-config": "^0.1.1",
57
+ "@systemfsoftware/vitest-config": "^0.1.0",
58
+ "@systemfsoftware/tsdown-config": "^0.1.0"
59
59
  },
60
60
  "publishConfig": {
61
61
  "access": "public",