@systemfsoftware/stryker-ignorer-angular 0.1.0 → 0.1.2

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,17 @@
1
1
  # @systemfsoftware/stryker-ignorer-angular
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Stages now run as cells over workflows, multi-item work runs as Effect streams, pools and worker transport use scoped Effect resources, and named operations are traced with Effect.fn. The Angular ignorer now declares @systemfsoftware/stryker-ignorer-kit as a runtime dependency.
8
+
9
+ ## 0.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 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>`.
14
+
3
15
  ## 0.1.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,7 +1,12 @@
1
- import { Ignorer, Node } from "@systemfsoftware/stryker-ignorer-interface";
2
- //#region src/AngularSignalIgnore.d.ts
3
- export declare const INPUT_MODEL_OUTPUT_CONFIG_MSG: 'Angular signal based input, model and output functions configuration object cannot be mutated as that causes issues with the Angular compiler.';
4
- export declare const SIGNAL_QUERY_OPTIONS_MSG: 'Angular signal query options object cannot be mutated as that causes issues with the Angular compiler.';
5
- export declare const shouldIgnore: (node: Node, ancestors: readonly Node[]) => string | undefined;
6
- export declare const strykerIgnorers: readonly Ignorer[];
7
- //#endregion
1
+ import { Ignorer } from '@systemfsoftware/stryker-ignorer-interface';
2
+ import { Node as Node_2 } from '@systemfsoftware/stryker-ignorer-interface';
3
+
4
+ export declare const INPUT_MODEL_OUTPUT_CONFIG_MSG: 'Angular signal based input, model and output functions configuration object cannot be mutated as that causes issues with the Angular compiler.';
5
+
6
+ export declare const shouldIgnore: (node: Node_2, ancestors: readonly Node_2[]) => string | undefined;
7
+
8
+ export declare const SIGNAL_QUERY_OPTIONS_MSG: 'Angular signal query options object cannot be mutated as that causes issues with the Angular compiler.';
9
+
10
+ export declare const strykerIgnorers: readonly Ignorer[];
11
+
12
+ export { }
package/dist/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
- //#region src/AngularSignalIgnore.ts
1
+ import { defineIgnorer } from "@systemfsoftware/stryker-ignorer-kit";
2
+ //#region src/angular-signals.ts
2
3
  const INPUT_MODEL_OUTPUT_CONFIG_MSG = "Angular signal based input, model and output functions configuration object cannot be mutated as that causes issues with the Angular compiler.";
3
4
  const SIGNAL_QUERY_OPTIONS_MSG = "Angular signal query options object cannot be mutated as that causes issues with the Angular compiler.";
