@systemfsoftware/stryker-js-typescript-checker 9.0.1 → 10.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/main.mjs +16 -24
  3. package/package.json +14 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @systemfsoftware/stryker-js-typescript-checker
2
2
 
3
+ ## 10.0.0
4
+
5
+ The package manifest's `inlinedDependencies` now names the effect 4.1.2 the checker bundles. It had said 4.1.4, a version the workspace pins away from.
6
+
7
+ Check the TypeScript checker against frozen real source files in its own test suite, in place of the checker-parity lane.
8
+
9
+ `effect` is a peer dependency (`^4.1.2`) of every package whose library entry points import it, so a consumer's schemas, layers and errors and these packages' share one effect instance.
10
+
11
+ - cli-contract, plugin-interface, instrumenter, typescript-checker and plugin-runtime declared `effect` as a dependency. A consumer on another 4.1.x got a second copy, and the contract's `ShardPlan` no longer type-checked against the consumer's effect. They now peer on it; install `effect` yourself.
12
+ - stryker-js and the html-reporter already peered on `effect`; the floor rises from 4.1.0 to 4.1.2, the version these packages are built and tested with.
13
+
14
+ The processes Stryker starts are unchanged: the CLI (`main.mjs`), the TypeScript checker's worker and the vitest runner's worker bundle their own effect 4.1.2. The flake package `stryker-package` now declares `effect` itself.
15
+
16
+ The install section names `pnpm add` and the npm packages instead of the flake. The workspace takes the released packages it dogfoods from npm; no published manifest changes.
17
+
3
18
  ## 9.0.1
4
19
 
5
20
  Updated dependency @systemfsoftware/stryker-js to 21.0.0
package/dist/main.mjs CHANGED
@@ -64577,7 +64577,7 @@ const isEmptyNumber = (value$14) => value(value$14).pipe(when(0, () => true), or
64577
64577
  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));
