@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 +20 -0
- package/README.md +1 -1
- package/dist/index.d.ts +30 -24
- package/dist/tester.d.ts +38 -32
- package/package.json +11 -11
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
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export interface
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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.
|
|
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.
|
|
40
|
-
"oxc-parser": "^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.
|
|
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": "^
|
|
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": "^
|
|
56
|
-
"@systemfsoftware/
|
|
57
|
-
"@systemfsoftware/
|
|
58
|
-
"@systemfsoftware/
|
|
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",
|