@systemfsoftware/stryker-ignorer-angular 0.1.1 → 0.1.4
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 +18 -0
- package/dist/index.d.ts +7 -12
- package/dist/index.mjs +21 -23
- package/package.json +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-ignorer-angular
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
Build and lint with effect 4.1.0 and @effect/tsgo 0.63.0; the published code is unchanged.
|
|
6
|
+
|
|
7
|
+
## 0.1.3
|
|
8
|
+
|
|
9
|
+
Effect moves to `4.0.0-rc.117`, together with the `@effect/*` packages these libraries use. Projects that install `effect` next to them need the same release.
|
|
10
|
+
|
|
11
|
+
- The TypeScript checker and test-runner workers now bundle their own runtime, so the only modules they load from your project are the TypeScript compiler and your test framework.
|
|
12
|
+
- The test-runner plugin supports the framework's fifth major release.
|
|
13
|
+
- The ignorer interface re-exports the `oxc-parser` 0.150 AST, in which `FormalParameterRest.decorators` is `Array<Decorator>`.
|
|
14
|
+
|
|
15
|
+
## 0.1.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 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.
|
|
20
|
+
|
|
3
21
|
## 0.1.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { Ignorer } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
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 { }
|
|
1
|
+
import { Ignorer, Node } from "@systemfsoftware/stryker-ignorer-interface";
|
|
2
|
+
//#region src/angular-signals.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
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
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
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
59
|
-
const call = ownedCallOf(node,
|
|
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
|
|
63
|
-
const call = ownedCallOf(node,
|
|
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
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
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
|
-
|
|
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.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"author": "Ryan Lee <drdgvhbh@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
],
|
|
23
23
|
"type": "module",
|
|
24
24
|
"files": [
|
|
25
|
-
"dist"
|
|
25
|
+
"dist",
|
|
26
|
+
"CHANGELOG.md"
|
|
26
27
|
],
|
|
27
28
|
"exports": {
|
|
28
29
|
".": {
|
|
@@ -32,23 +33,24 @@
|
|
|
32
33
|
"./package.json": "./package.json"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@systemfsoftware/stryker-ignorer-interface": "^0.1.
|
|
36
|
+
"@systemfsoftware/stryker-ignorer-interface": "^0.1.3",
|
|
37
|
+
"@systemfsoftware/stryker-ignorer-kit": "^0.1.3"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
38
40
|
"@microsoft/api-extractor": "^7",
|
|
39
41
|
"@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
|
|
40
|
-
"@systemfsoftware/
|
|
42
|
+
"@systemfsoftware/oxlint-ignorer-config": "^0.1.3",
|
|
43
|
+
"@systemfsoftware/tsconfig": "^2.0.1",
|
|
44
|
+
"@systemfsoftware/tsdown-config": "^0.1.0",
|
|
45
|
+
"@systemfsoftware/vitest": "^2.0.0",
|
|
46
|
+
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
41
47
|
"@types/node": "^24",
|
|
42
48
|
"@vitest/coverage-v8": "^5",
|
|
43
|
-
"oxlint": "
|
|
49
|
+
"oxlint": "~1.90.0",
|
|
44
50
|
"rimraf": "^6.1.3",
|
|
45
51
|
"tsdown": "^0.23.0",
|
|
46
52
|
"typescript": "^7",
|
|
47
|
-
"vitest": "^5"
|
|
48
|
-
"@systemfsoftware/oxlint-ignorer-config": "^0.1.1",
|
|
49
|
-
"@systemfsoftware/stryker-ignorer-kit": "^0.1.1",
|
|
50
|
-
"@systemfsoftware/tsdown-config": "^0.1.0",
|
|
51
|
-
"@systemfsoftware/vitest-config": "^0.1.0"
|
|
53
|
+
"vitest": "^5"
|
|
52
54
|
},
|
|
53
55
|
"publishConfig": {
|
|
54
56
|
"access": "public",
|
|
@@ -57,7 +59,7 @@
|
|
|
57
59
|
"scripts": {
|
|
58
60
|
"build": "tsdown",
|
|
59
61
|
"clean": "rimraf dist",
|
|
60
|
-
"typecheck": "tsc
|
|
62
|
+
"typecheck": "tsc -b",
|
|
61
63
|
"test": "vitest run",
|
|
62
64
|
"lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; oxlint . --format=${f:-default}",
|
|
63
65
|
"attw": "attw --pack .",
|