64578
64578
  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})`));
64579
64579
  const formatError = (error) => value(error.stack).pipe(when(hasText, (stack) => `${error.name}: ${error.message}\n${stack}`), orElse$1(() => `${error.name}: ${error.message}`));
64580
- const isJsonPrimitive = (value$9) => value(value$9).pipe(when(number, () => true), when(boolean, () => true), when(bigint, () => true), orElse$1(() => false));
64580
+ const isJsonPrimitive = (value$8) => value(value$8).pipe(when(number, () => true), when(boolean, () => true), when(bigint, () => true), orElse$1(() => false));
64581
64581
  const jsonText = (error) => getOrElse(try_$2({
64582
64582
  try: () => textIfNonEmpty(JSON.stringify(error)),
64583
64583
  catch: () => void 0
@@ -64608,13 +64608,13 @@ function nonStringTextOf(error) {
64608
64608
  return primitiveJsonOf(error) ?? stringifyRest(error);
64609
64609
  }
64610
64610
  const errorText = (error) => value(error).pipe(when(isErrnoException, formatErrnoException), orElse$1(() => formatError(error)));
64611
- const errorNameOf = (value$8) => value(value$8).pipe(when(instanceOf(Error), (error) => textIfNonEmpty(error.name)), orElse$1(() => void 0));
64612
- const tagOf = (value$6) => value(textIfNonEmpty(fieldOf(value$6, "_tag"))).pipe(when(hasText, (tag) => tag), orElse$1(() => errorNameOf(value$6)));
64611
+ const errorNameOf = (value$7) => value(value$7).pipe(when(instanceOf(Error), (error) => textIfNonEmpty(error.name)), orElse$1(() => void 0));
64612
+ const tagOf = (value$5) => value(textIfNonEmpty(fieldOf(value$5, "_tag"))).pipe(when(hasText, (tag) => tag), orElse$1(() => errorNameOf(value$5)));
64613
64613
  const textWithNested = (own, nested) => value(own).pipe(when(hasText, (text) => appendNested(text, nested)), orElse$1(() => nested));
64614
64614
  const appendNested = (own, nested) => value(nested).pipe(when(hasText, (text) => `${own}: ${text}`), orElse$1(() => own));
64615
64615
  const errorMessage = (error) => value(error.message.length > 0).pipe(when(true, () => error.message), orElse$1(() => tagOf(error)));
64616
64616
  const errorMessageOrTag = (value$20) => value(value$20).pipe(when(instanceOf(Error), errorMessage), orElse$1(() => tagOf(value$20)));
64617
- const messageText = (value$7) => value(textIfNonEmpty(fieldOf(value$7, "message"))).pipe(when(hasText, (message) => message), orElse$1(() => errorMessageOrTag(value$7)));
64617
+ const messageText = (value$6) => value(textIfNonEmpty(fieldOf(value$6, "message"))).pipe(when(hasText, (message) => message), orElse$1(() => errorMessageOrTag(value$6)));
64618
64618
  const ownCauseText = (value$19) => value(textIfNonEmpty(fieldOf(value$19, "reason"))).pipe(when(hasText, (reason) => reason), orElse$1(() => messageText(value$19)));
64619
64619
  const isPastDepth = (depth) => depth > 4;
64620
64620
  const isMissingCause = (cause) => cause === void 0 || cause === null;
@@ -65593,7 +65593,7 @@ const identifierText = (node) => match$7(fromNullishOr(node), {
65593
65593
  onNone: () => none(),
65594
65594
  onSome: (present) => value(present).pipe(when(isNamedIdentifier, (name) => some$1(name.name)), when(isStringLiteral$1, (literal) => literalValueText(literal.value)), orElse$1(() => none()))
65595
65595
  });
65596
- const literalValueText = (value$11) => value(value$11).pipe(when(isString$3, (text) => some$1(text)), orElse$1(() => none()));
65596
+ const literalValueText = (value$10) => value(value$10).pipe(when(isString$3, (text) => some$1(text)), orElse$1(() => none()));
65597
65597
  const moduleExportName = (name) => getOrElse$1(identifierText(name), () => "");
65598
65598
  const staticMemberName = (member) => value(member.computed).pipe(when(false, () => identifierText(member.property)), orElse$1(() => none()));
65599
65599
  const nodesOutsideFunctions = (root) => {
@@ -67393,7 +67393,7 @@ const literalWithoutRegex = (node) => match$7(fromNullishOr(node.bigint), {
67393
67393
  const valueLiteralText = (value$23) => value(value$23).pipe(when(string, (v) => JSON.stringify(v)), orElse$1(nonStringLiteralText));
67394
67394
  const nonStringLiteralText = (value$13) => value(value$13).pipe(when(number, (v) => String(v)), orElse$1(booleanOrBigintText));
67395
67395
  const booleanOrBigintText = (value$4) => value(value$4).pipe(when(boolean, (v) => String(v)), orElse$1(bigintText));
67396
- const bigintText = (value$12) => value(value$12).pipe(when((candidate) => typeof candidate === "bigint", (v) => `${String(v)}n`), orElse$1(() => "null"));
67396
+ const bigintText = (value$11) => value(value$11).pipe(when((candidate) => typeof candidate === "bigint", (v) => `${String(v)}n`), orElse$1(() => "null"));
67397
67397
  const flagText = (present, text) => match$1(isTruthy(present), {
67398
67398
  onTrue: () => text,
67399
67399
  onFalse: () => ""
@@ -67408,7 +67408,7 @@ const objectExpressionText = (ctx, node) => match$1(node.properties.length === 0
67408
67408
  onFalse: () => `{ ${nodeListText(ctx, node.properties, PREC.Sequence)} }`
67409
67409
  });
67410
67410
  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)}`));
