@systemfsoftware/stryker-js 0.1.1 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @systemfsoftware/stryker-js
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Plugin code can now ask for the module-loader service instead of touching the host module API: it exposes the same `createRequire`/`isBuiltin` surface as the host module module, and the Node engine supplies it automatically. Plugins that declare their environment through the engine's plugin declaration get the service without extra wiring; upgrades should move the engine and its plugins in the same release.
8
+
9
+ ### Patch Changes
10
+
11
+ - Refreshed builds on the platform-services dependency graph; the packages no longer reach for host builtins directly. No CLI flags or option names change.
12
+
3
13
  ## 0.1.1
4
14
 
5
15
  ### Patch Changes
@@ -0,0 +1,31 @@
1
+ import * as Context from "effect/Context";
2
+ //#region src/Module.d.ts
3
+ /**
4
+ * The subset of `node:module`'s `createRequire` result this port certifies: a
5
+ * require function bound to one path, plus its resolution. Calling it loads
6
+ * the specifier exactly as a module evaluated next to that path would.
7
+ */
8
+ interface ModuleRequire {
9
+ (request: string): unknown;
10
+ resolve(request: string, options?: {
11
+ readonly paths?: readonly string[];
12
+ }): string;
13
+ }
14
+ declare const Module_base: Context.ServiceClass<Module, "@systemfsoftware/stryker-js/Module", {
15
+ readonly createRequire: (filename: string | URL) => ModuleRequire;
16
+ readonly isBuiltin: (moduleName: string) => boolean;
17
+ }>;
18
+ /**
19
+ * Port over the host module loader, shaped as the subset of `node:module`
20
+ * feature code may use: `createRequire` and `isBuiltin`. Resolving a
21
+ * specifier against a project directory, importing a plugin, and asking
22
+ * whether a name is a builtin all go through this one tag; no feature module
23
+ * touches the host module API. The Node implementation ships in
24
+ * `@systemfsoftware/stryker-js-platform-node`; tests substitute a layer
25
+ * returning fixed paths.
26
+ *
27
+ * @since 2.0.0
28
+ */
29
+ declare class Module extends Module_base {}
30
+ //#endregion
31
+ export { ModuleRequire as n, Module as t };
@@ -0,0 +1,2 @@
1
+ import { n as ModuleRequire, t as Module } from "./Module-DUBk7gl2.mjs";
2
+ export { Module, ModuleRequire };
@@ -0,0 +1,16 @@
1
+ import * as Context from "effect/Context";
2
+ //#region src/Module.ts
3
+ /**
4
+ * Port over the host module loader, shaped as the subset of `node:module`
5
+ * feature code may use: `createRequire` and `isBuiltin`. Resolving a
6
+ * specifier against a project directory, importing a plugin, and asking
7
+ * whether a name is a builtin all go through this one tag; no feature module
8
+ * touches the host module API. The Node implementation ships in
9
+ * `@systemfsoftware/stryker-js-platform-node`; tests substitute a layer
10
+ * returning fixed paths.
11
+ *
12
+ * @since 2.0.0
13
+ */
14
+ var Module = class extends Context.Service()("@systemfsoftware/stryker-js/Module") {};
15
+ //#endregion
16
+ export { Module };
@@ -2,6 +2,7 @@ import { n as Checker } from "./Checker-DYgIIEai.mjs";
2
2
  import { J as TestRunner } from "./Mutant-BPRJTF8f.mjs";
3
3
  import { t as Evaluator } from "./Evaluator-DLVXUcVj.mjs";
4
4
  import { t as Ignorer } from "./Ignorer-BUY68FZQ.mjs";
5
+ import { t as Module } from "./Module-DUBk7gl2.mjs";
5
6
  import { c as Reporter } from "./Reporter-eZ3M7lO6.mjs";
6
7
  import * as Context from "effect/Context";
7
8
  import * as S from "effect/Schema";
@@ -118,7 +119,7 @@ interface PluginInterfaces {
118
119
  Ignore: Ignorer;
119
120
  Evaluator: Evaluator;
120
121
  }
