@systemfsoftware/stryker-js 0.1.0 → 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 +16 -0
- package/dist/Module-DUBk7gl2.d.mts +31 -0
- package/dist/Module.d.mts +2 -0
- package/dist/Module.mjs +16 -0
- package/dist/{Plugin-ZYNaWrl7.d.mts → Plugin-HR2dbiT7.d.mts} +3 -2
- package/dist/Plugin.d.mts +1 -1
- package/dist/{Schema-C7nahULg.mjs → Schema-BAKDG_jC.mjs} +3 -8
- package/dist/{Schema-Df2kA6F7.d.mts → Schema-CXKiLnTu.d.mts} +1 -1
- package/dist/Schema.d.mts +1 -1
- package/dist/Schema.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/provided-options.d.mts +1 -1
- package/package.json +9 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
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
|
+
|
|
13
|
+
## 0.1.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Re-published against the oxc-based instrumenter: workspace dependency ranges move to the new instrumenter major; no package's own behavior changes in this release.
|
|
18
|
+
|
|
3
19
|
## 0.1.0
|
|
4
20
|
|
|
5
21
|
### Major 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 };
|
package/dist/Module.mjs
ADDED
|
@@ -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";
|
|
@@ -60,6 +61,7 @@ declare const RunConfiguration_base: Context.ServiceClass<RunConfiguration, "~@s
|
|
|
60
61
|
readonly ignoreStatic: boolean;
|
|
61
62
|
readonly incremental: boolean;
|
|
62
63
|
readonly incrementalFile: string;
|
|
64
|
+
readonly progressStreamFile: string;
|
|
63
65
|
readonly force: boolean;
|
|
64
66
|
readonly fileLogLevel: "debug" | "error" | "fatal" | "info" | "off" | "trace" | "warn";
|
|
65
67
|
readonly inPlace: boolean;
|
|
@@ -68,7 +70,6 @@ declare const RunConfiguration_base: Context.ServiceClass<RunConfiguration, "~@s
|
|
|
68
70
|
readonly maxTestRunnerReuse: number;
|
|
69
71
|
readonly mutate: readonly string[];
|
|
70
72
|
readonly mutator: {
|
|
71
|
-
readonly plugins: readonly (string | readonly unknown[])[] | null;
|
|
72
73
|
readonly excludedMutations: readonly string[];
|
|
73
74
|
};
|
|
74
75
|
readonly packageManager?: "npm" | "pnpm" | "yarn" | undefined;
|
|
@@ -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-
|
|
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 };
|
|
@@ -96,10 +96,7 @@ const MutationScoreThresholdsSchema = S.Struct({
|
|
|
96
96
|
low: defaulted(Percentage, 60),
|
|
97
97
|
break: defaulted(S.NullOr(Percentage), null)
|
|
98
98
|
});
|
|
99
|
-
const MutatorDescriptor = Wire.wire({
|
|
100
|
-
plugins: defaulted(Wire.mint(S.NullOr(Wire.mint(S.Array(Wire.mint(S.Union([Wire.mint(S.String), Wire.mint(S.Array(Wire.mint(S.Unknown)))])))))), null),
|
|
101
|
-
excludedMutations: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), [])
|
|
102
|
-
});
|
|
99
|
+
const MutatorDescriptor = Wire.wire({ excludedMutations: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []) });
|
|
103
100
|
const WarningOptions = openStruct({
|
|
104
101
|
unknownOptions: defaulted(Wire.mint(S.Boolean), true),
|
|
105
102
|
preprocessorErrors: defaulted(Wire.mint(S.Boolean), true),
|
|
@@ -129,6 +126,7 @@ const StrykerOptionsSchema = S.StructWithRest(S.Struct({
|
|
|
129
126
|
ignoreStatic: defaulted(Wire.mint(S.Boolean), false),
|
|
130
127
|
incremental: defaulted(Wire.mint(S.Boolean), false),
|
|
131
128
|
incrementalFile: defaulted(Wire.mint(S.String), "reports/stryker-incremental.json"),
|
|
129
|
+
progressStreamFile: defaulted(Wire.mint(S.String), "reports/mutation-stream.jsonl"),
|
|
132
130
|
force: defaulted(Wire.mint(S.Boolean), false),
|
|
133
131
|
fileLogLevel: defaulted(LogLevel, RENDERED_OPTION_DEFAULTS$1.fileLogLevel),
|
|
134
132
|
inPlace: defaulted(Wire.mint(S.Boolean), false),
|
|
@@ -136,10 +134,7 @@ const StrykerOptionsSchema = S.StructWithRest(S.Struct({
|
|
|
136
134
|
maxConcurrentTestRunners: defaulted(Wire.mint(S.Finite), 9007199254740991),
|
|
137
135
|
maxTestRunnerReuse: defaulted(Wire.mint(S.Finite), 0),
|
|
138
136
|
mutate: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), ["{src,lib}/**/!(*.+(s|S)pec|*.+(t|T)est).+(cjs|mjs|js|ts|mts|cts|jsx|tsx|html|vue|svelte)", "!{src,lib}/**/__tests__/**/*.+(cjs|mjs|js|ts|mts|cts|jsx|tsx|html|vue|svelte)"]),
|
|
139
|
-
mutator: defaulted(MutatorDescriptor, {
|
|
140
|
-
plugins: null,
|
|
141
|
-
excludedMutations: []
|
|
142
|
-
}),
|
|
137
|
+
mutator: defaulted(MutatorDescriptor, { excludedMutations: [] }),
|
|
143
138
|
packageManager: S.optional(PackageManager),
|
|
144
139
|
plugins: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), ["@systemfsoftware/stryker-js-*"]),
|
|
145
140
|
appendPlugins: defaulted(Wire.mint(S.Array(Wire.mint(S.String))), []),
|
|
@@ -35,6 +35,7 @@ declare const StrykerOptionsSchema: S.StructWithRest<S.Struct<{
|
|
|
35
35
|
readonly ignoreStatic: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
|
|
36
36
|
readonly incremental: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
|
|
37
37
|
readonly incrementalFile: S.withDecodingDefaultKey<S.String, never> & Wire.Mark;
|
|
38
|
+
readonly progressStreamFile: S.withDecodingDefaultKey<S.String, never> & Wire.Mark;
|
|
38
39
|
readonly force: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
|
|
39
40
|
readonly fileLogLevel: S.withDecodingDefaultKey<S.Literals<readonly ["off", "fatal", "error", "warn", "info", "debug", "trace"]>, never> & Wire.Mark;
|
|
40
41
|
readonly inPlace: S.withDecodingDefaultKey<S.Boolean, never> & Wire.Mark;
|
|
@@ -43,7 +44,6 @@ declare const StrykerOptionsSchema: S.StructWithRest<S.Struct<{
|
|
|
43
44
|
readonly maxTestRunnerReuse: S.withDecodingDefaultKey<S.Finite, never> & Wire.Mark;
|
|
44
45
|
readonly mutate: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
|
|
45
46
|
readonly mutator: S.withDecodingDefaultKey<S.Struct<{
|
|
46
|
-
plugins: S.withDecodingDefaultKey<S.NullOr<S.$Array<S.Union<readonly [S.String & Wire.Mark, S.$Array<S.Unknown & Wire.Mark> & Wire.Mark]> & Wire.Mark> & Wire.Mark>, never> & Wire.Mark;
|
|
47
47
|
excludedMutations: S.withDecodingDefaultKey<S.$Array<S.String & Wire.Mark>, never> & Wire.Mark;
|
|
48
48
|
}>, never> & Wire.Mark;
|
|
49
49
|
readonly packageManager: S.optional<S.Literals<readonly ["npm", "yarn", "pnpm"]>>;
|
package/dist/Schema.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as strykerReportBugUrl, d as PackageManager, f as PartialStrykerOptions, h as StrykerOptionsSchema, i as RENDERED_OPTION_DEFAULTS, l as CoverageAnalysisMode, m as StrykerOptions, n as Primitive, o as propertyPath, p as ReportType, r as PropertyPathOverloads, s as strykerCoreSchema, t as KnownKeys, u as LogLevel } from "./Schema-
|
|
1
|
+
import { c as strykerReportBugUrl, d as PackageManager, f as PartialStrykerOptions, h as StrykerOptionsSchema, i as RENDERED_OPTION_DEFAULTS, l as CoverageAnalysisMode, m as StrykerOptions, n as Primitive, o as propertyPath, p as ReportType, r as PropertyPathOverloads, s as strykerCoreSchema, t as KnownKeys, u as LogLevel } from "./Schema-CXKiLnTu.mjs";
|
|
2
2
|
export { CoverageAnalysisMode, type CoverageAnalysisMode as CoverageAnalysisModeType, KnownKeys, LogLevel, type LogLevel as LogLevelType, PackageManager, type PackageManager as PackageManagerType, type PartialStrykerOptions, Primitive, PropertyPathOverloads, RENDERED_OPTION_DEFAULTS, ReportType, type ReportType as ReportTypeType, type StrykerOptions, StrykerOptionsSchema, propertyPath, strykerCoreSchema, strykerReportBugUrl };
|
package/dist/Schema.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as strykerReportBugUrl, c as PackageManager, i as strykerCoreSchema, l as ReportType, o as CoverageAnalysisMode, r as propertyPath, s as LogLevel, t as RENDERED_OPTION_DEFAULTS, u as StrykerOptionsSchema } from "./Schema-
|
|
1
|
+
import { a as strykerReportBugUrl, c as PackageManager, i as strykerCoreSchema, l as ReportType, o as CoverageAnalysisMode, r as propertyPath, s as LogLevel, t as RENDERED_OPTION_DEFAULTS, u as StrykerOptionsSchema } from "./Schema-BAKDG_jC.mjs";
|
|
2
2
|
export { CoverageAnalysisMode, LogLevel, PackageManager, RENDERED_OPTION_DEFAULTS, ReportType, StrykerOptionsSchema, propertyPath, strykerCoreSchema, strykerReportBugUrl };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
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
|
-
import { a as Schema_d_exports } from "./Schema-
|
|
7
|
+
import { a as Schema_d_exports } from "./Schema-CXKiLnTu.mjs";
|
|
8
8
|
export { Checker_d_exports as Checker, Ignorer_d_exports as Ignorer, Mutant_d_exports as Mutant, Plugin_d_exports as Plugin, Reporter_d_exports as Reporter, Run_d_exports as Run, Schema_d_exports as Schema, TestRunner_d_exports as TestRunner };
|
package/dist/index.mjs
CHANGED
|
@@ -4,6 +4,6 @@ import { t as Mutant_exports } from "./Mutant.mjs";
|
|
|
4
4
|
import { t as Plugin_exports } from "./Plugin-Ceh1G8Dz.mjs";
|
|
5
5
|
import { n as Reporter_exports } from "./Reporter-COVWW1my.mjs";
|
|
6
6
|
import { r as Run_exports } from "./Run-lXratlN7.mjs";
|
|
7
|
-
import { n as Schema_exports } from "./Schema-
|
|
7
|
+
import { n as Schema_exports } from "./Schema-BAKDG_jC.mjs";
|
|
8
8
|
import { n as TestRunner_exports } from "./TestRunner-DC9U8Unb.mjs";
|
|
9
9
|
export { Checker_exports as Checker, Ignorer_exports as Ignorer, Mutant_exports as Mutant, Plugin_exports as Plugin, Reporter_exports as Reporter, Run_exports as Run, Schema_exports as Schema, TestRunner_exports as TestRunner };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/stryker-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
|
|
@@ -20,24 +20,22 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"effect": "^4.0.0-rc.112",
|
|
22
22
|
"mutation-testing-report-schema": "3.7.3",
|
|
23
|
-
"@systemfsoftware/effect-cell-types": "^5.0.
|
|
23
|
+
"@systemfsoftware/effect-cell-types": "^5.0.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@systemfsoftware/arethetypeswrong-cli": "^1.1.1",
|
|
27
27
|
"@types/node": "^24",
|
|
28
28
|
"oxlint": "^1.77.0",
|
|
29
|
-
"oxlint-tsgolint": "
|
|
29
|
+
"oxlint-tsgolint": "7.0.2001",
|
|
30
30
|
"rimraf": "^6.1.3",
|
|
31
31
|
"tsdown": "^0.22.14",
|
|
32
32
|
"typescript": "^7",
|
|
33
|
-
"vitest": "^4
|
|
34
|
-
"@systemfsoftware/effect-schema-
|
|
35
|
-
"@systemfsoftware/effect-schema-
|
|
36
|
-
"@systemfsoftware/oxlint-plugin-cell-vocabulary": "^1.2.2",
|
|
37
|
-
"@systemfsoftware/oxlint-plugin-effect-workflow": "^4.0.0",
|
|
38
|
-
"@systemfsoftware/tsconfig": "^1.3.3",
|
|
33
|
+
"vitest": "^4",
|
|
34
|
+
"@systemfsoftware/effect-schema-law": "^2.0.1",
|
|
35
|
+
"@systemfsoftware/effect-schema-vite": "^2.0.2",
|
|
39
36
|
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
40
|
-
"@systemfsoftware/
|
|
37
|
+
"@systemfsoftware/tsconfig": "^1.3.3",
|
|
38
|
+
"@systemfsoftware/all": "^1.1.0"
|
|
41
39
|
},
|
|
42
40
|
"publishConfig": {
|
|
43
41
|
"access": "public",
|
|
@@ -49,6 +47,7 @@
|
|
|
49
47
|
"./Evaluator": "./dist/Evaluator.mjs",
|
|
50
48
|
"./ExitClass": "./dist/ExitClass.mjs",
|
|
51
49
|
"./Ignorer": "./dist/Ignorer.mjs",
|
|
50
|
+
"./Module": "./dist/Module.mjs",
|
|
52
51
|
"./Mutant": "./dist/Mutant.mjs",
|
|
53
52
|
"./output-file": "./dist/output-file.mjs",
|
|
54
53
|
"./Plugin": "./dist/Plugin.mjs",
|