@systemfsoftware/stryker-js-plugin-interface 6.0.0 → 7.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.
- package/CHANGELOG.md +17 -0
- package/dist/index.d.mts +53 -19
- package/dist/index.mjs +19 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js-plugin-interface
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- The checker request carries a plain data record, not the instrumenter's `Mutant` class. `CheckerRequest.mutants` and `CheckerService.check`/`group` now speak `CheckerMutantWire` - `id`, `fileName`, `mutatorName`, `replacement`, and `location`. A mutant that cannot be described to a checker is skipped instead of reaching it.
|
|
8
|
+
|
|
9
|
+
With `OTEL_ENABLED=true` the CLI now exports its OpenTelemetry metrics to `OTEL_EXPORTER_OTLP_ENDPOINT`, and `OTEL_METRIC_EXPORT_INTERVAL` sets the export interval in milliseconds. Checker timings, mutant counts, and worker crashes now reach a metrics backend.
|
|
10
|
+
|
|
11
|
+
`ConfigEnv` and `resolveExtends` are no longer exported. Import `ConfigEnv` from the config entry point of the package, and read merged options with `loadConfigCell` or `readConfig` from the package root - either performs the `extends` walk, validation and merge in order.
|
|
12
|
+
|
|
13
|
+
## 6.0.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies:
|
|
18
|
+
- @systemfsoftware/stryker-js-instrumenter@8.0.0
|
|
19
|
+
|
|
3
20
|
## 6.0.0
|
|
4
21
|
|
|
5
22
|
### Major Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import * as Context from 'effect/Context';
|
|
2
2
|
import * as Effect$1 from 'effect/Effect';
|
|
3
3
|
import * as HashMap from 'effect/HashMap';
|
|
4
|
-
import { Location } from '@systemfsoftware/stryker-js-instrumenter
|
|
5
|
-
import { LocationSchema } from '@systemfsoftware/stryker-js-instrumenter
|
|
6
|
-
import { Mutant } from '@systemfsoftware/stryker-js-instrumenter
|
|
7
|
-
import { MutantActivation } from '@systemfsoftware/stryker-js-instrumenter
|
|
8
|
-
import { MutantActivationSchema } from '@systemfsoftware/stryker-js-instrumenter
|
|
9
|
-
import { MutantCoverage } from '@systemfsoftware/stryker-js-instrumenter
|
|
10
|
-
import { MutantRunOptions } from '@systemfsoftware/stryker-js-instrumenter
|
|
11
|
-
import { MutantRunOptionsSchema } from '@systemfsoftware/stryker-js-instrumenter
|
|
12
|
-
import { MutantStatus } from '@systemfsoftware/stryker-js-instrumenter
|
|
13
|
-
import { MutantStatusSchema } from '@systemfsoftware/stryker-js-instrumenter
|
|
14
|
-
import { OpenEndLocation } from '@systemfsoftware/stryker-js-instrumenter
|
|
15
|
-
import { OpenEndLocationSchema } from '@systemfsoftware/stryker-js-instrumenter
|
|
4
|
+
import { Location } from '@systemfsoftware/stryker-js-instrumenter';
|
|
5
|
+
import { LocationSchema } from '@systemfsoftware/stryker-js-instrumenter';
|
|
6
|
+
import { Mutant } from '@systemfsoftware/stryker-js-instrumenter';
|
|
7
|
+
import { MutantActivation } from '@systemfsoftware/stryker-js-instrumenter';
|
|
8
|
+
import { MutantActivationSchema } from '@systemfsoftware/stryker-js-instrumenter';
|
|
9
|
+
import { MutantCoverage } from '@systemfsoftware/stryker-js-instrumenter';
|
|
10
|
+
import { MutantRunOptions } from '@systemfsoftware/stryker-js-instrumenter';
|
|
11
|
+
import { MutantRunOptionsSchema } from '@systemfsoftware/stryker-js-instrumenter';
|
|
12
|
+
import { MutantStatus } from '@systemfsoftware/stryker-js-instrumenter';
|
|
13
|
+
import { MutantStatusSchema } from '@systemfsoftware/stryker-js-instrumenter';
|
|
14
|
+
import { OpenEndLocation } from '@systemfsoftware/stryker-js-instrumenter';
|
|
15
|
+
import { OpenEndLocationSchema } from '@systemfsoftware/stryker-js-instrumenter';
|
|
16
16
|
import * as Option from 'effect/Option';
|
|
17
|
-
import { Position } from '@systemfsoftware/stryker-js-instrumenter
|
|
18
|
-
import { PositionSchema } from '@systemfsoftware/stryker-js-instrumenter
|
|
17
|
+
import { Position } from '@systemfsoftware/stryker-js-instrumenter';
|
|
18
|
+
import { PositionSchema } from '@systemfsoftware/stryker-js-instrumenter';
|
|
19
19
|
import * as Rpc from 'effect/unstable/rpc/Rpc';
|
|
20
20
|
import * as RpcGroup from 'effect/unstable/rpc/RpcGroup';
|
|
21
21
|
import * as RpcMiddleware from 'effect/unstable/rpc/RpcMiddleware';
|
|
22
|
-
import { RunOptions } from '@systemfsoftware/stryker-js-instrumenter
|
|
22
|
+
import { RunOptions } from '@systemfsoftware/stryker-js-instrumenter';
|
|
23
23
|
import * as S from 'effect/Schema';
|
|
24
24
|
import { Schema } from 'effect';
|
|
25
25
|
import { StandardSchemaV1 } from 'effect/StandardSchema';
|
|
@@ -97,9 +97,43 @@ declare const CheckerFailed_base: S.Class<CheckerFailed, S.TaggedStruct<"Checker
|
|
|
97
97
|
|
|
98
98
|
export declare const CheckerGroupResult: S.$Array<S.$Array<S.String>>;
|
|
99
99
|
|
|
100
|
+
export declare const CheckerMutantWire: S.Struct<{
|
|
101
|
+
readonly id: S.NonEmptyString;
|
|
102
|
+
readonly fileName: S.NonEmptyString;
|
|
103
|
+
readonly mutatorName: S.NonEmptyString;
|
|
104
|
+
readonly replacement: S.String;
|
|
105
|
+
readonly location: S.Struct<{
|
|
106
|
+
readonly start: S.Struct<{
|
|
107
|
+
readonly line: S.Finite;
|
|
108
|
+
readonly column: S.Finite;
|
|
109
|
+
}>;
|
|
110
|
+
readonly end: S.Struct<{
|
|
111
|
+
readonly line: S.Finite;
|
|
112
|
+
readonly column: S.Finite;
|
|
113
|
+
}>;
|
|
114
|
+
}>;
|
|
115
|
+
}>;
|
|
116
|
+
|
|
117
|
+
export declare type CheckerMutantWire = typeof CheckerMutantWire.Type;
|
|
118
|
+
|
|
100
119
|
export declare const CheckerRequest: S.Struct<{
|
|
101
120
|
readonly checkerName: S.String;
|
|
102
|
-
readonly mutants: S.$Array<
|
|
121
|
+
readonly mutants: S.$Array<S.Struct<{
|
|
122
|
+
readonly id: S.NonEmptyString;
|
|
123
|
+
readonly fileName: S.NonEmptyString;
|
|
124
|
+
readonly mutatorName: S.NonEmptyString;
|
|
125
|
+
readonly replacement: S.String;
|
|
126
|
+
readonly location: S.Struct<{
|
|
127
|
+
readonly start: S.Struct<{
|
|
128
|
+
readonly line: S.Finite;
|
|
129
|
+
readonly column: S.Finite;
|
|
130
|
+
}>;
|
|
131
|
+
readonly end: S.Struct<{
|
|
132
|
+
readonly line: S.Finite;
|
|
133
|
+
readonly column: S.Finite;
|
|
134
|
+
}>;
|
|
135
|
+
}>;
|
|
136
|
+
}>>;
|
|
103
137
|
}>;
|
|
104
138
|
|
|
105
139
|
export declare type CheckerRequest = typeof CheckerRequest.Type;
|
|
@@ -108,8 +142,8 @@ export declare const CheckerRpcs: RpcGroup.RpcGroup<TracedRpc<'check', typeof Ch
|
|
|
108
142
|
|
|
109
143
|
export declare interface CheckerService {
|
|
110
144
|
readonly init: Effect$1.Effect<void, CheckerFailed>;
|
|
111
|
-
readonly check: (mutants: readonly
|
|
112
|
-
readonly group: (mutants: readonly
|
|
145
|
+
readonly check: (mutants: readonly CheckerMutantWire[]) => Effect$1.Effect<HashMap.HashMap<string, CheckResult>, CheckerFailed>;
|
|
146
|
+
readonly group: (mutants: readonly CheckerMutantWire[]) => Effect$1.Effect<readonly (readonly string[])[], CheckerFailed>;
|
|
113
147
|
}
|
|
114
148
|
|
|
115
149
|
export declare type CheckResult = FailedCheckResult | PassedCheckResult;
|
|
@@ -1126,7 +1160,7 @@ export declare const TestRunnerMutantRunRequest: S.Struct<{
|
|
|
1126
1160
|
readonly options: S.Struct<{
|
|
1127
1161
|
readonly timeout: S.Finite;
|
|
1128
1162
|
readonly disableBail: S.Boolean;
|
|
1129
|
-
readonly activeMutant:
|
|
1163
|
+
readonly activeMutant: Mutant;
|
|
1130
1164
|
readonly sandboxFileName: S.String;
|
|
1131
1165
|
readonly mutantActivation: S.Literals<readonly ["runtime", "static"]>;
|
|
1132
1166
|
readonly reloadEnvironment: S.Boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LocationSchema, LocationSchema as LocationSchema$1,
|
|
1
|
+
import { LocationSchema, LocationSchema as LocationSchema$1, MutantActivationSchema, MutantRunOptionsSchema, MutantRunOptionsSchema as MutantRunOptionsSchema$1, MutantStatusSchema, MutantStatusSchema as MutantStatusSchema$1, OpenEndLocationSchema, OpenEndLocationSchema as OpenEndLocationSchema$1, PositionSchema, PositionSchema as PositionSchema$1, RunOptionsFields } from "@systemfsoftware/stryker-js-instrumenter";
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
3
|
import * as S from "effect/Schema";
|
|
4
4
|
import * as Rpc from "effect/unstable/rpc/Rpc";
|
|
@@ -8,6 +8,22 @@ import { Effect } from "effect";
|
|
|
8
8
|
import * as Match from "effect/Match";
|
|
9
9
|
import * as Option from "effect/Option";
|
|
10
10
|
//#region src/Checker.schema.ts
|
|
11
|
+
/** A position inside a file, in the coordinates the wire carries — 0-based line and column. */
|
|
12
|
+
const CheckerPositionWire = S.Struct({
|
|
13
|
+
line: S.Finite,
|
|
14
|
+
column: S.Finite
|
|
15
|
+
});
|
|
16
|
+
const CheckerLocationWire = S.Struct({
|
|
17
|
+
start: CheckerPositionWire,
|
|
18
|
+
end: CheckerPositionWire
|
|
19
|
+
});
|
|
20
|
+
const CheckerMutantWire = S.Struct({
|
|
21
|
+
id: S.NonEmptyString,
|
|
22
|
+
fileName: S.NonEmptyString,
|
|
23
|
+
mutatorName: S.NonEmptyString,
|
|
24
|
+
replacement: S.String,
|
|
25
|
+
location: CheckerLocationWire
|
|
26
|
+
});
|
|
11
27
|
const CheckStatus = S.Literals(["passed", "compileError"]);
|
|
12
28
|
const CheckResultSchema = S.Union([S.Struct({ status: S.Literal("passed") }), S.Struct({
|
|
13
29
|
status: S.Literal("compileError"),
|
|
@@ -302,7 +318,7 @@ const TestRunnerDryRunRequest = S.Struct({ options: DryRunOptionsSchema });
|
|
|
302
318
|
const TestRunnerMutantRunRequest = S.Struct({ options: MutantRunOptionsSchema$1 });
|
|
303
319
|
const CheckerRequest = S.Struct({
|
|
304
320
|
checkerName: S.String,
|
|
305
|
-
mutants: S.Array(
|
|
321
|
+
mutants: S.Array(CheckerMutantWire)
|
|
306
322
|
});
|
|
307
323
|
const CheckerCheckResult = S.Record(S.String, CheckResultSchema);
|
|
308
324
|
const CheckerGroupResult = S.Array(S.Array(S.String));
|
|
@@ -692,4 +708,4 @@ const parseTraceparent = (value) => {
|
|
|
692
708
|
};
|
|
693
709
|
const TraceContextReference = Context.Reference("@systemfsoftware/stryker-js-plugin-interface/TraceContextReference", { defaultValue: () => Option.none() });
|
|
694
710
|
//#endregion
|
|
695
|
-
export { BoundaryErrorSchema, BoundaryPayloadRejected, BoundaryUnrecognizedSignal, BrandingInformationSchema, CheckResultSchema, CheckStatus, Checker, CheckerCheckResult, CheckerCustomConfigSchema, CheckerEntryConfigSchema, CheckerFailed, CheckerGroupResult, CheckerRequest, CheckerRpcs, CommandRunnerOptionsSchema, CoverageAnalysisMode, CoverageAnalysisSchema, DependenciesSchema, DryRunCompleted, DryRunOptionsSchema, DryRunResultSchema, DryRunStatus, EXIT_CODE, Evaluator, EvaluatorFailed, ExitClass, FileResultDictionarySchema, FileResultSchema, FrameworkInformationSchema, LocationSchema, LogLevel, MetricsResultSchema, MetricsSchema, MutantActivationSchema, MutantCoverageSchema, MutantResultSchema, MutantRunOptionsSchema, MutantRunResultSchema, MutantRunStatus, MutantStatusSchema, MutantTested, MutationScoreThresholdsSchema, MutationTestReportReady, MutationTestResultSchema, MutationTestingPlanReady, OpenEndLocationSchema, PackageManager, PluginFileUrl, PositionSchema, PropagatedTrace, RENDERED_OPTION_DEFAULTS, ReportType, ReporterAck, ReporterDrained, ReporterEventBatch, ReporterEventKind, ReporterEventSchema, ReporterEventUnion, ReporterFailed, ReporterInitOptions, ReporterPlanDescriptorSchema, ReporterPlanKind, ReporterRpcs, RunTimingSchema, StrykerOptionsSchema, TRACEPARENT_HEADER, TRACESTATE_HEADER, TestDefinitionSchema, TestFileDefinitionDictionarySchema, TestFileSchema, TestResultSchema, TestRunner, TestRunnerCapabilitiesSchema, TestRunnerConfigSchema, TestRunnerCustomConfigSchema, TestRunnerDryRunRequest, TestRunnerFailed, TestRunnerMutantRunRequest, TestRunnerRpcs, TestStatus, ThresholdsSchema, TraceContextMiddleware, TraceContextReference, WorkerEntryUrl, WorkerPluginKind, WorkerPluginSpawnSchema, formatTraceparent, isCustomTestRunner, parseTraceparent, propertyPath, strykerCoreSchema, strykerReportBugUrl, testFilesProvided, toMutantRunResult };
|
|
711
|
+
export { BoundaryErrorSchema, BoundaryPayloadRejected, BoundaryUnrecognizedSignal, BrandingInformationSchema, CheckResultSchema, CheckStatus, Checker, CheckerCheckResult, CheckerCustomConfigSchema, CheckerEntryConfigSchema, CheckerFailed, CheckerGroupResult, CheckerMutantWire, CheckerRequest, CheckerRpcs, CommandRunnerOptionsSchema, CoverageAnalysisMode, CoverageAnalysisSchema, DependenciesSchema, DryRunCompleted, DryRunOptionsSchema, DryRunResultSchema, DryRunStatus, EXIT_CODE, Evaluator, EvaluatorFailed, ExitClass, FileResultDictionarySchema, FileResultSchema, FrameworkInformationSchema, LocationSchema, LogLevel, MetricsResultSchema, MetricsSchema, MutantActivationSchema, MutantCoverageSchema, MutantResultSchema, MutantRunOptionsSchema, MutantRunResultSchema, MutantRunStatus, MutantStatusSchema, MutantTested, MutationScoreThresholdsSchema, MutationTestReportReady, MutationTestResultSchema, MutationTestingPlanReady, OpenEndLocationSchema, PackageManager, PluginFileUrl, PositionSchema, PropagatedTrace, RENDERED_OPTION_DEFAULTS, ReportType, ReporterAck, ReporterDrained, ReporterEventBatch, ReporterEventKind, ReporterEventSchema, ReporterEventUnion, ReporterFailed, ReporterInitOptions, ReporterPlanDescriptorSchema, ReporterPlanKind, ReporterRpcs, RunTimingSchema, StrykerOptionsSchema, TRACEPARENT_HEADER, TRACESTATE_HEADER, TestDefinitionSchema, TestFileDefinitionDictionarySchema, TestFileSchema, TestResultSchema, TestRunner, TestRunnerCapabilitiesSchema, TestRunnerConfigSchema, TestRunnerCustomConfigSchema, TestRunnerDryRunRequest, TestRunnerFailed, TestRunnerMutantRunRequest, TestRunnerRpcs, TestStatus, ThresholdsSchema, TraceContextMiddleware, TraceContextReference, WorkerEntryUrl, WorkerPluginKind, WorkerPluginSpawnSchema, formatTraceparent, isCustomTestRunner, parseTraceparent, propertyPath, strykerCoreSchema, strykerReportBugUrl, testFilesProvided, toMutantRunResult };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/stryker-js-plugin-interface",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"effect": "4.0.0-rc.112",
|
|
22
|
-
"@systemfsoftware/stryker-js-instrumenter": "^
|
|
22
|
+
"@systemfsoftware/stryker-js-instrumenter": "^8.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@effect/tsgo": "^0.45.0",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"tsdown": "^0.23.0",
|
|
37
37
|
"typescript": "^7",
|
|
38
38
|
"vitest": "^4",
|
|
39
|
-
"@systemfsoftware/
|
|
40
|
-
"@systemfsoftware/
|
|
39
|
+
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
40
|
+
"@systemfsoftware/tsdown-config": "^0.1.0"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public",
|