@systemfsoftware/stryker-plugins 0.11.0 → 0.13.0
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 +85 -0
- package/LICENSE +203 -21
- package/README.md +3 -3
- package/dist/AncestorPath-BR3dvosy.mjs +9 -0
- package/dist/{effect-schema-ignorer-DJv73jAE.mjs → effect-schema-ignorer-38xDaLr8.mjs} +90 -33
- package/dist/effect-schema-ignorer.d.ts +8 -2
- package/dist/effect-schema-ignorer.mjs +2 -2
- package/dist/in-source-test-ignorer-DTJIr1ut.mjs +48 -0
- package/dist/in-source-test-ignorer.d.ts +12 -0
- package/dist/in-source-test-ignorer.mjs +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +8 -50
- package/dist/stryker-plugins.d.ts +2 -2
- package/dist/workflow-make-ignorer-dLlC4-S_.mjs +260 -0
- package/dist/workflow-make-ignorer.d.ts +15 -0
- package/dist/workflow-make-ignorer.mjs +2 -0
- package/package.json +31 -24
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# @systemfsoftware/stryker-plugins
|
|
2
|
+
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- cut over to effect v4 (4.0.0-rc.108): public surface derives from effect types; peers flip effect ^3→^4
|
|
8
|
+
|
|
9
|
+
- The schema-declaration ignorer now treats a `Schema.Class` identifier and a `Schema.brand` name as declaration data, exporting `CLASS_ID_IGNORED` and `BRAND_NAME_IGNORED` and suppressing those string arguments. It also exports `CLASS_FIELDS_IGNORED` for a Class fields object, but no rule emits it: ignoring the fields object would suppress the literals inside it, and a field's accepted value set is behaviour, not data.
|
|
10
|
+
|
|
11
|
+
- The `workflow-make-boundary` ignorer selects the mutation population mechanically.
|
|
12
|
+
|
|
13
|
+
Every mutant whose ancestor chain contains no `Workflow.make(...)` call argument is excised with
|
|
14
|
+
the named reason `NOT_INSIDE_WORKFLOW_MAKE`; mutants inside any make boundary pass through to the
|
|
15
|
+
other ignorers. The boundary is identity-contained through the call's arguments (nested makes
|
|
16
|
+
count), resolves named, aliased, and namespace imports of `Workflow`, and follows module-scope
|
|
17
|
+
function references. Ships as the `./workflow-make-ignorer` subpath wired like
|
|
18
|
+
`./effect-schema-ignorer`, with the AST schemas redeclared locally.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Array types are spelled one way. `Array<T>` and `ReadonlyArray<T>` in emitted
|
|
23
|
+
declarations become `T[]` and `readonly T[]`, which the type checker cannot tell
|
|
24
|
+
apart: no exported type changes, only how it is written.
|
|
25
|
+
|
|
26
|
+
- New version is published through npm trusted publishing, so it carries a provenance attestation you can verify.
|
|
27
|
+
|
|
28
|
+
- The `atom` packages publish their own author rather than crediting an upstream they are not downstream of, and `stryker-plugins` no longer pulls Node's ambient types into a package that has no runtime dependency on them.
|
|
29
|
+
|
|
30
|
+
- Fix two `test:types` scripts that could not pass.
|
|
31
|
+
|
|
32
|
+
`tstyche` exits 1 with "No test files were selected using current configuration" when nothing matches
|
|
33
|
+
`testFileMatch`, so a watcher pointed at files that do not exist is a script guaranteed to fail the
|
|
34
|
+
moment anyone runs it. Measured directly: `effect-gherkin-spec`'s `tstyche.json` matched
|
|
35
|
+
`src/**/*.tst.ts` and the package holds no such file, so its `test:types` script is removed rather than
|
|
36
|
+
left as a gate attached to nothing. `stryker-plugins` now pins `TSTYCHE_TYPESCRIPT_MODULE` so its own
|
|
37
|
+
`test:types` resolves the TypeScript module it needs.
|
|
38
|
+
|
|
39
|
+
Both packages publish, and both scripts ship in the published `package.json`, so a consumer inspecting
|
|
40
|
+
or running them sees the change — a real patch rather than an empty intent.
|
|
41
|
+
|
|
42
|
+
- Updated dependencies:
|
|
43
|
+
- @systemfsoftware/stryker-js-plugin-api@2.0.0
|
|
44
|
+
|
|
45
|
+
## 0.12.0
|
|
46
|
+
|
|
47
|
+
### Minor Changes
|
|
48
|
+
|
|
49
|
+
- cut over to effect v4 (4.0.0-rc.108): public surface derives from effect types; peers flip effect ^3→^4
|
|
50
|
+
|
|
51
|
+
- The schema-declaration ignorer now treats a `Schema.Class` identifier and a `Schema.brand` name as declaration data, exporting `CLASS_ID_IGNORED` and `BRAND_NAME_IGNORED` and suppressing those string arguments. It also exports `CLASS_FIELDS_IGNORED` for a Class fields object, but no rule emits it: ignoring the fields object would suppress the literals inside it, and a field's accepted value set is behaviour, not data.
|
|
52
|
+
|
|
53
|
+
- The `workflow-make-boundary` ignorer selects the mutation population mechanically.
|
|
54
|
+
|
|
55
|
+
Every mutant whose ancestor chain contains no `Workflow.make(...)` call argument is excised with
|
|
56
|
+
the named reason `NOT_INSIDE_WORKFLOW_MAKE`; mutants inside any make boundary pass through to the
|
|
57
|
+
other ignorers. The boundary is identity-contained through the call's arguments (nested makes
|
|
58
|
+
count), resolves named, aliased, and namespace imports of `Workflow`, and follows module-scope
|
|
59
|
+
function references. Ships as the `./workflow-make-ignorer` subpath wired like
|
|
60
|
+
`./effect-schema-ignorer`, with the AST schemas redeclared locally.
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- Array types are spelled one way. `Array<T>` and `ReadonlyArray<T>` in emitted
|
|
65
|
+
declarations become `T[]` and `readonly T[]`, which the type checker cannot tell
|
|
66
|
+
apart: no exported type changes, only how it is written.
|
|
67
|
+
|
|
68
|
+
- New version is published through npm trusted publishing, so it carries a provenance attestation you can verify.
|
|
69
|
+
|
|
70
|
+
- The `atom` packages publish their own author rather than crediting an upstream they are not downstream of, and `stryker-plugins` no longer pulls Node's ambient types into a package that has no runtime dependency on them.
|
|
71
|
+
|
|
72
|
+
- Fix two `test:types` scripts that could not pass.
|
|
73
|
+
|
|
74
|
+
`tstyche` exits 1 with "No test files were selected using current configuration" when nothing matches
|
|
75
|
+
`testFileMatch`, so a watcher pointed at files that do not exist is a script guaranteed to fail the
|
|
76
|
+
moment anyone runs it. Measured directly: `effect-gherkin-spec`'s `tstyche.json` matched
|
|
77
|
+
`src/**/*.tst.ts` and the package holds no such file, so its `test:types` script is removed rather than
|
|
78
|
+
left as a gate attached to nothing. `stryker-plugins` now pins `TSTYCHE_TYPESCRIPT_MODULE` so its own
|
|
79
|
+
`test:types` resolves the TypeScript module it needs.
|
|
80
|
+
|
|
81
|
+
Both packages publish, and both scripts ship in the published `package.json`, so a consumer inspecting
|
|
82
|
+
or running them sees the change — a real patch rather than an empty intent.
|
|
83
|
+
|
|
84
|
+
- Updated dependencies:
|
|
85
|
+
- @systemfsoftware/stryker-js-plugin-api@1.0.0
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,203 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
Copyright (c) 2026 Ryan Lee (systemfsoftware)
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
179
|
+
|
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
181
|
+
|
|
182
|
+
To apply the Apache License to your work, attach the following
|
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
184
|
+
replaced with your own identifying information. (Don't include
|
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
186
|
+
comment syntax for the file format. We also recommend that a
|
|
187
|
+
file or class name and description of purpose be included on the
|
|
188
|
+
same "printed page" as the copyright notice for easier
|
|
189
|
+
identification within third-party archives.
|
|
190
|
+
|
|
191
|
+
Copyright 2026 Ryan Lee (systemfsoftware)
|
|
192
|
+
|
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
|
+
you may not use this file except in compliance with the License.
|
|
195
|
+
You may obtain a copy of the License at
|
|
196
|
+
|
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
|
+
See the License for the specific language governing permissions and
|
|
203
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ In `stryker.config.json`:
|
|
|
18
18
|
```jsonc
|
|
19
19
|
{
|
|
20
20
|
"plugins": [
|
|
21
|
-
"@stryker-
|
|
21
|
+
"@systemfsoftware/stryker-js-vitest-runner",
|
|
22
22
|
"@stryker-mutator/typescript-checker",
|
|
23
23
|
"@systemfsoftware/stryker-plugins"
|
|
24
24
|
],
|
|
@@ -29,7 +29,7 @@ In `stryker.config.json`:
|
|
|
29
29
|
Mutants it recognizes are reported as `Ignored`, each carrying the reason it was safe to skip.
|
|
30
30
|
|
|
31
31
|
> [!NOTE]
|
|
32
|
-
> `@stryker-
|
|
32
|
+
> `@systemfsoftware/stryker-js-plugin-api` is a peer dependency — your Stryker install provides it. `effect` is a direct dependency (the plugin decodes AST nodes with `Schema`).
|
|
33
33
|
|
|
34
34
|
## What it ignores
|
|
35
35
|
|
|
@@ -54,4 +54,4 @@ Development setup and workflow: [AGENTS.md](AGENTS.md).
|
|
|
54
54
|
|
|
55
55
|
## License
|
|
56
56
|
|
|
57
|
-
[
|
|
57
|
+
[Apache 2.0](LICENSE)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/AncestorPath.ts
|
|
2
|
+
/** The ancestor nodes of a path, nearest first, ending at the file root.
|
|
3
|
+
* @yields each ancestor node, nearest first
|
|
4
|
+
*/
|
|
5
|
+
function* ancestorsOf(path) {
|
|
6
|
+
for (let current = path.parentPath; current; current = current.parentPath) yield current.node;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ancestorsOf as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PluginKind, declareValuePlugin } from "@stryker-
|
|
1
|
+
import { PluginKind, declareValuePlugin } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
//#region src/effect-schema-ignorer/
|
|
3
|
+
//#region src/effect-schema-ignorer/AstNode.schema.ts
|
|
4
4
|
const Identifier = Schema.Struct({
|
|
5
5
|
type: Schema.Literal("Identifier"),
|
|
6
6
|
name: Schema.String
|
|
@@ -12,55 +12,62 @@ const StringLiteral = Schema.Struct({
|
|
|
12
12
|
const ObjectExpression = Schema.Struct({ type: Schema.Literal("ObjectExpression") });
|
|
13
13
|
const ArrowFunctionExpression = Schema.Struct({ type: Schema.Literal("ArrowFunctionExpression") });
|
|
14
14
|
const UnknownNode = Schema.Struct({ type: Schema.String });
|
|
15
|
+
/**
|
|
16
|
+
* The recursive member schemas reference the shared `AstNode` UNION directly
|
|
17
|
+
* (v4: a reference straight to the schema, not a fresh `S.suspend` wrap). The
|
|
18
|
+
* v4 arbitrary derivation declares a recursion "finite" when every cycle passes
|
|
19
|
+
* through a suspend node that appears in its recursion stack; a field suspend
|
|
20
|
+
* layered in front of the top-level suspend double-wraps the same node and
|
|
21
|
+
* loses that boundary, which made the schema-law encoded-arbitrary fail with
|
|
22
|
+
* "recursive schema without a finite generation path". Keeping the union node
|
|
23
|
+
* shared and letting `MemberExpression`/`CallExpression` suspend at the top is
|
|
24
|
+
* also the v4 Schema document's own recursive-schema shape (fields reference
|
|
25
|
+
* the schema, the cycle breaks at the one suspension).
|
|
26
|
+
*/
|
|
27
|
+
let AstNodeSchema;
|
|
15
28
|
const MemberExpression = Schema.suspend(() => Schema.Struct({
|
|
16
29
|
type: Schema.Literal("MemberExpression"),
|
|
17
|
-
object:
|
|
18
|
-
property:
|
|
30
|
+
object: AstNodeSchema,
|
|
31
|
+
property: AstNodeSchema
|
|
19
32
|
}));
|
|
20
33
|
const CallExpression = Schema.suspend(() => Schema.Struct({
|
|
21
34
|
type: Schema.Literal("CallExpression"),
|
|
22
|
-
callee:
|
|
23
|
-
arguments: Schema.Array(
|
|
35
|
+
callee: AstNodeSchema,
|
|
36
|
+
arguments: Schema.Array(AstNodeSchema)
|
|
24
37
|
}));
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const DocumentationKey = Schema.Literal("identifier", "description", "title", "documentation", "examples");
|
|
38
|
+
AstNodeSchema = Schema.Union([
|
|
39
|
+
Identifier,
|
|
40
|
+
StringLiteral,
|
|
41
|
+
ObjectExpression,
|
|
42
|
+
ArrowFunctionExpression,
|
|
43
|
+
MemberExpression,
|
|
44
|
+
CallExpression,
|
|
45
|
+
UnknownNode
|
|
46
|
+
]);
|
|
47
|
+
const DocumentationKey = Schema.Literals([
|
|
48
|
+
"identifier",
|
|
49
|
+
"description",
|
|
50
|
+
"title",
|
|
51
|
+
"documentation",
|
|
52
|
+
"examples"
|
|
53
|
+
]);
|
|
42
54
|
const DocumentationProperty = Schema.Struct({
|
|
43
55
|
type: Schema.Literal("ObjectProperty"),
|
|
44
56
|
computed: Schema.Literal(false),
|
|
45
|
-
key: Schema.Union(Schema.Struct({
|
|
57
|
+
key: Schema.Union([Schema.Struct({
|
|
46
58
|
type: Schema.Literal("Identifier"),
|
|
47
59
|
name: DocumentationKey
|
|
48
60
|
}), Schema.Struct({
|
|
49
61
|
type: Schema.Literal("StringLiteral"),
|
|
50
62
|
value: DocumentationKey
|
|
51
|
-
})),
|
|
63
|
+
})]),
|
|
52
64
|
value: Schema.Unknown
|
|
53
65
|
});
|
|
54
|
-
/**
|
|
55
|
-
* An object literal whose every entry documents. One behaviour-bearing entry -
|
|
56
|
-
* an `arbitrary` beside a `title` - fails the schema, so the object keeps its
|
|
57
|
-
* mutants: emptying it would delete a generator, which a test can observe.
|
|
58
|
-
*/
|
|
59
66
|
const DocumentationObject = Schema.Struct({
|
|
60
67
|
type: Schema.Literal("ObjectExpression"),
|
|
61
68
|
properties: Schema.NonEmptyArray(DocumentationProperty)
|
|
62
69
|
});
|
|
63
|
-
|
|
70
|
+
/** Derived recognisers, declared beside the shapes they decide. */
|
|
64
71
|
const isIdentifier = Schema.is(Identifier);
|
|
65
72
|
const isStringLiteral = Schema.is(StringLiteral);
|
|
66
73
|
const isObjectExpression = Schema.is(ObjectExpression);
|
|
@@ -69,9 +76,57 @@ const isMemberExpression = Schema.is(MemberExpression);
|
|
|
69
76
|
const isCallExpression = Schema.is(CallExpression);
|
|
70
77
|
const isDocumentationProperty = Schema.is(DocumentationProperty);
|
|
71
78
|
const isDocumentationObject = Schema.is(DocumentationObject);
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/effect-schema-ignorer/SchemaDeclarationIgnore.ts
|
|
81
|
+
const SYMBOL_DESCRIPTION_IGNORED = "Symbol.for() brand description is identity-only data, not behaviour";
|
|
82
|
+
const TAGGED_TAG_IGNORED = "TaggedClass/TaggedError _tag is a declaration discriminant, not behaviour";
|
|
83
|
+
const TAGGED_FIELDS_IGNORED = "TaggedClass/TaggedError field schema is a declaration, not behaviour";
|
|
84
|
+
const CLASS_ID_IGNORED = "Schema.Class identifier is a declaration name, not behaviour";
|
|
85
|
+
const CLASS_FIELDS_IGNORED = "Schema.Class field schema is a declaration, not behaviour";
|
|
86
|
+
const BRAND_NAME_IGNORED = "Schema.brand name is identity-only data, not behaviour";
|
|
87
|
+
const OPTIONAL_DEFAULT_IGNORED = "optionalWith default value is config, not behaviour";
|
|
88
|
+
const ANNOTATION_OBJECT_IGNORED = "annotations object holding only documentation is a declaration, not behaviour";
|
|
89
|
+
const ANNOTATION_TEXT_IGNORED = "annotation documentation value is declaration data, not behaviour";
|
|
90
|
+
/**
|
|
91
|
+
* The Effect `Schema` annotations that describe a schema without changing what
|
|
92
|
+
* it does. `arbitrary`, `pretty`, `equivalence`, `message`, `jsonSchema` and
|
|
93
|
+
* `parseIssueTitle` are absent by design: each one alters observable behaviour,
|
|
94
|
+
* so a surviving mutant of one is a test gap to close, never an equivalent
|
|
95
|
+
* mutant to ignore.
|
|
96
|
+
*/
|
|
97
|
+
/**
|
|
98
|
+
* An object literal whose every entry documents. One behaviour-bearing entry -
|
|
99
|
+
* an `arbitrary` beside a `title` - fails the schema, so the object keeps its
|
|
100
|
+
* mutants: emptying it would delete a generator, which a test can observe.
|
|
101
|
+
*/
|
|
102
|
+
const TAGGED_FACTORIES = ["TaggedClass", "TaggedError"];
|
|
103
|
+
/**
|
|
104
|
+
* `Schema.Class` is curried the other way round from `Schema.TaggedClass`.
|
|
105
|
+
*
|
|
106
|
+
* `S.TaggedClass<A>()('tag', fields)` puts both the discriminant and the fields on the outer
|
|
107
|
+
* call, so one callee predicate reaches both. `S.Class<A>('Id')(fields)` puts the identifier on
|
|
108
|
+
* the *inner* call and the fields on the outer one, so the same declaration data needs two
|
|
109
|
+
* predicates. Missing that shape is why a class-shaped schema kept fourteen mutants a
|
|
110
|
+
* tag-shaped one never had.
|
|
111
|
+
*/
|
|
112
|
+
const CLASS_FACTORY = "Class";
|
|
72
113
|
const isNamedMember = (node, object, property) => isMemberExpression(node) && isIdentifier(node.object) && node.object.name === object && isIdentifier(node.property) && node.property.name === property;
|
|
73
114
|
const isSymbolForCallee = (callee) => isNamedMember(callee, "Symbol", "for");
|
|
74
|
-
const
|
|
115
|
+
const isNamedFactoryReference = (reference, names) => isMemberExpression(reference) && isIdentifier(reference.property) && names.includes(reference.property.name);
|
|
116
|
+
const isTaggedFactoryReference = (reference) => isNamedFactoryReference(reference, TAGGED_FACTORIES);
|
|
117
|
+
/** The inner `S.Class<A>('Id')` call, which carries the identifier. */
|
|
118
|
+
const isClassFactoryReference = (reference) => isNamedFactoryReference(reference, [CLASS_FACTORY]);
|
|
119
|
+
/**
|
|
120
|
+
* There is deliberately no rule for a `Schema.Class` *fields* object, and the reason is measured.
|
|
121
|
+
*
|
|
122
|
+
* Stryker's ignorer suppresses a node's whole subtree, so ignoring the fields object also ignores
|
|
123
|
+
* every literal inside it - and a field's accepted value set is behaviour: emptying
|
|
124
|
+
* `Schema.Literal('permanent', 'transient')` changes what decodes. Adding that rule turned
|
|
125
|
+
* fourteen survivors green in one run while hiding the accepted-set decisions the survivors were
|
|
126
|
+
* pointing at. Those belong to a decode test, not to an ignorer.
|
|
127
|
+
*/
|
|
128
|
+
/** `S.brand('Name')` - the brand name is identity data, like a `Symbol.for` description. */
|
|
129
|
+
const isBrandCallee = (callee) => isMemberExpression(callee) && isIdentifier(callee.property) && callee.property.name === "brand";
|
|
75
130
|
const isTaggedFactoryCallee = (callee) => isCallExpression(callee) && isTaggedFactoryReference(callee.callee);
|
|
76
131
|
const isArgumentOf = (node, parent, index, calleeMatches) => isCallExpression(parent) && calleeMatches(parent.callee) && parent.arguments[index] === node;
|
|
77
132
|
const isOptionalWithCallee = (callee) => isNamedMember(callee, "S", "optionalWith");
|
|
@@ -95,6 +150,8 @@ const RULES = [
|
|
|
95
150
|
argumentRule(isStringLiteral, 0, isSymbolForCallee, SYMBOL_DESCRIPTION_IGNORED),
|
|
96
151
|
argumentRule(isStringLiteral, 0, isTaggedFactoryCallee, TAGGED_TAG_IGNORED),
|
|
97
152
|
argumentRule(isObjectExpression, 1, isTaggedFactoryCallee, TAGGED_FIELDS_IGNORED),
|
|
153
|
+
argumentRule(isStringLiteral, 0, isClassFactoryReference, CLASS_ID_IGNORED),
|
|
154
|
+
argumentRule(isStringLiteral, 0, isBrandCallee, BRAND_NAME_IGNORED),
|
|
98
155
|
argumentRule(isArrowFunctionExpression, 1, isOptionalWithCallee, OPTIONAL_DEFAULT_IGNORED),
|
|
99
156
|
argumentRule(isDocumentationObject, 0, isAnnotationsCallee, ANNOTATION_OBJECT_IGNORED),
|
|
100
157
|
documentationValueRule
|
|
@@ -108,4 +165,4 @@ const strykerPlugins = [declareValuePlugin(PluginKind.Ignore, "effect-schema-dec
|
|
|
108
165
|
return decideSchemaDeclarationIgnore(path.node, parent?.node, grandparent?.node, grandparent?.parentPath?.node);
|
|
109
166
|
} })];
|
|
110
167
|
//#endregion
|
|
111
|
-
export {
|
|
168
|
+
export { CLASS_FIELDS_IGNORED as a, SYMBOL_DESCRIPTION_IGNORED as c, decideSchemaDeclarationIgnore as d, BRAND_NAME_IGNORED as i, TAGGED_FIELDS_IGNORED as l, ANNOTATION_OBJECT_IGNORED as n, CLASS_ID_IGNORED as o, ANNOTATION_TEXT_IGNORED as r, OPTIONAL_DEFAULT_IGNORED as s, strykerPlugins as t, TAGGED_TAG_IGNORED as u };
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import { PluginKind } from '@stryker-
|
|
2
|
-
import { ValuePlugin } from '@stryker-
|
|
1
|
+
import { PluginKind } from '@systemfsoftware/stryker-js-plugin-api/plugin';
|
|
2
|
+
import { ValuePlugin } from '@systemfsoftware/stryker-js-plugin-api/plugin';
|
|
3
3
|
|
|
4
4
|
export declare const ANNOTATION_OBJECT_IGNORED: 'annotations object holding only documentation is a declaration, not behaviour';
|
|
5
5
|
|
|
6
6
|
export declare const ANNOTATION_TEXT_IGNORED: 'annotation documentation value is declaration data, not behaviour';
|
|
7
7
|
|
|
8
|
+
export declare const BRAND_NAME_IGNORED: 'Schema.brand name is identity-only data, not behaviour';
|
|
9
|
+
|
|
10
|
+
export declare const CLASS_FIELDS_IGNORED: 'Schema.Class field schema is a declaration, not behaviour';
|
|
11
|
+
|
|
12
|
+
export declare const CLASS_ID_IGNORED: 'Schema.Class identifier is a declaration name, not behaviour';
|
|
13
|
+
|
|
8
14
|
export declare const decideSchemaDeclarationIgnore: (node: unknown, parent: unknown, grandparent?: unknown, ancestor?: unknown) => string | undefined;
|
|
9
15
|
|
|
10
16
|
export declare const OPTIONAL_DEFAULT_IGNORED: 'optionalWith default value is config, not behaviour';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { ANNOTATION_OBJECT_IGNORED, ANNOTATION_TEXT_IGNORED, OPTIONAL_DEFAULT_IGNORED, SYMBOL_DESCRIPTION_IGNORED, TAGGED_FIELDS_IGNORED, TAGGED_TAG_IGNORED, decideSchemaDeclarationIgnore, strykerPlugins };
|
|
1
|
+
import { a as CLASS_FIELDS_IGNORED, c as SYMBOL_DESCRIPTION_IGNORED, d as decideSchemaDeclarationIgnore, i as BRAND_NAME_IGNORED, l as TAGGED_FIELDS_IGNORED, n as ANNOTATION_OBJECT_IGNORED, o as CLASS_ID_IGNORED, r as ANNOTATION_TEXT_IGNORED, s as OPTIONAL_DEFAULT_IGNORED, t as strykerPlugins, u as TAGGED_TAG_IGNORED } from "./effect-schema-ignorer-38xDaLr8.mjs";
|
|
2
|
+
export { ANNOTATION_OBJECT_IGNORED, ANNOTATION_TEXT_IGNORED, BRAND_NAME_IGNORED, CLASS_FIELDS_IGNORED, CLASS_ID_IGNORED, OPTIONAL_DEFAULT_IGNORED, SYMBOL_DESCRIPTION_IGNORED, TAGGED_FIELDS_IGNORED, TAGGED_TAG_IGNORED, decideSchemaDeclarationIgnore, strykerPlugins };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { t as ancestorsOf } from "./AncestorPath-BR3dvosy.mjs";
|
|
2
|
+
import { PluginKind, declareValuePlugin } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
3
|
+
import { Schema } from "effect";
|
|
4
|
+
//#region src/in-source-test-ignorer/AstNode.schema.ts
|
|
5
|
+
const Identifier = Schema.Struct({
|
|
6
|
+
type: Schema.Literal("Identifier"),
|
|
7
|
+
name: Schema.String
|
|
8
|
+
});
|
|
9
|
+
const AstLike = Schema.Struct({ type: Schema.String });
|
|
10
|
+
const MetaProperty = Schema.Struct({
|
|
11
|
+
type: Schema.Literal("MetaProperty"),
|
|
12
|
+
meta: Identifier,
|
|
13
|
+
property: Identifier
|
|
14
|
+
});
|
|
15
|
+
const ImportMetaMember = Schema.Struct({
|
|
16
|
+
type: Schema.Literal("MemberExpression"),
|
|
17
|
+
object: MetaProperty,
|
|
18
|
+
property: Identifier
|
|
19
|
+
});
|
|
20
|
+
const BinaryExpression = Schema.Struct({
|
|
21
|
+
type: Schema.Literal("BinaryExpression"),
|
|
22
|
+
left: AstLike,
|
|
23
|
+
right: AstLike
|
|
24
|
+
});
|
|
25
|
+
const IfStatement = Schema.Struct({
|
|
26
|
+
type: Schema.Literal("IfStatement"),
|
|
27
|
+
test: AstLike
|
|
28
|
+
});
|
|
29
|
+
/** Derived recognisers, declared beside the shapes they decide. */
|
|
30
|
+
const isImportMetaMember = Schema.is(ImportMetaMember);
|
|
31
|
+
const isBinaryExpression = Schema.is(BinaryExpression);
|
|
32
|
+
const isIfStatement = Schema.is(IfStatement);
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/in-source-test-ignorer/InSourceTestIgnore.ts
|
|
35
|
+
const IN_SOURCE_TEST_IGNORED = "inside an `if (import.meta.vitest)` block — test code, not production behaviour";
|
|
36
|
+
const isImportMetaVitest = (node) => isImportMetaMember(node) && node.object.meta.name === "import" && node.object.property.name === "meta" && node.property.name === "vitest";
|
|
37
|
+
const guardsOnImportMetaVitest = (test) => isImportMetaVitest(test) || isBinaryExpression(test) && (isImportMetaVitest(test.left) || isImportMetaVitest(test.right));
|
|
38
|
+
const isInSourceTestGuard = (node) => isIfStatement(node) && guardsOnImportMetaVitest(node.test);
|
|
39
|
+
const decideInSourceTestIgnore = (ancestors) => {
|
|
40
|
+
for (const ancestor of ancestors) if (isInSourceTestGuard(ancestor)) return IN_SOURCE_TEST_IGNORED;
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/in-source-test-ignorer/index.ts
|
|
44
|
+
const strykerPlugins = [declareValuePlugin(PluginKind.Ignore, "in-source-vitest-block", { shouldIgnore(path) {
|
|
45
|
+
return decideInSourceTestIgnore(ancestorsOf(path));
|
|
46
|
+
} })];
|
|
47
|
+
//#endregion
|
|
48
|
+
export { isInSourceTestGuard as i, IN_SOURCE_TEST_IGNORED as n, decideInSourceTestIgnore as r, strykerPlugins as t };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PluginKind } from '@systemfsoftware/stryker-js-plugin-api/plugin';
|
|
2
|
+
import { ValuePlugin } from '@systemfsoftware/stryker-js-plugin-api/plugin';
|
|
3
|
+
|
|
4
|
+
export declare const decideInSourceTestIgnore: (ancestors: Iterable<unknown>) => string | undefined;
|
|
5
|
+
|
|
6
|
+
export declare const IN_SOURCE_TEST_IGNORED: 'inside an `if (import.meta.vitest)` block — test code, not production behaviour';
|
|
7
|
+
|
|
8
|
+
export declare const isInSourceTestGuard: (node: unknown) => boolean;
|
|
9
|
+
|
|
10
|
+
export declare const strykerPlugins: ValuePlugin<PluginKind.Ignore>[];
|
|
11
|
+
|
|
12
|
+
export { }
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/mod.d.ts
|
|
2
|
-
declare const strykerPlugins: import("@stryker-
|
|
2
|
+
declare const strykerPlugins: import("@systemfsoftware/stryker-js-plugin-api/plugin").ValuePlugin<import("@systemfsoftware/stryker-js-plugin-api/plugin").PluginKind.Ignore>[];
|
|
3
3
|
//#endregion
|
|
4
4
|
export { strykerPlugins };
|
package/dist/index.mjs
CHANGED
|
@@ -1,53 +1,11 @@
|
|
|
1
|
-
import { t as strykerPlugins$
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
//#region src/in-source-test-ignorer/ast-node.kernel.ts
|
|
5
|
-
const Identifier = Schema.Struct({
|
|
6
|
-
type: Schema.Literal("Identifier"),
|
|
7
|
-
name: Schema.String
|
|
8
|
-
});
|
|
9
|
-
const AstLike = Schema.Struct({ type: Schema.String });
|
|
10
|
-
const MetaProperty = Schema.Struct({
|
|
11
|
-
type: Schema.Literal("MetaProperty"),
|
|
12
|
-
meta: Identifier,
|
|
13
|
-
property: Identifier
|
|
14
|
-
});
|
|
15
|
-
const ImportMetaMember = Schema.Struct({
|
|
16
|
-
type: Schema.Literal("MemberExpression"),
|
|
17
|
-
object: MetaProperty,
|
|
18
|
-
property: Identifier
|
|
19
|
-
});
|
|
20
|
-
const BinaryExpression = Schema.Struct({
|
|
21
|
-
type: Schema.Literal("BinaryExpression"),
|
|
22
|
-
left: AstLike,
|
|
23
|
-
right: AstLike
|
|
24
|
-
});
|
|
25
|
-
const IfStatement = Schema.Struct({
|
|
26
|
-
type: Schema.Literal("IfStatement"),
|
|
27
|
-
test: AstLike
|
|
28
|
-
});
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/in-source-test-ignorer/in-source-test-ignore.kernel.ts
|
|
31
|
-
const IN_SOURCE_TEST_IGNORED = "inside an `if (import.meta.vitest)` block — test code, not production behaviour";
|
|
32
|
-
const isImportMetaMember = Schema.is(ImportMetaMember);
|
|
33
|
-
const isBinaryExpression = Schema.is(BinaryExpression);
|
|
34
|
-
const isIfStatement = Schema.is(IfStatement);
|
|
35
|
-
const isImportMetaVitest = (node) => isImportMetaMember(node) && node.object.meta.name === "import" && node.object.property.name === "meta" && node.property.name === "vitest";
|
|
36
|
-
const guardsOnImportMetaVitest = (test) => isImportMetaVitest(test) || isBinaryExpression(test) && (isImportMetaVitest(test.left) || isImportMetaVitest(test.right));
|
|
37
|
-
const isInSourceTestGuard = (node) => isIfStatement(node) && guardsOnImportMetaVitest(node.test);
|
|
38
|
-
const decideInSourceTestIgnore = (ancestors) => {
|
|
39
|
-
for (const ancestor of ancestors) if (isInSourceTestGuard(ancestor)) return IN_SOURCE_TEST_IGNORED;
|
|
40
|
-
};
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/in-source-test-ignorer/index.ts
|
|
43
|
-
function* ancestorsOf(path) {
|
|
44
|
-
for (let current = path.parentPath; current; current = current.parentPath) yield current.node;
|
|
45
|
-
}
|
|
46
|
-
const strykerPlugins$1 = [declareValuePlugin(PluginKind.Ignore, "in-source-vitest-block", { shouldIgnore(path) {
|
|
47
|
-
return decideInSourceTestIgnore(ancestorsOf(path));
|
|
48
|
-
} })];
|
|
49
|
-
//#endregion
|
|
1
|
+
import { t as strykerPlugins$1 } from "./effect-schema-ignorer-38xDaLr8.mjs";
|
|
2
|
+
import { t as strykerPlugins$2 } from "./in-source-test-ignorer-DTJIr1ut.mjs";
|
|
3
|
+
import { t as strykerPlugins$3 } from "./workflow-make-ignorer-dLlC4-S_.mjs";
|
|
50
4
|
//#region src/mod.ts
|
|
51
|
-
const strykerPlugins = [
|
|
5
|
+
const strykerPlugins = [
|
|
6
|
+
...strykerPlugins$1,
|
|
7
|
+
...strykerPlugins$2,
|
|
8
|
+
...strykerPlugins$3
|
|
9
|
+
];
|
|
52
10
|
//#endregion
|
|
53
11
|
export { strykerPlugins };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PluginKind } from '@stryker-
|
|
2
|
-
import { ValuePlugin } from '@stryker-
|
|
1
|
+
import { PluginKind } from '@systemfsoftware/stryker-js-plugin-api/plugin';
|
|
2
|
+
import { ValuePlugin } from '@systemfsoftware/stryker-js-plugin-api/plugin';
|
|
3
3
|
|
|
4
4
|
export declare const strykerPlugins: ValuePlugin<PluginKind.Ignore>[];
|
|
5
5
|
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { t as ancestorsOf } from "./AncestorPath-BR3dvosy.mjs";
|
|
2
|
+
import { PluginKind, declareValuePlugin } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
3
|
+
import { Schema } from "effect";
|
|
4
|
+
//#region src/workflow-make-ignorer/AstNode.schema.ts
|
|
5
|
+
const Identifier = Schema.Struct({
|
|
6
|
+
type: Schema.Literal("Identifier"),
|
|
7
|
+
name: Schema.String
|
|
8
|
+
});
|
|
9
|
+
const StringLiteral = Schema.Struct({
|
|
10
|
+
type: Schema.Literal("StringLiteral"),
|
|
11
|
+
value: Schema.String
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* The `Workflow.make(...)` decision argument. Effect Schema S.structs are inexact, so a
|
|
15
|
+
* body carrying parameters, statements, and nested expressions passes the `{ type }` shape
|
|
16
|
+
* while its children stay unmodeled — the boundary containment is identity, not shape.
|
|
17
|
+
*/
|
|
18
|
+
const ArrowFunctionExpression = Schema.Struct({ type: Schema.Literal("ArrowFunctionExpression") });
|
|
19
|
+
/** A named-function decision argument, the `function (command) { … }` form of a make body. */
|
|
20
|
+
const FunctionExpression = Schema.Struct({ type: Schema.Literal("FunctionExpression") });
|
|
21
|
+
/** Any AST node outside the modeled vocabulary — accepts every babel node type structurally. */
|
|
22
|
+
const UnknownNode = Schema.Struct({ type: Schema.String });
|
|
23
|
+
let AstNodeSchema;
|
|
24
|
+
/**
|
|
25
|
+
* The recursive member schemas reference the shared `AstNode` UNION directly (v4: a reference
|
|
26
|
+
* straight to the schema, not a fresh `S.suspend` wrap), the same suspension layout the
|
|
27
|
+
* effect-schema-ignorer kernel uses — the cycle breaks at the one union node and the schema-law
|
|
28
|
+
* arbitrary derivation terminates.
|
|
29
|
+
*/
|
|
30
|
+
const MemberExpression = Schema.suspend(() => Schema.Struct({
|
|
31
|
+
type: Schema.Literal("MemberExpression"),
|
|
32
|
+
object: AstNodeSchema,
|
|
33
|
+
property: AstNodeSchema
|
|
34
|
+
}));
|
|
35
|
+
const CallExpression = Schema.suspend(() => Schema.Struct({
|
|
36
|
+
type: Schema.Literal("CallExpression"),
|
|
37
|
+
callee: AstNodeSchema,
|
|
38
|
+
arguments: Schema.Array(Schema.Unknown)
|
|
39
|
+
}));
|
|
40
|
+
AstNodeSchema = Schema.Union([
|
|
41
|
+
Identifier,
|
|
42
|
+
StringLiteral,
|
|
43
|
+
ArrowFunctionExpression,
|
|
44
|
+
FunctionExpression,
|
|
45
|
+
MemberExpression,
|
|
46
|
+
CallExpression,
|
|
47
|
+
UnknownNode
|
|
48
|
+
]);
|
|
49
|
+
const ImportSpecifier = Schema.Struct({
|
|
50
|
+
type: Schema.Literal("ImportSpecifier"),
|
|
51
|
+
imported: Identifier,
|
|
52
|
+
local: Identifier
|
|
53
|
+
});
|
|
54
|
+
const ImportNamespaceSpecifier = Schema.Struct({
|
|
55
|
+
type: Schema.Literal("ImportNamespaceSpecifier"),
|
|
56
|
+
local: Identifier
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* A specifier union admitting the named and namespace forms. A default specifier cannot bind
|
|
60
|
+
* `Workflow` — `@systemfsoftware/effect-cell-types` ships no default export — so it is left
|
|
61
|
+
* out and an import carrying one is not a workflow import.
|
|
62
|
+
*/
|
|
63
|
+
const ImportDeclaration = Schema.Struct({
|
|
64
|
+
type: Schema.Literal("ImportDeclaration"),
|
|
65
|
+
source: StringLiteral,
|
|
66
|
+
specifiers: Schema.Array(Schema.Union([ImportSpecifier, ImportNamespaceSpecifier]))
|
|
67
|
+
});
|
|
68
|
+
/** The file root. Body holds every statement, so the element schema is intentionally loose. */
|
|
69
|
+
const Program = Schema.Struct({
|
|
70
|
+
type: Schema.Literal("Program"),
|
|
71
|
+
body: Schema.Array(Schema.Unknown)
|
|
72
|
+
});
|
|
73
|
+
/** Derived recognisers, declared beside the shapes they decide. */
|
|
74
|
+
const isProgram = Schema.is(Program);
|
|
75
|
+
const isImportDeclaration = Schema.is(ImportDeclaration);
|
|
76
|
+
const isImportSpecifier = Schema.is(ImportSpecifier);
|
|
77
|
+
const isImportNamespaceSpecifier = Schema.is(ImportNamespaceSpecifier);
|
|
78
|
+
const isIdentifier = Schema.is(Identifier);
|
|
79
|
+
const isStringLiteral = Schema.is(StringLiteral);
|
|
80
|
+
const isMemberExpression = Schema.is(MemberExpression);
|
|
81
|
+
const isCallExpression = Schema.is(CallExpression);
|
|
82
|
+
const isArrowFunction = Schema.is(ArrowFunctionExpression);
|
|
83
|
+
const isFunctionExpression = Schema.is(FunctionExpression);
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/workflow-make-ignorer/MakeBoundaryIgnore.ts
|
|
86
|
+
const NOT_INSIDE_WORKFLOW_MAKE = "mutant is outside every Workflow.make decision body; only make bodies are the mutation population";
|
|
87
|
+
/** The module whose `Workflow` value owns the `make` boundary. */
|
|
88
|
+
const WORKFLOW_SOURCE = "@systemfsoftware/effect-cell-types";
|
|
89
|
+
/** The import name a specifier must carry to be the workflow value. */
|
|
90
|
+
const WORKFLOW_IMPORT_NAME = "Workflow";
|
|
91
|
+
/** The member of the workflow value the boundary call invokes. */
|
|
92
|
+
const MAKE_MEMBER_NAME = "make";
|
|
93
|
+
const NO_WORKFLOW_LOCALS = /* @__PURE__ */ new Set();
|
|
94
|
+
const NO_MAKE_ARGUMENT_BODIES = /* @__PURE__ */ new Set();
|
|
95
|
+
/** Program -> its workflow local names, so repeated mutant probes never re-walk the body. */
|
|
96
|
+
const WORKFLOW_LOCALS_BY_PROGRAM = /* @__PURE__ */ new WeakMap();
|
|
97
|
+
/**
|
|
98
|
+
* The local binding names that resolve to the `Workflow` value of the cell-types module: the
|
|
99
|
+
* canonical `import { Workflow }`, an alias `import { Workflow as W }`, or the namespace form
|
|
100
|
+
* `import * as Workflow`. This is deliberately a file-level import resolution, not a scope
|
|
101
|
+
* analysis — the boundary is a mechanical gate, so a local shadowing the imported name
|
|
102
|
+
* shadows the boundary too (no production site does this). Memoized keyed by the Program
|
|
103
|
+
* node: the probe loop visits every mutant in the file, and the import set is a pure
|
|
104
|
+
* function of the Program.
|
|
105
|
+
*/
|
|
106
|
+
const workflowLocalNamesOf = (program) => {
|
|
107
|
+
if (!isProgram(program)) return NO_WORKFLOW_LOCALS;
|
|
108
|
+
const cached = WORKFLOW_LOCALS_BY_PROGRAM.get(program);
|
|
109
|
+
if (cached !== void 0) return cached;
|
|
110
|
+
const names = /* @__PURE__ */ new Set();
|
|
111
|
+
for (const statement of program.body) {
|
|
112
|
+
if (!isImportDeclaration(statement) || !isStringLiteral(statement.source)) continue;
|
|
113
|
+
if (statement.source.value !== WORKFLOW_SOURCE) continue;
|
|
114
|
+
for (const specifier of statement.specifiers) if (isImportNamespaceSpecifier(specifier)) names.add(specifier.local.name);
|
|
115
|
+
else if (isImportSpecifier(specifier) && isIdentifier(specifier.imported) && specifier.imported.name === WORKFLOW_IMPORT_NAME) names.add(specifier.local.name);
|
|
116
|
+
}
|
|
117
|
+
WORKFLOW_LOCALS_BY_PROGRAM.set(program, names);
|
|
118
|
+
return names;
|
|
119
|
+
};
|
|
120
|
+
const isWorkflowMakeCallee = (callee, localNames) => isMemberExpression(callee) && isIdentifier(callee.object) && localNames.has(callee.object.name) && isIdentifier(callee.property) && callee.property.name === MAKE_MEMBER_NAME;
|
|
121
|
+
const isWorkflowMakeCall = (node, localNames) => isCallExpression(node) && isWorkflowMakeCallee(node.callee, localNames);
|
|
122
|
+
const isArgumentOf = (node, call) => call.arguments.includes(node);
|
|
123
|
+
const isFunctionDeclaration = (value) => {
|
|
124
|
+
if (typeof value !== "object" || value === null) return false;
|
|
125
|
+
if (!("type" in value) || value["type"] !== "FunctionDeclaration") return false;
|
|
126
|
+
return "id" in value && isIdentifier(value["id"]);
|
|
127
|
+
};
|
|
128
|
+
const isVariableDeclaration = (value) => {
|
|
129
|
+
if (typeof value !== "object" || value === null) return false;
|
|
130
|
+
if (!("type" in value) || value["type"] !== "VariableDeclaration") return false;
|
|
131
|
+
return "kind" in value && "declarations" in value && Array.isArray(value["declarations"]);
|
|
132
|
+
};
|
|
133
|
+
const isVariableDeclarator = (value) => {
|
|
134
|
+
if (typeof value !== "object" || value === null) return false;
|
|
135
|
+
if (!("type" in value) || value["type"] !== "VariableDeclarator") return false;
|
|
136
|
+
return "id" in value && "init" in value;
|
|
137
|
+
};
|
|
138
|
+
const isExportWrapper = (value) => {
|
|
139
|
+
if (typeof value !== "object" || value === null) return false;
|
|
140
|
+
if (!("type" in value)) return false;
|
|
141
|
+
return value["type"] === "ExportNamedDeclaration" || value["type"] === "ExportDefaultDeclaration";
|
|
142
|
+
};
|
|
143
|
+
const unwrapExport = (value) => isExportWrapper(value) && "declaration" in value && value.declaration !== void 0 && value.declaration !== null ? value.declaration : value;
|
|
144
|
+
const isFunctionLike = (value) => isArrowFunction(value) || isFunctionExpression(value) || isFunctionDeclaration(value);
|
|
145
|
+
/** Follow depth bound, mirroring the oxlint kernel's cycle guard. */
|
|
146
|
+
const MAX_FOLLOW_DEPTH = 8;
|
|
147
|
+
/**
|
|
148
|
+
* The same-file follow walk: a make argument name resolves through module-scope
|
|
149
|
+
* `const` bindings (function initializers and identifier aliases) and named
|
|
150
|
+
* function declarations, with the depth bound breaking alias cycles.
|
|
151
|
+
*/
|
|
152
|
+
const followFunctionReference = (name, bindings, depth) => {
|
|
153
|
+
if (depth > MAX_FOLLOW_DEPTH) return null;
|
|
154
|
+
const binding = bindings.get(name);
|
|
155
|
+
if (binding === void 0 || binding === null) return null;
|
|
156
|
+
if (isFunctionLike(binding)) return binding;
|
|
157
|
+
if (isIdentifier(binding)) return followFunctionReference(binding.name, bindings, depth + 1);
|
|
158
|
+
return null;
|
|
159
|
+
};
|
|
160
|
+
/** The module-scope bindings of a file: name -> function-like node, alias identifier, or null. */
|
|
161
|
+
const moduleBindingsOf = (programBody) => {
|
|
162
|
+
const bindings = /* @__PURE__ */ new Map();
|
|
163
|
+
for (const rawStatement of programBody) {
|
|
164
|
+
const statement = unwrapExport(rawStatement);
|
|
165
|
+
if (isFunctionDeclaration(statement)) {
|
|
166
|
+
bindings.set(statement.id.name, statement);
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
if (!isVariableDeclaration(statement) || statement.kind !== "const") continue;
|
|
170
|
+
for (const declarator of statement.declarations) {
|
|
171
|
+
if (!isVariableDeclarator(declarator) || !isIdentifier(declarator.id)) continue;
|
|
172
|
+
const init = declarator.init;
|
|
173
|
+
if (init === null || init === void 0) continue;
|
|
174
|
+
bindings.set(declarator.id.name, isFunctionLike(init) || isIdentifier(init) ? init : null);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return bindings;
|
|
178
|
+
};
|
|
179
|
+
const isWalkable = (value) => typeof value === "object" && value !== null;
|
|
180
|
+
const walkAllNodes = (root, visit) => {
|
|
181
|
+
const visited = /* @__PURE__ */ new Set();
|
|
182
|
+
const walk = (value) => {
|
|
183
|
+
if (!isWalkable(value)) return;
|
|
184
|
+
if (visited.has(value)) return;
|
|
185
|
+
visited.add(value);
|
|
186
|
+
visit(value);
|
|
187
|
+
for (const key of Object.keys(value)) {
|
|
188
|
+
const child = value[key];
|
|
189
|
+
if (Array.isArray(child)) for (const entry of child) walk(entry);
|
|
190
|
+
else walk(child);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
walk(root);
|
|
194
|
+
};
|
|
195
|
+
/** Program -> the same-file function bodies a `Workflow.make` identifier argument resolves to. */
|
|
196
|
+
const MAKE_ARGUMENT_BODIES_BY_PROGRAM = /* @__PURE__ */ new WeakMap();
|
|
197
|
+
/**
|
|
198
|
+
* The function nodes a make call names by identifier, memoized keyed by the Program:
|
|
199
|
+
* the probe loop visits every mutant in the file, and the resolution is a pure
|
|
200
|
+
* function of the Program. The bodies are the container objects — a mutant whose
|
|
201
|
+
* ancestor chain includes one stays inside the population.
|
|
202
|
+
*/
|
|
203
|
+
const makeArgumentBodiesOf = (program) => {
|
|
204
|
+
if (!isProgram(program)) return NO_MAKE_ARGUMENT_BODIES;
|
|
205
|
+
const cached = MAKE_ARGUMENT_BODIES_BY_PROGRAM.get(program);
|
|
206
|
+
if (cached !== void 0) return cached;
|
|
207
|
+
const bodies = /* @__PURE__ */ new Set();
|
|
208
|
+
const localNames = workflowLocalNamesOf(program);
|
|
209
|
+
if (localNames.size > 0) {
|
|
210
|
+
const bindings = moduleBindingsOf(program.body);
|
|
211
|
+
walkAllNodes(program, (node) => {
|
|
212
|
+
if (!isCallExpression(node)) return;
|
|
213
|
+
if (!isWorkflowMakeCallee(node.callee, localNames)) return;
|
|
214
|
+
const firstArgument = node.arguments[0];
|
|
215
|
+
if (firstArgument === void 0 || !isIdentifier(firstArgument)) return;
|
|
216
|
+
const resolved = followFunctionReference(firstArgument.name, bindings, 0);
|
|
217
|
+
if (resolved !== null && typeof resolved === "object") bodies.add(resolved);
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
MAKE_ARGUMENT_BODIES_BY_PROGRAM.set(program, bodies);
|
|
221
|
+
return bodies;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* True when the mutant descends from an argument slot of a `Workflow.make` call — babel nests
|
|
225
|
+
* the make body under the call's `arguments` array, so identity containment through the walk
|
|
226
|
+
* is the boundary test. A mutant ON the call (its callee or the call itself) is outside the
|
|
227
|
+
* argument and therefore outside the population, which is the point of the inverted gate.
|
|
228
|
+
*/
|
|
229
|
+
const insideMakeBoundary = (node, ancestors) => {
|
|
230
|
+
let root = void 0;
|
|
231
|
+
for (let i = ancestors.length - 1; i >= 0; i--) if (isProgram(ancestors[i])) {
|
|
232
|
+
root = ancestors[i];
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
const localNames = workflowLocalNamesOf(root);
|
|
236
|
+
if (localNames.size === 0) return false;
|
|
237
|
+
for (let i = 0; i < ancestors.length; i++) {
|
|
238
|
+
const ancestor = ancestors[i];
|
|
239
|
+
const child = i === 0 ? node : ancestors[i - 1];
|
|
240
|
+
if (isWorkflowMakeCall(ancestor, localNames) && isArgumentOf(child, ancestor)) return true;
|
|
241
|
+
}
|
|
242
|
+
const resolvedBodies = makeArgumentBodiesOf(root);
|
|
243
|
+
if (resolvedBodies.size === 0) return false;
|
|
244
|
+
if (typeof node === "object" && node !== null && resolvedBodies.has(node)) return true;
|
|
245
|
+
for (const ancestor of ancestors) if (typeof ancestor === "object" && ancestor !== null && resolvedBodies.has(ancestor)) return true;
|
|
246
|
+
return false;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* The inverted population selector: every mutant whose ancestor chain contains no
|
|
250
|
+
* `Workflow.make(...)` call argument is excised with the named reason, and every mutant
|
|
251
|
+
* inside any make boundary passes through to the next ignorer.
|
|
252
|
+
*/
|
|
253
|
+
const decideWorkflowMakeBoundaryIgnore = (node, ancestors) => insideMakeBoundary(node, ancestors) ? void 0 : NOT_INSIDE_WORKFLOW_MAKE;
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/workflow-make-ignorer/index.ts
|
|
256
|
+
const strykerPlugins = [declareValuePlugin(PluginKind.Ignore, "workflow-make-boundary", { shouldIgnore(path) {
|
|
257
|
+
return decideWorkflowMakeBoundaryIgnore(path.node, [...ancestorsOf(path)]);
|
|
258
|
+
} })];
|
|
259
|
+
//#endregion
|
|
260
|
+
export { NOT_INSIDE_WORKFLOW_MAKE as n, decideWorkflowMakeBoundaryIgnore as r, strykerPlugins as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PluginKind } from '@systemfsoftware/stryker-js-plugin-api/plugin';
|
|
2
|
+
import { ValuePlugin } from '@systemfsoftware/stryker-js-plugin-api/plugin';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The inverted population selector: every mutant whose ancestor chain contains no
|
|
6
|
+
* `Workflow.make(...)` call argument is excised with the named reason, and every mutant
|
|
7
|
+
* inside any make boundary passes through to the next ignorer.
|
|
8
|
+
*/
|
|
9
|
+
export declare const decideWorkflowMakeBoundaryIgnore: (node: unknown, ancestors: readonly unknown[]) => string | undefined;
|
|
10
|
+
|
|
11
|
+
export declare const NOT_INSIDE_WORKFLOW_MAKE: 'mutant is outside every Workflow.make decision body; only make bodies are the mutation population';
|
|
12
|
+
|
|
13
|
+
export declare const strykerPlugins: ValuePlugin<PluginKind.Ignore>[];
|
|
14
|
+
|
|
15
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/stryker-plugins",
|
|
3
|
-
"license": "
|
|
4
|
-
"version": "0.
|
|
3
|
+
"license": "Apache-2.0",
|
|
4
|
+
"version": "0.13.0",
|
|
5
5
|
"author": "Ryan Lee <drdgvhbh@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
|
|
9
|
-
"directory": "packages/stryker-plugins"
|
|
9
|
+
"directory": "packages/testing/mutation/plugins/stryker-plugins"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/stryker-plugins#readme",
|
|
11
|
+
"homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/testing/mutation/plugins/stryker-plugins#readme",
|
|
12
12
|
"bugs": "https://github.com/systemfsoftware/systemfsoftware/issues",
|
|
13
13
|
"description": "Stryker mutation-testing plugins for Effect-TS — ignore equivalent mutants on Effect Schema declarations (brands, TaggedClass/TaggedError tags) so the score reflects behaviour, not data.",
|
|
14
14
|
"keywords": [
|
|
@@ -36,35 +36,43 @@
|
|
|
36
36
|
"types": "./dist/effect-schema-ignorer.d.ts",
|
|
37
37
|
"default": "./dist/effect-schema-ignorer.mjs"
|
|
38
38
|
},
|
|
39
|
+
"./in-source-test-ignorer": {
|
|
40
|
+
"types": "./dist/in-source-test-ignorer.d.ts",
|
|
41
|
+
"default": "./dist/in-source-test-ignorer.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./workflow-make-ignorer": {
|
|
44
|
+
"types": "./dist/workflow-make-ignorer.d.ts",
|
|
45
|
+
"default": "./dist/workflow-make-ignorer.mjs"
|
|
46
|
+
},
|
|
39
47
|
"./package.json": "./package.json"
|
|
40
48
|
},
|
|
41
49
|
"devDependencies": {
|
|
42
50
|
"@babel/types": "^7.29.0",
|
|
43
|
-
"@effect/vitest": "0.
|
|
51
|
+
"@effect/vitest": "4.0.0-rc.108",
|
|
44
52
|
"@microsoft/api-extractor": "^7.58.7",
|
|
45
53
|
"@stryker-mutator/api": "^9.6.1",
|
|
46
|
-
"@
|
|
54
|
+
"@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
|
|
47
55
|
"@types/node": "^24",
|
|
48
56
|
"@vitest/coverage-v8": "^4",
|
|
49
|
-
"effect": "
|
|
57
|
+
"effect": "4.0.0-rc.108",
|
|
58
|
+
"oxlint": "^1.77.0",
|
|
50
59
|
"rimraf": "^6.1.3",
|
|
51
|
-
"tsdown": "^0.22.
|
|
60
|
+
"tsdown": "^0.22.14",
|
|
52
61
|
"tstyche": "^7.1.0",
|
|
53
|
-
"vitest": "^4",
|
|
54
|
-
"@systemfsoftware/
|
|
62
|
+
"vitest": "^4.1.10",
|
|
63
|
+
"@systemfsoftware/effect-schema-law": "^0.8.0",
|
|
64
|
+
"@systemfsoftware/effect-gherkin-spec": "^2.0.0",
|
|
65
|
+
"@systemfsoftware/effect-schema-vite": "^1.5.3",
|
|
55
66
|
"@systemfsoftware/oxlint-config": "^0.1.0",
|
|
56
|
-
"@systemfsoftware/
|
|
57
|
-
"@systemfsoftware/
|
|
58
|
-
"@systemfsoftware/
|
|
59
|
-
"@systemfsoftware/stryker-js-typescript-checker": "^1.2.3",
|
|
60
|
-
"@systemfsoftware/tsconfig": "^1.3.1",
|
|
61
|
-
"@systemfsoftware/stryker-js-core": "^1.2.4",
|
|
62
|
-
"@systemfsoftware/vitest-config": "^0.1.0"
|
|
67
|
+
"@systemfsoftware/tsconfig": "^1.3.3",
|
|
68
|
+
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
69
|
+
"@systemfsoftware/stryker-js-plugin-api": "^2.0.0"
|
|
63
70
|
},
|
|
64
71
|
"peerDependencies": {
|
|
65
72
|
"@stryker-mutator/api": "^9.6.1",
|
|
66
|
-
"effect": "
|
|
67
|
-
"typescript": ">=5.0.0"
|
|
73
|
+
"effect": "4.0.0-rc.108",
|
|
74
|
+
"typescript": ">=5.0.0",
|
|
75
|
+
"@systemfsoftware/stryker-js-plugin-api": "^2.0.0"
|
|
68
76
|
},
|
|
69
77
|
"publishConfig": {
|
|
70
78
|
"provenance": true
|
|
@@ -75,11 +83,10 @@
|
|
|
75
83
|
"typecheck": "tsc --noEmit --incremental",
|
|
76
84
|
"test": "vitest run",
|
|
77
85
|
"test:run": "vitest run --coverage",
|
|
78
|
-
"test:types": "tstyche",
|
|
79
|
-
"
|
|
80
|
-
"lint": "oxlint . ${AGENT:+--format=unix --quiet}",
|
|
86
|
+
"test:types": "TSTYCHE_TYPESCRIPT_MODULE=tstyche-typescript tstyche",
|
|
87
|
+
"lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; oxlint . --format=${f:-default}",
|
|
81
88
|
"attw": "attw --pack .",
|
|
82
|
-
"api:check": "concurrently --kill-others-on-fail \"api-extractor run\" \"api-extractor run --config api-extractor.effect-schema-ignorer.json\"",
|
|
83
|
-
"api:update": "concurrently --kill-others-on-fail \"api-extractor run --local\" \"api-extractor run --local --config api-extractor.effect-schema-ignorer.json\""
|
|
89
|
+
"api:check": "concurrently --kill-others-on-fail \"api-extractor run\" \"api-extractor run --config api-extractor.effect-schema-ignorer.json\" \"api-extractor run --config api-extractor.in-source-test-ignorer.json\" \"api-extractor run --config api-extractor.workflow-make-ignorer.json\"",
|
|
90
|
+
"api:update": "concurrently --kill-others-on-fail \"api-extractor run --local\" \"api-extractor run --local --config api-extractor.effect-schema-ignorer.json\" \"api-extractor run --local --config api-extractor.in-source-test-ignorer.json\" \"api-extractor run --local --config api-extractor.workflow-make-ignorer.json\""
|
|
84
91
|
}
|
|
85
92
|
}
|