@systemfsoftware/stryker-js 10.0.0 → 10.1.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-C0Cxsfe9.mjs → Run.schema-B0ERLxQj.mjs} +78 -65
- package/dist/{Run.schema-BBKIZ81u.d.mts → Run.schema-RWUb38ZE.d.mts} +13 -5
- package/dist/{compiler-Bq9Nelu8.mjs → compiler-Dc7TYMb_.mjs} +1709 -991
- package/dist/{compiler-C8aLIb5U.mjs → compiler-Faeg70AC.mjs} +1709 -991
- package/dist/config.d.mts +1 -1
- package/dist/{dist-B3nT7z4G.mjs → dist-Dmv1WEP8.mjs} +625 -443
- package/dist/events.d.mts +1 -1
- package/dist/events.mjs +1 -1
- package/dist/{index-DnAm4mSL.d.mts → index-BopuZXrl.d.mts} +51 -11
- package/dist/index.d.mts +48 -12
- package/dist/index.mjs +2 -2
- package/dist/main.mjs +16461 -35430
- package/dist/{mutation-test.cell-m9T-X2Qx.d.mts → mutation-test.cell-CobzlfL-.d.mts} +14 -6
- package/dist/parser.wasm32-wasi.wasm +0 -0
- package/dist/promises.d.mts +2 -2
- package/dist/promises.mjs +1 -1
- package/dist/{src-Bu4i-Lt2.mjs → src-Baq6uz-6.mjs} +541 -623
- package/dist/{src-js-DRK8boNV.mjs → src-js-CvBdbRpe.mjs} +129 -56
- package/dist/{wasm-Dg4JcQ2d.mjs → wasm-CUFfND2k.mjs} +4545 -4335
- package/package.json +31 -31
- package/dist/execAsync-CfPZgJSD.mjs +0 -10
- package/dist/getMachineId-bsd-YZILidse.mjs +0 -27
- package/dist/getMachineId-darwin-B_CgClId.mjs +0 -24
- package/dist/getMachineId-linux-DprzjpT3.mjs +0 -20
- package/dist/getMachineId-unsupported-Ce9f061A.mjs +0 -15
- package/dist/getMachineId-win-DETv1PQd.mjs +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js
|
|
2
2
|
|
|
3
|
+
## 10.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- A finite mutant is killed or survived from its tests. Timeout is reserved for one named nonterminating trap, detected by a hit bound rather than a wall-clock budget. A wall-clock timeout fails the run instead of being stored as a detected mutant.
|
|
8
|
+
|
|
9
|
+
## 10.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Effect moves to `4.0.0-rc.116` (with `@effect/platform-node`, `@effect/platform-node-shared`, `@effect/vitest` and `@effect/opentelemetry` on the same release), the `@systemfsoftware/*` toolchain pins move to their current releases, and `vitest` 5 with `oxc-parser` 0.150 come along. Both worker bundles (`stryker-js-typescript-checker`, `stryker-js-vitest-runner`) now inline their whole runtime rather than resolving `effect`, `@effect/*` and the sibling packages from the host's tree, so a worker runs on its own copy of the effect that built it; the project's `typescript` and `vitest` remain the only imports beside Node builtins. The filter-level `arbitrary.candidate` generators that the thresholds schemas carried are gone: v4 no longer reads them, so thresholds still reject a `low` above `high` and the property tests generate the pair from the schema again. Log calls inside `Effect.catch*` handlers moved to `Effect.tapError`/`Effect.tapCause` at the same level and message. `@systemfsoftware/stryker-ignorer-interface` re-exports the 0.150 AST, where `FormalParameterRest.decorators` is now `Array<Decorator>`.
|
|
14
|
+
|
|
3
15
|
## 10.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
|
@@ -6,11 +6,11 @@ import * as Option from "effect/Option";
|
|
|
6
6
|
import * as S from "effect/Schema";
|
|
7
7
|
import * as Predicate from "effect/Predicate";
|
|
8
8
|
import * as Arr from "effect/Array";
|
|
9
|
-
import { Effect, Schema } from "effect";
|
|
9
|
+
import { Effect, Schema, SchemaGetter, SchemaTransformation } from "effect";
|
|
10
10
|
import * as Rpc from "effect/unstable/rpc/Rpc";
|
|
11
11
|
import * as RpcGroup from "effect/unstable/rpc/RpcGroup";
|
|
12
12
|
import * as RpcMiddleware from "effect/unstable/rpc/RpcMiddleware";
|
|
13
|
-
//#region ../../node_modules/.pnpm/oxc-walker@1.1.1_@oxc-project+types@0.
|
|
13
|
+
//#region ../../node_modules/.pnpm/oxc-walker@1.1.1_@oxc-project+types@0.150.0_oxc-parser@0.150.0_rolldown@1.2.8/node_modules/oxc-walker/dist/index.mjs
|
|
14
14
|
function isNode(v) {
|
|
15
15
|
return v !== null && typeof v === "object" && typeof v.type === "string";
|
|
16
16
|
}
|
|
@@ -2747,6 +2747,7 @@ const EXPRESSION_KINDS = /* @__PURE__ */ new Set([
|
|
|
2747
2747
|
"JSXFragment",
|
|
2748
2748
|
"Literal",
|
|
2749
2749
|
"LogicalExpression",
|
|
2750
|
+
"MemberExpression",
|
|
2750
2751
|
"MetaProperty",
|
|
2751
2752
|
"NewExpression",
|
|
2752
2753
|
"ObjectExpression",
|
|
@@ -3204,7 +3205,7 @@ const writeElement = (container, index, replacement) => {
|
|
|
3204
3205
|
};
|
|
3205
3206
|
let oxc;
|
|
3206
3207
|
const loadOxc = Effect$1.gen(function* () {
|
|
3207
|
-
if (oxc === void 0) oxc = yield* Effect$1.promise(() => import("./src-js-
|
|
3208
|
+
if (oxc === void 0) oxc = yield* Effect$1.promise(() => import("./src-js-CvBdbRpe.mjs"));
|
|
3208
3209
|
return oxc;
|
|
3209
3210
|
});
|
|
3210
3211
|
var ParseFailed = class extends S.TaggedError("@systemfsoftware/stryker-js-instrumenter/Parser.schema/ParseFailed")("ParseFailed", {
|
|
@@ -3408,7 +3409,7 @@ const parseHtml = (text, originFileName, context) => Effect$1.map(ngHtmlParser(t
|
|
|
3408
3409
|
root
|
|
3409
3410
|
}));
|
|
3410
3411
|
const ngHtmlParser = (text, fileName, parserContext) => Effect$1.gen(function* () {
|
|
3411
|
-
const ngParser = yield* Effect$1.promise(() => import("./dist-
|
|
3412
|
+
const ngParser = yield* Effect$1.promise(() => import("./dist-Dmv1WEP8.mjs"));
|
|
3412
3413
|
const { rootNodes, errors } = ngParser.parse(text, {
|
|
3413
3414
|
canSelfClose: true,
|
|
3414
3415
|
allowHtmComponentClosingTags: true,
|
|
@@ -3600,7 +3601,7 @@ const loadWalkerModule = (specifier, fileName, cause) => Effect$1.gen(function*
|
|
|
3600
3601
|
return walk;
|
|
3601
3602
|
});
|
|
3602
3603
|
const parseSvelte = (text, fileName, context) => Effect$1.gen(function* () {
|
|
3603
|
-
const { parse: svelteParse, preprocess, VERSION } = yield* Effect$1.promise(() => import("./compiler-
|
|
3604
|
+
const { parse: svelteParse, preprocess, VERSION } = yield* Effect$1.promise(() => import("./compiler-Faeg70AC.mjs"));
|
|
3604
3605
|
if (!isAtLeast(VERSION, MINIMUM_SVELTE_VERSION)) return yield* SvelteVersionNotSupported.make({
|
|
3605
3606
|
version: VERSION,
|
|
3606
3607
|
fileName,
|
|
@@ -7055,7 +7056,6 @@ function isDeclared(node) {
|
|
|
7055
7056
|
return "declare" in node && node.declare === true;
|
|
7056
7057
|
}
|
|
7057
7058
|
const tsTypeAnnotationNodeTypes = Object.freeze([
|
|
7058
|
-
"TSAsExpression",
|
|
7059
7059
|
"TSInterfaceDeclaration",
|
|
7060
7060
|
"TSTypeAnnotation",
|
|
7061
7061
|
"TSTypeAliasDeclaration",
|
|
@@ -7997,6 +7997,9 @@ const MetricsResultSchema = S.Struct({
|
|
|
7997
7997
|
metrics: Metrics,
|
|
7998
7998
|
childResults: S.Array(S.suspend(() => MetricsResultSchema))
|
|
7999
7999
|
}).annotate({ identifier: "MetricsResult" });
|
|
8000
|
+
const WALL_CLOCK_TIMEOUT_REASON = "wall-clock-timeout";
|
|
8001
|
+
const isHitLimitReason = (reason) => reason !== void 0 && reason.startsWith("Hit limit reached");
|
|
8002
|
+
const wallClockTimeoutStopsRun = (status, reason) => status === "timeout" && !isHitLimitReason(reason);
|
|
8000
8003
|
const MutantResultSchema = S.Struct({
|
|
8001
8004
|
id: S.String,
|
|
8002
8005
|
mutatorName: S.String,
|
|
@@ -8027,24 +8030,30 @@ const TestFileSchema = S.Struct({
|
|
|
8027
8030
|
tests: S.Array(TestDefinitionSchema)
|
|
8028
8031
|
});
|
|
8029
8032
|
const TestFileDefinitionDictionarySchema = S.Record(S.String, TestFileSchema);
|
|
8030
|
-
const
|
|
8033
|
+
const ThresholdsValuesSchema = S.Struct({
|
|
8031
8034
|
high: Percentage,
|
|
8032
8035
|
low: Percentage
|
|
8033
|
-
})
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8036
|
+
});
|
|
8037
|
+
const isThresholds = (value) => S.is(ThresholdsValuesSchema)(value) && value.low <= value.high;
|
|
8038
|
+
/**
|
|
8039
|
+
* The pair is *built* ordered — a drawn pair is sorted — rather than drawn at
|
|
8040
|
+
* random and discarded until it happens to be ordered. The invariant lives on
|
|
8041
|
+
* the declaration because a filter over the pair cannot express `low <= high`
|
|
8042
|
+
* in the generation-constraint vocabulary, and only a declaration carries a
|
|
8043
|
+
* `toCodecArbitrary` derivation. `ThresholdsValuesSchema` stays the wire side, so
|
|
8044
|
+
* decoding keeps its field paths.
|
|
8045
|
+
*/
|
|
8046
|
+
const OrderedThresholds = S.declare(isThresholds, {
|
|
8047
|
+
message: "expected thresholds where low <= high",
|
|
8048
|
+
toCodecArbitrary: () => S.link()(ThresholdsValuesSchema, {
|
|
8049
|
+
decode: SchemaGetter.transform(({ high, low }) => ({
|
|
8050
|
+
high: Math.max(high, low),
|
|
8051
|
+
low: Math.min(high, low)
|
|
8052
|
+
})),
|
|
8053
|
+
encode: SchemaGetter.transform((thresholds) => thresholds)
|
|
8054
|
+
})
|
|
8055
|
+
});
|
|
8056
|
+
const ThresholdsSchema = ThresholdsValuesSchema.pipe(S.decodeTo(OrderedThresholds, SchemaTransformation.passthrough()));
|
|
8048
8057
|
const BrandingInformationSchema = S.Struct({
|
|
8049
8058
|
homepageUrl: S.String,
|
|
8050
8059
|
imageUrl: S.optional(S.String)
|
|
@@ -8377,30 +8386,32 @@ const ClearTextReporterOptions = openStruct({
|
|
|
8377
8386
|
});
|
|
8378
8387
|
const HtmlReporterOptions = S.Struct({ fileName: defaulted(S.String, "reports/mutation/mutation.html") });
|
|
8379
8388
|
const JsonReporterOptions = S.Struct({ fileName: defaulted(S.String, "reports/mutation/mutation.json") });
|
|
8380
|
-
const
|
|
8389
|
+
const MutationScoreThresholdsValuesSchema = S.Struct({
|
|
8381
8390
|
high: defaulted(Percentage, 80),
|
|
8382
8391
|
low: defaulted(Percentage, 60),
|
|
8383
8392
|
break: defaulted(S.NullOr(Percentage), null)
|
|
8384
|
-
})
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
})
|
|
8393
|
+
});
|
|
8394
|
+
const isMutationScoreThresholds = (value) => S.is(MutationScoreThresholdsValuesSchema)(value) && value.low <= value.high;
|
|
8395
|
+
/**
|
|
8396
|
+
* The pair is *built* ordered — a drawn pair is sorted — rather than drawn at
|
|
8397
|
+
* random and discarded until it happens to be ordered. The invariant lives on
|
|
8398
|
+
* the declaration because a filter over the pair cannot express `low <= high`
|
|
8399
|
+
* in the generation-constraint vocabulary, and only a declaration carries a
|
|
8400
|
+
* `toCodecArbitrary` derivation. The struct stays the wire side, so decoding
|
|
8401
|
+
* keeps member defaults and field paths.
|
|
8402
|
+
*/
|
|
8403
|
+
const OrderedMutationScoreThresholds = S.declare(isMutationScoreThresholds, {
|
|
8404
|
+
message: "expected thresholds where low <= high",
|
|
8405
|
+
toCodecArbitrary: () => S.link()(MutationScoreThresholdsValuesSchema, {
|
|
8406
|
+
decode: SchemaGetter.transform(({ break: breaking, high, low }) => ({
|
|
8407
|
+
break: breaking,
|
|
8408
|
+
high: Math.max(high, low),
|
|
8409
|
+
low: Math.min(high, low)
|
|
8410
|
+
})),
|
|
8411
|
+
encode: SchemaGetter.transform((thresholds) => thresholds)
|
|
8412
|
+
})
|
|
8413
|
+
});
|
|
8414
|
+
const MutationScoreThresholdsSchema = MutationScoreThresholdsValuesSchema.pipe(S.decodeTo(OrderedMutationScoreThresholds, SchemaTransformation.passthrough()));
|
|
8404
8415
|
const MutatorDescriptor = S.Struct({ excludedMutations: defaulted(S.Array(S.String), []) });
|
|
8405
8416
|
const WarningOptions = openStruct({
|
|
8406
8417
|
unknownOptions: defaulted(S.Boolean, true),
|
|
@@ -8607,30 +8618,32 @@ var Heartbeat = class extends S.TaggedClass()("tick", {
|
|
|
8607
8618
|
completed: NonNegativeInt,
|
|
8608
8619
|
total: S.NullOr(NonNegativeInt)
|
|
8609
8620
|
}) {};
|
|
8610
|
-
const
|
|
8621
|
+
const VerdictThresholdsValuesSchema = S.Struct({
|
|
8611
8622
|
high: Percentage,
|
|
8612
8623
|
low: Percentage,
|
|
8613
8624
|
break: S.NullOr(Percentage)
|
|
8614
|
-
})
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8623
|
-
|
|
8624
|
-
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
})
|
|
8625
|
+
});
|
|
8626
|
+
const isVerdictThresholds = (value) => S.is(VerdictThresholdsValuesSchema)(value) && value.low <= value.high;
|
|
8627
|
+
/**
|
|
8628
|
+
* The pair is *built* ordered — a drawn pair is sorted — rather than drawn at
|
|
8629
|
+
* random and discarded until it happens to be ordered. The invariant lives on
|
|
8630
|
+
* the declaration because a filter over the pair cannot express `low <= high`
|
|
8631
|
+
* in the generation-constraint vocabulary, and only a declaration carries a
|
|
8632
|
+
* `toCodecArbitrary` derivation. The struct stays the wire side, so decoding
|
|
8633
|
+
* keeps its field paths.
|
|
8634
|
+
*/
|
|
8635
|
+
const OrderedVerdictThresholds = S.declare(isVerdictThresholds, {
|
|
8636
|
+
message: "expected thresholds where low <= high",
|
|
8637
|
+
toCodecArbitrary: () => S.link()(VerdictThresholdsValuesSchema, {
|
|
8638
|
+
decode: SchemaGetter.transform(({ break: breaking, high, low }) => ({
|
|
8639
|
+
break: breaking,
|
|
8640
|
+
high: Math.max(high, low),
|
|
8641
|
+
low: Math.min(high, low)
|
|
8642
|
+
})),
|
|
8643
|
+
encode: SchemaGetter.transform((thresholds) => thresholds)
|
|
8644
|
+
})
|
|
8645
|
+
});
|
|
8646
|
+
const VerdictThresholds = VerdictThresholdsValuesSchema.pipe(S.decodeTo(OrderedVerdictThresholds, SchemaTransformation.passthrough()));
|
|
8634
8647
|
const VerdictMutant = S.Struct({
|
|
8635
8648
|
id: S.String,
|
|
8636
8649
|
file: S.String,
|
|
@@ -8743,4 +8756,4 @@ var PrepareError = class extends S.TaggedError()("PrepareError", {
|
|
|
8743
8756
|
reason: S.String
|
|
8744
8757
|
}) {};
|
|
8745
8758
|
//#endregion
|
|
8746
|
-
export {
|
|
8759
|
+
export { WorkerEntryUrl as $, MetricsSchema as A, ReporterEventBatch as B, CheckerRequest as C, FileResultSchema as D, ExitClass as E, MutationTestingPlanReady as F, TRACEPARENT_HEADER as G, ReporterInitOptions as H, NonNegativeInt as I, TestRunnerFailed as J, TRACESTATE_HEADER as K, PropagatedTrace as L, MutantTested as M, MutationTestReportReady as N, Metrics as O, MutationTestResultSchema as P, WALL_CLOCK_TIMEOUT_REASON as Q, ReporterAck as R, CheckerMutantWire as S, DryRunCompleted as T, ReporterRpcs as U, ReporterFailed as V, StrykerOptionsSchema as W, TraceContextMiddleware as X, TestRunnerRpcs as Y, TraceContextReference as Z, RunStarted as _, ModeSignal as a, wallClockTimeoutStopsRun as at, CheckerFailed as b, PhaseEntered as c, Mutant as ct, RunDecodeError as d, PositionSchema as dt, WorkerPluginKind as et, RunEvent as f, disableTypeChecks as ft, RunReadError as g, RunPhase as h, normalizeFileName as ht, HelpRendered as i, toMutantRunResult as it, MutantResultSchema as j, MetricsResultSchema as k, PlanKnown as l, MutantActivationSchema as lt, RunMutantTested as m, instrument as mt, StageError as n, isCustomTestRunner as nt, MutationRunPlan as o, INSTRUMENTER_CONSTANTS as ot, RunFailed as p, errorToString as pt, TestRunnerConfigSchema as q, Heartbeat as r, parseTraceparent as rt, OutputMode as s, LocationSchema as st, PrepareError as t, formatTraceparent as tt, PlanMutationRunCommand as u, MutantStatusSchema as ut, VerdictReached as v, CheckerRpcs as w, CheckerGroupResult as x, CheckerCheckResult as y, ReporterDrained as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Metrics, _ as ExitClass } from "./index-
|
|
1
|
+
import { C as Metrics, _ as ExitClass } from "./index-BopuZXrl.mjs";
|
|
2
2
|
import * as S from "effect/Schema";
|
|
3
3
|
//#region src/RunEvent.schema.d.ts
|
|
4
4
|
declare const RunPhase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
|
|
@@ -49,12 +49,12 @@ declare const Heartbeat_base: S.Class<Heartbeat, S.TaggedStruct<"tick", {
|
|
|
49
49
|
readonly total: S.NullOr<S.Int>;
|
|
50
50
|
}>, {}>;
|
|
51
51
|
declare class Heartbeat extends Heartbeat_base {}
|
|
52
|
-
declare const
|
|
52
|
+
declare const VerdictThresholdsValuesSchema: S.Struct<{
|
|
53
53
|
readonly high: S.Finite;
|
|
54
54
|
readonly low: S.Finite;
|
|
55
55
|
readonly break: S.NullOr<S.Finite>;
|
|
56
56
|
}>;
|
|
57
|
-
type VerdictThresholds = typeof
|
|
57
|
+
type VerdictThresholds = typeof VerdictThresholdsValuesSchema.Type;
|
|
58
58
|
declare const VerdictMutant: S.Struct<{
|
|
59
59
|
readonly id: S.String;
|
|
60
60
|
readonly file: S.String;
|
|
@@ -80,11 +80,19 @@ declare const VerdictReached_base: S.Class<VerdictReached, S.TaggedStruct<"verdi
|
|
|
80
80
|
readonly mode: S.Literals<readonly ["human", "machine"]>;
|
|
81
81
|
readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
|
|
82
82
|
readonly score: S.NullOr<S.Finite>;
|
|
83
|
-
readonly thresholds: S.
|
|
83
|
+
readonly thresholds: S.decodeTo<S.declare<{
|
|
84
|
+
readonly high: number;
|
|
85
|
+
readonly low: number;
|
|
86
|
+
readonly break: number | null;
|
|
87
|
+
}, {
|
|
88
|
+
readonly high: number;
|
|
89
|
+
readonly low: number;
|
|
90
|
+
readonly break: number | null;
|
|
91
|
+
}>, S.Struct<{
|
|
84
92
|
readonly high: S.Finite;
|
|
85
93
|
readonly low: S.Finite;
|
|
86
94
|
readonly break: S.NullOr<S.Finite>;
|
|
87
|
-
}>;
|
|
95
|
+
}>, never, never>;
|
|
88
96
|
readonly reportFile: S.NullOr<S.String>;
|
|
89
97
|
readonly counts: typeof Metrics;
|
|
90
98
|
readonly mutants: S.$Array<S.Struct<{
|