@systemfsoftware/stryker-js-plugin-interface 7.1.1 → 7.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,11 @@
1
1
  # @systemfsoftware/stryker-js-plugin-interface
2
2
 
3
+ ## 7.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 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.
8
+
3
9
  ## 7.1.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -419,10 +419,18 @@ export declare const FrameworkInformationSchema: S.Struct<{
419
419
  readonly dependencies: S.optional<S.$Record<S.String, S.String>>;
420
420
  }>;
421
421
 
422
+ export declare const HIT_LIMIT_REASON_PREFIX = "Hit limit reached";
423
+
424
+ export declare const hitLimitReachedReason: (count: number, limit: number) => string;
425
+
422
426
  export declare const InvalidStatus: S.Union<readonly [S.Literal<"CompileError">, S.Literal<"RuntimeError">]>;
423
427
 
424
428
  export declare const isCustomTestRunner: (value: TestRunnerConfig) => value is TestRunnerCustomConfig;
425
429
 
430
+ export declare const isHitLimitReason: (reason: string | undefined) => boolean;
431
+
432
+ export declare const isNamedTrap: (activeMutantId: string, namedTrapId: string | undefined) => boolean;
433
+
426
434
  export declare interface KilledMutantRunResult {
427
435
  readonly status: 'killed';
428
436
  readonly killedBy: readonly string[];
@@ -1246,6 +1254,10 @@ export declare const UndetectedStatus: S.Union<readonly [S.Literal<"Survived">,
1246
1254
 
1247
1255
  export declare const UntestedStatus: S.Union<readonly [S.Literal<"Ignored">, S.Literal<"Pending">]>;
1248
1256
 
1257
+ export declare const WALL_CLOCK_TIMEOUT_REASON = "wall-clock-timeout";
1258
+
1259
+ export declare const wallClockTimeoutStopsRun: (status: string, reason: string | undefined) => boolean;
1260
+
1249
1261
  export declare const WorkerEntryUrl: S.String;
1250
1262
 
1251
1263
  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.1.1",
3
+ "version": "7.2.0",
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.0"
22
+ "@systemfsoftware/stryker-js-instrumenter": "^8.0.1"
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.0",
30
- "@systemfsoftware/effect-schema-vite": "^2.2.0",
31
- "@systemfsoftware/tsconfig": "^1.3.5",
28
+ "@systemfsoftware/effect-schema-law": "^2.2.1",
29
+ "@systemfsoftware/effect-schema-vite": "^2.2.1",
30
+ "@systemfsoftware/oxlint-config-recommended": "^1.0.0",
31
+ "@systemfsoftware/tsconfig": "^1.3.6",
32
32
  "@types/node": "^24",
33
33
  "oxlint": "^1",
34
34
  "oxlint-tsgolint": "^7",