@systemfsoftware/stryker-js 10.1.0 → 10.1.1
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 +6 -0
- package/dist/{Run.schema-B0ERLxQj.mjs → Run.schema-B_KpPeBA.mjs} +98 -72
- package/dist/{Run.schema-RWUb38ZE.d.mts → Run.schema-BsSOfQnD.d.mts} +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/events.d.mts +1 -1
- package/dist/events.mjs +1 -1
- package/dist/{index-BopuZXrl.d.mts → index-CogNSD0V.d.mts} +6 -5
- package/dist/index.d.mts +15 -14
- package/dist/index.mjs +2 -2
- package/dist/main.mjs +541 -298
- package/dist/merge-config-CHZWyvVQ.mjs +19 -0
- package/dist/{mutation-test.cell-CobzlfL-.d.mts → mutation-test.cell-DS86DvC9.d.mts} +32 -32
- package/dist/promises.d.mts +2 -2
- package/dist/promises.mjs +1 -1
- package/dist/{src-Baq6uz-6.mjs → src-BkTsNvl0.mjs} +199 -209
- package/package.json +7 -7
- package/dist/merge-config-BrrNQWje.mjs +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js
|
|
2
2
|
|
|
3
|
+
## 10.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Exported declarations that previously took `unknown` now take a defaulted type parameter: calls that omit the type argument are unchanged, and calls that were previously rejected for passing an unconstrained value are accepted. No runtime behaviour changes.
|
|
8
|
+
|
|
3
9
|
## 10.1.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -3107,24 +3107,29 @@ const COMMENT_KEYS = /* @__PURE__ */ new Set(["leadingComments", "trailingCommen
|
|
|
3107
3107
|
function isCommentKey(key) {
|
|
3108
3108
|
return typeof key === "string" && COMMENT_KEYS.has(key);
|
|
3109
3109
|
}
|
|
3110
|
+
function walkTraverse(root, stack, visitors) {
|
|
3111
|
+
walk(walkableNode(root), {
|
|
3112
|
+
enter(node, _parent, context) {
|
|
3113
|
+
readPath(stack, node, this, context, visitors);
|
|
3114
|
+
},
|
|
3115
|
+
leave(_node, _parent, context) {
|
|
3116
|
+
closePath(stack, context, visitors);
|
|
3117
|
+
}
|
|
3118
|
+
});
|
|
3119
|
+
}
|
|
3120
|
+
const toTraverseError = (error) => error instanceof Error ? error : new Error("Traversal failed", { cause: error });
|
|
3121
|
+
const handleTraverseError = (error) => {
|
|
3122
|
+
const err = toTraverseError(error);
|
|
3123
|
+
if (!S.is(TraversalStopped)(err)) throw err;
|
|
3124
|
+
};
|
|
3110
3125
|
function traverse(root, visitors) {
|
|
3111
3126
|
const stack = [];
|
|
3112
3127
|
try {
|
|
3113
|
-
|
|
3114
|
-
enter(node, _parent, context) {
|
|
3115
|
-
readPath(stack, node, this, context, visitors);
|
|
3116
|
-
},
|
|
3117
|
-
leave(_node, _parent, context) {
|
|
3118
|
-
closePath(stack, context, visitors);
|
|
3119
|
-
}
|
|
3120
|
-
});
|
|
3128
|
+
walkTraverse(root, stack, visitors);
|
|
3121
3129
|
} catch (error) {
|
|
3122
|
-
|
|
3130
|
+
handleTraverseError(error);
|
|
3123
3131
|
}
|
|
3124
3132
|
}
|
|
3125
|
-
const rethrowUnlessStopped = (error) => {
|
|
3126
|
-
if (!S.is(TraversalStopped)(error)) throw error;
|
|
3127
|
-
};
|
|
3128
3133
|
const readPath = (stack, node, controls, context, visitors) => {
|
|
3129
3134
|
if (isCommentKey(context.key)) return;
|
|
3130
3135
|
const path = createPath(node, parentOf(stack), controls, context);
|
|
@@ -3192,7 +3197,7 @@ function writeInto(parent, key, index, replacement) {
|
|
|
3192
3197
|
writeAtKey(parent, key, index, replacement);
|
|
3193
3198
|
}
|
|
3194
3199
|
function writeAtKey(parent, key, index, replacement) {
|
|
3195
|
-
|
|
3200
|
+
if (Predicate.isString(key)) writeAtSlot(parent, key, index, replacement);
|
|
3196
3201
|
}
|
|
3197
3202
|
function writeAtSlot(parent, key, index, replacement) {
|
|
3198
3203
|
Match.value(index).pipe(Match.when(Match.null, () => overwrite(parent, key, replacement)), Match.orElse((position) => writeElement(parent[key], position, replacement)));
|
|
@@ -3272,17 +3277,16 @@ function isRangedBaseNode(value) {
|
|
|
3272
3277
|
function isNonEmptyArray(value) {
|
|
3273
3278
|
return Array.isArray(value) && value.length > 0;
|
|
3274
3279
|
}
|
|
3275
|
-
function
|
|
3276
|
-
return isPlainRecord(value) &&
|
|
3277
|
-
}
|
|
3278
|
-
function hasContent(value) {
|
|
3279
|
-
return hasField(value, "content");
|
|
3280
|
+
function hasContentField(value) {
|
|
3281
|
+
return isPlainRecord(value) && "content" in value;
|
|
3280
3282
|
}
|
|
3281
|
-
function
|
|
3282
|
-
return
|
|
3283
|
+
function hasHtmlField(value) {
|
|
3284
|
+
return isPlainRecord(value) && "html" in value;
|
|
3283
3285
|
}
|
|
3286
|
+
const readRecordField = (record, key) => record[key];
|
|
3284
3287
|
function fieldOf$1(value, key) {
|
|
3285
|
-
|
|
3288
|
+
if (!isPlainRecord(value)) return void 0;
|
|
3289
|
+
return readRecordField(value, key);
|
|
3286
3290
|
}
|
|
3287
3291
|
function appendIfDefined(values, value) {
|
|
3288
3292
|
if (value !== void 0) values.push(value);
|
|
@@ -3557,12 +3561,12 @@ function isTextRange(value) {
|
|
|
3557
3561
|
function isTemplateExpressionTag(value) {
|
|
3558
3562
|
return isTypedRecord(value) && TEMPLATE_EXPRESSION_TYPES[value["type"]] === true;
|
|
3559
3563
|
}
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
+
const firstChild = (element) => {
|
|
3565
|
+
const children = element["children"];
|
|
3566
|
+
return isNonEmptyArray(children) ? Option.getOrUndefined(Arr.head(children)) : void 0;
|
|
3567
|
+
};
|
|
3564
3568
|
function scriptChild(node) {
|
|
3565
|
-
return
|
|
3569
|
+
return isScriptElement(node) ? firstChild(node) : void 0;
|
|
3566
3570
|
}
|
|
3567
3571
|
function tryGetScriptRangeFromElement(node) {
|
|
3568
3572
|
return Match.value(scriptChild(node)).pipe(Match.when(isTextRange, (range) => ({
|
|
@@ -3572,14 +3576,14 @@ function tryGetScriptRangeFromElement(node) {
|
|
|
3572
3576
|
})), Match.orElse(() => void 0));
|
|
3573
3577
|
}
|
|
3574
3578
|
function templateExpressionRange(node) {
|
|
3575
|
-
return
|
|
3579
|
+
return isTemplateExpressionTag(node) ? rangedExpressionOf(node["expression"]) : void 0;
|
|
3576
3580
|
}
|
|
3577
3581
|
function rangedExpressionOf(payload) {
|
|
3578
|
-
|
|
3579
|
-
start:
|
|
3580
|
-
end:
|
|
3582
|
+
if (isRangedBaseNode(payload)) return {
|
|
3583
|
+
start: payload.start,
|
|
3584
|
+
end: payload.end,
|
|
3581
3585
|
isExpression: true
|
|
3582
|
-
}
|
|
3586
|
+
};
|
|
3583
3587
|
}
|
|
3584
3588
|
/**
|
|
3585
3589
|
* Allow instrumentation of Svelte 5 projects without dropping support for Svelte 4.
|
|
@@ -3591,9 +3595,10 @@ const loadWalker = (version, fileName) => Match.value(isAtLeast(version, SVELTE_
|
|
|
3591
3595
|
* The specifier is chosen at run time and both modules are optional peers of
|
|
3592
3596
|
* this package, so neither can be a static import.
|
|
3593
3597
|
*/
|
|
3598
|
+
const findWalker = (module) => isRecordWithWalk(module) ? module.walk : void 0;
|
|
3594
3599
|
const loadWalkerModule = (specifier, fileName, cause) => Effect$1.gen(function* () {
|
|
3595
3600
|
const module = yield* Effect$1.promise(() => import(specifier));
|
|
3596
|
-
const walk =
|
|
3601
|
+
const walk = findWalker(module);
|
|
3597
3602
|
if (walk === void 0) return yield* SvelteWalkerNotFound.make({
|
|
3598
3603
|
fileName,
|
|
3599
3604
|
cause
|
|
@@ -3668,29 +3673,31 @@ function getTemplateScriptRanges(ast, walker) {
|
|
|
3668
3673
|
return ranges;
|
|
3669
3674
|
}
|
|
3670
3675
|
function htmlRootOf(ast) {
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
}));
|
|
3676
|
+
if (!hasHtmlField(ast)) throw new Error("Svelte AST without html");
|
|
3677
|
+
return ast["html"];
|
|
3674
3678
|
}
|
|
3675
3679
|
function instanceScriptRange(ast) {
|
|
3676
|
-
|
|
3680
|
+
const record = contentFieldOf(fieldOf$1(ast, "instance"));
|
|
3681
|
+
return record === void 0 ? void 0 : scriptContentRange(record["content"], INSTANCE_RANGE_MISSING);
|
|
3677
3682
|
}
|
|
3678
3683
|
function scriptContentRange(content, missingRange) {
|
|
3679
|
-
|
|
3680
|
-
start:
|
|
3681
|
-
end:
|
|
3684
|
+
if (isRange(content)) return {
|
|
3685
|
+
start: content.start,
|
|
3686
|
+
end: content.end,
|
|
3682
3687
|
isExpression: false
|
|
3683
|
-
}
|
|
3684
|
-
|
|
3685
|
-
}));
|
|
3688
|
+
};
|
|
3689
|
+
throw new Error(missingRange);
|
|
3686
3690
|
}
|
|
3687
3691
|
function getModuleScriptRange(svelteAst) {
|
|
3688
3692
|
return Match.value(fieldOf$1(svelteAst, "module")).pipe(Match.when(void 0, () => void 0), Match.when(null, () => void 0), Match.orElse((block) => moduleBlockRange(block)));
|
|
3689
3693
|
}
|
|
3694
|
+
function contentFieldOf(value) {
|
|
3695
|
+
return Option.getOrUndefined(Option.filter(Option.fromNullishOr(value), hasContentField));
|
|
3696
|
+
}
|
|
3690
3697
|
function moduleBlockRange(block) {
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3698
|
+
const record = contentFieldOf(block);
|
|
3699
|
+
if (record === void 0) throw new Error(MODULE_RANGE_MISSING);
|
|
3700
|
+
return scriptContentRange(record["content"], MODULE_RANGE_MISSING);
|
|
3694
3701
|
}
|
|
3695
3702
|
/**
|
|
3696
3703
|
* Remaps script locations back to the original places using the script map
|
|
@@ -5888,16 +5895,19 @@ function literalWithoutRegex(node) {
|
|
|
5888
5895
|
return valueLiteralText(node.value);
|
|
5889
5896
|
}
|
|
5890
5897
|
function valueLiteralText(value) {
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5898
|
+
if (typeof value === "string") return JSON.stringify(value);
|
|
5899
|
+
return nonStringLiteralText(value);
|
|
5900
|
+
}
|
|
5901
|
+
function nonStringLiteralText(value) {
|
|
5902
|
+
if (typeof value === "number") return String(value);
|
|
5903
|
+
return booleanOrBigintText(value);
|
|
5904
|
+
}
|
|
5905
|
+
function booleanOrBigintText(value) {
|
|
5906
|
+
if (typeof value === "boolean") return String(value);
|
|
5907
|
+
return bigintText(value);
|
|
5908
|
+
}
|
|
5909
|
+
function bigintText(value) {
|
|
5910
|
+
return typeof value === "bigint" ? `${value}n` : "null";
|
|
5901
5911
|
}
|
|
5902
5912
|
function flagText(present, text) {
|
|
5903
5913
|
switch (Boolean(present)) {
|
|
@@ -5949,13 +5959,12 @@ const HASHBANG_FIELDS = {
|
|
|
5949
5959
|
function isHashbang(value) {
|
|
5950
5960
|
return Predicate.isObject(value) && Object.entries(HASHBANG_FIELDS).every(([key, accepts]) => accepts(value[key]));
|
|
5951
5961
|
}
|
|
5952
|
-
const
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
};
|
|
5957
|
-
const
|
|
5958
|
-
const tsPrint = (file) => printProgram(file.root, { hashbang: hashbangOf(file.root) });
|
|
5962
|
+
const toHashbang = (hashbang) => isHashbang(hashbang) ? hashbang : null;
|
|
5963
|
+
function getHashbang(root) {
|
|
5964
|
+
return toHashbang("hashbang" in root ? root.hashbang : null);
|
|
5965
|
+
}
|
|
5966
|
+
const jsPrint = (file) => printProgram(file.root, { hashbang: getHashbang(file.root) });
|
|
5967
|
+
const tsPrint = (file) => printProgram(file.root, { hashbang: getHashbang(file.root) });
|
|
5959
5968
|
function getScriptStart$1(script) {
|
|
5960
5969
|
const span = spanOf(script.root);
|
|
5961
5970
|
if (span === void 0) throw new Error("Script AST root without start");
|
|
@@ -6019,9 +6028,14 @@ function normalizeFileName(fileName) {
|
|
|
6019
6028
|
}
|
|
6020
6029
|
const hasText = (value) => Predicate.isString(value) && value.length > 0;
|
|
6021
6030
|
const textIfNonEmpty = (value) => Option.getOrUndefined(Option.filter(Option.fromUndefinedOr(value), hasText));
|
|
6022
|
-
|
|
6023
|
-
return
|
|
6024
|
-
}
|
|
6031
|
+
function readFieldOf(record, key) {
|
|
6032
|
+
return record[key];
|
|
6033
|
+
}
|
|
6034
|
+
const hasFieldIn = (value, key) => key in value;
|
|
6035
|
+
const fieldOf = (value, key) => {
|
|
6036
|
+
if (!hasFieldIn(value, key)) return;
|
|
6037
|
+
return readFieldOf(value, key);
|
|
6038
|
+
};
|
|
6025
6039
|
const hasStringCode = (error) => Match.value(fieldOf(error, "code")).pipe(Match.when(Match.string, () => true), Match.orElse(() => false));
|
|
6026
6040
|
function isErrnoException(error) {
|
|
6027
6041
|
return Match.value(error).pipe(Match.when(Match.instanceOf(Error), hasStringCode), Match.orElse(() => false));
|
|
@@ -6046,7 +6060,7 @@ const isNonPlaceholderText = (text) => Match.value({
|
|
|
6046
6060
|
isPlaceholder: false
|
|
6047
6061
|
}, () => true), Match.orElse(() => false));
|
|
6048
6062
|
const isUsableText = (value) => Match.value(value).pipe(Match.when(Match.string, isNonPlaceholderText), Match.orElse(() => false));
|
|
6049
|
-
const usableText = (value) =>
|
|
6063
|
+
const usableText = (value) => isUsableText(value) ? value : "";
|
|
6050
6064
|
const objectToStringText = (value) => Match.value(fieldOf(value, "toString")).pipe(Match.when(Match.instanceOf(Function), (callable) => {
|
|
6051
6065
|
try {
|
|
6052
6066
|
return usableText(Reflect.apply(callable, value, []));
|
|
@@ -6055,9 +6069,19 @@ const objectToStringText = (value) => Match.value(fieldOf(value, "toString")).pi
|
|
|
6055
6069
|
}
|
|
6056
6070
|
}), Match.orElse(() => ""));
|
|
6057
6071
|
const isObjectType = (cause) => typeof cause === "object";
|
|
6058
|
-
const
|
|
6059
|
-
const
|
|
6060
|
-
const
|
|
6072
|
+
const isNonNullObjectType = (error) => error !== null && isObjectType(error);
|
|
6073
|
+
const toStringText = (error) => isNonNullObjectType(error) ? objectToStringText(error) : "";
|
|
6074
|
+
const stringifyRest = (error) => {
|
|
6075
|
+
const json = jsonText(error);
|
|
6076
|
+
return hasText(json) ? json : toStringText(error);
|
|
6077
|
+
};
|
|
6078
|
+
function primitiveJsonOf(error) {
|
|
6079
|
+
return isJsonPrimitive(error) ? JSON.stringify(error) : void 0;
|
|
6080
|
+
}
|
|
6081
|
+
const stringifyNonError = (error) => typeof error === "string" ? error : nonStringTextOf(error);
|
|
6082
|
+
function nonStringTextOf(error) {
|
|
6083
|
+
return primitiveJsonOf(error) ?? stringifyRest(error);
|
|
6084
|
+
}
|
|
6061
6085
|
const errorText = (error) => Match.value(error).pipe(Match.when(isErrnoException, formatErrnoException), Match.orElse(() => formatError(error)));
|
|
6062
6086
|
function errorToString(error) {
|
|
6063
6087
|
return Match.value(error).pipe(Match.when(isEmptyError, () => ""), Match.when(Match.instanceOf(Error), errorText), Match.orElse(() => stringifyNonError(error)));
|
|
@@ -6349,9 +6373,10 @@ function withOperator(node, operator) {
|
|
|
6349
6373
|
function mutantsWhen(holds, build) {
|
|
6350
6374
|
return Match.value(holds).pipe(Match.when(true, build), Match.orElse(() => NO_MUTANTS));
|
|
6351
6375
|
}
|
|
6352
|
-
|
|
6376
|
+
const hasPropertyIn = (node, key) => key in node;
|
|
6377
|
+
const readPropertyOf = (node, key) => hasPropertyIn(node, key) ? node[key] : void 0;
|
|
6353
6378
|
function propertyOf(node, key) {
|
|
6354
|
-
return
|
|
6379
|
+
return Predicate.isObject(node) ? readPropertyOf(node, key) : void 0;
|
|
6355
6380
|
}
|
|
6356
6381
|
function isIdentifier(node) {
|
|
6357
6382
|
return nodeType(node) === "Identifier";
|
|
@@ -7415,7 +7440,8 @@ function frozenContainer(value) {
|
|
|
7415
7440
|
freezableChildren(object).forEach((child) => {
|
|
7416
7441
|
deepFreeze(child);
|
|
7417
7442
|
});
|
|
7418
|
-
|
|
7443
|
+
Object.freeze(object);
|
|
7444
|
+
return value;
|
|
7419
7445
|
});
|
|
7420
7446
|
}
|
|
7421
7447
|
function freezableChildren(value) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Metrics, _ as ExitClass } from "./index-
|
|
1
|
+
import { C as Metrics, _ as ExitClass } from "./index-CogNSD0V.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"]>;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as StrykerOptions, P as PartialStrykerOptions } from "./index-
|
|
1
|
+
import { K as StrykerOptions, P as PartialStrykerOptions } from "./index-CogNSD0V.mjs";
|
|
2
2
|
import { n as OutputMode } from "./output-mode-CfGHDpi5.mjs";
|
|
3
3
|
//#region src/config/stryker-config.d.ts
|
|
4
4
|
interface ConfigEnv {
|
package/dist/config.mjs
CHANGED
package/dist/events.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as VerdictThresholds, _ as RunStarted, a as ModeSignal, b as VerdictMutant, c as PhaseEntered, d as RunDecodeError, f as RunEvent, g as RunReadError, h as RunPhase, i as HelpRendered, l as PlanKnown, m as RunMutantTested, n as StageError, o as MutationRunPlan, p as RunFailed, r as Heartbeat, s as OutputMode, t as PrepareError, u as PlanMutationRunCommand, x as VerdictReached, y as VerdictCounts } from "./Run.schema-
|
|
1
|
+
import { S as VerdictThresholds, _ as RunStarted, a as ModeSignal, b as VerdictMutant, c as PhaseEntered, d as RunDecodeError, f as RunEvent, g as RunReadError, h as RunPhase, i as HelpRendered, l as PlanKnown, m as RunMutantTested, n as StageError, o as MutationRunPlan, p as RunFailed, r as Heartbeat, s as OutputMode, t as PrepareError, u as PlanMutationRunCommand, x as VerdictReached, y as VerdictCounts } from "./Run.schema-BsSOfQnD.mjs";
|
|
2
2
|
export { Heartbeat, HelpRendered, ModeSignal, MutationRunPlan, OutputMode, PhaseEntered, PlanKnown, PlanMutationRunCommand, PrepareError, RunDecodeError, RunEvent, RunFailed, RunMutantTested, RunPhase, RunReadError, RunStarted, StageError, type VerdictCounts, type VerdictMutant, VerdictReached, type VerdictThresholds };
|
package/dist/events.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as RunStarted, a as ModeSignal, c as PhaseEntered, d as RunDecodeError, f as RunEvent, g as RunReadError, h as RunPhase, i as HelpRendered, l as PlanKnown, m as RunMutantTested, n as StageError, o as MutationRunPlan, p as RunFailed, r as Heartbeat, s as OutputMode, t as PrepareError, u as PlanMutationRunCommand, v as VerdictReached } from "./Run.schema-
|
|
1
|
+
import { _ as RunStarted, a as ModeSignal, c as PhaseEntered, d as RunDecodeError, f as RunEvent, g as RunReadError, h as RunPhase, i as HelpRendered, l as PlanKnown, m as RunMutantTested, n as StageError, o as MutationRunPlan, p as RunFailed, r as Heartbeat, s as OutputMode, t as PrepareError, u as PlanMutationRunCommand, v as VerdictReached } from "./Run.schema-B_KpPeBA.mjs";
|
|
2
2
|
export { Heartbeat, HelpRendered, ModeSignal, MutationRunPlan, OutputMode, PhaseEntered, PlanKnown, PlanMutationRunCommand, PrepareError, RunDecodeError, RunEvent, RunFailed, RunMutantTested, RunPhase, RunReadError, RunStarted, StageError, VerdictReached };
|
|
@@ -8,11 +8,12 @@ import * as RpcGroup from "effect/unstable/rpc/RpcGroup";
|
|
|
8
8
|
import * as RpcMiddleware from "effect/unstable/rpc/RpcMiddleware";
|
|
9
9
|
import * as HashMap from "effect/HashMap";
|
|
10
10
|
import { YieldableError } from "effect/Cause";
|
|
11
|
+
import { JsonSchema } from "effect/JsonSchema";
|
|
11
12
|
import { StandardSchemaV1 } from "effect/StandardSchema";
|
|
12
13
|
declare namespace index_d_exports$1 {
|
|
13
14
|
export { Coverage, CoverageData, CoveragePerTestId, ERROR_CODES, EarlyResultPlan, ErrnoException, File_2 as File, FileDescription, FileDescriptions, INSTRUMENTER_CONSTANTS, InstrumentError, InstrumentResult, InstrumenterContext, InstrumenterOptions, InstrumenterOptionsSchema, Location, LocationSchema, Mutant, MutantActivation, MutantActivationSchema, MutantCoverage, MutantEarlyResultPlan, MutantRunOptions, MutantRunOptionsSchema, MutantRunPlan, MutantStatus, MutantStatusSchema, MutantTestCoverage, MutantTestPlan, MutateDescription, MutationRange, OpenEndLocation, OpenEndLocationSchema, ParserOptions, Position, PositionSchema, RunMutantResult, RunOptions, RunOptionsFields, RunPlan, TestPlan, causeText, disableTypeChecks, errorToString, instrument, isErrnoException, isMutant, normalizeFileName };
|
|
14
15
|
}
|
|
15
|
-
declare const causeText: (cause:
|
|
16
|
+
declare const causeText: <A = unknown>(cause: A, depth: number) => string | undefined;
|
|
16
17
|
declare interface Coverage {
|
|
17
18
|
readonly static: CoverageData;
|
|
18
19
|
readonly perTest: CoveragePerTestId;
|
|
@@ -33,7 +34,7 @@ declare interface ErrnoException extends Error {
|
|
|
33
34
|
declare const ERROR_CODES: Readonly<{
|
|
34
35
|
NoSuchFileOrDirectory: 'ENOENT';
|
|
35
36
|
}>;
|
|
36
|
-
declare function errorToString(error:
|
|
37
|
+
declare function errorToString<A = unknown>(error: A): string;
|
|
37
38
|
declare interface File_2 extends FileDescription {
|
|
38
39
|
name: string;
|
|
39
40
|
content: string;
|
|
@@ -317,7 +318,7 @@ declare const CoverageAnalysisSchema: S.Literals<readonly ["off", "all", "perTes
|
|
|
317
318
|
* caller CONSTRUCTS by assignment, so `readonly` is stripped. The decoded
|
|
318
319
|
* `StrykerOptions` keeps it - that side is read, never built.
|
|
319
320
|
*/
|
|
320
|
-
declare type DeepOptional<T> = { -readonly [P in keyof T]?: T[P] extends Record<string,
|
|
321
|
+
declare type DeepOptional<T, V = unknown> = { -readonly [P in keyof T]?: T[P] extends Record<string, V> ? DeepOptional<T[P], V> | undefined : T[P]; };
|
|
321
322
|
declare type Dependencies = typeof DependenciesSchema.Type;
|
|
322
323
|
declare const DependenciesSchema: S.$Record<S.String, S.String>;
|
|
323
324
|
declare const DetectedStatus: S.Union<readonly [S.Literal<"Killed">, S.Literal<"Timeout">]>;
|
|
@@ -858,7 +859,7 @@ declare const ReporterEventBatch: S.$Array<S.Union<readonly [typeof DryRunComple
|
|
|
858
859
|
declare type ReporterEventBatch = typeof ReporterEventBatch.Type;
|
|
859
860
|
declare const ReporterEventKind: S.Literals<readonly ["dryRunCompleted", "mutationTestingPlanReady", "mutantTested", "mutationTestReportReady"]>;
|
|
860
861
|
declare type ReporterEventKind = typeof ReporterEventKind.Type;
|
|
861
|
-
declare const ReporterEventSchema: StandardSchemaV1<
|
|
862
|
+
declare const ReporterEventSchema: StandardSchemaV1<typeof ReporterEventUnion['Encoded'], ReporterEvent>;
|
|
862
863
|
declare const ReporterEventUnion: S.Union<readonly [typeof DryRunCompleted, typeof MutationTestingPlanReady, typeof MutantTested, typeof MutationTestReportReady]>;
|
|
863
864
|
declare type ReporterFactory = (options: StrykerOptions, init: ReporterInit) => (events: AsyncIterable<ReporterEvent>) => Effect$1.Effect<void, ReporterFailed>;
|
|
864
865
|
declare class ReporterFailed extends ReporterFailed_base {}
|
|
@@ -905,7 +906,7 @@ declare interface SkippedTestResult extends BaseTestResult {
|
|
|
905
906
|
* one is a schema - the generated law suite does exactly that, and a document
|
|
906
907
|
* handed to `toEncoded` takes the whole suite down with it.
|
|
907
908
|
*/
|
|
908
|
-
declare const strykerCoreSchema:
|
|
909
|
+
declare const strykerCoreSchema: JsonSchema;
|
|
909
910
|
/** The decoded type: every defaulted option is present. */
|
|
910
911
|
declare type StrykerOptions = S.Schema.Type<typeof StrykerOptionsSchema>;
|
|
911
912
|
declare const StrykerOptionsSchema: S.StructWithRest<S.Struct<{
|
package/dist/index.d.mts
CHANGED
|
@@ -9,6 +9,7 @@ import * as EffectDuration from 'effect/Duration';
|
|
|
9
9
|
import * as Exit from 'effect/Exit';
|
|
10
10
|
import * as FileSystem from 'effect/FileSystem';
|
|
11
11
|
import * as HashMap from 'effect/HashMap';
|
|
12
|
+
import { JsonSchema } from 'effect/JsonSchema';
|
|
12
13
|
import * as Layer from 'effect/Layer';
|
|
13
14
|
import * as Metric from 'effect/Metric';
|
|
14
15
|
import * as MutableHashMap from 'effect/MutableHashMap';
|
|
@@ -563,7 +564,7 @@ export declare function deepFreeze<T>(target: T): Immutable<T>;
|
|
|
563
564
|
* caller CONSTRUCTS by assignment, so `readonly` is stripped. The decoded
|
|
564
565
|
* `StrykerOptions` keeps it - that side is read, never built.
|
|
565
566
|
*/
|
|
566
|
-
export declare type DeepOptional<T> = { -readonly [P in keyof T]?: T[P] extends Record<string,
|
|
567
|
+
export declare type DeepOptional<T, V = unknown> = { -readonly [P in keyof T]?: T[P] extends Record<string, V> ? DeepOptional<T[P], V> | undefined : T[P]; };
|
|
567
568
|
|
|
568
569
|
export declare const defaultOptions: Effect.Effect<Immutable<StrykerOptions>, never, never>;
|
|
569
570
|
|
|
@@ -829,7 +830,7 @@ export declare const FileResultSchema: S.Struct<{
|
|
|
829
830
|
}>>;
|
|
830
831
|
}>;
|
|
831
832
|
|
|
832
|
-
export declare function findUnserializables(thing:
|
|
833
|
+
export declare function findUnserializables<A = unknown>(thing: A): UnserializableDescription[] | undefined;
|
|
833
834
|
|
|
834
835
|
declare interface ForInStatement$1 extends Span$1 {
|
|
835
836
|
type: "ForInStatement";
|
|
@@ -839,7 +840,7 @@ declare interface ForInStatement$1 extends Span$1 {
|
|
|
839
840
|
parent?: Node$1;
|
|
840
841
|
}
|
|
841
842
|
|
|
842
|
-
export declare const forkCoreSchema:
|
|
843
|
+
export declare const forkCoreSchema: JsonSchema;
|
|
843
844
|
|
|
844
845
|
export declare const forkOptionsSchema: S.StructWithRest<S.Struct<{
|
|
845
846
|
readonly allowConsoleColors: S.withDecodingDefaultKey<S.Boolean, never>;
|
|
@@ -1059,7 +1060,7 @@ export declare interface Ignorer {
|
|
|
1059
1060
|
|
|
1060
1061
|
export declare type Immutable<T> = T extends ImmutablePrimitive ? T : T extends Array<infer U> ? ReadonlyArray<Immutable<U>> : T extends Map<infer K, infer V> ? ReadonlyMap<Immutable<K>, Immutable<V>> : T extends Set<infer M> ? ReadonlySet<Immutable<M>> : T extends RegExp ? Readonly<RegExp> : { readonly [K in keyof T]: Immutable<T[K]>; };
|
|
1061
1062
|
|
|
1062
|
-
export declare type ImmutablePrimitive = Primitive | ((...args: never[]) =>
|
|
1063
|
+
export declare type ImmutablePrimitive = Primitive | ((...args: never[]) => void);
|
|
1063
1064
|
|
|
1064
1065
|
declare interface ImportAttribute$1 extends Span$1 {
|
|
1065
1066
|
type: "ImportAttribute";
|
|
@@ -1100,7 +1101,7 @@ declare interface ImportExpression$1 extends Span$1 {
|
|
|
1100
1101
|
parent?: Node$1;
|
|
1101
1102
|
}
|
|
1102
1103
|
|
|
1103
|
-
export declare function importModule(moduleName: string): Effect.Effect<
|
|
1104
|
+
export declare function importModule<A = unknown>(moduleName: string): Effect.Effect<A, StrykerError>;
|
|
1104
1105
|
|
|
1105
1106
|
declare interface ImportNamespaceSpecifier extends Span$1 {
|
|
1106
1107
|
type: "ImportNamespaceSpecifier";
|
|
@@ -1355,8 +1356,8 @@ declare interface LabelIdentifier$1 extends Span$1 {
|
|
|
1355
1356
|
|
|
1356
1357
|
export declare const loadConfigCell: typeof readConfig;
|
|
1357
1358
|
|
|
1358
|
-
export declare interface LoadedPlugins {
|
|
1359
|
-
readonly schemaContributions: readonly Record<string,
|
|
1359
|
+
export declare interface LoadedPlugins<A = unknown> {
|
|
1360
|
+
readonly schemaContributions: readonly Record<string, A>[];
|
|
1360
1361
|
readonly pluginsByKind: HashMap.HashMap<PluginKind, readonly PluginDescriptor[]>;
|
|
1361
1362
|
readonly pluginModulePaths: readonly string[];
|
|
1362
1363
|
readonly pluginSources: readonly PluginSource[];
|
|
@@ -2224,7 +2225,7 @@ declare interface SequenceExpression$1 extends Span$1 {
|
|
|
2224
2225
|
parent?: Node$1;
|
|
2225
2226
|
}
|
|
2226
2227
|
|
|
2227
|
-
export declare const shouldKeepTempDir: (exit: Exit.Exit<
|
|
2228
|
+
export declare const shouldKeepTempDir: <A = unknown, E = unknown>(exit: Exit.Exit<A, E>, cleanTempDir: 'always' | boolean) => boolean;
|
|
2228
2229
|
|
|
2229
2230
|
declare type SimpleAssignmentTarget$1 = IdentifierReference$1 | TSAsExpression$1 | TSSatisfiesExpression$1 | TSNonNullExpression$1 | TSTypeAssertion$1 | MemberExpression$1;
|
|
2230
2231
|
|
|
@@ -3118,11 +3119,11 @@ declare interface V8IntrinsicExpression extends Span$1 {
|
|
|
3118
3119
|
parent?: Node$1;
|
|
3119
3120
|
}
|
|
3120
3121
|
|
|
3121
|
-
export declare function validateOptions(options: Record<string,
|
|
3122
|
+
export declare function validateOptions<A = unknown>(options: Record<string, A>, schema: ValidationSchemaDocument): Effect.Effect<StrykerOptions, ConfigError>;
|
|
3122
3123
|
|
|
3123
|
-
export declare type ValidationSchemaDocument = {
|
|
3124
|
-
readonly properties?:
|
|
3125
|
-
readonly [key: string]:
|
|
3124
|
+
export declare type ValidationSchemaDocument<A = unknown> = {
|
|
3125
|
+
readonly properties?: A;
|
|
3126
|
+
readonly [key: string]: A;
|
|
3126
3127
|
};
|
|
3127
3128
|
|
|
3128
3129
|
declare interface VariableDeclaration$1 extends Span$1 {
|
|
@@ -3237,7 +3238,7 @@ export declare interface VmPlatform {
|
|
|
3237
3238
|
readonly vm: VmModule;
|
|
3238
3239
|
}
|
|
3239
3240
|
|
|
3240
|
-
export declare type VmRequire = (specifier: string) =>
|
|
3241
|
+
export declare type VmRequire = <A = unknown>(specifier: string) => A;
|
|
3241
3242
|
|
|
3242
3243
|
export declare class VmRunner extends VmRunner_base {}
|
|
3243
3244
|
|
|
@@ -3250,7 +3251,7 @@ export declare const vmRunnerCapabilities: {
|
|
|
3250
3251
|
export declare const vmRunnerName = "vm";
|
|
3251
3252
|
|
|
3252
3253
|
export declare interface VmScript {
|
|
3253
|
-
readonly runInContext: (context: object) =>
|
|
3254
|
+
readonly runInContext: <A = unknown>(context: object) => A;
|
|
3254
3255
|
}
|
|
3255
3256
|
|
|
3256
3257
|
export declare const vmTestRunner: (config: VmTestRunnerConfig) => Effect.Effect<PooledTestRunner, TestRunnerFailed, FileSystem.FileSystem | VmRunner>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as MetricsSchema, B as ReporterEventBatch, C as CheckerRequest, D as FileResultSchema, E as ExitClass, F as MutationTestingPlanReady, H as ReporterInitOptions, M as MutantTested, N as MutationTestReportReady, P as MutationTestResultSchema, R as ReporterAck, S as CheckerMutantWire, T as DryRunCompleted, U as ReporterRpcs, W as StrykerOptionsSchema, X as TraceContextMiddleware, _ as RunStarted, b as CheckerFailed, c as PhaseEntered, dt as PositionSchema, et as WorkerPluginKind, h as RunPhase, i as HelpRendered, j as MutantResultSchema, l as PlanKnown, lt as MutantActivationSchema, m as RunMutantTested, n as StageError, p as RunFailed, q as TestRunnerConfigSchema, r as Heartbeat, st as LocationSchema, ut as MutantStatusSchema, v as VerdictReached, w as CheckerRpcs, x as CheckerGroupResult, y as CheckerCheckResult, z as ReporterDrained } from "./Run.schema-
|
|
2
|
-
import { $ as
|
|
1
|
+
import { A as MetricsSchema, B as ReporterEventBatch, C as CheckerRequest, D as FileResultSchema, E as ExitClass, F as MutationTestingPlanReady, H as ReporterInitOptions, M as MutantTested, N as MutationTestReportReady, P as MutationTestResultSchema, R as ReporterAck, S as CheckerMutantWire, T as DryRunCompleted, U as ReporterRpcs, W as StrykerOptionsSchema, X as TraceContextMiddleware, _ as RunStarted, b as CheckerFailed, c as PhaseEntered, dt as PositionSchema, et as WorkerPluginKind, h as RunPhase, i as HelpRendered, j as MutantResultSchema, l as PlanKnown, lt as MutantActivationSchema, m as RunMutantTested, n as StageError, p as RunFailed, q as TestRunnerConfigSchema, r as Heartbeat, st as LocationSchema, ut as MutantStatusSchema, v as VerdictReached, w as CheckerRpcs, x as CheckerGroupResult, y as CheckerCheckResult, z as ReporterDrained } from "./Run.schema-B_KpPeBA.mjs";
|
|
2
|
+
import { $ as OutOfMemoryError, A as strykerVersion, At as defaultOptions, B as initialExtendsStepState, C as checkerMutantsSkipped, Ct as extendsPropertySchema, D as CheckerSkippedRequested, Dt as SUPPORTED_CONFIG_FILE_NAMES, E as CheckerAnsweredUnrequested, Et as CONFIG_SYNTAX_HELP, F as spawnReporterWorker, Ft as toRelativeNormalizedFileName, G as buildTestRunner, H as mergeConfigs, I as decideExtendsStep, It as RunEvents, J as connectRetry, K as isCommandRunner, L as describeErrors, Lt as RunIdentity, M as RunEnvironment, Mt as isModuleSpecifier, N as REPORTER_EVENT_BATCH_BOUND, Nt as isWarningEnabled, O as createFileMatcher, Ot as createDefaultOptions, P as reporterWorkerFactory, Pt as optionsPath, Q as ChildProcessCrashedError, R as forkCoreSchema, Rt as RunEventWireLine, S as checkerMutantsChecked, St as ReadConfigCommand, T as checkerRpcFailures, Tt as survivorsPriorReport, U as readConfig, V as loadConfigCell, W as validateOptions, X as IdGenerator, Y as makeWorkerClient, Z as classifyWorkerExit, _ as verdictExitClass, _t as ExtendsStepResolve, a as RUN_EVENTS_QUEUE_BOUND, at as vmTestRunner, b as checkGroupedPlans, bt as MergeCommand, c as shouldKeepTempDir, ct as ConfigError, d as buildVerdictEnvelope, dt as ConfigFileUnreadableError, et as WorkerBootTimeoutError, f as generateRunId, ft as ConfigFileUnsupportedError, g as resolveExitCode, gt as ExtendsStepRefused, h as highestExitClass, ht as ExtendsStepRead, i as makeRunEventStream, it as vmRunnerName, j as IncrementalReportSchema, jt as findUnserializables, k as matchesFile, kt as deepFreeze, l as ACTIONABLE_STATUSES, lt as ConfigFileInvalidError, m as EXIT_CODE, mt as ExtendsStepDone, n as RunEventDrain, nt as isVmRunner, o as makeRunLayer, ot as StrykerError, p as isActionableStatus, pt as ExtendsStepDocumentSchema, q as WorkerLauncher, r as RunEventDrainLive, rt as vmRunnerCapabilities, s as mutationTestCell, st as ConfigDocumentSchema, t as strykerCell, tt as VmRunner, u as VERDICT_ENVELOPE_SCHEMA_VERSION, ut as ConfigFileNotFoundError, v as calculateMetrics, vt as ExtendsStepStateSchema, w as checkerProcessCrashes, wt as forkOptionsSchema, x as checkerDuration, xt as MergeResult, y as countMutants, yt as ImportedModuleSchema, z as importModule, zt as S } from "./src-BkTsNvl0.mjs";
|
|
3
3
|
export { ACTIONABLE_STATUSES, CONFIG_SYNTAX_HELP, CheckerAnsweredUnrequested, CheckerCheckResult, CheckerFailed, CheckerGroupResult, CheckerMutantWire, CheckerRequest, CheckerRpcs, CheckerSkippedRequested, ChildProcessCrashedError, ConfigDocumentSchema, ConfigError, ConfigFileInvalidError, ConfigFileNotFoundError, ConfigFileUnreadableError, ConfigFileUnsupportedError, DryRunCompleted, EXIT_CODE, ExitClass, ExtendsStepDocumentSchema, ExtendsStepDone, ExtendsStepRead, ExtendsStepRefused, ExtendsStepResolve, ExtendsStepStateSchema, FileResultSchema, Heartbeat, HelpRendered, IdGenerator, ImportedModuleSchema, IncrementalReportSchema, LocationSchema, MergeCommand, MergeResult, MetricsSchema, MutantActivationSchema, MutantResultSchema, MutantStatusSchema, MutantTested, MutationTestReportReady, MutationTestResultSchema, MutationTestingPlanReady, OutOfMemoryError, PhaseEntered, PlanKnown, PositionSchema, REPORTER_EVENT_BATCH_BOUND, RUN_EVENTS_QUEUE_BOUND, ReadConfigCommand, ReporterAck, ReporterDrained, ReporterEventBatch, ReporterInitOptions, ReporterRpcs, RunEnvironment, RunEventDrain, RunEventDrainLive, RunEventWireLine, RunEvents, RunFailed, RunIdentity, RunMutantTested, RunPhase, RunStarted, S, SUPPORTED_CONFIG_FILE_NAMES, StageError, StrykerError, StrykerOptionsSchema, TestRunnerConfigSchema, TraceContextMiddleware, VERDICT_ENVELOPE_SCHEMA_VERSION, VerdictReached, VmRunner, WorkerBootTimeoutError, WorkerLauncher, WorkerPluginKind, buildTestRunner, buildVerdictEnvelope, calculateMetrics, checkGroupedPlans, checkerDuration, checkerMutantsChecked, checkerMutantsSkipped, checkerProcessCrashes, checkerRpcFailures, classifyWorkerExit, connectRetry, countMutants, createDefaultOptions, createFileMatcher, decideExtendsStep, deepFreeze, defaultOptions, describeErrors, extendsPropertySchema, findUnserializables, forkCoreSchema, forkOptionsSchema, generateRunId, highestExitClass, importModule, initialExtendsStepState, isActionableStatus, isCommandRunner, isModuleSpecifier, isVmRunner, isWarningEnabled, loadConfigCell, makeRunEventStream, makeRunLayer, makeWorkerClient, matchesFile, mergeConfigs, mutationTestCell, optionsPath, readConfig, reporterWorkerFactory, resolveExitCode, shouldKeepTempDir, spawnReporterWorker, strykerCell, strykerVersion, survivorsPriorReport, toRelativeNormalizedFileName, validateOptions, verdictExitClass, vmRunnerCapabilities, vmRunnerName, vmTestRunner };
|