4
5
  const SIGNAL_IO_FUNCTIONS = Object.freeze([
@@ -38,37 +39,34 @@ const ownsPropertyDefinitionField = (owner) => owner?.type === "PropertyDefiniti
38
39
  const ownsClassField = (owner) => CLASS_FIELD_KINDS.some((kind) => kind === owner?.type);
39
40
  const holdsArgument = (call, node) => call.arguments.some((argument) => argument === node);
40
41
  const isObjectArgumentOf = (node, call) => isObjectExpression(node) && holdsArgument(call, node);
41
- const parentCallOf = (ancestors, offset) => {
42
- const parent = ancestors[offset];
43
- return isCallExpression(parent) ? parent : void 0;
44
- };
45
- const callOfObjectArgument = (node, call) => isObjectArgumentOf(node, call) ? call : void 0;
46
- const argumentCallOf = (node, ancestors, offset) => {
47
- const call = parentCallOf(ancestors, offset);
48
- return call === void 0 ? void 0 : callOfObjectArgument(node, call);
49
- };
50
- const ownedCallOf = (node, ancestors, offset, ownsCallSite) => {
51
- const call = argumentCallOf(node, ancestors, offset);
52
- return ownsCallSite(ancestors[offset + 1]) ? call : void 0;
42
+ const holdsObjectArgument = (parent, node) => isCallExpression(parent) && isObjectArgumentOf(node, parent);
43
+ const objectArgumentCall = (node, parent) => holdsObjectArgument(parent, node) ? parent : void 0;
44
+ const ownedCallOf = (node, parent, owner, ownsCallSite) => {
45
+ const call = objectArgumentCall(node, parent);
46
+ return ownsCallSite(owner) ? call : void 0;
53
47
  };
54
48
  const isArgumentAt = (index, call, node) => index !== void 0 && call.arguments[index] === node;
55
49
  const ioConfigReason = (call, node) => isArgumentAt(signalIoArgumentIndex(call.callee), call, node) ? INPUT_MODEL_OUTPUT_CONFIG_MSG : void 0;
56
50
  const isQueryOptionsArgument = (call, node) => isSignalQueryCall(call.callee) && isArgumentAt(1, call, node);
57
51
  const queryOptionsReason = (call, node) => isQueryOptionsArgument(call, node) ? SIGNAL_QUERY_OPTIONS_MSG : void 0;
58
- const ioReasonOf = (node, ancestors, offset) => {
59
- const call = ownedCallOf(node, ancestors, offset, ownsPropertyDefinitionField);
52
+ const ioReasonFor = (node, parent, owner) => {
53
+ const call = ownedCallOf(node, parent, owner, ownsPropertyDefinitionField);
60
54
  return call === void 0 ? void 0 : ioConfigReason(call, node);
61
55
  };
62
- const queryReasonOf = (node, ancestors, offset) => {
63
- const call = ownedCallOf(node, ancestors, offset, ownsClassField);
56
+ const queryReasonFor = (node, parent, owner) => {
57
+ const call = ownedCallOf(node, parent, owner, ownsClassField);
64
58
  return call === void 0 ? void 0 : queryOptionsReason(call, node);
65
59
  };
66
- const reasonAt = (node, ancestors, offset) => ioReasonOf(node, ancestors, offset) ?? queryReasonOf(node, ancestors, offset);
67
- const ancestorReason = (node, ancestors) => ancestors.map((ancestor, position) => reasonAt(ancestor, ancestors, position + 1)).find((reason) => reason !== void 0);
68
- const shouldIgnore = (node, ancestors) => reasonAt(node, ancestors, 0) ?? ancestorReason(node, ancestors);
69
- const strykerIgnorers = [{
60
+ const reasonFor = (node, parent, owner) => ioReasonFor(node, parent, owner) ?? queryReasonFor(node, parent, owner);
61
+ const pointReason = (node, ancestors) => reasonFor(node, ancestors[0], ancestors[1]);
62
+ const ancestorReason = (ancestors) => ancestors.map((ancestor, position) => reasonFor(ancestor, ancestors[position + 1], ancestors[position + 2])).find((reason) => reason !== void 0);
63
+ const shouldIgnore = (node, ancestors) => pointReason(node, ancestors) ?? ancestorReason(ancestors);
64
+ const strykerIgnorers = [defineIgnorer({
70
65
  name: "angular-signals",
71
- shouldIgnore
72
- }];
66
+ visitors: {
67
+ ObjectExpression: (node, ctx) => pointReason(node, ctx.ancestors),
68
+ onAnyNode: (_node, ctx) => ancestorReason(ctx.ancestors)
69
+ }
70
+ })];
73
71
  //#endregion
74
72
  export { INPUT_MODEL_OUTPUT_CONFIG_MSG, SIGNAL_QUERY_OPTIONS_MSG, shouldIgnore, strykerIgnorers };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-ignorer-angular",
3
3
  "license": "Apache-2.0",
4
- "version": "0.1.0",
4
+ "version": "0.1.2",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
@@ -32,23 +32,24 @@
32
32
  "./package.json": "./package.json"
33
33
  },
34
34
  "dependencies": {
35
- "@systemfsoftware/stryker-ignorer-interface": "^0.1.0"
35
+ "@systemfsoftware/stryker-ignorer-kit": "^0.1.1",
36
+ "@systemfsoftware/stryker-ignorer-interface": "^0.1.1"
36
37
  },
37
38
  "devDependencies": {
38
39
  "@microsoft/api-extractor": "^7",
39
- "@systemfsoftware/arethetypeswrong-cli": "^4",
40
- "@systemfsoftware/tsconfig": "^1",
40
+ "@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
41
+ "@systemfsoftware/tsconfig": "^2.0.1",
42
+ "@systemfsoftware/vitest": "^0.1.0",
41
43
  "@types/node": "^24",
42
- "@vitest/coverage-v8": "^4",
44
+ "@vitest/coverage-v8": "^5",
43
45
  "oxlint": "^1",
44
46
  "rimraf": "^6.1.3",
45
47
  "tsdown": "^0.23.0",
46
48
  "typescript": "^7",
47
- "vitest": "^4",
48
- "@systemfsoftware/oxlint-ignorer-config": "^0.1.0",
49
- "@systemfsoftware/stryker-ignorer-kit": "^0.1.0",
50
- "@systemfsoftware/vitest-config": "^0.1.0",
51
- "@systemfsoftware/tsdown-config": "^0.1.0"
49
+ "vitest": "^5",
50
+ "@systemfsoftware/tsdown-config": "^0.1.0",
51
+ "@systemfsoftware/oxlint-ignorer-config": "^0.1.1",
52
+ "@systemfsoftware/vitest-config": "^0.1.0"
52
53
  },
53
54
  "publishConfig": {
54
55
  "access": "public",
@@ -57,7 +58,7 @@
57
58
  "scripts": {
58
59
  "build": "tsdown",
59
60
  "clean": "rimraf dist",
60
- "typecheck": "tsc --noEmit --incremental && tsc -p tsconfig.node.json --noEmit",
61
+ "typecheck": "tsc -b",
61
62
  "test": "vitest run",
62
63
  "lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; oxlint . --format=${f:-default}",
63
64
  "attw": "attw --pack .",