@systemfsoftware/stryker-js-vitest-runner 4.0.2 → 4.0.4

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,23 @@
1
1
  # @systemfsoftware/stryker-js-vitest-runner
2
2
 
3
+ ## 4.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Imports rewired to the collapsed `@systemfsoftware/stryker-js` root entry; each package now co-releases against the root-entry major.
8
+
9
+ - Updated dependencies:
10
+ - @systemfsoftware/effect-cell-types@8.0.0
11
+ - @systemfsoftware/stryker-js@4.0.0
12
+
13
+ ## 4.0.3
14
+
15
+ ### Patch Changes
16
+
17
+ - Releases the workspace so its published versions track the shared dependency graph this change moves.
18
+
19
+ - The `@systemfsoftware/source` export condition is gone. It resolved to a package's TypeScript sources for editors and in-repo typechecks; each package now exports only its built entry. If your tsconfig sets `customConditions: ["@systemfsoftware/source"]`, or a bundler config names that condition, remove it — resolution falls back to the built entry, which is what every consumer already got.
20
+
3
21
  ## 4.0.2
4
22
 
5
23
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,18 +1,20 @@
1
- //#region src/index.d.ts
2
- /**
3
- * The `vitest` test runner, as the plugin the engine loads.
4
- *
5
- * The declared layer asks for the run's resolved options and the sandbox it runs
6
- * in, so the requirement is visible in the type and an engine that does not
7
- * provide it fails to compile.
8
- */
9
- declare const strykerPlugins: import("@systemfsoftware/stryker-js/Plugin").PluginLayerContribution<"TestRunner">[];
10
- /**
11
- * The `vitest` option section as a JSON Schema document, for Stryker's option
12
- * validation — derived from the declaration, never read from a file. It is built
13
- * here, at the entry that contributes it, because a document is a *use* of a
14
- * schema and the schema module exports only declarations.
15
- */
16
- declare const strykerValidationSchema: Record<string, unknown>;
17
- //#endregion
18
- export { strykerPlugins, strykerValidationSchema };
1
+ import { PluginLayerContribution } from '@systemfsoftware/stryker-js';
2
+
3
+ /**
4
+ * The `vitest` test runner, as the plugin the engine loads.
5
+ *
6
+ * The declared layer asks for the run's resolved options and the sandbox it runs
7
+ * in, so the requirement is visible in the type and an engine that does not
8
+ * provide it fails to compile.
9
+ */
10
+ export declare const strykerPlugins: PluginLayerContribution<"TestRunner">[];
11
+
12
+ /**
13
+ * The `vitest` option section as a JSON Schema document, for Stryker's option
14
+ * validation derived from the declaration, never read from a file. It is built
15
+ * here, at the entry that contributes it, because a document is a *use* of a
16
+ * schema and the schema module exports only declarations.
17
+ */
18
+ export declare const strykerValidationSchema: Record<string, unknown>;
19
+
20
+ export { }
package/dist/index.mjs CHANGED
@@ -1,12 +1,9 @@
1
- import { RunConfiguration, SandboxDirectory, declarePlugin } from "@systemfsoftware/stryker-js/Plugin";
1
+ import { INSTRUMENTER_CONSTANTS, Module, RunConfiguration, SandboxDirectory, TestRunner, TestRunnerFailed, declarePlugin, errorToString, normalizeFileName, testFilesProvided } from "@systemfsoftware/stryker-js";
2
2
  import * as Effect$1 from "effect/Effect";
3
3
  import * as Layer from "effect/Layer";
4
4
  import * as S from "effect/Schema";
5
5
  import { createVitest } from "vitest/node";
6
6
  import { Cell, Workflow } from "@systemfsoftware/effect-cell-types";
7
- import { Module } from "@systemfsoftware/stryker-js/Module";
8
- import { INSTRUMENTER_CONSTANTS, errorToString, normalizeFileName } from "@systemfsoftware/stryker-js/Mutant";
9
- import { TestRunner, TestRunnerFailed, testFilesProvided } from "@systemfsoftware/stryker-js/TestRunner";
10
7
  import * as Context from "effect/Context";
11
8
  import * as FileSystem from "effect/FileSystem";
12
9
  import * as Match from "effect/Match";
@@ -474,7 +471,6 @@ const decideVitestDryRun = (command) => {
474
471
  errorMessage: `An error occurred outside of a test run: ${command.externalErrorText}`
475
472
  })), Match.orElse(() => DryRunComplete.make({ testsJson })))));
476
473
  };