121
- type PluginEnvironment = RunConfiguration | SandboxDirectory | FileSystem.FileSystem | Path.Path;
122
+ type PluginEnvironment = RunConfiguration | SandboxDirectory | FileSystem.FileSystem | Module | Path.Path;
122
123
  type AnyPluginContribution = { [K in PluginKind]: PluginContribution<K>; }[PluginKind];
123
124
  type ContributionOf<K extends PluginKind> = Extract<AnyPluginContribution, {
124
125
  readonly kind: K;
package/dist/Plugin.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as PluginEnvironment, c as RunConfiguration, d as declarePlugin, f as PluginContribution, i as MergedPluginServices, l as SandboxDirectory, m as Shadowing, n as ComposedPlugins, o as PluginInterfaces, p as PluginKind, r as ContributionOf, t as AnyPluginContribution, u as composePlugins } from "./Plugin-DypwaPHd.mjs";
1
+ import { a as PluginEnvironment, c as RunConfiguration, d as declarePlugin, f as PluginContribution, i as MergedPluginServices, l as SandboxDirectory, m as Shadowing, n as ComposedPlugins, o as PluginInterfaces, p as PluginKind, r as ContributionOf, t as AnyPluginContribution, u as composePlugins } from "./Plugin-HR2dbiT7.mjs";
2
2
  export { AnyPluginContribution, ComposedPlugins, ContributionOf, MergedPluginServices, PluginContribution, PluginEnvironment, PluginInterfaces, PluginKind, RunConfiguration, SandboxDirectory, Shadowing, composePlugins, declarePlugin };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { i as Checker_d_exports } from "./Checker-DYgIIEai.mjs";
2
2
  import { Z as TestRunner_d_exports, v as Mutant_d_exports } from "./Mutant-BPRJTF8f.mjs";
3
3
  import { r as Ignorer_d_exports } from "./Ignorer-BUY68FZQ.mjs";
4
- import { s as Plugin_d_exports } from "./Plugin-DypwaPHd.mjs";
4
+ import { s as Plugin_d_exports } from "./Plugin-HR2dbiT7.mjs";
5
5
  import { u as Reporter_d_exports } from "./Reporter-eZ3M7lO6.mjs";
6
6
  import { a as Run_d_exports } from "./Run-BudLsVwF.mjs";
7
7
  import { a as Schema_d_exports } from "./Schema-CXKiLnTu.mjs";
@@ -1,4 +1,4 @@
1
- import { c as RunConfiguration } from "./Plugin-DypwaPHd.mjs";
1
+ import { c as RunConfiguration } from "./Plugin-HR2dbiT7.mjs";
2
2
  //#region src/provided-options.d.ts
3
3
  /**
4
4
  * The run's options exactly as the `RunConfiguration` service hands them over.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@systemfsoftware/stryker-js",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
@@ -31,11 +31,11 @@
31
31
  "tsdown": "^0.22.14",
32
32
  "typescript": "^7",
33
33
  "vitest": "^4",
34
- "@systemfsoftware/all": "^1.0.2",
35
- "@systemfsoftware/tsconfig": "^1.3.3",
36
34
  "@systemfsoftware/effect-schema-law": "^2.0.1",
37
35
  "@systemfsoftware/effect-schema-vite": "^2.0.2",
38
- "@systemfsoftware/vitest-config": "^0.1.0"
36
+ "@systemfsoftware/vitest-config": "^0.1.0",
37
+ "@systemfsoftware/tsconfig": "^1.3.3",
38
+ "@systemfsoftware/all": "^1.1.0"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public",
@@ -47,6 +47,7 @@
47
47
  "./Evaluator": "./dist/Evaluator.mjs",
48
48
  "./ExitClass": "./dist/ExitClass.mjs",
49
49
  "./Ignorer": "./dist/Ignorer.mjs",
50
+ "./Module": "./dist/Module.mjs",
50
51
  "./Mutant": "./dist/Mutant.mjs",
51
52
  "./output-file": "./dist/output-file.mjs",
52
53
  "./Plugin": "./dist/Plugin.mjs",