@systemfsoftware/stryker-js-typescript-checker 9.0.1 → 10.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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # @systemfsoftware/stryker-js-typescript-checker
2
2
 
3
+ ## 10.0.1
4
+
5
+ The workspace dogfoods @systemfsoftware/stryker-js 23.0.0 and the TypeScript checker 10.0.0, and every package resolves one @systemfsoftware/effect-cell-types (12.1.4). The TypeScript checker and the vitest runner bundle 12.1.4 in place of 12.0.0, and stryker-js and the checker bundle @jsr/std__jsonc 1.0.3 in place of 1.0.2. Every package that takes @systemfsoftware/effect-cell-types from the catalog publishes the range ^12.1.4 in place of ^12.0.0.
6
+
7
+ The edit-site laws compile each distinct input once instead of on every property run. Only tests change.
8
+
9
+ ## 10.0.0
10
+
11
+ 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.
12
+
13
+ Check the TypeScript checker against frozen real source files in its own test suite, in place of the checker-parity lane.
14
+
15
+ `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.
16
+
17
+ - 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.
18
+ - 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.
19
+
20
+ 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.
21
+
22
+ 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.
23
+
3
24
  ## 9.0.1
4
25
 
5
26
  Updated dependency @systemfsoftware/stryker-js to 21.0.0
package/dist/main.mjs CHANGED
@@ -60848,7 +60848,7 @@ Literals([
60848
60848
  "FinalizerEscape"
60849
60849
  ]);
60850
60850
  //#endregion
60851
- //#region ../../node_modules/.pnpm/@systemfsoftware+effect-cell-types@12.0.0_effect@4.1.2/node_modules/@systemfsoftware/effect-cell-types/dist/rolldown-runtime-D7D4PA-g.mjs
60851
+ //#region ../../node_modules/.pnpm/@systemfsoftware+effect-cell-types@12.1.4_effect@4.1.2/node_modules/@systemfsoftware/effect-cell-types/dist/rolldown-runtime-D7D4PA-g.mjs
60852
60852
  var __defProp$1 = Object.defineProperty;
60853
60853
  var __exportAll$1 = (all, no_symbols) => {
60854
60854
  let target = {};
@@ -60860,7 +60860,7 @@ var __exportAll$1 = (all, no_symbols) => {
60860
60860
  return target;
60861
60861
  };
60862
60862
  //#endregion
60863
- //#region ../../node_modules/.pnpm/@systemfsoftware+effect-cell-types@12.0.0_effect@4.1.2/node_modules/@systemfsoftware/effect-cell-types/dist/index.mjs
60863
+ //#region ../../node_modules/.pnpm/@systemfsoftware+effect-cell-types@12.1.4_effect@4.1.2/node_modules/@systemfsoftware/effect-cell-types/dist/index.mjs
60864
60864
  var Blueprint_exports = /* @__PURE__ */ __exportAll$1({
60865
60865
  IndexId: () => IndexId,
60866
60866
  make: () => make$3$1
@@ -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
  }
@@ -70902,7 +70894,7 @@ const overrideTsconfigOptions = Workflow_exports.make({
70902
70894
  decide: decide$10
70903
70895
  });
70904
70896
  //#endregion
70905
- //#region ../../node_modules/.pnpm/@jsr+std__jsonc@1.0.2/node_modules/@jsr/std__jsonc/parse.js
70897
+ //#region ../../node_modules/.pnpm/@jsr+std__jsonc@1.0.3/node_modules/@jsr/std__jsonc/parse.js
70906
70898
  /**
70907
70899
  * Converts a JSON with Comments (JSONC) string into an object.
70908
70900
  *
@@ -71005,11 +70997,16 @@ var JsoncParser = class {
71005
70997
  case "\"": {
71006
70998
  const startIndex = i;
71007
70999
  let shouldEscapeNext = false;
71000
+ let hasEndOfString = false;
71008
71001
  i++;
71009
71002
  for (; i < this.#length; i++) {
71010
- if (this.#text[i] === "\"" && !shouldEscapeNext) break;
71003
+ if (this.#text[i] === "\"" && !shouldEscapeNext) {
71004
+ hasEndOfString = true;
71005
+ break;
71006
+ }
71011
71007
  shouldEscapeNext = this.#text[i] === "\\" && !shouldEscapeNext;
71012
71008
  }
71009
+ if (!hasEndOfString) throw new SyntaxError("Cannot parse JSONC: unexpected end of JSONC input");
71013
71010
  yield {
71014
71011
  type: "String",
71015
71012
  sourceText: this.#text.substring(startIndex, i + 1),
package/dist/runtime.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
- import { a as groups, c as nodes, d as CheckMutantsInput, f as MutantVerdict, i as describeDiagnostics, l as programDigest, m as CheckMutantsCommand, n as check, o as init, p as tceFieldOf, r as close, s as make$2, t as layer$1, u as DryRunCompileErrors } from "./type-query.handle-DrgF8cok.mjs";
2
+ import { a as groups, c as nodes, d as CheckMutantsInput, f as MutantVerdict, i as describeDiagnostics, l as programDigest, m as CheckMutantsCommand, n as check, o as init, p as tceFieldOf, r as close, s as make$2, t as layer$1, u as DryRunCompileErrors } from "./type-query.handle-CIA1WjKN.mjs";
3
3
  import * as Context from "effect/Context";
4
4
  import { Blueprint, Cell, Sandwich, Workflow } from "@systemfsoftware/effect-cell-types";
5
5
  import { SpanTaxonomy } from "@systemfsoftware/stryker-js-cli-contract";
@@ -920,7 +920,7 @@ const overrideTsconfigOptions = Workflow.make({
920
920
  decide: decide$10
921
921
  });
922
922
  //#endregion
923
- //#region ../../node_modules/.pnpm/@jsr+std__jsonc@1.0.2/node_modules/@jsr/std__jsonc/parse.js
923
+ //#region ../../node_modules/.pnpm/@jsr+std__jsonc@1.0.3/node_modules/@jsr/std__jsonc/parse.js
924
924
  /**
925
925
  * Converts a JSON with Comments (JSONC) string into an object.
926
926
  *
@@ -1023,11 +1023,16 @@ var JsoncParser = class {
1023
1023
  case "\"": {
1024
1024
  const startIndex = i;
1025
1025
  let shouldEscapeNext = false;
1026
+ let hasEndOfString = false;
1026
1027
  i++;
1027
1028
  for (; i < this.#length; i++) {
1028
- if (this.#text[i] === "\"" && !shouldEscapeNext) break;
1029
+ if (this.#text[i] === "\"" && !shouldEscapeNext) {
1030
+ hasEndOfString = true;
1031
+ break;
1032
+ }
1029
1033
  shouldEscapeNext = this.#text[i] === "\\" && !shouldEscapeNext;
1030
1034
  }
1035
+ if (!hasEndOfString) throw new SyntaxError("Cannot parse JSONC: unexpected end of JSONC input");
1031
1036
  yield {
1032
1037
  type: "String",
1033
1038
  sourceText: this.#text.substring(startIndex, i + 1),
@@ -1,2 +1,2 @@
1
- import { t as layer } from "./type-query.handle-DrgF8cok.mjs";
1
+ import { t as layer } from "./type-query.handle-CIA1WjKN.mjs";
2
2
  export { layer };
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.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
@@ -37,12 +37,11 @@
37
37
  "@opentelemetry/exporter-trace-otlp-http": "^0.222.0",
38
38
  "@opentelemetry/sdk-node": "^0.222.0",
39
39
  "@opentelemetry/sdk-trace-base": "^2.2.0",
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",
40
+ "@systemfsoftware/effect-cell-types": "^12.1.4",
41
+ "@systemfsoftware/stryker-js-cli-contract": "^3.0.1",
42
+ "@systemfsoftware/stryker-js-instrumenter": "^16.0.1",
43
+ "@systemfsoftware/stryker-js-plugin-interface": "^19.0.1",
44
+ "@systemfsoftware/stryker-js-plugin-runtime": "^9.0.1",
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": "^23.0.0",
62
+ "@systemfsoftware/stryker-js-typescript-checker": "^10.0.0",
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",
@@ -78,7 +78,7 @@
78
78
  "@effect/platform-node": "4.1.2",
79
79
  "@effect/platform-node-shared": "4.1.2",
80
80
  "@eslint-community/regexpp": "4.12.2",
81
- "@jsr/std__jsonc": "1.0.2",
81
+ "@jsr/std__jsonc": "1.0.3",
82
82
  "@noble/hashes": "2.4.0",
83
83
  "@opentelemetry/api": "1.9.1",
84
84
  "@opentelemetry/api-logs": "0.222.0",
@@ -94,7 +94,7 @@
94
94
  "@opentelemetry/sdk-trace-base": "2.11.0",
95
95
  "@opentelemetry/sdk-trace-node": "2.11.0",
96
96
  "@opentelemetry/semantic-conventions": "1.43.0",
97
- "@systemfsoftware/effect-cell-types": "12.0.0",
97
+ "@systemfsoftware/effect-cell-types": "12.1.4",
98
98
  "effect": "4.1.2",
99
99
  "oxc-parser": "0.150.0"
100
100
  },
@@ -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",