@systemfsoftware/stryker-js-mutation-run 2.0.0 → 4.0.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 +92 -0
- package/README.md +1 -1
- package/dist/{checker-C4tGiXtZ.mjs → checker-C0Vh51o8.mjs} +3 -3
- package/dist/{checker-resource-DTYEKXdg.d.mts → checker-resource-LZCpsbpn.d.mts} +1 -1
- package/dist/checker-worker.d.mts +2 -2
- package/dist/checker-worker.mjs +1 -1
- package/dist/{child-process-proxy-worker-lx1M5Mz3.mjs → child-process-proxy-worker-CmAwSjYi.mjs} +2 -2
- package/dist/child-process-proxy-worker-main.mjs +1 -1
- package/dist/{child-process-test-runner-worker-BTWRYb8V.mjs → child-process-test-runner-worker-DPXWNPqZ.mjs} +2 -2
- package/dist/child-process-test-runner-worker.d.mts +1 -1
- package/dist/child-process-test-runner-worker.mjs +1 -1
- package/dist/config/base.mjs +2 -1
- package/dist/config/config-resolution.d.mts +2 -2
- package/dist/config/config-resolution.mjs +1 -1
- package/dist/config/fork-schema.mjs +1 -1
- package/dist/{errors-BkjxkY_S.d.mts → errors-B8Vx4QIQ.d.mts} +1 -1
- package/dist/errors.d.mts +1 -1
- package/dist/errors.mjs +1 -1
- package/dist/{fork-schema-BHuTbRBR.mjs → fork-schema-K8Ab5szC.mjs} +1 -14
- package/dist/{incremental-differ-DY8AA09Q.mjs → incremental-differ-DAz2XlBK.mjs} +2 -2
- package/dist/{incremental-differ-DDVwtXBn.d.mts → incremental-differ-DtBnr6fJ.d.mts} +1 -1
- package/dist/{index-CyOSz6LC.d.mts → index-C19nE7Ww.d.mts} +23 -4
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +21 -34
- package/dist/mutants/incremental-differ.d.mts +1 -1
- package/dist/mutants/incremental-differ.mjs +1 -1
- package/dist/{plugins-Nx86IJQW.mjs → plugins-Bdy2g7fR.mjs} +69 -24
- package/dist/plugins.d.mts +1 -1
- package/dist/plugins.mjs +1 -1
- package/dist/{run-event-CzRz9Gtk.d.mts → run-event-Dx_Q5jrc.d.mts} +1 -1
- package/dist/run-event.d.mts +1 -1
- package/dist/{stryker-package-CTcsIZ4S.mjs → stryker-package-JIsmRMux.mjs} +1 -1
- package/dist/stryker-package.d.mts +1 -1
- package/dist/stryker-package.mjs +1 -1
- package/dist/{verdict-envelope-CKLZPjxC.d.mts → verdict-envelope-BJz-h7K-.d.mts} +2 -10
- package/dist/verdict-envelope.d.mts +1 -1
- package/dist/verdict-envelope.mjs +135 -1
- package/package.json +13 -14
- package/schema/stryker-schema.json +6 -20
- package/dist/verdict-envelope-BWc61mHm.mjs +0 -229
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js-mutation-run
|
|
2
2
|
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- The engine no longer judges test contribution, and the verdict envelope no longer includes a `testContribution` field. Install the companion plugin and list it in `plugins` if you want that check. Configs that extend this package's base preset now run the gate for workflow, policy, and kernel property tests; remove the plugin from `plugins` to turn it off.
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- Declarations that were never meant to be hidden are public again.
|
|
12
|
+
|
|
13
|
+
- The package now publishes a `test-contribution` entry. Import it to call the functions that decide whether a test file earned its keep on a mutation run.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- The peer requirements for `effect` and for the Effect test-runner integration now accept any compatible `4.0.0-rc` release, instead of demanding one exact release candidate.
|
|
18
|
+
|
|
19
|
+
Installing alongside a newer release candidate no longer reports an unmet peer dependency or resolves a second copy of `effect` into the dependency tree.
|
|
20
|
+
|
|
21
|
+
## 3.0.0
|
|
22
|
+
|
|
23
|
+
### Major Changes
|
|
24
|
+
|
|
25
|
+
- Timeout options now take the values they document. `timeoutFactor`, `timeoutMS` and
|
|
26
|
+
`dryRunTimeoutMinutes` arrived unset whenever a configuration left them out, so the
|
|
27
|
+
initial test run was given a budget of one millisecond and every run ended with "Initial
|
|
28
|
+
test run timed out" before testing anything. A run that leaves them out now gets the
|
|
29
|
+
documented 1.5, 5000 and 5
|
|
30
|
+
|
|
31
|
+
Configuration is validated against the same declaration that supplies the defaults, so a
|
|
32
|
+
default can no longer go missing while the option that documents it stays listed. Invalid
|
|
33
|
+
configurations still report every offending option in one pass, and options contributed
|
|
34
|
+
by plugins are still accepted
|
|
35
|
+
|
|
36
|
+
`dashboard` and `eventReporter` are no longer accepted. The reporters they configured
|
|
37
|
+
were already removed, and the two names were already rejected on sight, so a
|
|
38
|
+
configuration setting either has been failing; they are now absent from the option set
|
|
39
|
+
as well. Remove them from your configuration — to publish a report, write the `json` or
|
|
40
|
+
`html` report and publish it yourself
|
|
41
|
+
|
|
42
|
+
One fewer package is installed alongside these
|
|
43
|
+
|
|
44
|
+
### Minor Changes
|
|
45
|
+
|
|
46
|
+
- The base mutation preset selects at the make boundary.
|
|
47
|
+
|
|
48
|
+
The preset carries both ignorers (`effect-schema-declarations`, `workflow-make-boundary`) and
|
|
49
|
+
`disableBail: true`, so killer recording is structural for every inheriting config. The sandwich
|
|
50
|
+
packages (daemon-spec, stryker-js-cli, omp-claude-compat) widen `mutate` to all non-test source
|
|
51
|
+
at explicit 100/100/100 thresholds — the ignorer is the selector, so membership is forced by the
|
|
52
|
+
brand rather than chosen by a path list. Library packages' mutate arrays are byte-identical.
|
|
53
|
+
|
|
54
|
+
- cut over to effect v4 (4.0.0-rc.108): public surface derives from effect types; peers flip effect ^3→^4
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- Array types are spelled one way. `Array<T>` and `ReadonlyArray<T>` in emitted
|
|
59
|
+
declarations become `T[]` and `readonly T[]`, which the type checker cannot tell
|
|
60
|
+
apart: no exported type changes, only how it is written.
|
|
61
|
+
|
|
62
|
+
- New version is published through npm trusted publishing, so it carries a provenance attestation you can verify.
|
|
63
|
+
|
|
64
|
+
- Config inheritance no longer depends on which module resolver serves the process.
|
|
65
|
+
|
|
66
|
+
A config that extends a package specifier is resolved relative to the directory of the config file that declared it, and the same chain now produces the same merged options whichever resolver is in play. Previously the outcome could differ between environments for the same files.
|
|
67
|
+
|
|
68
|
+
Error reporting is unchanged: an inheritance cycle, an `extends` that is not a string, and a parent that cannot be resolved or read each surface the same configuration error as before, naming the same file.
|
|
69
|
+
|
|
70
|
+
- Mutation runs no longer fail during the initial test run when a call argument
|
|
71
|
+
carries an optional member set to `undefined`, a class instance, or a date. The
|
|
72
|
+
worker protocol now carries the value a caller passes and sends across the wire
|
|
73
|
+
whatever the wire can represent, rather than refusing the call. A method that
|
|
74
|
+
returns nothing still reports no value, and a reply a process cannot read is still
|
|
75
|
+
reported as a failure of that child rather than raised as an unhandled error.
|
|
76
|
+
|
|
77
|
+
- Each of these packages now has a README, so its registry page says what the package is, how
|
|
78
|
+
to install it, and what to import or register — previously the page was blank. The lint
|
|
79
|
+
plugins show the configuration line that enables what they recommend.
|
|
80
|
+
|
|
81
|
+
`@systemfsoftware/stryker-js-mutation-report` also carries its licence text
|
|
82
|
+
|
|
83
|
+
- These packages no longer ship their development files. Sources, tests and build, lint and
|
|
84
|
+
test configuration were all included, which broke consumers in one specific way: oxlint
|
|
85
|
+
discovers configuration by walking directories, finds the published `oxlint.config.ts` under
|
|
86
|
+
`node_modules`, and stops with "Stripping types is currently unsupported for files under
|
|
87
|
+
node_modules" before linting anything.
|
|
88
|
+
|
|
89
|
+
The installed package now contains the compiled output, the runtime schema files it reads,
|
|
90
|
+
and the usual manifest, README and licence
|
|
91
|
+
|
|
92
|
+
- Updated dependencies:
|
|
93
|
+
- @systemfsoftware/stryker-js-plugin-api@2.0.0
|
|
94
|
+
|
|
3
95
|
## 2.0.0
|
|
4
96
|
|
|
5
97
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { F as pluginModulePaths, O as loggingServerAddress, P as pluginCreator, Q as testRunnerFactory, Z as testRunnerConcurrencyTokens, h as checkerFactory, it as workerIdGenerator, m as checkerConcurrencyTokens, s as kill } from "./plugins-
|
|
2
|
-
import { i as WorkerMessageSchema, n as ProtocolEncodeError, r as ParentMessageSchema } from "./child-process-proxy-worker-
|
|
1
|
+
import { F as pluginModulePaths, O as loggingServerAddress, P as pluginCreator, Q as testRunnerFactory, Z as testRunnerConcurrencyTokens, h as checkerFactory, it as workerIdGenerator, m as checkerConcurrencyTokens, s as kill } from "./plugins-Bdy2g7fR.mjs";
|
|
2
|
+
import { i as WorkerMessageSchema, n as ProtocolEncodeError, r as ParentMessageSchema } from "./child-process-proxy-worker-CmAwSjYi.mjs";
|
|
3
3
|
import "@systemfsoftware/stryker-js-plugin-api/core";
|
|
4
4
|
import { PluginKind, commonTokens, tokens } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
5
5
|
import { tokens as tokens$1 } from "typed-inject";
|
|
6
|
-
import { ExpirableTask, StrykerError, Task, isErrnoException, notEmpty } from "@stryker-
|
|
6
|
+
import { ExpirableTask, StrykerError, Task, isErrnoException, notEmpty } from "@systemfsoftware/stryker-js-util";
|
|
7
7
|
import { URL, fileURLToPath } from "url";
|
|
8
8
|
import "@systemfsoftware/stryker-js-plugin-api/logging";
|
|
9
9
|
import os, { EOL } from "os";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-C19nE7Ww.mjs";
|
|
2
2
|
import { FileDescriptions, Mutant, PartialStrykerOptions, StrykerOptions } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
3
3
|
import "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
4
4
|
import { Disposable, Injector as Injector$1 } from "typed-inject";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as PluginCreator } from "./index-
|
|
2
|
-
import { t as CheckerResource } from "./checker-resource-
|
|
1
|
+
import { r as PluginCreator } from "./index-C19nE7Ww.mjs";
|
|
2
|
+
import { t as CheckerResource } from "./checker-resource-LZCpsbpn.mjs";
|
|
3
3
|
import { Mutant, StrykerOptions } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
4
4
|
import { CheckResult } from "@systemfsoftware/stryker-js-plugin-api/check";
|
|
5
5
|
//#region src/checker/checker-worker.d.ts
|
package/dist/checker-worker.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as CheckerWorker } from "./checker-
|
|
1
|
+
import { n as CheckerWorker } from "./checker-C0Vh51o8.mjs";
|
|
2
2
|
export { CheckerWorker };
|
package/dist/{child-process-proxy-worker-lx1M5Mz3.mjs → child-process-proxy-worker-CmAwSjYi.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as loggingServer, E as loggerShowColors, I as pluginsByKind, O as loggingServerAddress, P as pluginCreator, T as loggerConsoleOut, k as loggingSink, p as PluginCreator, t as PluginLoader, w as loggerActiveLevel } from "./plugins-
|
|
1
|
+
import { D as loggingServer, E as loggerShowColors, I as pluginsByKind, O as loggingServerAddress, P as pluginCreator, T as loggerConsoleOut, k as loggingSink, p as PluginCreator, t as PluginLoader, w as loggerActiveLevel } from "./plugins-Bdy2g7fR.mjs";
|
|
2
2
|
import { StrykerOptionsSchema } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
3
3
|
import { Scope, commonTokens } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
4
4
|
import "typed-inject";
|
|
5
|
-
import { errorToString } from "@stryker-
|
|
5
|
+
import { errorToString } from "@systemfsoftware/stryker-js-util";
|
|
6
6
|
import fs from "fs";
|
|
7
7
|
import util, { promisify } from "util";
|
|
8
8
|
import path from "path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ChildProcessProxyWorker } from "./child-process-proxy-worker-
|
|
1
|
+
import { t as ChildProcessProxyWorker } from "./child-process-proxy-worker-CmAwSjYi.mjs";
|
|
2
2
|
import { createInjector } from "typed-inject";
|
|
3
3
|
//#region src/worker-pool/child-process-proxy-worker-main.ts
|
|
4
4
|
new ChildProcessProxyWorker(createInjector);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as pluginCreator } from "./plugins-
|
|
1
|
+
import { P as pluginCreator } from "./plugins-Bdy2g7fR.mjs";
|
|
2
2
|
import "@systemfsoftware/stryker-js-plugin-api/core";
|
|
3
3
|
import { PluginKind, commonTokens, tokens } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
4
|
-
import { errorToString } from "@stryker-
|
|
4
|
+
import { errorToString } from "@systemfsoftware/stryker-js-util";
|
|
5
5
|
import * as S from "effect/Schema";
|
|
6
6
|
import { DryRunStatus, MutantRunStatus } from "@systemfsoftware/stryker-js-plugin-api/test-runner";
|
|
7
7
|
//#region src/test-runner/mutant-coverage.schema.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as PluginCreator } from "./index-
|
|
1
|
+
import { r as PluginCreator } from "./index-C19nE7Ww.mjs";
|
|
2
2
|
import { StrykerOptions } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
3
3
|
import { DryRunOptions, DryRunResult, MutantRunOptions, MutantRunResult, TestRunner, TestRunnerCapabilities } from "@systemfsoftware/stryker-js-plugin-api/test-runner";
|
|
4
4
|
//#region src/test-runner/child-process-test-runner-worker.d.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ChildProcessTestRunnerWorker } from "./child-process-test-runner-worker-
|
|
1
|
+
import { t as ChildProcessTestRunnerWorker } from "./child-process-test-runner-worker-DPXWNPqZ.mjs";
|
|
2
2
|
export { ChildProcessTestRunnerWorker };
|
package/dist/config/base.mjs
CHANGED
|
@@ -15,7 +15,8 @@ const basePreset = {
|
|
|
15
15
|
"@systemfsoftware/stryker-js-vitest-runner",
|
|
16
16
|
"@systemfsoftware/stryker-js-typescript-checker",
|
|
17
17
|
"@systemfsoftware/stryker-plugins/effect-schema-ignorer",
|
|
18
|
-
"@systemfsoftware/stryker-plugins/workflow-make-ignorer"
|
|
18
|
+
"@systemfsoftware/stryker-plugins/workflow-make-ignorer",
|
|
19
|
+
"@systemfsoftware/stryker-test-contribution"
|
|
19
20
|
],
|
|
20
21
|
reporters: [
|
|
21
22
|
"progress",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../errors-
|
|
1
|
+
import "../errors-B8Vx4QIQ.mjs";
|
|
2
2
|
import { PartialStrykerOptions, StrykerOptions } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
3
|
-
import { I, Immutable } from "@stryker-
|
|
3
|
+
import { I, Immutable } from "@systemfsoftware/stryker-js-util";
|
|
4
4
|
import { Logger } from "@systemfsoftware/stryker-js-plugin-api/logging";
|
|
5
5
|
//#region src/config/options-validator.d.ts
|
|
6
6
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as ConfigReader, n as OptionsValidator, r as defaultOptions } from "../plugins-
|
|
1
|
+
import { d as ConfigReader, n as OptionsValidator, r as defaultOptions } from "../plugins-Bdy2g7fR.mjs";
|
|
2
2
|
export { ConfigReader, OptionsValidator, defaultOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as forkCoreSchema } from "../fork-schema-
|
|
1
|
+
import { t as forkCoreSchema } from "../fork-schema-K8Ab5szC.mjs";
|
|
2
2
|
export { forkCoreSchema };
|
package/dist/errors.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as retrieveCause, t as ConfigError } from "./errors-
|
|
1
|
+
import { n as retrieveCause, t as ConfigError } from "./errors-B8Vx4QIQ.mjs";
|
|
2
2
|
export { ConfigError, retrieveCause };
|
package/dist/errors.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionError } from "typed-inject";
|
|
2
|
-
import { StrykerError } from "@stryker-
|
|
2
|
+
import { StrykerError } from "@systemfsoftware/stryker-js-util";
|
|
3
3
|
//#region src/errors.ts
|
|
4
4
|
var ConfigError = class extends StrykerError {};
|
|
5
5
|
function retrieveCause(error) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StrykerOptionsSchema } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
2
|
-
import
|
|
2
|
+
import "effect";
|
|
3
3
|
import * as S from "effect/Schema";
|
|
4
4
|
//#region src/config/removed-surface.ts
|
|
5
5
|
/**
|
|
@@ -26,18 +26,6 @@ const REMOVED_OPTIONS = {
|
|
|
26
26
|
};
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/config/fork-schema.schema.ts
|
|
29
|
-
const requireTestContribution = S.NullOr(S.Array(S.String)).pipe(S.annotate({
|
|
30
|
-
default: [
|
|
31
|
-
".workflow.property.test.ts",
|
|
32
|
-
".policy.property.test.ts",
|
|
33
|
-
".kernel.property.test.ts"
|
|
34
|
-
],
|
|
35
|
-
description: "Fail the run when a test file whose name ends with one of these suffixes kills no mutant that another test file does not also kill. Such a file could be deleted without leaving a single mutant alive, so a passing mutation score is no evidence it earns its place. Set to null to disable the check. The gate only applies to file classes the mutation operators can express — workflow, policy, and kernel property tests today; schema refusal tests are gated by refutation adequacy rather than by mutation."
|
|
36
|
-
}), S.withDecodingDefaultKey(Effect.succeed([
|
|
37
|
-
".workflow.property.test.ts",
|
|
38
|
-
".policy.property.test.ts",
|
|
39
|
-
".kernel.property.test.ts"
|
|
40
|
-
])));
|
|
41
29
|
const survivorsPriorReport = S.optionalKey(S.String.pipe(S.annotate({ description: "The path of the prior mutation report a --survivors run admits against and re-tests the survivors of. Defaults to \"reports/mutation-report.json\" when unset. Deliberately has no default: a default would be injected into every resolved options object and written into every report, poisoning the KTD7 marker that identifies a report produced by a survivors run." })));
|
|
42
30
|
const extendsPropertySchema = S.optionalKey(S.String.pipe(S.annotate({ description: "Path to another stryker config file whose options merge underneath this one. Resolved relative to this file. A child scalar or array replaces the inherited value; a child object merges one level deep; a child key set to null deletes the inherited key. Inheritance chains are not rewritten, so an inherited relative path value still resolves against the working directory of the run that reads it." })));
|
|
43
31
|
/**
|
|
@@ -50,7 +38,6 @@ const extendsPropertySchema = S.optionalKey(S.String.pipe(S.annotate({ descripti
|
|
|
50
38
|
*/
|
|
51
39
|
const forkOptionsSchema = S.StructWithRest(S.Struct({
|
|
52
40
|
...Object.fromEntries(Object.entries(StrykerOptionsSchema.schema.fields).filter(([name]) => !Object.hasOwn(REMOVED_OPTIONS, name))),
|
|
53
|
-
requireTestContribution,
|
|
54
41
|
survivorsPriorReport,
|
|
55
42
|
extends: extendsPropertySchema
|
|
56
43
|
}), [S.Record(S.String, S.Unknown)]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as dryRunResult } from "./plugins-
|
|
1
|
+
import { b as dryRunResult } from "./plugins-Bdy2g7fR.mjs";
|
|
2
2
|
import "@systemfsoftware/stryker-js-plugin-api/core";
|
|
3
3
|
import { commonTokens } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
4
|
-
import { normalizeFileName, normalizeLineEndings, notEmpty } from "@stryker-
|
|
4
|
+
import { normalizeFileName, normalizeLineEndings, notEmpty } from "@systemfsoftware/stryker-js-util";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import "@systemfsoftware/stryker-js-plugin-api/logging";
|
|
7
7
|
import "mutation-testing-report-schema";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CoverageData, FileDescriptions, Mutant, StrykerOptions, schema } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
2
|
-
import { I } from "@stryker-
|
|
2
|
+
import { I } from "@systemfsoftware/stryker-js-util";
|
|
3
3
|
import { Logger } from "@systemfsoftware/stryker-js-plugin-api/logging";
|
|
4
4
|
import { CompleteDryRunResult, TestResult } from "@systemfsoftware/stryker-js-plugin-api/test-runner";
|
|
5
5
|
//#region src/mutants/diff-statistics-collector.d.ts
|
|
@@ -58,6 +58,8 @@ declare class PluginCreator {
|
|
|
58
58
|
static readonly inject: ["pluginsByKind", "$injector"];
|
|
59
59
|
constructor(pluginsByKind: Map<PluginKind, Plugin<PluginKind>[]>, injector: Injector<PluginContext>);
|
|
60
60
|
create<TPlugin extends keyof Plugins>(kind: TPlugin, name: string): PluginInterfaces[TPlugin];
|
|
61
|
+
createAll<TPlugin extends keyof Plugins>(kind: TPlugin): PluginInterfaces[TPlugin][];
|
|
62
|
+
private instantiate;
|
|
61
63
|
private findPlugin;
|
|
62
64
|
}
|
|
63
65
|
//#endregion
|
|
@@ -89,15 +91,32 @@ declare class PluginLoader {
|
|
|
89
91
|
/**
|
|
90
92
|
* Loads plugins based on configured plugin descriptors.
|
|
91
93
|
* A plugin descriptor can be:
|
|
92
|
-
* * A full url: "file:///home/
|
|
93
|
-
* * An absolute file path: "/home/
|
|
94
|
+
* * A full url: "file:///home/user/github/my-plugin.js"
|
|
95
|
+
* * An absolute file path: "/home/user/github/my-plugin.js"
|
|
94
96
|
* * A relative path: "./my-plugin.js"
|
|
95
|
-
* * A bare import expression: "@stryker-
|
|
96
|
-
* * A simple glob expression (only wild cards are supported): "@stryker-
|
|
97
|
+
* * A bare import expression: "@systemfsoftware/stryker-js-vitest-runner"
|
|
98
|
+
* * A simple glob expression (only wild cards are supported): "@systemfsoftware/stryker-js-*"
|
|
97
99
|
*/
|
|
98
100
|
load(pluginDescriptors: readonly string[]): Promise<LoadedPlugins>;
|
|
99
101
|
private resolvePluginModules;
|
|
100
102
|
private globPluginModules;
|
|
103
|
+
/**
|
|
104
|
+
* Reads the org's package names from every install directory above this
|
|
105
|
+
* module, unioned.
|
|
106
|
+
*
|
|
107
|
+
* Never a fixed number of `..` segments: `dist/` and `src/plugins/` sit at
|
|
108
|
+
* different depths, so a numeric walk resolves to a different directory
|
|
109
|
+
* depending on which one is running — and a wrong directory yields zero
|
|
110
|
+
* plugins rather than an error, so the mistake ships as a silent 100% score.
|
|
111
|
+
*
|
|
112
|
+
* Never the first directory that happens to be populated either: under a
|
|
113
|
+
* pnpm-isolated install this package's own virtual `node_modules` holds only
|
|
114
|
+
* its own dependencies, and stopping there hides every sibling plugin the
|
|
115
|
+
* project installed one level up. The union spans both, so discovery reaches
|
|
116
|
+
* as far as a hoisted layout does. A missing org directory contributes
|
|
117
|
+
* nothing; it is not an error.
|
|
118
|
+
*/
|
|
119
|
+
private readOrgDirectory;
|
|
101
120
|
private loadPlugin;
|
|
102
121
|
}
|
|
103
122
|
//#endregion
|
package/dist/index.d.mts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { c as progressEnabled, d as resolvedMode, f as runEventSink, i as clearTextEnabled, l as reporterOverride, m as runStartedAt, o as loggingServerAddress, p as runId, s as loggingSink, u as reporterPluginModules } from "./index-
|
|
2
|
-
import { n as LoggingServerAddress, r as LoggingBackend } from "./checker-resource-
|
|
1
|
+
import { c as progressEnabled, d as resolvedMode, f as runEventSink, i as clearTextEnabled, l as reporterOverride, m as runStartedAt, o as loggingServerAddress, p as runId, s as loggingSink, u as reporterPluginModules } from "./index-C19nE7Ww.mjs";
|
|
2
|
+
import { n as LoggingServerAddress, r as LoggingBackend } from "./checker-resource-LZCpsbpn.mjs";
|
|
3
3
|
import { r as ResolvedMode } from "./output-mode-CfGHDpi5.mjs";
|
|
4
|
-
import { c as RunEventSink } from "./run-event-
|
|
5
|
-
import "./incremental-differ-
|
|
4
|
+
import { c as RunEventSink } from "./run-event-Dx_Q5jrc.mjs";
|
|
5
|
+
import "./incremental-differ-DtBnr6fJ.mjs";
|
|
6
6
|
import { FileDescriptions, Mutant, MutantResult, MutantStatus, PartialStrykerOptions, StrykerOptions } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
7
7
|
import { BaseContext, Injector, PluginContext, commonTokens } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
8
8
|
import { Disposable, Injector as Injector$1, createInjector } from "typed-inject";
|
|
9
|
-
import { I, requireResolve } from "@stryker-
|
|
9
|
+
import { I, requireResolve } from "@systemfsoftware/stryker-js-util";
|
|
10
10
|
import { Logger } from "@systemfsoftware/stryker-js-plugin-api/logging";
|
|
11
11
|
import "rxjs";
|
|
12
|
-
import "@stryker-
|
|
12
|
+
import "@systemfsoftware/stryker-js-instrumenter";
|
|
13
13
|
import "mutation-testing-report-schema";
|
|
14
14
|
import { CompleteDryRunResult, MutantRunResult, TestRunner } from "@systemfsoftware/stryker-js-plugin-api/test-runner";
|
|
15
15
|
import { execaCommand } from "execa";
|
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { ConfigError, retrieveCause } from "./errors.mjs";
|
|
2
|
-
import { $ as testRunnerPool, A as mutantTestPlanner, B as reporter, F as pluginModulePaths, G as runEventSink, H as reporterPluginModules, I as pluginsByKind, J as sandbox, K as runId, L as process$1, M as mutationTestReportHelper, N as optionsValidator, O as loggingServerAddress, P as pluginCreator, Q as testRunnerFactory, R as progressEnabled, S as incrementalDiffer, U as requireFromCwd, V as reporterOverride, W as resolvedMode, X as testCoverage, Y as temporaryDirectory, Z as testRunnerConcurrencyTokens, _ as clearTextEnabled, a as isWarningEnabled, b as dryRunResult, c as ProjectReader, d as ConfigReader, et as timeOverheadMS, f as FileSystem, g as checkerPool, h as checkerFactory, i as optionsPath, it as workerIdGenerator, j as mutants, k as loggingSink, l as MetaSchemaBuilder, m as checkerConcurrencyTokens, n as OptionsValidator, nt as unexpectedExitRegistry, o as CommandTestRunner, p as PluginCreator, q as runStartedAt, rt as validationSchema, t as PluginLoader, tt as timer, u as FileMatcher, v as concurrencyTokenProvider, x as execa, y as disableTypeChecksHelper, z as project } from "./plugins-
|
|
2
|
+
import { $ as testRunnerPool, A as mutantTestPlanner, B as reporter, F as pluginModulePaths, G as runEventSink, H as reporterPluginModules, I as pluginsByKind, J as sandbox, K as runId, L as process$1, M as mutationTestReportHelper, N as optionsValidator, O as loggingServerAddress, P as pluginCreator, Q as testRunnerFactory, R as progressEnabled, S as incrementalDiffer, U as requireFromCwd, V as reporterOverride, W as resolvedMode, X as testCoverage, Y as temporaryDirectory, Z as testRunnerConcurrencyTokens, _ as clearTextEnabled, a as isWarningEnabled, b as dryRunResult, c as ProjectReader, d as ConfigReader, et as timeOverheadMS, f as FileSystem, g as checkerPool, h as checkerFactory, i as optionsPath, it as workerIdGenerator, j as mutants, k as loggingSink, l as MetaSchemaBuilder, m as checkerConcurrencyTokens, n as OptionsValidator, nt as unexpectedExitRegistry, o as CommandTestRunner, p as PluginCreator, q as runStartedAt, rt as validationSchema, t as PluginLoader, tt as timer, u as FileMatcher, v as concurrencyTokenProvider, x as execa, y as disableTypeChecksHelper, z as project } from "./plugins-Bdy2g7fR.mjs";
|
|
3
3
|
import { Timer } from "./timer.mjs";
|
|
4
|
-
import { t as forkCoreSchema } from "./fork-schema-
|
|
5
|
-
import { a as provideLogging, o as provideLoggingBackend } from "./child-process-proxy-worker-
|
|
6
|
-
import { a as ChildProcessCrashedError, c as createTestRunnerPool, i as OutOfMemoryError, l as ConcurrencyTokenProvider, o as ResourceDecorator, r as ChildProcessProxy, s as createCheckerPool, t as createCheckerFactory } from "./checker-
|
|
7
|
-
import { n as toRelativeNormalizedFileName, r as TestCoverage, t as IncrementalDiffer } from "./incremental-differ-
|
|
4
|
+
import { t as forkCoreSchema } from "./fork-schema-K8Ab5szC.mjs";
|
|
5
|
+
import { a as provideLogging, o as provideLoggingBackend } from "./child-process-proxy-worker-CmAwSjYi.mjs";
|
|
6
|
+
import { a as ChildProcessCrashedError, c as createTestRunnerPool, i as OutOfMemoryError, l as ConcurrencyTokenProvider, o as ResourceDecorator, r as ChildProcessProxy, s as createCheckerPool, t as createCheckerFactory } from "./checker-C0Vh51o8.mjs";
|
|
7
|
+
import { n as toRelativeNormalizedFileName, r as TestCoverage, t as IncrementalDiffer } from "./incremental-differ-DAz2XlBK.mjs";
|
|
8
8
|
import { setPendingExitClass } from "./exit-classification.mjs";
|
|
9
|
-
import { n as strykerVersion } from "./stryker-package-
|
|
10
|
-
import {
|
|
11
|
-
import { t as ChildProcessTestRunnerWorker } from "./child-process-test-runner-worker-
|
|
9
|
+
import { n as strykerVersion } from "./stryker-package-JIsmRMux.mjs";
|
|
10
|
+
import { buildVerdictEnvelope } from "./verdict-envelope.mjs";
|
|
11
|
+
import { t as ChildProcessTestRunnerWorker } from "./child-process-test-runner-worker-DPXWNPqZ.mjs";
|
|
12
12
|
import { PlanKind } from "@systemfsoftware/stryker-js-plugin-api/core";
|
|
13
13
|
import { PluginKind, commonTokens, tokens } from "@systemfsoftware/stryker-js-plugin-api/plugin";
|
|
14
14
|
import { createInjector, tokens as tokens$1 } from "typed-inject";
|
|
15
|
-
import { ExpirableTask, deepFreeze, errorToString, isErrnoException, normalizeFileName, normalizeWhitespaces, notEmpty, requireResolve, split } from "@stryker-
|
|
15
|
+
import { ExpirableTask, deepFreeze, errorToString, isErrnoException, normalizeFileName, normalizeWhitespaces, notEmpty, requireResolve, split } from "@systemfsoftware/stryker-js-util";
|
|
16
16
|
import fs from "fs";
|
|
17
17
|
import path from "path";
|
|
18
18
|
import { URL } from "url";
|
|
@@ -21,7 +21,7 @@ import "@systemfsoftware/stryker-js-plugin-api/logging";
|
|
|
21
21
|
import { EOL } from "os";
|
|
22
22
|
import * as S from "effect/Schema";
|
|
23
23
|
import { EMPTY, bufferTime, concat, from, lastValueFrom, merge, mergeMap, of, partition } from "rxjs";
|
|
24
|
-
import { createInstrumenter, disableTypeChecks, frameworkPluginsFileUrl } from "@stryker-
|
|
24
|
+
import { createInstrumenter, disableTypeChecks, frameworkPluginsFileUrl } from "@systemfsoftware/stryker-js-instrumenter";
|
|
25
25
|
import { DryRunStatus, MutantRunStatus, TestStatus } from "@systemfsoftware/stryker-js-plugin-api/test-runner";
|
|
26
26
|
import { execaCommand } from "execa";
|
|
27
27
|
import "@systemfsoftware/stryker-js-plugin-api/report";
|
|
@@ -284,7 +284,7 @@ var MultiPreprocessor = class {
|
|
|
284
284
|
}
|
|
285
285
|
};
|
|
286
286
|
//#endregion
|
|
287
|
-
//#region
|
|
287
|
+
//#region ../../../../../node_modules/.pnpm/@jsr+std__jsonc@1.0.2/node_modules/@jsr/std__jsonc/parse.js
|
|
288
288
|
/**
|
|
289
289
|
* Converts a JSON with Comments (JSONC) string into an object.
|
|
290
290
|
*
|
|
@@ -1004,7 +1004,7 @@ const STRYKER_FRAMEWORK = Object.freeze({
|
|
|
1004
1004
|
name: "StrykerJS",
|
|
1005
1005
|
version: strykerVersion,
|
|
1006
1006
|
branding: {
|
|
1007
|
-
homepageUrl: "https://
|
|
1007
|
+
homepageUrl: "https://github.com/systemfsoftware/systemfsoftware",
|
|
1008
1008
|
imageUrl: "data:image/svg+xml;utf8,%3Csvg viewBox='0 0 1458 1458' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' clip-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2'%3E%3Cpath fill='none' d='M0 0h1458v1458H0z'/%3E%3CclipPath id='a'%3E%3Cpath d='M0 0h1458v1458H0z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='M1458 729c0 402.655-326.345 729-729 729S0 1131.655 0 729C0 326.445 326.345 0 729 0s729 326.345 729 729' fill='%23e74c3c' fill-rule='nonzero'/%3E%3Cpath d='M778.349 1456.15L576.6 1254.401l233-105 85-78.668v-64.332l-257-257-44-187-50-208 251.806-82.793L1076.6 389.401l380.14 379.15c-19.681 367.728-311.914 663.049-678.391 687.599z' fill-opacity='.3'/%3E%3Cpath d='M753.4 329.503c41.79 0 74.579 7.83 97.925 25.444 23.571 18.015 41.69 43.956 55.167 77.097l11.662 28.679 165.733-58.183-14.137-32.13c-26.688-60.655-64.896-108.61-114.191-144.011-49.329-35.423-117.458-54.302-204.859-54.302-50.78 0-95.646 7.376-134.767 21.542-40.093 14.671-74.09 34.79-102.239 60.259-28.84 26.207-50.646 57.06-65.496 92.701-14.718 35.052-22.101 72.538-22.101 112.401 0 72.536 20.667 133.294 61.165 182.704 38.624 47.255 98.346 88.037 179.861 121.291 42.257 17.475 78.715 33.125 109.227 46.994 27.193 12.361 49.294 26.124 66.157 41.751 15.309 14.186 26.497 30.584 33.63 49.258 7.721 20.214 11.16 45.69 11.16 76.402 0 28.021-4.251 51.787-13.591 71.219-8.832 18.374-20.171 33.178-34.523 44.219-14.787 11.374-31.193 19.591-49.393 24.466-19.68 5.359-39.14 7.993-58.69 7.993-29.359 0-54.387-3.407-75.182-10.747-20.112-7.013-37.144-16.144-51.259-27.486-13.618-11.009-24.971-23.766-33.744-38.279-9.64-15.8-17.272-31.924-23.032-48.408l-10.965-31.376-161.669 60.585 10.734 30.124c10.191 28.601 24.197 56.228 42.059 82.748 18.208 27.144 41.322 51.369 69.525 72.745 27.695 21.075 60.904 38.218 99.481 51.041 37.777 12.664 82.004 19.159 132.552 19.159 49.998 0 95.818-8.321 137.611-24.622 42.228-16.471 78.436-38.992 108.835-67.291 30.719-28.597 54.631-62.103 71.834-100.642 17.263-38.56 25.923-79.392 25.923-122.248 0-54.339-8.368-100.37-24.208-138.32-16.29-38.759-38.252-71.661-65.948-98.797-26.965-26.418-58.269-48.835-93.858-67.175-33.655-17.241-69.196-33.11-106.593-47.533-35.934-13.429-65.822-26.601-89.948-39.525-22.153-11.868-40.009-24.21-53.547-37.309-11.429-11.13-19.83-23.678-24.718-37.664-5.413-15.49-7.98-33.423-7.98-53.577 0-40.883 11.293-71.522 37.086-90.539 28.443-20.825 64.985-30.658 109.311-30.658z' fill='%23f1c40f' fill-rule='nonzero'/%3E%3Cpath d='M720 0h18v113h-18zM1458 738v-18h-113v18h113zM720 1345h18v113h-18zM113 738v-18H0v18h113z'/%3E%3C/g%3E%3C/svg%3E"
|
|
1009
1009
|
}
|
|
1010
1010
|
});
|
|
@@ -1044,8 +1044,9 @@ var MutationTestReportHelper = class {
|
|
|
1044
1044
|
runEventSink;
|
|
1045
1045
|
runId;
|
|
1046
1046
|
resolvedMode;
|
|
1047
|
-
|
|
1048
|
-
|
|
1047
|
+
pluginCreator;
|
|
1048
|
+
static inject = tokens(reporter, commonTokens.options, project, commonTokens.logger, testCoverage, "fs", requireFromCwd, runEventSink, runId, resolvedMode, pluginCreator);
|
|
1049
|
+
constructor(reporter, options, project, log, testCoverage, fs, requireFromCwd, runEventSink, runId, resolvedMode, pluginCreator) {
|
|
1049
1050
|
this.reporter = reporter;
|
|
1050
1051
|
this.options = options;
|
|
1051
1052
|
this.project = project;
|
|
@@ -1056,6 +1057,7 @@ var MutationTestReportHelper = class {
|
|
|
1056
1057
|
this.runEventSink = runEventSink;
|
|
1057
1058
|
this.runId = runId;
|
|
1058
1059
|
this.resolvedMode = resolvedMode;
|
|
1060
|
+
this.pluginCreator = pluginCreator;
|
|
1059
1061
|
}
|
|
1060
1062
|
reportCheckFailed(mutant, checkResult) {
|
|
1061
1063
|
const location = toSchemaLocation(mutant.location);
|
|
@@ -1123,7 +1125,7 @@ var MutationTestReportHelper = class {
|
|
|
1123
1125
|
await this.fs.writeFile(this.options.incrementalFile, JSON.stringify(report, null, 2), "utf-8");
|
|
1124
1126
|
}
|
|
1125
1127
|
this.determineExitCode(metrics);
|
|
1126
|
-
this.
|
|
1128
|
+
for (const evaluator of this.pluginCreator.createAll(PluginKind.Evaluator)) evaluator.evaluate(report);
|
|
1127
1129
|
this.emitVerdict(report);
|
|
1128
1130
|
}
|
|
1129
1131
|
/**
|
|
@@ -1139,20 +1141,6 @@ var MutationTestReportHelper = class {
|
|
|
1139
1141
|
...buildVerdictEnvelope(report, this.resolvedMode.mode, this.resolvedMode.signal, this.runId)
|
|
1140
1142
|
});
|
|
1141
1143
|
}
|
|
1142
|
-
determineTestContribution(report) {
|
|
1143
|
-
const verdict = judgeTestContribution(report, this.options["requireTestContribution"], this.options.disableBail);
|
|
1144
|
-
if (verdict === void 0) {
|
|
1145
|
-
this.log.debug("No test contribution required. Won't fail the build for a test file that kills nothing another test file does not also kill. Set `requireTestContribution` to change this behavior.");
|
|
1146
|
-
return;
|
|
1147
|
-
}
|
|
1148
|
-
if (!verdict.failed) {
|
|
1149
|
-
this.log.info(verdict.message);
|
|
1150
|
-
return;
|
|
1151
|
-
}
|
|
1152
|
-
this.log.error(`${verdict.message}\nSetting exit code to 1 (failure).`);
|
|
1153
|
-
this.log.info("(sharpen or delete them, or set `requireTestContribution = null` to prevent this error in the future)");
|
|
1154
|
-
setPendingExitClass(1);
|
|
1155
|
-
}
|
|
1156
1144
|
determineExitCode(metrics) {
|
|
1157
1145
|
const { mutationScore } = metrics.systemUnderTestMetrics.metrics;
|
|
1158
1146
|
const breaking = this.options.thresholds.break;
|
|
@@ -1272,11 +1260,10 @@ var MutationTestReportHelper = class {
|
|
|
1272
1260
|
}
|
|
1273
1261
|
};
|
|
1274
1262
|
return [
|
|
1275
|
-
"@stryker-
|
|
1276
|
-
"@stryker-
|
|
1277
|
-
"@stryker-
|
|
1278
|
-
"
|
|
1279
|
-
"@stryker-mutator/typescript-checker",
|
|
1263
|
+
"@systemfsoftware/stryker-js-vitest-runner",
|
|
1264
|
+
"@systemfsoftware/stryker-js-typescript-checker",
|
|
1265
|
+
"@systemfsoftware/stryker-plugins",
|
|
1266
|
+
"vitest",
|
|
1280
1267
|
"karma",
|
|
1281
1268
|
"karma-chai",
|
|
1282
1269
|
"karma-chrome-launcher",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as toRelativeNormalizedFileName, t as IncrementalDiffer } from "../incremental-differ-
|
|
1
|
+
import { n as toRelativeNormalizedFileName, t as IncrementalDiffer } from "../incremental-differ-DtBnr6fJ.mjs";
|
|
2
2
|
export { IncrementalDiffer, toRelativeNormalizedFileName };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as toRelativeNormalizedFileName, t as IncrementalDiffer } from "../incremental-differ-
|
|
1
|
+
import { n as toRelativeNormalizedFileName, t as IncrementalDiffer } from "../incremental-differ-DAz2XlBK.mjs";
|
|
2
2
|
export { IncrementalDiffer, toRelativeNormalizedFileName };
|