@systemfsoftware/stryker-js-plugin-interface 7.1.1 → 7.2.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 +12 -0
- package/dist/index.d.mts +16 -3
- package/dist/index.mjs +9 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @systemfsoftware/stryker-js-plugin-interface
|
|
2
2
|
|
|
3
|
+
## 7.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Exported declarations that previously took `unknown` now take a defaulted type parameter: calls that omit the type argument are unchanged, and calls that were previously rejected for passing an unconstrained value are accepted. No runtime behaviour changes.
|
|
8
|
+
|
|
9
|
+
## 7.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- A finite mutant is killed or survived from its tests. Timeout is reserved for one named nonterminating trap, detected by a hit bound rather than a wall-clock budget. A wall-clock timeout fails the run instead of being stored as a detected mutant.
|
|
14
|
+
|
|
3
15
|
## 7.1.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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 { JsonSchema } from 'effect/JsonSchema';
|
|
4
5
|
import { Location } from '@systemfsoftware/stryker-js-instrumenter';
|
|
5
6
|
import { LocationSchema } from '@systemfsoftware/stryker-js-instrumenter';
|
|
6
7
|
import { Mutant } from '@systemfsoftware/stryker-js-instrumenter';
|
|
@@ -186,7 +187,7 @@ export declare const CoverageAnalysisSchema: S.Literals<readonly ["off", "all",
|
|
|
186
187
|
* caller CONSTRUCTS by assignment, so `readonly` is stripped. The decoded
|
|
187
188
|
* `StrykerOptions` keeps it - that side is read, never built.
|
|
188
189
|
*/
|
|
189
|
-
export declare type DeepOptional<T> = { -readonly [P in keyof T]?: T[P] extends Record<string,
|
|
190
|
+
export declare type DeepOptional<T, V = unknown> = { -readonly [P in keyof T]?: T[P] extends Record<string, V> ? DeepOptional<T[P], V> | undefined : T[P]; };
|
|
190
191
|
|
|
191
192
|
export declare type Dependencies = typeof DependenciesSchema.Type;
|
|
192
193
|
|
|
@@ -419,10 +420,18 @@ export declare const FrameworkInformationSchema: S.Struct<{
|
|
|
419
420
|
readonly dependencies: S.optional<S.$Record<S.String, S.String>>;
|
|
420
421
|
}>;
|
|
421
422
|
|
|
423
|
+
export declare const HIT_LIMIT_REASON_PREFIX = "Hit limit reached";
|
|
424
|
+
|
|
425
|
+
export declare const hitLimitReachedReason: (count: number, limit: number) => string;
|
|
426
|
+
|
|
422
427
|
export declare const InvalidStatus: S.Union<readonly [S.Literal<"CompileError">, S.Literal<"RuntimeError">]>;
|
|
423
428
|
|
|
424
429
|
export declare const isCustomTestRunner: (value: TestRunnerConfig) => value is TestRunnerCustomConfig;
|
|
425
430
|
|
|
431
|
+
export declare const isHitLimitReason: (reason: string | undefined) => boolean;
|
|
432
|
+
|
|
433
|
+
export declare const isNamedTrap: (activeMutantId: string, namedTrapId: string | undefined) => boolean;
|
|
434
|
+
|
|
426
435
|
export declare interface KilledMutantRunResult {
|
|
427
436
|
readonly status: 'killed';
|
|
428
437
|
readonly killedBy: readonly string[];
|
|
@@ -836,7 +845,7 @@ export declare const ReporterEventKind: S.Literals<readonly ["dryRunCompleted",
|
|
|
836
845
|
|
|
837
846
|
export declare type ReporterEventKind = typeof ReporterEventKind.Type;
|
|
838
847
|
|
|
839
|
-
export declare const ReporterEventSchema: StandardSchemaV1<
|
|
848
|
+
export declare const ReporterEventSchema: StandardSchemaV1<typeof ReporterEventUnion['Encoded'], ReporterEvent>;
|
|
840
849
|
|
|
841
850
|
export declare const ReporterEventUnion: S.Union<readonly [typeof DryRunCompleted, typeof MutationTestingPlanReady, typeof MutantTested, typeof MutationTestReportReady]>;
|
|
842
851
|
|
|
@@ -904,7 +913,7 @@ export declare interface SkippedTestResult extends BaseTestResult {
|
|
|
904
913
|
* one is a schema - the generated law suite does exactly that, and a document
|
|
905
914
|
* handed to `toEncoded` takes the whole suite down with it.
|
|
906
915
|
*/
|
|
907
|
-
export declare const strykerCoreSchema:
|
|
916
|
+
export declare const strykerCoreSchema: JsonSchema;
|
|
908
917
|
|
|
909
918
|
/** The decoded type: every defaulted option is present. */
|
|
910
919
|
export declare type StrykerOptions = S.Schema.Type<typeof StrykerOptionsSchema>;
|
|
@@ -1246,6 +1255,10 @@ export declare const UndetectedStatus: S.Union<readonly [S.Literal<"Survived">,
|
|
|
1246
1255
|
|
|
1247
1256
|
export declare const UntestedStatus: S.Union<readonly [S.Literal<"Ignored">, S.Literal<"Pending">]>;
|
|
1248
1257
|
|
|
1258
|
+
export declare const WALL_CLOCK_TIMEOUT_REASON = "wall-clock-timeout";
|
|
1259
|
+
|
|
1260
|
+
export declare const wallClockTimeoutStopsRun: (status: string, reason: string | undefined) => boolean;
|
|
1261
|
+
|
|
1249
1262
|
export declare const WorkerEntryUrl: S.String;
|
|
1250
1263
|
|
|
1251
1264
|
export declare type WorkerEntryUrl = typeof WorkerEntryUrl.Type;
|
package/dist/index.mjs
CHANGED
|
@@ -155,6 +155,14 @@ const MetricsResultSchema = S.Struct({
|
|
|
155
155
|
childResults: S.Array(S.suspend(() => MetricsResultSchema))
|
|
156
156
|
}).annotate({ identifier: "MetricsResult" });
|
|
157
157
|
//#endregion
|
|
158
|
+
//#region src/mutant-timeout-reason.ts
|
|
159
|
+
const HIT_LIMIT_REASON_PREFIX = "Hit limit reached";
|
|
160
|
+
const WALL_CLOCK_TIMEOUT_REASON = "wall-clock-timeout";
|
|
161
|
+
const hitLimitReachedReason = (count, limit) => `${HIT_LIMIT_REASON_PREFIX} (${count}/${limit})`;
|
|
162
|
+
const isHitLimitReason = (reason) => reason !== void 0 && reason.startsWith("Hit limit reached");
|
|
163
|
+
const isNamedTrap = (activeMutantId, namedTrapId) => namedTrapId !== void 0 && activeMutantId === namedTrapId;
|
|
164
|
+
const wallClockTimeoutStopsRun = (status, reason) => status === "timeout" && !isHitLimitReason(reason);
|
|
165
|
+
//#endregion
|
|
158
166
|
//#region src/Report.schema.ts
|
|
159
167
|
const MutantResultSchema = S.Struct({
|
|
160
168
|
id: S.String,
|
|
@@ -804,4 +812,4 @@ const parseTraceparent = (value) => {
|
|
|
804
812
|
};
|
|
805
813
|
const TraceContextReference = Context.Reference("@systemfsoftware/stryker-js-plugin-interface/TraceContextReference", { defaultValue: () => Option.none() });
|
|
806
814
|
//#endregion
|
|
807
|
-
export { BoundaryErrorSchema, BoundaryPayloadRejected, BoundaryUnrecognizedSignal, BrandingInformationSchema, CheckResultSchema, CheckStatus, Checker, CheckerCheckResult, CheckerCustomConfigSchema, CheckerEntryConfigSchema, CheckerFailed, CheckerGroupResult, CheckerMutantWire, CheckerRequest, CheckerRpcs, CommandRunnerOptionsSchema, CoverageAnalysisMode, CoverageAnalysisSchema, DependenciesSchema, DetectedStatus, DryRunCompleted, DryRunOptionsSchema, DryRunResultSchema, DryRunStatus, EXIT_CODE, Evaluator, EvaluatorFailed, ExitClass, FileResultDictionarySchema, FileResultSchema, FrameworkInformationSchema, InvalidStatus, LocationSchema, LogLevel, Metrics, MetricsResultSchema, MetricsSchema, MutantActivationSchema, MutantCoverageSchema, MutantResultSchema, MutantRunOptionsSchema, MutantRunResultSchema, MutantRunStatus, MutantStatusSchema, MutantTested, MutationScoreThresholdsSchema, MutationTestReportReady, MutationTestResultSchema, MutationTestingPlanReady, NonNegativeFinite, NonNegativeInt, OpenEndLocationSchema, PackageManager, Percentage, 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, UndetectedStatus, UntestedStatus, WorkerEntryUrl, WorkerPluginKind, WorkerPluginSpawnSchema, formatTraceparent, isCustomTestRunner, parseTraceparent, propertyPath, strykerCoreSchema, strykerReportBugUrl, testFilesProvided, toMutantRunResult };
|
|
815
|
+
export { BoundaryErrorSchema, BoundaryPayloadRejected, BoundaryUnrecognizedSignal, BrandingInformationSchema, CheckResultSchema, CheckStatus, Checker, CheckerCheckResult, CheckerCustomConfigSchema, CheckerEntryConfigSchema, CheckerFailed, CheckerGroupResult, CheckerMutantWire, CheckerRequest, CheckerRpcs, CommandRunnerOptionsSchema, CoverageAnalysisMode, CoverageAnalysisSchema, DependenciesSchema, DetectedStatus, DryRunCompleted, DryRunOptionsSchema, DryRunResultSchema, DryRunStatus, EXIT_CODE, Evaluator, EvaluatorFailed, ExitClass, FileResultDictionarySchema, FileResultSchema, FrameworkInformationSchema, HIT_LIMIT_REASON_PREFIX, InvalidStatus, LocationSchema, LogLevel, Metrics, MetricsResultSchema, MetricsSchema, MutantActivationSchema, MutantCoverageSchema, MutantResultSchema, MutantRunOptionsSchema, MutantRunResultSchema, MutantRunStatus, MutantStatusSchema, MutantTested, MutationScoreThresholdsSchema, MutationTestReportReady, MutationTestResultSchema, MutationTestingPlanReady, NonNegativeFinite, NonNegativeInt, OpenEndLocationSchema, PackageManager, Percentage, 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, UndetectedStatus, UntestedStatus, WALL_CLOCK_TIMEOUT_REASON, WorkerEntryUrl, WorkerPluginKind, WorkerPluginSpawnSchema, formatTraceparent, hitLimitReachedReason, isCustomTestRunner, isHitLimitReason, isNamedTrap, parseTraceparent, propertyPath, strykerCoreSchema, strykerReportBugUrl, testFilesProvided, toMutantRunResult, wallClockTimeoutStopsRun };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/stryker-js-plugin-interface",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/systemfsoftware/stryker-js-effect.git",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"effect": "4.0.0-rc.116",
|
|
22
|
-
"@systemfsoftware/stryker-js-instrumenter": "^8.0.
|
|
22
|
+
"@systemfsoftware/stryker-js-instrumenter": "^8.0.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@effect/tsgo": "^0.45.0",
|
|
26
26
|
"@microsoft/api-extractor": "^7",
|
|
27
|
-
"@systemfsoftware/all": "^2.1.1",
|
|
28
27
|
"@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
|
|
29
|
-
"@systemfsoftware/effect-schema-law": "^2.2.
|
|
30
|
-
"@systemfsoftware/effect-schema-vite": "^2.2.
|
|
31
|
-
"@systemfsoftware/
|
|
28
|
+
"@systemfsoftware/effect-schema-law": "^2.2.1",
|
|
29
|
+
"@systemfsoftware/effect-schema-vite": "^2.2.1",
|
|
30
|
+
"@systemfsoftware/oxlint-config-recommended": "^1.1.0",
|
|
31
|
+
"@systemfsoftware/tsconfig": "^1.3.6",
|
|
32
32
|
"@types/node": "^24",
|
|
33
33
|
"oxlint": "^1",
|
|
34
34
|
"oxlint-tsgolint": "^7",
|