@systemfsoftware/stryker-js-typescript-checker 8.0.0 → 8.0.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 +8 -0
- package/dist/main.mjs +159 -44
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js-typescript-checker
|
|
2
2
|
|
|
3
|
+
## 8.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The packages now depend on `@systemfsoftware/effect-cell-types` 11.
|
|
8
|
+
|
|
9
|
+
- Every tagged error now has a one-line message built from its fields, so a failure names the file, mutant, plugin, worker or exit code involved instead of an empty message. The errors' tags, fields and encoded forms are unchanged.
|
|
10
|
+
|
|
3
11
|
## 8.0.0
|
|
4
12
|
|
|
5
13
|
### Major Changes
|
package/dist/main.mjs
CHANGED
|
@@ -54452,7 +54452,7 @@ const orElse$1 = orElse$2;
|
|
|
54452
54452
|
*/
|
|
54453
54453
|
const exhaustive = exhaustive$1;
|
|
54454
54454
|
//#endregion
|
|
54455
|
-
//#region ../../node_modules/.pnpm/@systemfsoftware+effect-cell-types@
|
|
54455
|
+
//#region ../../node_modules/.pnpm/@systemfsoftware+effect-cell-types@11.0.0_effect@4.0.0-rc.117/node_modules/@systemfsoftware/effect-cell-types/dist/rolldown-runtime-D7D4PA-g.mjs
|
|
54456
54456
|
var __defProp$1 = Object.defineProperty;
|
|
54457
54457
|
var __exportAll$1 = (all, no_symbols) => {
|
|
54458
54458
|
let target = {};
|
|
@@ -54464,7 +54464,7 @@ var __exportAll$1 = (all, no_symbols) => {
|
|
|
54464
54464
|
return target;
|
|
54465
54465
|
};
|
|
54466
54466
|
//#endregion
|
|
54467
|
-
//#region ../../node_modules/.pnpm/@systemfsoftware+effect-cell-types@
|
|
54467
|
+
//#region ../../node_modules/.pnpm/@systemfsoftware+effect-cell-types@11.0.0_effect@4.0.0-rc.117/node_modules/@systemfsoftware/effect-cell-types/dist/index.mjs
|
|
54468
54468
|
var Blueprint_exports = /* @__PURE__ */ __exportAll$1({
|
|
54469
54469
|
IndexId: () => IndexId,
|
|
54470
54470
|
make: () => make$3$1
|
|
@@ -54713,7 +54713,11 @@ const make$1$1 = () => (typeId) => ({
|
|
|
54713
54713
|
return self[SlotId];
|
|
54714
54714
|
}
|
|
54715
54715
|
});
|
|
54716
|
-
var CommandRejected = class extends TaggedError()("CommandRejected", { issue: String$2 }) {
|
|
54716
|
+
var CommandRejected = class extends TaggedError()("CommandRejected", { issue: String$2 }) {
|
|
54717
|
+
get message() {
|
|
54718
|
+
return this.issue;
|
|
54719
|
+
}
|
|
54720
|
+
};
|
|
54717
54721
|
var Workflow_exports = /* @__PURE__ */ __exportAll$1({
|
|
54718
54722
|
InstrumentationBrand: () => InstrumentationBrand,
|
|
54719
54723
|
WorkflowSchemasKey: () => WorkflowSchemasKey,
|
|
@@ -54726,7 +54730,8 @@ const make$5 = (options) => {
|
|
|
54726
54730
|
Object.assign(decide, { [WorkflowSchemasKey]: {
|
|
54727
54731
|
command,
|
|
54728
54732
|
decision,
|
|
54729
|
-
error
|
|
54733
|
+
error,
|
|
54734
|
+
decideStacktrace: String((/* @__PURE__ */ new Error()).stack)
|
|
54730
54735
|
} });
|
|
54731
54736
|
return decide;
|
|
54732
54737
|
};
|
|
@@ -54762,6 +54767,32 @@ const entriesOf = (map) => Object.entries(map);
|
|
|
54762
54767
|
const isMapDeclaration = (value) => typeof value === "object" && value !== null;
|
|
54763
54768
|
const annotateFields = (schema, command) => forEach$1(entriesOf(schema[InstrumentationBrand]), ([field, attribute]) => annotateCurrentSpan(attribute, Reflect.get(Object(command), field)), { discard: true });
|
|
54764
54769
|
const tagOf$1 = (value) => String(Reflect.get(Object(value), "_tag"));
|
|
54770
|
+
const tagIfPresent = (value) => {
|
|
54771
|
+
const tag = Reflect.get(Object(value), "_tag");
|
|
54772
|
+
return typeof tag === "string" ? tag : void 0;
|
|
54773
|
+
};
|
|
54774
|
+
const declaredFields = (schema, command) => Object.fromEntries(entriesOf(schema[InstrumentationBrand]).map(([field]) => [field, Reflect.get(Object(command), field)]));
|
|
54775
|
+
const taggedMember = (command, field) => {
|
|
54776
|
+
const tag = tagIfPresent(Reflect.get(Object(command), field));
|
|
54777
|
+
return tag === void 0 ? [] : [[field, tag]];
|
|
54778
|
+
};
|
|
54779
|
+
const memberTags = (command, fields) => Object.fromEntries(Object.keys(fields).filter((field) => field !== "_tag").flatMap((field) => taggedMember(command, field)));
|
|
54780
|
+
const outcomeTag = (outcome) => match$4(outcome, {
|
|
54781
|
+
onSuccess: tagOf$1,
|
|
54782
|
+
onFailure: tagOf$1
|
|
54783
|
+
});
|
|
54784
|
+
const annotateCellIdentity = (name, stacktrace, decideStacktrace) => gen(function* () {
|
|
54785
|
+
yield* annotateCurrentSpan("cell.name", name);
|
|
54786
|
+
yield* annotateCurrentSpan("cell.stacktrace", stacktrace);
|
|
54787
|
+
yield* annotateCurrentSpan("cell.decide_stacktrace", decideStacktrace);
|
|
54788
|
+
});
|
|
54789
|
+
const annotateCommand = (schema, decoded) => gen(function* () {
|
|
54790
|
+
const commandTag = tagIfPresent(decoded);
|
|
54791
|
+
yield* commandTag === void 0 ? void_$1 : annotateCurrentSpan("cell.command_tag", commandTag);
|
|
54792
|
+
yield* annotateCurrentSpan("cell.member_tags", memberTags(decoded, schema.fields));
|
|
54793
|
+
yield* annotateCurrentSpan("cell.declared", declaredFields(schema, decoded));
|
|
54794
|
+
});
|
|
54795
|
+
const annotateCellOutcome = (outcome) => annotateCurrentSpan("cell.outcome", outcomeTag(outcome));
|
|
54765
54796
|
const holdsBrand = (holder) => isMapDeclaration(Reflect.get(Object(holder), InstrumentationBrand));
|
|
54766
54797
|
const hasHeldBrand = (value) => holdsBrand(Reflect.get(Object(value), "constructor"));
|
|
54767
54798
|
const heldMap = (value) => hasHeldBrand(value) ? value.constructor[InstrumentationBrand] : {};
|
|
@@ -54783,14 +54814,14 @@ const recordDuration = (histogram, startNanos, resultClass) => gen(function* ()
|
|
|
54783
54814
|
yield* update$2(withAttributes(histogram, { result_class: resultClass }), seconds);
|
|
54784
54815
|
});
|
|
54785
54816
|
/** Runs the shell inside the parent span, records duration on every exit, and closes the span. */
|
|
54786
|
-
const monitoredRun = (name, histogram, core) => gen(function* () {
|
|
54817
|
+
const monitoredRun = (name, stacktrace, decideStacktrace, histogram, core) => gen(function* () {
|
|
54787
54818
|
const settled = yield* make$11("infrastructure");
|
|
54788
54819
|
const startNanos = yield* monotonicTimeNanos;
|
|
54789
54820
|
const timed = onExit(core((resultClass) => set(settled, resultClass)), (exit) => gen(function* () {
|
|
54790
54821
|
const resultClass = yield* get$1(settled);
|
|
54791
54822
|
yield* recordDuration(histogram, startNanos, recordedClass(isSuccess(exit), resultClass));
|
|
54792
54823
|
}));
|
|
54793
|
-
return yield* withSpan(timed, name);
|
|
54824
|
+
return yield* withSpan(andThen$1(annotateCellIdentity(name, stacktrace, decideStacktrace), timed), name);
|
|
54794
54825
|
});
|
|
54795
54826
|
const boundariesFor = (options) => options === void 0 ? DEFAULT_DURATION_BOUNDARIES : options.boundaries;
|
|
54796
54827
|
const histogramFor = (name, options) => histogram(`app.${name}.duration`, { boundaries: boundariesFor(options) });
|
|
@@ -54804,12 +54835,18 @@ const dispatchAll = (handlers, values, raw) => forEach$1(values, (value) => disp
|
|
|
54804
54835
|
const isEventList = (candidate) => Array.isArray(candidate);
|
|
54805
54836
|
const dispatchEncoded = (handlers, encoded, raw) => isEventList(encoded) ? dispatchAll(handlers, encoded, raw) : dispatchOne(handlers, encoded, raw);
|
|
54806
54837
|
const writeValue = (name, handlers, value, raw) => withSpan(dispatchEncoded(handlers, value, raw), `${name}.write`);
|
|
54807
|
-
const rejectedRun = (name, handlers, raw, issue, settle) =>
|
|
54838
|
+
const rejectedRun = (name, handlers, raw, issue, settle) => gen(function* () {
|
|
54839
|
+
yield* settle("failure");
|
|
54840
|
+
yield* annotateCurrentSpan("cell.outcome", "CommandRejected");
|
|
54841
|
+
return yield* writeValue(name, handlers, new CommandRejected({ issue }), raw);
|
|
54842
|
+
});
|
|
54808
54843
|
const encodeValue = (schema, value) => getOrThrow(encodeResult(schema)(value));
|
|
54809
54844
|
const outcomeRun = (name, schemas, workflow, handlers, decoded, raw, settle) => gen(function* () {
|
|
54810
54845
|
yield* annotateFields(schemas.command, decoded);
|
|
54846
|
+
yield* annotateCommand(schemas.command, decoded);
|
|
54811
54847
|
const outcome = workflow(decoded);
|
|
54812
54848
|
yield* annotateOutcome(name, outcome);
|
|
54849
|
+
yield* annotateCellOutcome(outcome);
|
|
54813
54850
|
yield* settle(okOrRefusal(outcome));
|
|
54814
54851
|
return yield* match$4(outcome, {
|
|
54815
54852
|
onFailure: (refusal) => writeValue(name, handlers, encodeValue(schemas.error, refusal), raw),
|
|
@@ -54833,10 +54870,11 @@ const runOnce = (name, schemas, workflow, handlers, raw, settle) => match$4(deco
|
|
|
54833
54870
|
const namedImpl = (name, options) => {
|
|
54834
54871
|
const histogram = histogramFor(name, options);
|
|
54835
54872
|
return (read) => {
|
|
54873
|
+
const stacktrace = String((/* @__PURE__ */ new Error()).stack);
|
|
54836
54874
|
const decide = (workflow) => {
|
|
54837
54875
|
const schemas = workflow[WorkflowSchemasKey];
|
|
54838
54876
|
const write = (handlers) => {
|
|
54839
|
-
const run = (input) => monitoredRun(name, histogram, (settle) => gen(function* () {
|
|
54877
|
+
const run = (input) => monitoredRun(name, stacktrace, schemas.decideStacktrace, histogram, (settle) => gen(function* () {
|
|
54840
54878
|
const raw = yield* withSpan(read(input), `${name}.read`);
|
|
54841
54879
|
return yield* runOnce(name, schemas, workflow, handlers, raw, settle);
|
|
54842
54880
|
}));
|
|
@@ -57300,7 +57338,7 @@ const isEmptyNumber = (value$10) => value(value$10).pipe(when(0, () => true), or
|
|
|
57300
57338
|
const isEmptyError = (error) => value(error).pipe(when(_undefined, () => true), when(_null, () => true), when(string, (text) => text.length === 0), when(number, isEmptyNumber), when(boolean, (value) => !value), orElse$1(() => false));
|
|
57301
57339
|
const formatErrnoException = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.code} (${error.syscall}) ${stack}`), orElse$1(() => `${error.name}: ${error.code} (${error.syscall})`));
|
|
57302
57340
|
const formatError = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.message}\n${stack}`), orElse$1(() => `${error.name}: ${error.message}`));
|
|
57303
|
-
const isJsonPrimitive = (value$
|
|
57341
|
+
const isJsonPrimitive = (value$6) => value(value$6).pipe(when(number, () => true), when(boolean, () => true), when(bigint, () => true), orElse$1(() => false));
|
|
57304
57342
|
const jsonText = (error) => getOrElse(try_$2({
|
|
57305
57343
|
try: () => textIfNonEmpty(JSON.stringify(error)),
|
|
57306
57344
|
catch: () => void 0
|
|
@@ -57314,8 +57352,8 @@ const isNonPlaceholderText = (text) => value({
|
|
|
57314
57352
|
}, () => true), orElse$1(() => false));
|
|
57315
57353
|
const isUsableText = (value$11) => value(value$11).pipe(when(string, isNonPlaceholderText), orElse$1(() => false));
|
|
57316
57354
|
const usableText = (value) => isUsableText(value) ? value : "";
|
|
57317
|
-
const objectToStringText = (value$
|
|
57318
|
-
try: () => usableText(Reflect.apply(callable, value$
|
|
57355
|
+
const objectToStringText = (value$14) => value(fieldOf(value$14, "toString")).pipe(when(instanceOf(Function), (callable) => getOrElse(try_$2({
|
|
57356
|
+
try: () => usableText(Reflect.apply(callable, value$14, [])),
|
|
57319
57357
|
catch: () => ""
|
|
57320
57358
|
}), () => "")), orElse$1(() => ""));
|
|
57321
57359
|
const toStringText = (error) => isObjectOrArray(error) ? objectToStringText(error) : "";
|
|
@@ -57331,14 +57369,14 @@ function nonStringTextOf(error) {
|
|
|
57331
57369
|
return primitiveJsonOf(error) ?? stringifyRest(error);
|
|
57332
57370
|
}
|
|
57333
57371
|
const errorText = (error) => value(error).pipe(when(isErrnoException, formatErrnoException), orElse$1(() => formatError(error)));
|
|
57334
|
-
const errorNameOf = (value$
|
|
57372
|
+
const errorNameOf = (value$5) => value(value$5).pipe(when(instanceOf(Error), (error) => textIfNonEmpty(error.name)), orElse$1(() => void 0));
|
|
57335
57373
|
const tagOf = (value$22) => value(textIfNonEmpty(fieldOf(value$22, "_tag"))).pipe(when(hasText, (tag) => tag), orElse$1(() => errorNameOf(value$22)));
|
|
57336
57374
|
const textWithNested = (own, nested) => value(own).pipe(when(hasText, (text) => appendNested(text, nested)), orElse$1(() => nested));
|
|
57337
57375
|
const appendNested = (own, nested) => value(nested).pipe(when(hasText, (text) => `${own}: ${text}`), orElse$1(() => own));
|
|
57338
57376
|
const errorMessage = (error) => value(error.message.length > 0).pipe(when(true, () => error.message), orElse$1(() => tagOf(error)));
|
|
57339
|
-
const errorMessageOrTag = (value$
|
|
57340
|
-
const messageText = (value$
|
|
57341
|
-
const ownCauseText = (value$
|
|
57377
|
+
const errorMessageOrTag = (value$16) => value(value$16).pipe(when(instanceOf(Error), errorMessage), orElse$1(() => tagOf(value$16)));
|
|
57378
|
+
const messageText = (value$4) => value(textIfNonEmpty(fieldOf(value$4, "message"))).pipe(when(hasText, (message) => message), orElse$1(() => errorMessageOrTag(value$4)));
|
|
57379
|
+
const ownCauseText = (value$15) => value(textIfNonEmpty(fieldOf(value$15, "reason"))).pipe(when(hasText, (reason) => reason), orElse$1(() => messageText(value$15)));
|
|
57342
57380
|
const isPastDepth = (depth) => depth > 4;
|
|
57343
57381
|
const isMissingCause = (cause) => cause === void 0 || cause === null;
|
|
57344
57382
|
function causeText(cause, depth) {
|
|
@@ -57582,16 +57620,32 @@ var MutantsUnapplied = class extends TaggedError()("MutantsUnapplied", {
|
|
|
57582
57620
|
placer: PlacerNameSchema,
|
|
57583
57621
|
mutatorNames: ArraySchema(MutatorNameSchema),
|
|
57584
57622
|
cause: Defect()
|
|
57585
|
-
}) {
|
|
57623
|
+
}) {
|
|
57624
|
+
get message() {
|
|
57625
|
+
return `Failed to apply ${this.mutatorNames.join(", ")} in ${this.fileName}`;
|
|
57626
|
+
}
|
|
57627
|
+
};
|
|
57586
57628
|
var MutantNotApplied = class extends TaggedError()("MutantNotApplied", {
|
|
57587
57629
|
fileName: String$2,
|
|
57588
57630
|
mutatorName: MutatorNameSchema
|
|
57589
|
-
}) {
|
|
57590
|
-
|
|
57631
|
+
}) {
|
|
57632
|
+
get message() {
|
|
57633
|
+
return `Could not apply the ${this.mutatorName} mutant in ${this.fileName}`;
|
|
57634
|
+
}
|
|
57635
|
+
};
|
|
57636
|
+
var NodeWithoutSpan = class extends TaggedError()("NodeWithoutSpan", { fileName: String$2 }) {
|
|
57637
|
+
get message() {
|
|
57638
|
+
return `Node without a span in ${this.fileName}`;
|
|
57639
|
+
}
|
|
57640
|
+
};
|
|
57591
57641
|
var MutantsUnplaced = class extends TaggedError()("MutantsUnplaced", {
|
|
57592
57642
|
fileName: String$2,
|
|
57593
57643
|
detail: String$2
|
|
57594
|
-
}) {
|
|
57644
|
+
}) {
|
|
57645
|
+
get message() {
|
|
57646
|
+
return `Mutants cannot be placed. This shouldn't happen! Unplaced mutants: ${this.detail}`;
|
|
57647
|
+
}
|
|
57648
|
+
};
|
|
57595
57649
|
var PlacementRefused = class extends TaggedError()("PlacementRefused", { message: String$2 }) {};
|
|
57596
57650
|
const LINE_TERMINATOR = /\r\n|[\n\r\u2028\u2029]/g;
|
|
57597
57651
|
const lineStartsOf = (text) => [0, ...[...text.matchAll(LINE_TERMINATOR)].map((match) => match.index + match[0].length)];
|
|
@@ -58348,7 +58402,7 @@ const identifierText = (node) => match$6(fromNullishOr(node), {
|
|
|
58348
58402
|
onNone: () => none(),
|
|
58349
58403
|
onSome: (present) => value(present).pipe(when(isNamedIdentifier, (name) => some$1(name.name)), when(isStringLiteral$1, (literal) => literalValueText(literal.value)), orElse$1(() => none()))
|
|
58350
58404
|
});
|
|
58351
|
-
const literalValueText = (value$
|
|
58405
|
+
const literalValueText = (value$9) => value(value$9).pipe(when(isString$1, (text) => some$1(text)), orElse$1(() => none()));
|
|
58352
58406
|
const moduleExportName = (name) => getOrElse$1(identifierText(name), () => "");
|
|
58353
58407
|
const staticMemberName = (member) => value(member.computed).pipe(when(false, () => identifierText(member.property)), orElse$1(() => none()));
|
|
58354
58408
|
const nodesOutsideFunctions = (root) => {
|
|
@@ -58372,7 +58426,7 @@ const pruneAtFunction = (path) => match$6(onlyWhen(isFunctionLike(path.node), pa
|
|
|
58372
58426
|
});
|
|
58373
58427
|
const moduleCallDataFirst = (module, property, args) => callExpression(memberExpression(module, identifier(property), false), args);
|
|
58374
58428
|
const moduleCall = dual((args) => args.length >= 3, moduleCallDataFirst);
|
|
58375
|
-
const onlyWhenDataFirst = (holds, value$
|
|
58429
|
+
const onlyWhenDataFirst = (holds, value$21) => value(holds).pipe(when(true, () => some$1(value$21)), orElse$1(() => none()));
|
|
58376
58430
|
const onlyWhen = dual((args) => args.length >= 2, onlyWhenDataFirst);
|
|
58377
58431
|
const holdsAny = (conditions) => conditions.some((condition) => condition);
|
|
58378
58432
|
const sameNode = (first, second) => first === second;
|
|
@@ -59900,10 +59954,10 @@ const literalWithoutRegex = (node) => match$6(fromNullishOr(node.bigint), {
|
|
|
59900
59954
|
onSome: (bigint) => bigint,
|
|
59901
59955
|
onNone: () => valueLiteralText(node.value)
|
|
59902
59956
|
});
|
|
59903
|
-
const valueLiteralText = (value$
|
|
59904
|
-
const nonStringLiteralText = (value$
|
|
59905
|
-
const booleanOrBigintText = (value$
|
|
59906
|
-
const bigintText = (value$
|
|
59957
|
+
const valueLiteralText = (value$19) => value(value$19).pipe(when(string, (v) => JSON.stringify(v)), orElse$1(nonStringLiteralText));
|
|
59958
|
+
const nonStringLiteralText = (value$13) => value(value$13).pipe(when(number, (v) => String(v)), orElse$1(booleanOrBigintText));
|
|
59959
|
+
const booleanOrBigintText = (value$20) => value(value$20).pipe(when(boolean, (v) => String(v)), orElse$1(bigintText));
|
|
59960
|
+
const bigintText = (value$8) => value(value$8).pipe(when((candidate) => typeof candidate === "bigint", (v) => `${String(v)}n`), orElse$1(() => "null"));
|
|
59907
59961
|
const flagText = (present, text) => match$1(isTruthy(present), {
|
|
59908
59962
|
onTrue: () => text,
|
|
59909
59963
|
onFalse: () => ""
|
|
@@ -59918,7 +59972,7 @@ const objectExpressionText = (ctx, node) => match$1(node.properties.length === 0
|
|
|
59918
59972
|
onFalse: () => `{ ${nodeListText(ctx, node.properties, PREC.Sequence)} }`
|
|
59919
59973
|
});
|
|
59920
59974
|
const propertyText = (ctx, node) => value(propertyFormOf(node)).pipe(when("accessor", () => `${node.kind} ${propertyKeyText(ctx, node.key, node.computed === true, PREC.Assignment)}${functionValueTailText(ctx, node.value)}`), when("method", () => `${propertyKeyText(ctx, node.key, node.computed === true, PREC.Assignment)}${functionValueTailText(ctx, node.value)}`), when("shorthand", () => identifierNameText(node.key)), when("shorthandDefault", () => shorthandDefaultPropertyText(ctx, node)), orElse$1(() => `${propertyKeyText(ctx, node.key, node.computed === true, PREC.Assignment)}: ${printNodePrec(ctx, node.value, PREC.Assignment)}`));
|
|
59921
|
-
const functionValueTailText = (ctx, value$
|
|
59975
|
+
const functionValueTailText = (ctx, value$7) => value(value$7).pipe(when(isFunctionNode, (fn) => functionTailText(ctx, fn)), orElse$1(() => ""));
|
|
59922
59976
|
const shorthandDefaultPropertyText = (ctx, node) => value(node.value).pipe(when(isAssignmentPattern, (value) => `${identifierNameText(node.key)} = ${printNodePrec(ctx, value.right, PREC.Assignment)}`), orElse$1(() => ""));
|
|
59923
59977
|
const propertyKeyText = (ctx, key, computed, computedPrec) => match$1(computed, {
|
|
59924
59978
|
onTrue: () => `[${dispatchNode(ctx, key, computedPrec)}]`,
|
|
@@ -60057,7 +60111,7 @@ const jsxAttributeValueClauseText = (ctx, value) => match$6(fromNullishOr(value)
|
|
|
60057
60111
|
onSome: (nonNull) => `=${jsxAttributeValueText(ctx, nonNull)}`,
|
|
60058
60112
|
onNone: () => ""
|
|
60059
60113
|
});
|
|
60060
|
-
const jsxAttributeValueText = (ctx, value$
|
|
60114
|
+
const jsxAttributeValueText = (ctx, value$12) => value(value$12).pipe(discriminators("type")({
|
|
60061
60115
|
Literal: (n) => literalText(n),
|
|
60062
60116
|
JSXExpressionContainer: (n) => `{${sequenceNodeText(ctx, n.expression)}}`,
|
|
60063
60117
|
JSXElement: (n) => sequenceNodeText(ctx, n),
|
|
@@ -60099,7 +60153,7 @@ const doWhileStatementText = (ctx, node) => `do ${statementOrBlockText(ctx, node
|
|
|
60099
60153
|
const forStatementText = (ctx, node) => `for (${declarationOrExpressionText(ctx, node.init)}; ${optionalSequenceText(ctx, node.test)}; ${optionalSequenceText(ctx, node.update)}) ${statementOrBlockText(ctx, node.body)}`;
|
|
60100
60154
|
const declarationOrExpressionText = (ctx, node) => match$6(fromNullishOr(node), {
|
|
60101
60155
|
onNone: () => "",
|
|
60102
|
-
onSome: (value$
|
|
60156
|
+
onSome: (value$18) => value(value$18).pipe(discriminators("type")({ VariableDeclaration: (n) => variableDeclarationText(ctx, n) }), orElse$1((n) => printNodePrec(ctx, n, PREC.Sequence)))
|
|
60103
60157
|
});
|
|
60104
60158
|
const optionalSequenceText = (ctx, node) => sequenceNodeText(ctx, node);
|
|
60105
60159
|
const forInStatementText = (ctx, node) => `for (${value(node.left).pipe(discriminators("type")({ VariableDeclaration: (n) => variableDeclarationText(ctx, n) }), orElse$1((n) => printNodePrec(ctx, n, PREC.Sequence)))} in ${printNodePrec(ctx, node.right, PREC.Sequence)}) ${statementOrBlockText(ctx, node.body)}`;
|
|
@@ -60357,7 +60411,7 @@ const identifierName = (node) => getOrUndefined$1(map$8(filter$1(fromNullishOr(n
|
|
|
60357
60411
|
const identifierNameText = (node) => identifierName(node) ?? "";
|
|
60358
60412
|
const privateIdentifierText = (node) => match$6(fromNullishOr(node), {
|
|
60359
60413
|
onNone: () => "",
|
|
60360
|
-
onSome: (value$
|
|
60414
|
+
onSome: (value$17) => value(value$17).pipe(discriminators("type")({ PrivateIdentifier: (n) => `#${n.name}` }), orElse$1(() => ""))
|
|
60361
60415
|
});
|
|
60362
60416
|
const precOf = type().pipe(discriminators("type")({
|
|
60363
60417
|
SequenceExpression: () => PREC.Sequence,
|
|
@@ -60558,7 +60612,11 @@ var FormatOverrideUnclaimed = class extends TaggedError()("FormatOverrideUnclaim
|
|
|
60558
60612
|
fileName: String$2,
|
|
60559
60613
|
formatId: String$2,
|
|
60560
60614
|
reason: String$2
|
|
60561
|
-
}) {
|
|
60615
|
+
}) {
|
|
60616
|
+
get message() {
|
|
60617
|
+
return `Cannot instrument ${this.fileName}: ${this.reason}`;
|
|
60618
|
+
}
|
|
60619
|
+
};
|
|
60562
60620
|
const pinOf = (command) => fromUndefinedOr(command.formatId);
|
|
60563
60621
|
const matchesCommand = (claim, command) => value(pinOf(command)).pipe(when(isSome, (pin) => claim.formatId === pin.value), orElse$1(() => claim.extensions.includes(command.extension)));
|
|
60564
60622
|
const claimFor = (command) => command.claims.find((claim) => matchesCommand(claim, command));
|
|
@@ -60786,8 +60844,16 @@ var MutantKindMismatch = class extends TaggedError()("MutantKindMismatch", {
|
|
|
60786
60844
|
mutantId: MutantId,
|
|
60787
60845
|
mutatorName: MutatorNameSchema,
|
|
60788
60846
|
expected: ExpectedKindSchema
|
|
60789
|
-
}) {
|
|
60790
|
-
|
|
60847
|
+
}) {
|
|
60848
|
+
get message() {
|
|
60849
|
+
return `Expected ${this.expected} for mutant ${this.mutantId} (${this.mutatorName}) in ${this.fileName}`;
|
|
60850
|
+
}
|
|
60851
|
+
};
|
|
60852
|
+
var NoPlacerClaimsNode = class extends TaggedError()("NoPlacerClaimsNode", { fileName: String$2 }) {
|
|
60853
|
+
get message() {
|
|
60854
|
+
return `No placer claims the node in ${this.fileName}`;
|
|
60855
|
+
}
|
|
60856
|
+
};
|
|
60791
60857
|
const claimingPlacer = (facts) => value(facts).pipe(when({
|
|
60792
60858
|
isExpression: true,
|
|
60793
60859
|
expressionIsValid: true
|
|
@@ -60887,7 +60953,11 @@ var MutantsFullyIgnored = class extends TaggedClass()("MutantsFullyIgnored", {
|
|
|
60887
60953
|
var MutantWithoutLocation = class extends TaggedError()("MutantWithoutLocation", {
|
|
60888
60954
|
fileName: String$2,
|
|
60889
60955
|
mutatorName: MutatorNameSchema
|
|
60890
|
-
}) {
|
|
60956
|
+
}) {
|
|
60957
|
+
get message() {
|
|
60958
|
+
return `Mutant without a source location: ${this.mutatorName} in ${this.fileName}`;
|
|
60959
|
+
}
|
|
60960
|
+
};
|
|
60891
60961
|
const reachedLine = (located, line) => value(located.directive.scope).pipe(when(NEXT_LINE, () => located.governedLine === line), when("block", () => true), exhaustive);
|
|
60892
60962
|
const namesMutator = (located, lowerMutatorName) => located.directive.mutatorNames.some((name) => [name === WILDCARD, name.toLowerCase() === lowerMutatorName].some(Boolean));
|
|
60893
60963
|
const lastReachingDirective = (rule, lowerMutatorName, line) => fromNullishOr(rule.findLast((located) => [reachedLine(located, line), namesMutator(located, lowerMutatorName)].every(Boolean)));
|
|
@@ -62240,7 +62310,12 @@ var CheckerFailed = class extends TaggedError()("CheckerFailed", {
|
|
|
62240
62310
|
cause: String$2,
|
|
62241
62311
|
checkerName: String$2,
|
|
62242
62312
|
mutantIds: ArraySchema(Mutant_exports.MutantId)
|
|
62243
|
-
}) {
|
|
62313
|
+
}) {
|
|
62314
|
+
get message() {
|
|
62315
|
+
const mutants = this.mutantIds.length === 0 ? "" : ` for mutants ${this.mutantIds.join(", ")}`;
|
|
62316
|
+
return `Checker "${this.checkerName}" failed${mutants}: ${this.cause}`;
|
|
62317
|
+
}
|
|
62318
|
+
};
|
|
62244
62319
|
var Checker = class extends Service$1()("@systemfsoftware/stryker-js-plugin-interface/Checker.service/Checker") {};
|
|
62245
62320
|
var Checker_exports = /* @__PURE__ */ __exportAll$3({
|
|
62246
62321
|
CheckResultSchema: () => CheckResultSchema,
|
|
@@ -62418,7 +62493,11 @@ var TestRunnerFailed = class extends TaggedError()("TestRunnerFailed", {
|
|
|
62418
62493
|
"mutantRun"
|
|
62419
62494
|
]),
|
|
62420
62495
|
runnerName: String$2
|
|
62421
|
-
}) {
|
|
62496
|
+
}) {
|
|
62497
|
+
get message() {
|
|
62498
|
+
return `Test runner "${this.runnerName}" failed during ${this.phase}: ${this.cause}`;
|
|
62499
|
+
}
|
|
62500
|
+
};
|
|
62422
62501
|
const FileResultDictionarySchema = Record(String$2, Struct({
|
|
62423
62502
|
language: String$2,
|
|
62424
62503
|
source: String$2,
|
|
@@ -62787,7 +62866,11 @@ var ReporterFailed = class extends TaggedError()("ReporterFailed", {
|
|
|
62787
62866
|
cause: String$2,
|
|
62788
62867
|
event: ReporterEventKind,
|
|
62789
62868
|
reporterName: String$2
|
|
62790
|
-
}) {
|
|
62869
|
+
}) {
|
|
62870
|
+
get message() {
|
|
62871
|
+
return `Reporter "${this.reporterName}" failed while handling ${this.event}: ${this.cause}`;
|
|
62872
|
+
}
|
|
62873
|
+
};
|
|
62791
62874
|
const TraceparentHeader = Literal("traceparent");
|
|
62792
62875
|
const TracestateHeader = Literal("tracestate");
|
|
62793
62876
|
const VERSION = String$2.pipe(check$2(isPattern(/^([0-9a-e][0-9a-f]|[0-9a-f][0-9a-e])$/)));
|
|
@@ -62884,12 +62967,20 @@ var BoundaryPayloadRejected = class extends TaggedError()("BoundaryPayloadReject
|
|
|
62884
62967
|
pluginName: String$2,
|
|
62885
62968
|
method: String$2,
|
|
62886
62969
|
cause: String$2
|
|
62887
|
-
}) {
|
|
62970
|
+
}) {
|
|
62971
|
+
get message() {
|
|
62972
|
+
return `Plugin "${this.pluginName}" rejected the payload for ${this.method}: ${this.cause}`;
|
|
62973
|
+
}
|
|
62974
|
+
};
|
|
62888
62975
|
var BoundaryUnrecognizedSignal = class extends TaggedError()("BoundaryUnrecognizedSignal", {
|
|
62889
62976
|
pluginName: String$2,
|
|
62890
62977
|
method: String$2,
|
|
62891
62978
|
signal: String$2
|
|
62892
|
-
}) {
|
|
62979
|
+
}) {
|
|
62980
|
+
get message() {
|
|
62981
|
+
return `Plugin "${this.pluginName}" sent an unrecognized signal "${this.signal}" for ${this.method}`;
|
|
62982
|
+
}
|
|
62983
|
+
};
|
|
62893
62984
|
const BoundaryErrorSchema = Union([
|
|
62894
62985
|
BoundaryPayloadRejected,
|
|
62895
62986
|
BoundaryUnrecognizedSignal,
|
|
@@ -63024,7 +63115,11 @@ var __exportAll = (all, no_symbols) => {
|
|
|
63024
63115
|
//#endregion
|
|
63025
63116
|
//#region ../stryker-js-plugin-runtime/dist/index.mjs
|
|
63026
63117
|
init_esm$2();
|
|
63027
|
-
var TraceContextUnavailable = class extends TaggedError()("TraceContextUnavailable", { reason: Literals(["invalid-span-context", "undecodable-parts"]) }) {
|
|
63118
|
+
var TraceContextUnavailable = class extends TaggedError()("TraceContextUnavailable", { reason: Literals(["invalid-span-context", "undecodable-parts"]) }) {
|
|
63119
|
+
get message() {
|
|
63120
|
+
return value(this.reason).pipe(when("invalid-span-context", () => "Cannot read trace context: the span context is invalid"), when("undecodable-parts", () => "Cannot read trace context: the trace context parts could not be decoded"), exhaustive);
|
|
63121
|
+
}
|
|
63122
|
+
};
|
|
63028
63123
|
const CURRENT_VERSION = "00";
|
|
63029
63124
|
const SAMPLED_FLAG = 1;
|
|
63030
63125
|
const EffectSpanShape = Struct({
|
|
@@ -63214,11 +63309,19 @@ var CheckMutantsInput = class extends TaggedClass()("CheckMutantsInput", {
|
|
|
63214
63309
|
is(SourceFileSchema);
|
|
63215
63310
|
//#endregion
|
|
63216
63311
|
//#region src/check-mutants.workflow.ts
|
|
63217
|
-
var DiagnosticWithoutFileError = class extends TaggedError()("DiagnosticWithoutFileError", { text: String$2 }) {
|
|
63312
|
+
var DiagnosticWithoutFileError = class extends TaggedError()("DiagnosticWithoutFileError", { text: String$2 }) {
|
|
63313
|
+
get message() {
|
|
63314
|
+
return `A compiler diagnostic has no file name: ${this.text}`;
|
|
63315
|
+
}
|
|
63316
|
+
};
|
|
63218
63317
|
var DiagnosticInUnrelatedFileError = class extends TaggedError()("DiagnosticInUnrelatedFileError", {
|
|
63219
63318
|
text: String$2,
|
|
63220
63319
|
fileName: String$2
|
|
63221
|
-
}) {
|
|
63320
|
+
}) {
|
|
63321
|
+
get message() {
|
|
63322
|
+
return `A compiler diagnostic for '${this.fileName}' does not belong to any mutant's file: ${this.text}`;
|
|
63323
|
+
}
|
|
63324
|
+
};
|
|
63222
63325
|
const CheckMutantsTypeId = Symbol.for("@systemfsoftware/stryker-js-typescript-checker/CheckMutants");
|
|
63223
63326
|
const MutantCheckStatusSchema = Union([Struct({ status: Literal("passed") }), Struct({
|
|
63224
63327
|
status: Literal("compileError"),
|
|
@@ -63330,7 +63433,11 @@ var CheckMutantsCommand = class extends TaggedClass()("CheckMutantsCommand", { m
|
|
|
63330
63433
|
var TsConfigParseError = class extends TaggedError()("TsConfigParseError", {
|
|
63331
63434
|
file: String$2,
|
|
63332
63435
|
reason: String$2
|
|
63333
|
-
}) {
|
|
63436
|
+
}) {
|
|
63437
|
+
get message() {
|
|
63438
|
+
return `Could not parse tsconfig file '${this.file}': ${this.reason}`;
|
|
63439
|
+
}
|
|
63440
|
+
};
|
|
63334
63441
|
var TsConfigNotFoundError = class extends TaggedError()("TsConfigNotFoundError", { file: String$2 }) {
|
|
63335
63442
|
get message() {
|
|
63336
63443
|
return `The tsconfig file does not exist at: "${this.file}". Please configure the tsconfig file in your stryker.conf file using "tsconfigFile"`;
|
|
@@ -63435,8 +63542,16 @@ var UnsupportedTypeScriptVersionError = class extends TaggedError()("Unsupported
|
|
|
63435
63542
|
}
|
|
63436
63543
|
};
|
|
63437
63544
|
/** Requested file is not present in the hybrid in-memory file map. */
|
|
63438
|
-
var HybridFileNotFoundError = class extends TaggedError()("HybridFileNotFoundError", { fileName: String$2 }) {
|
|
63439
|
-
|
|
63545
|
+
var HybridFileNotFoundError = class extends TaggedError()("HybridFileNotFoundError", { fileName: String$2 }) {
|
|
63546
|
+
get message() {
|
|
63547
|
+
return `'${this.fileName}' is part of your TypeScript project but could not be found on disk`;
|
|
63548
|
+
}
|
|
63549
|
+
};
|
|
63550
|
+
var HybridMutantOutsideFileError = class extends TaggedError()("HybridMutantOutsideFileError", { fileName: String$2 }) {
|
|
63551
|
+
get message() {
|
|
63552
|
+
return `A mutant's location falls outside '${this.fileName}'`;
|
|
63553
|
+
}
|
|
63554
|
+
};
|
|
63440
63555
|
/**
|
|
63441
63556
|
* Every way the TypeScript compiler can fail while serving a check.
|
|
63442
63557
|
* One tagged error — callers branch only on failure itself; `reason` keeps
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/stryker-js-typescript-checker",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"@opentelemetry/exporter-trace-otlp-http": "^0.222.0",
|
|
28
28
|
"@opentelemetry/sdk-node": "^0.222.0",
|
|
29
29
|
"@opentelemetry/sdk-trace-base": "^2.2.0",
|
|
30
|
-
"@systemfsoftware/effect-cell-types": "^
|
|
30
|
+
"@systemfsoftware/effect-cell-types": "^11.0.0",
|
|
31
31
|
"effect": "4.0.0-rc.117",
|
|
32
32
|
"typescript": "^7",
|
|
33
|
-
"@systemfsoftware/stryker-js-instrumenter": "^10.0.
|
|
34
|
-
"@systemfsoftware/stryker-js-plugin-
|
|
35
|
-
"@systemfsoftware/stryker-js-plugin-
|
|
33
|
+
"@systemfsoftware/stryker-js-instrumenter": "^10.0.1",
|
|
34
|
+
"@systemfsoftware/stryker-js-plugin-runtime": "^6.0.4",
|
|
35
|
+
"@systemfsoftware/stryker-js-plugin-interface": "^10.0.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@effect/platform-node": "4.0.0-rc.117",
|
|
@@ -41,24 +41,24 @@
|
|
|
41
41
|
"@microsoft/api-extractor": "^7",
|
|
42
42
|
"@std/jsonc": "npm:@jsr/std__jsonc@^1",
|
|
43
43
|
"@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
|
|
44
|
-
"@systemfsoftware/effect-gherkin-spec": "^
|
|
45
|
-
"@systemfsoftware/effect-schema-law": "^
|
|
46
|
-
"@systemfsoftware/effect-schema-vite": "^2.2.
|
|
47
|
-
"@systemfsoftware/oxlint-config-recommended": "^3.
|
|
44
|
+
"@systemfsoftware/effect-gherkin-spec": "^6.0.0",
|
|
45
|
+
"@systemfsoftware/effect-schema-law": "^4.0.0",
|
|
46
|
+
"@systemfsoftware/effect-schema-vite": "^2.2.6",
|
|
47
|
+
"@systemfsoftware/oxlint-config-recommended": "^3.2.0",
|
|
48
48
|
"@systemfsoftware/stryker-ignorer-effect-schema-declarations": "latest",
|
|
49
49
|
"@systemfsoftware/stryker-ignorer-in-source-vitest-block": "latest",
|
|
50
50
|
"@systemfsoftware/stryker-js": "latest",
|
|
51
51
|
"@systemfsoftware/stryker-js-typescript-checker": "latest",
|
|
52
52
|
"@systemfsoftware/stryker-js-vitest-runner": "latest",
|
|
53
53
|
"@systemfsoftware/tsconfig": "^2.0.1",
|
|
54
|
-
"@systemfsoftware/vitest": "^0.
|
|
54
|
+
"@systemfsoftware/vitest": "^0.2.0",
|
|
55
55
|
"@types/node": "^24",
|
|
56
56
|
"oxlint": "^1",
|
|
57
57
|
"rimraf": "^6.1.3",
|
|
58
58
|
"tsdown": "^0.23.0",
|
|
59
59
|
"vitest": "^5",
|
|
60
|
-
"@systemfsoftware/stryker-config": "^0.1.0",
|
|
61
60
|
"@systemfsoftware/tsdown-config": "^0.1.0",
|
|
61
|
+
"@systemfsoftware/stryker-config": "^0.1.0",
|
|
62
62
|
"@systemfsoftware/vitest-config": "^0.1.0"
|
|
63
63
|
},
|
|
64
64
|
"inlinedDependencies": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@opentelemetry/sdk-trace-base": "2.11.0",
|
|
82
82
|
"@opentelemetry/sdk-trace-node": "2.11.0",
|
|
83
83
|
"@opentelemetry/semantic-conventions": "1.43.0",
|
|
84
|
-
"@systemfsoftware/effect-cell-types": "
|
|
84
|
+
"@systemfsoftware/effect-cell-types": "11.0.0",
|
|
85
85
|
"effect": "4.0.0-rc.117",
|
|
86
86
|
"oxc-parser": "0.150.0",
|
|
87
87
|
"ws": "8.21.3"
|