67411
- const functionValueTailText = (ctx, value$10) => value(value$10).pipe(when(isFunctionNode, (fn) => functionTailText(ctx, fn)), orElse$1(() => ""));
67411
+ const functionValueTailText = (ctx, value$9) => value(value$9).pipe(when(isFunctionNode, (fn) => functionTailText(ctx, fn)), orElse$1(() => ""));
67412
67412
  const shorthandDefaultPropertyText = (ctx, node) => value(node.value).pipe(when(isAssignmentPattern, (value) => `${identifierNameText(node.key)} = ${printNodePrec(ctx, value.right, PREC.Assignment)}`), orElse$1(() => ""));
67413
67413
  const propertyKeyText = (ctx, key, computed, computedPrec) => match$1(computed, {
67414
67414
  onTrue: () => `[${dispatchNode(ctx, key, computedPrec)}]`,
@@ -68537,21 +68537,12 @@ var MutantKept = class extends TaggedClass()("MutantKept", {}) {
68537
68537
  [MutantSetOutcomeTypeId] = MutantSetOutcomeTypeId;
68538
68538
  };
68539
68539
  const MutantSetDecision = ArraySchema(Union([MutantSuppressed, MutantKept]));
68540
- const canonicalForm = (text) => stripOuterParentheses(text.trim());
68541
- const stripOuterParentheses = (text) => value(wrapsWhole(text)).pipe(when(true, () => stripOuterParentheses(text.slice(1, -1).trim())), orElse$1(() => text));
68542
- const parenDepthDelta = (character) => value(character).pipe(when("(", () => 1), when(")", () => -1), orElse$1(() => 0));
68543
- const depthsAfter = (text) => text.split("").reduce((depths, character) => [...depths, getOrElse$1(last(depths), () => 0) + parenDepthDelta(character)], []);
68544
- const wrapsWhole = (text) => {
68545
- const depths = depthsAfter(text);
68546
- return [
68547
- text.startsWith("("),
68548
- text.endsWith(")"),
68549
- depths.length > 0,
68550
- depths.slice(0, -1).every((depth) => depth >= 1),
68551
- getOrElse$1(last(depths), () => 0) === 0
68552
- ].every(Boolean);
68553
- };
68554
- const defaultOnly = (policy, value$5) => value(policy).pipe(when("full", () => none()), when("default", value$5), exhaustive);
68540
+ /**
68541
+ * The code a candidate plants, as the instrumenter's printer wrote it from the node the placers plant. Two candidates
68542
+ * plant the same code exactly when these texts are equal, so the policy compares text and reparses nothing.
68543
+ */
68544
+ const canonicalForm = (text) => text.trim();
68545
+ const defaultOnly = (policy, value$12) => value(policy).pipe(when("full", () => none()), when("default", value$12), exhaustive);
68555
68546
  const printedAs = (code) => canonicalForm(code);
68556
68547
  const printsSomething = (code) => printedAs(code).length > 0;
68557
68548
  const samePrintedCode = (left, right) => [printsSomething(left), printedAs(left) === printedAs(right)].every(Boolean);
@@ -69272,6 +69263,7 @@ const mutablesFor = (frame, location, context) => {
69272
69263
  const ignorerAnswer = getOrUndefined$1(ignorerAnswerFor(frame.node, ancestors, context.ignorers));
69273
69264
  const aridReason = getOrUndefined$1(aridReasonOf(frame, context.mutantSetPolicy, context.aridImportTable));
69274
69265
  const originalCode = printNode(frame.node);
69266
+ const plantedOriginal = printNode(unwrapParenthesizedExpression(frame.node));
69275
69267
  return replacements.map(({ mutatorName, replacement }) => {
69276
69268
  const replacementCode = printNode(replacement);
69277
69269
  const tuple = {
@@ -69294,8 +69286,8 @@ const mutablesFor = (frame, location, context) => {
69294
69286
  ignorerAnswer,
69295
69287
  ...aridReason === void 0 ? {} : { aridReason },
69296
69288
  mutantSet: {
69297
- originalCode,
69298
- replacementCode
69289
+ originalCode: plantedOriginal,
69290
+ replacementCode: printNode(unwrapParenthesizedExpression(replacement))
69299
69291
  },
69300
69292
  subsumption: subsumptionReplacementOf(mutatorName, replacement)
69301
69293
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-js-typescript-checker",
3
- "version": "9.0.1",
3
+ "version": "10.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
@@ -38,11 +38,10 @@
38
38
  "@opentelemetry/sdk-node": "^0.222.0",
39
39
  "@opentelemetry/sdk-trace-base": "^2.2.0",
40
40
  "@systemfsoftware/effect-cell-types": "^12.0.0",
41
- "@systemfsoftware/stryker-js-cli-contract": "^2.0.0",
42
- "@systemfsoftware/stryker-js-instrumenter": "^15.0.0",
43
- "@systemfsoftware/stryker-js-plugin-interface": "^18.0.0",
44
- "@systemfsoftware/stryker-js-plugin-runtime": "^8.0.1",
45
- "effect": "^4.1.0",
41
+ "@systemfsoftware/stryker-js-cli-contract": "^3.0.0",
42
+ "@systemfsoftware/stryker-js-instrumenter": "^16.0.0",
43
+ "@systemfsoftware/stryker-js-plugin-interface": "^19.0.0",
44
+ "@systemfsoftware/stryker-js-plugin-runtime": "^9.0.0",
46
45
  "typescript": "^7"
47
46
  },
48
47
  "devDependencies": {
@@ -57,16 +56,17 @@
57
56
  "@systemfsoftware/effect-schema-law": "^5.0.0",
58
57
  "@systemfsoftware/oxlint-config-recommended": "^4.0.0",
59
58
  "@systemfsoftware/stryker-config": "^0.1.0",
60
- "@systemfsoftware/stryker-ignorer-effect-schema-declarations": "file:../../.deps/stryker-ignorer-effect-schema-declarations.tgz",
61
- "@systemfsoftware/stryker-ignorer-in-source-vitest-block": "file:../../.deps/stryker-ignorer-in-source-vitest-block.tgz",
62
- "@systemfsoftware/stryker-js": "file:../../.deps/stryker-js.tgz",
63
- "@systemfsoftware/stryker-js-typescript-checker": "file:../../.deps/stryker-js-typescript-checker.tgz",
64
- "@systemfsoftware/stryker-js-vitest-runner": "file:../../.deps/stryker-js-vitest-runner.tgz",
59
+ "@systemfsoftware/stryker-ignorer-effect-schema-declarations": "^0.3.1",
60
+ "@systemfsoftware/stryker-ignorer-in-source-vitest-block": "^0.1.3",
61
+ "@systemfsoftware/stryker-js": "^22.0.0",
62
+ "@systemfsoftware/stryker-js-typescript-checker": "^9.0.1",
63
+ "@systemfsoftware/stryker-js-vitest-runner": "^10.1.0",
65
64
  "@systemfsoftware/tsconfig": "^2.0.1",
66
65
  "@systemfsoftware/tsdown-config": "^0.1.0",
67
66
  "@systemfsoftware/vitest": "^2.0.0",
68
67
  "@systemfsoftware/vitest-config": "^0.1.0",
69
68
  "@types/node": "^24",
69
+ "effect": "^4.1.2",
70
70
  "fast-check": "^4",
71
71
  "oxlint": "~1.90.0",
72
72
  "rimraf": "^6.1.3",
@@ -102,6 +102,9 @@
102
102
  "access": "public",
103
103
  "provenance": true
104
104
  },
105
+ "peerDependencies": {
106
+ "effect": "^4.1.2"
107
+ },
105
108
  "scripts": {
106
109
  "clean": "rimraf dist",
107
110
  "build": "tsdown",