477
- const SOURCE_CONDITION = "@systemfsoftware/source";
478
474
  const TYPESCRIPT_SOURCE_EXTENSIONS = [
479
475
  ".ts",
480
476
  ".tsx",
@@ -482,7 +478,7 @@ const TYPESCRIPT_SOURCE_EXTENSIONS = [
482
478
  ];
483
479
  const isTypescriptSourcePath = (filePath) => TYPESCRIPT_SOURCE_EXTENSIONS.some((extension) => filePath.endsWith(extension));
484
480
  const typescriptSourcePath = (filePath) => Option.getOrUndefined(Option.filter(Option.some(filePath), isTypescriptSourcePath));
485
- const sourceTargetOf = (entry) => Match.value(entry).pipe(Match.when(Match.string, (filePath) => typescriptSourcePath(filePath)), Match.orElse((conditions) => Option.getOrUndefined(Option.flatMap(recordOption(conditions), (record) => getStringField(record, SOURCE_CONDITION)))));
481
+ const sourceTargetOf = (entry) => Match.value(entry).pipe(Match.when(Match.string, (filePath) => typescriptSourcePath(filePath)), Match.orElse(() => void 0));
486
482
  const subpathSpecifier = (packageName, exportKey) => Match.value(exportKey.startsWith("./")).pipe(Match.when(true, () => `${packageName}/${exportKey.slice(2)}`), Match.orElse(() => void 0));
487
483
  const specifierForExport = (packageName, exportKey) => Match.value(exportKey).pipe(Match.when(".", () => packageName), Match.when("./package.json", () => void 0), Match.orElse((key) => subpathSpecifier(packageName, key)));
488
484
  const namedExports = (manifest) => Option.flatMap(Option.filter(Option.fromNullishOr(manifest.name), (name) => name.length > 0), (name) => Option.map(Option.fromNullishOr(manifest.exports), (exportMap) => ({
@@ -717,7 +713,7 @@ const makeVitestRunnerLayer = (input) => Layer.effect(TestRunner, Effect$1.gen(f
717
713
  }, {
718
714
  resolve: {
719
715
  alias: [...aliases],
720
- conditions: ["@systemfsoftware/source", "import"]
716
+ conditions: ["import"]
721
717
  },
722
718
  plugins: [plugin]
723
719
  }),
@@ -953,7 +949,7 @@ const makeVitestRunnerLayer = (input) => Layer.effect(TestRunner, Effect$1.gen(f
953
949
  cause: errorToString(cause)
954
950
  });
955
951
  })()));
956
- const mutantRun = (options) => Cell.run(mutantRunCell, options).pipe(Effect$1.provideService(VitestHarness, harnessImpl), Effect$1.mapError((cause) => (() => {
952
+ const mutantRun = (options) => mutantRunCell.run(options).pipe(Effect$1.provideService(VitestHarness, harnessImpl), Effect$1.mapError((cause) => (() => {
957
953
  if (cause instanceof TestRunnerFailed) return cause;
958
954
  return new TestRunnerFailed({
959
955
  runnerName: "vitest",
@@ -1 +1 @@
1
- export {}
1
+ export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-js-vitest-runner",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
@@ -31,8 +31,8 @@
31
31
  "coverageAnalysis": "perTest"
32
32
  },
33
33
  "dependencies": {
34
- "@systemfsoftware/effect-cell-types": "^7.0.0",
35
- "@systemfsoftware/stryker-js": "^3.0.1"
34
+ "@systemfsoftware/stryker-js": "^4.0.0",
35
+ "@systemfsoftware/effect-cell-types": "^8.0.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "effect": "4.0.0-rc.112",
@@ -41,7 +41,8 @@
41
41
  "devDependencies": {
42
42
  "@effect/platform-node": "4.0.0-rc.112",
43
43
  "@effect/vitest": "4.0.0-rc.112",
44
- "@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
44
+ "@microsoft/api-extractor": "^7.58.7",
45
+ "@systemfsoftware/arethetypeswrong-cli": "^4.1.0",
45
46
  "@types/node": "^24",
46
47
  "@vitest/browser-playwright": "^4",
47
48
  "effect": "4.0.0-rc.112",
@@ -50,21 +51,23 @@
50
51
  "tsdown": "^0.22.14",
51
52
  "typescript": "^7",
52
53
  "vitest": "^4",
53
- "@systemfsoftware/effect-gherkin-spec": "^4.0.1",
54
+ "@systemfsoftware/all": "^2.0.2",
55
+ "@systemfsoftware/effect-gherkin-spec": "^4.0.2",
54
56
  "@systemfsoftware/oxlint-config": "^0.1.0",
55
- "@systemfsoftware/tsconfig": "^1.3.3",
56
- "@systemfsoftware/vitest-config": "^0.1.0",
57
- "@systemfsoftware/all": "^2.0.0"
57
+ "@systemfsoftware/tsconfig": "^1.3.4",
58
+ "@systemfsoftware/vitest-config": "^0.1.0"
58
59
  },
59
60
  "publishConfig": {
60
61
  "provenance": true
61
62
  },
62
63
  "scripts": {
63
64
  "clean": "rimraf dist",
64
- "build": "tsdown",
65
+ "build": "tsdown && pnpm api:check",
65
66
  "typecheck": "tsc --noEmit --incremental",
66
67
  "attw": "attw --pack .",
67
68
  "test": "vitest run",
68
- "lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; oxlint . --format=${f:-default}"
69
+ "lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; oxlint . --format=${f:-default}",
70
+ "api:check": "tsdown && concurrently --kill-others-on-fail \"api-extractor run\" \"api-extractor run --config api-extractor.stryker-setup.json\"",
71
+ "api:update": "concurrently --kill-others-on-fail \"api-extractor run --local\" \"api-extractor run --local --config api-extractor.stryker-setup.json\""
69
72
  }
70
73
  }