@systemfsoftware/stryker-js 16.0.1 → 17.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 +12 -0
- package/dist/{Run.schema-CgcTsB1w.d.mts → Run.schema-7DBK1X32.d.mts} +1 -1
- package/dist/{RunEnvironment.service-F8LgeCqh.d.mts → RunEnvironment.service-Cluh-Bxt.d.mts} +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +1 -1
- package/dist/events.d.mts +1 -1
- package/dist/{index-DEphx668.d.mts → index-y-Pg3XgT.d.mts} +35 -3
- package/dist/index.d.mts +6 -4
- package/dist/index.mjs +2 -2
- package/dist/main.mjs +259 -113
- package/dist/{merge-config-b06M-Ccx.d.mts → merge-config-52qu-jD7.d.mts} +1 -1
- package/dist/{merge-config-BYhhPA7r.mjs → merge-config-ruui2TPS.mjs} +9 -2
- package/dist/promises.d.mts +2 -2
- package/dist/promises.mjs +1 -1
- package/dist/{run-stages-DYuRm353.mjs → run-stages-B5YfftjV.mjs} +45 -8
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as mod_d_exports$5 } from "./index-
|
|
1
|
+
import { i as mod_d_exports$5 } from "./index-y-Pg3XgT.mjs";
|
|
2
2
|
import * as S from "effect/Schema";
|
|
3
3
|
//#region src/config/stryker-config.schema.d.ts
|
|
4
4
|
type StrykerConfig = mod_d_exports$5.PartialStrykerOptions;
|
|
@@ -1032,6 +1032,9 @@ const MutantRunResultSchema = S.Union([
|
|
|
1032
1032
|
errorMessage: S.String
|
|
1033
1033
|
})
|
|
1034
1034
|
]);
|
|
1035
|
+
var MutantRunStarted = class extends S.TaggedClass()("MutantRunStarted", {}) {};
|
|
1036
|
+
var MutantRunSettled = class extends S.TaggedClass()("MutantRunSettled", { result: MutantRunResultSchema }) {};
|
|
1037
|
+
const MutantRunEventSchema = S.Union([MutantRunStarted, MutantRunSettled]);
|
|
1035
1038
|
const CoverageAnalysisSchema = S.Literals([
|
|
1036
1039
|
"off",
|
|
1037
1040
|
"all",
|
|
@@ -1247,8 +1250,9 @@ const dryRun = Rpc.make("dryRun", {
|
|
|
1247
1250
|
}).middleware(TraceContextMiddleware);
|
|
1248
1251
|
const mutantRun = Rpc.make("mutantRun", {
|
|
1249
1252
|
payload: TestRunnerMutantRunRequest,
|
|
1250
|
-
success:
|
|
1251
|
-
error: TestRunnerFailed
|
|
1253
|
+
success: MutantRunEventSchema,
|
|
1254
|
+
error: TestRunnerFailed,
|
|
1255
|
+
stream: true
|
|
1252
1256
|
}).middleware(TraceContextMiddleware);
|
|
1253
1257
|
const check = Rpc.make("check", {
|
|
1254
1258
|
payload: CheckerRequest,
|
|
@@ -1399,7 +1403,10 @@ var TestRunner_exports = /* @__PURE__ */ __exportAll({
|
|
|
1399
1403
|
HitLimitReason: () => HitLimitReason,
|
|
1400
1404
|
HitLimitReasonPrefix: () => HitLimitReasonPrefix,
|
|
1401
1405
|
HitLimitReasonText: () => HitLimitReasonText,
|
|
1406
|
+
MutantRunEventSchema: () => MutantRunEventSchema,
|
|
1402
1407
|
MutantRunResultSchema: () => MutantRunResultSchema,
|
|
1408
|
+
MutantRunSettled: () => MutantRunSettled,
|
|
1409
|
+
MutantRunStarted: () => MutantRunStarted,
|
|
1403
1410
|
MutantRunStatus: () => MutantRunStatus,
|
|
1404
1411
|
TestId: () => TestId,
|
|
1405
1412
|
TestResultSchema: () => TestResultSchema,
|
package/dist/promises.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as mod_d_exports$5 } from "./index-
|
|
2
|
-
import { l as MutationTestDone } from "./RunEnvironment.service-
|
|
1
|
+
import { i as mod_d_exports$5 } from "./index-y-Pg3XgT.mjs";
|
|
2
|
+
import { l as MutationTestDone } from "./RunEnvironment.service-Cluh-Bxt.mjs";
|
|
3
3
|
//#region src/drivers/promise.d.ts
|
|
4
4
|
export declare const run: ((targetMutatePatterns?: readonly string[]) => (options: mod_d_exports$5.PartialStrykerOptions) => Promise<MutationTestDone>) & ((options: mod_d_exports$5.PartialStrykerOptions, targetMutatePatterns?: readonly string[]) => Promise<MutationTestDone>);
|
|
5
5
|
//#endregion
|
package/dist/promises.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as nodePlatformLayer, t as strykerCell } from "./run-stages-
|
|
1
|
+
import { C as nodePlatformLayer, t as strykerCell } from "./run-stages-B5YfftjV.mjs";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import { dual } from "effect/Function";
|
|
4
4
|
//#region src/drivers/promise.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll$4 } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
|
-
import { a as MutatorCatalog_exports, c as Plugin_exports, d as TestRunner_exports, f as Trace_exports$1, i as Mutant_exports, l as Report_exports, n as mergeConfigs, o as MutatorProvider_exports, r as Checker_exports, s as Options_exports, t as mergeConfig, u as Reporter_exports } from "./merge-config-
|
|
2
|
+
import { a as MutatorCatalog_exports, c as Plugin_exports, d as TestRunner_exports, f as Trace_exports$1, i as Mutant_exports, l as Report_exports, n as mergeConfigs, o as MutatorProvider_exports, r as Checker_exports, s as Options_exports, t as mergeConfig, u as Reporter_exports } from "./merge-config-ruui2TPS.mjs";
|
|
3
3
|
import { n as StageError, t as PrepareError } from "./Run.schema-DuaneDGd.mjs";
|
|
4
4
|
import { Blueprint, Cell, Handle, Sandwich, Workflow } from "@systemfsoftware/effect-cell-types";
|
|
5
5
|
import * as S from "effect/Schema";
|
|
@@ -11346,7 +11346,7 @@ const strykerOutputFilesOf = (options) => [
|
|
|
11346
11346
|
];
|
|
11347
11347
|
//#endregion
|
|
11348
11348
|
//#region package.json
|
|
11349
|
-
var version = "
|
|
11349
|
+
var version = "17.0.0";
|
|
11350
11350
|
//#endregion
|
|
11351
11351
|
//#region src/stryker-package.schema.ts
|
|
11352
11352
|
var StrykerPackage = class extends S.Class("StrykerPackage")({
|
|
@@ -11835,7 +11835,7 @@ const writeIncrementalReport = Effect$1.fn(SpanTaxonomy_exports.Spans.mutationRe
|
|
|
11835
11835
|
const runInputsDigest = yield* runInputsDigestOf(deps.fs, deps.path, input.basePath, input.options);
|
|
11836
11836
|
const json = yield* S.encodeEffect(S.fromJsonString(S.Unknown, { space: 2 }))({
|
|
11837
11837
|
incrementalVersion: "3",
|
|
11838
|
-
verdictSemanticsVersion:
|
|
11838
|
+
verdictSemanticsVersion: 4,
|
|
11839
11839
|
mutantSetPolicy: input.options.mutator.mutantSetPolicy,
|
|
11840
11840
|
runInputsDigest,
|
|
11841
11841
|
...report,
|
|
@@ -11885,7 +11885,7 @@ const slimIncrementalReport = Effect$1.fn(SpanTaxonomy_exports.Spans.mutationRep
|
|
|
11885
11885
|
const runInputsDigest = yield* runInputsDigestOf(deps.fs, deps.path, input.basePath, input.options);
|
|
11886
11886
|
return {
|
|
11887
11887
|
incrementalVersion: "3",
|
|
11888
|
-
verdictSemanticsVersion:
|
|
11888
|
+
verdictSemanticsVersion: 4,
|
|
11889
11889
|
mutantSetPolicy: input.options.mutator.mutantSetPolicy,
|
|
11890
11890
|
runInputsDigest,
|
|
11891
11891
|
schemaVersion: Report_exports.WrittenSchemaVersion.literal,
|
|
@@ -14873,7 +14873,7 @@ const readProject = Effect$1.fn(SpanTaxonomy_exports.Spans.projectReadFromDisk.n
|
|
|
14873
14873
|
_tag: "AdmitIncrementalReportCommand",
|
|
14874
14874
|
report: reportRead.report,
|
|
14875
14875
|
expectedIncrementalVersion: "3",
|
|
14876
|
-
verdictSemanticsVersion:
|
|
14876
|
+
verdictSemanticsVersion: 4,
|
|
14877
14877
|
mutantSetPolicy: options.mutator.mutantSetPolicy,
|
|
14878
14878
|
runInputsDigest,
|
|
14879
14879
|
options,
|
|
@@ -15926,6 +15926,43 @@ const make$1 = (runner) => PooledTestRunner.make({
|
|
|
15926
15926
|
dryRun: runner.dryRun,
|
|
15927
15927
|
mutantRun: runner.mutantRun
|
|
15928
15928
|
});
|
|
15929
|
+
const wallClockTimeoutResult = {
|
|
15930
|
+
status: "timeout",
|
|
15931
|
+
reason: TestRunner_exports.WallClockTimeoutReason.literal
|
|
15932
|
+
};
|
|
15933
|
+
const endedWithoutResult = () => TestRunner_exports.TestRunnerFailed.make({
|
|
15934
|
+
runnerName: "test runner",
|
|
15935
|
+
phase: "mutantRun",
|
|
15936
|
+
cause: "the mutant run ended without reporting a result"
|
|
15937
|
+
});
|
|
15938
|
+
const deadlineArmedMutantRun = dual(2, (events, timeoutMs) => Effect$1.scoped(Effect$1.gen(function* () {
|
|
15939
|
+
const started = yield* Deferred.make();
|
|
15940
|
+
const settled = yield* Deferred.make();
|
|
15941
|
+
const pump = events.pipe(Stream.runForEach((event) => Match$1.value(event).pipe(Match$1.tag("MutantRunStarted", () => Deferred.succeed(started, void 0)), Match$1.tag("MutantRunSettled", ({ result }) => Deferred.succeed(settled, result)), Match$1.exhaustive, Effect$1.asVoid)), Effect$1.onExit((exit) => Exit.match(exit, {
|
|
15942
|
+
onFailure: (cause) => Deferred.failCause(settled, cause),
|
|
15943
|
+
onSuccess: () => Deferred.fail(settled, endedWithoutResult())
|
|
15944
|
+
}).pipe(Effect$1.asVoid)));
|
|
15945
|
+
yield* Effect$1.forkScoped(pump);
|
|
15946
|
+
const deadline = Effect$1.raceFirst(Deferred.await(started).pipe(Effect$1.as(true)), Deferred.await(settled).pipe(Effect$1.as(false))).pipe(Effect$1.timeoutOption(WORKER_BOOT_TIMEOUT), Effect$1.flatMap(Option$1.match({
|
|
15947
|
+
onNone: () => Effect$1.succeed(wallClockTimeoutResult),
|
|
15948
|
+
onSome: (began) => began ? Effect$1.sleep(Duration.millis(timeoutMs)).pipe(Effect$1.as(wallClockTimeoutResult)) : Deferred.await(settled)
|
|
15949
|
+
})));
|
|
15950
|
+
return yield* Effect$1.raceFirst(deadline, Deferred.await(settled));
|
|
15951
|
+
})));
|
|
15952
|
+
/**
|
|
15953
|
+
* The dry run keeps the configured absolute budget. A mutant run is bounded from
|
|
15954
|
+
* its own start by {@link deadlineArmedMutantRun}, so it is not wrapped here.
|
|
15955
|
+
*/
|
|
15956
|
+
const withDryRunTimeout = (inner) => make$1({
|
|
15957
|
+
...inner,
|
|
15958
|
+
dryRun: (options) => inner.dryRun(options).pipe(Effect$1.timeoutOrElse({
|
|
15959
|
+
duration: Duration.millis(options.timeout),
|
|
15960
|
+
orElse: () => Effect$1.succeed({
|
|
15961
|
+
status: "timeout",
|
|
15962
|
+
reason: TestRunner_exports.WallClockTimeoutReason.literal
|
|
15963
|
+
})
|
|
15964
|
+
}))
|
|
15965
|
+
});
|
|
15929
15966
|
const withTimeout = (inner) => make$1({
|
|
15930
15967
|
...inner,
|
|
15931
15968
|
dryRun: (options) => inner.dryRun(options).pipe(Effect$1.timeoutOrElse({
|
|
@@ -16148,7 +16185,7 @@ const scopedOf = Effect$1.fnUntraced(function* (params) {
|
|
|
16148
16185
|
capabilities: client.capabilities().pipe(Effect$1.mapError(toRunnerFailure(runnerName, "capabilities"))),
|
|
16149
16186
|
init: Effect$1.void,
|
|
16150
16187
|
dryRun: (options) => client.dryRun({ options }).pipe(Effect$1.mapError(toRunnerFailure(runnerName, "dryRun"))),
|
|
16151
|
-
mutantRun: (options) => client.mutantRun({ options }).pipe(
|
|
16188
|
+
mutantRun: (options) => deadlineArmedMutantRun(client.mutantRun({ options }).pipe(Stream.mapError(toRunnerFailure(runnerName, "mutantRun"))), options.timeout)
|
|
16152
16189
|
});
|
|
16153
16190
|
});
|
|
16154
16191
|
const TestRunners = Blueprint.make()(TypeId$5).steps({
|
|
@@ -16160,7 +16197,7 @@ const commandRunnerEffect = (context) => ChildProcessSpawner.ChildProcessSpawner
|
|
|
16160
16197
|
const inProcessRunner = (context) => Match$1.value(context.options.testRunner).pipe(Match$1.when(isCommandRunner, () => Option$1.some(commandRunnerEffect(context))), Match$1.orElse(() => Option$1.none()));
|
|
16161
16198
|
const decorateChildRunner = Effect$1.fnUntraced(function* (context, childProcessRunner) {
|
|
16162
16199
|
const base = yield* childProcessRunner;
|
|
16163
|
-
const timed =
|
|
16200
|
+
const timed = withDryRunTimeout(base);
|
|
16164
16201
|
const limited = yield* withMaxReuse(context.options, context.retire)(timed);
|
|
16165
16202
|
const reloading = yield* withEnvironmentReload(context.retire)(limited);
|
|
16166
16203
|
return withRetry(reloading);
|
|
@@ -18162,7 +18199,7 @@ const readIncrementalReuseCommand = Effect$1.fn(SpanTaxonomy_exports.Spans.incre
|
|
|
18162
18199
|
previousRecords: [...previousRecords],
|
|
18163
18200
|
closureDigestsByMutantId: closures.digests,
|
|
18164
18201
|
closureAnalysisFailed: closures.failed,
|
|
18165
|
-
verdictSemanticsVersion:
|
|
18202
|
+
verdictSemanticsVersion: 4,
|
|
18166
18203
|
mutantSetPolicy: input.options.mutator.mutantSetPolicy,
|
|
18167
18204
|
runInputsDigest,
|
|
18168
18205
|
force: input.force,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/stryker-js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
"@opentelemetry/sdk-metrics": "^2.11.0",
|
|
34
34
|
"@opentelemetry/sdk-trace-base": "^2.2.0",
|
|
35
35
|
"@systemfsoftware/effect-cell-types": "^12.0.0",
|
|
36
|
-
"@systemfsoftware/stryker-js-vm-runner": "npm:@systemfsoftware/stryker-js-vitest-runner@^8.1.
|
|
36
|
+
"@systemfsoftware/stryker-js-vm-runner": "npm:@systemfsoftware/stryker-js-vitest-runner@^8.1.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"effect": "^4.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@effect/tsgo": "^0.
|
|
42
|
+
"@effect/tsgo": "^0.48.0",
|
|
43
43
|
"@microsoft/api-extractor": "^7",
|
|
44
44
|
"@oxc-parser/binding-wasm32-wasi": "^0.150.0",
|
|
45
45
|
"@std/jsonc": "npm:@jsr/std__jsonc@^1",
|
|
46
46
|
"@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
|
|
47
|
-
"@systemfsoftware/differential-spec": "^1.0.
|
|
47
|
+
"@systemfsoftware/differential-spec": "^1.0.1",
|
|
48
48
|
"@systemfsoftware/effect-gherkin-spec": "^7.0.0",
|
|
49
49
|
"@systemfsoftware/effect-schema-law": "^5.0.0",
|
|
50
50
|
"@systemfsoftware/oxlint-config-recommended": "^4.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@systemfsoftware/stryker-js-typescript-checker": "latest",
|
|
55
55
|
"@systemfsoftware/stryker-js-vitest-runner": "latest",
|
|
56
56
|
"@systemfsoftware/tsconfig": "^2.0.1",
|
|
57
|
-
"@systemfsoftware/vitest": "^
|
|
57
|
+
"@systemfsoftware/vitest": "^2.0.0",
|
|
58
58
|
"@types/node": "^24",
|
|
59
59
|
"@vitest/browser-playwright": "^5",
|
|
60
60
|
"@vitest/coverage-v8": "^5",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"@systemfsoftware/stryker-config": "^0.1.0",
|
|
74
74
|
"@systemfsoftware/stryker-framework-interface": "^0.0.0",
|
|
75
75
|
"@systemfsoftware/stryker-ignorer-interface": "^0.1.1",
|
|
76
|
-
"@systemfsoftware/stryker-js-
|
|
77
|
-
"@systemfsoftware/stryker-js-plugin-
|
|
78
|
-
"@systemfsoftware/stryker-js-
|
|
79
|
-
"@systemfsoftware/stryker-js-
|
|
80
|
-
"@systemfsoftware/
|
|
76
|
+
"@systemfsoftware/stryker-js-html-reporter": "^6.0.2",
|
|
77
|
+
"@systemfsoftware/stryker-js-plugin-runtime": "^7.0.2",
|
|
78
|
+
"@systemfsoftware/stryker-js-plugin-interface": "^14.0.0",
|
|
79
|
+
"@systemfsoftware/stryker-js-instrumenter": "^12.1.1",
|
|
80
|
+
"@systemfsoftware/stryker-js-cli-contract": "^0.3.1",
|
|
81
81
|
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
82
|
-
"@systemfsoftware/
|
|
82
|
+
"@systemfsoftware/tsdown-config": "^0.1.0"
|
|
83
83
|
},
|
|
84
84
|
"publishConfig": {
|
|
85
85
|
"access": "public",
|