@systemfsoftware/stryker-js 16.0.1 → 17.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @systemfsoftware/stryker-js
2
2
 
3
+ ## 17.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - A mutant's timeout now starts when its first test begins, not when the test runner is asked to run it. With a short `timeoutMS`, a mutant its tests would kill is reported `Killed` instead of `Timeout`, so a slow or busy machine no longer changes the verdict. A mutant whose tests never begin still ends, on the same window that bounds a plugin worker which never accepts its connection.
8
+
9
+ If you author a test-runner plugin, `mutantRun` now streams its run: emit `MutantRunStarted` before the runner's first test begins, then `MutantRunSettled` carrying the result.
10
+
11
+ ### Patch Changes
12
+
13
+ - A merged shard report now records the run budget, so a budget check can read it and `--update-budget-baseline` can bootstrap a baseline from it. Before, every merged report was refused with `the finished mutation report records no budget`. The budget's actual time is the slowest shard: the sum of its projects' run times, because shards run side by side. The predicted time is the plan's largest per-shard prediction. If any project's progress stream holds no verdict, the merged report carries no budget.
14
+
3
15
  ## 16.0.1
4
16
 
5
17
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { a as mod_d_exports$6 } from "./index-DEphx668.mjs";
1
+ import { a as mod_d_exports$6 } from "./index-y-Pg3XgT.mjs";
2
2
  import * as S from "effect/Schema";
3
3
  //#region src/Run.schema.d.ts
4
4
  declare const TypeId: '~stryker/mutation-run/StageError';
@@ -1,5 +1,5 @@
1
- import { a as mod_d_exports$6, c as mod_d_exports$9, d as Program$2, f as Statement, i as mod_d_exports$5, l as Ignorer$1, n as mod_d_exports$2$1, o as mod_d_exports$7, r as mod_d_exports$4, s as mod_d_exports$8, t as mod_d_exports$3 } from "./index-DEphx668.mjs";
2
- import "./Run.schema-CgcTsB1w.mjs";
1
+ import { a as mod_d_exports$6, c as mod_d_exports$9, d as Program$2, f as Statement, i as mod_d_exports$5, l as Ignorer$1, n as mod_d_exports$2$1, o as mod_d_exports$7, r as mod_d_exports$4, s as mod_d_exports$8, t as mod_d_exports$3 } from "./index-y-Pg3XgT.mjs";
2
+ import "./Run.schema-7DBK1X32.mjs";
3
3
  import { Cell, Handle, Sandwich, Workflow } from "@systemfsoftware/effect-cell-types";
4
4
  import * as S from "effect/Schema";
5
5
  import * as Option$1 from "effect/Option";
package/dist/config.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { i as mod_d_exports$5 } from "./index-DEphx668.mjs";
2
- import { a as ImmutablePrimitive, c as StrykerConfigExport, i as Immutable, l as StrykerConfigFn, o as Primitive, r as ConfigEnv, s as StrykerConfig, t as mergeConfig } from "./merge-config-b06M-Ccx.mjs";
1
+ import { i as mod_d_exports$5 } from "./index-y-Pg3XgT.mjs";
2
+ import { a as ImmutablePrimitive, c as StrykerConfigExport, i as Immutable, l as StrykerConfigFn, o as Primitive, r as ConfigEnv, s as StrykerConfig, t as mergeConfig } from "./merge-config-52qu-jD7.mjs";
3
3
  //#region src/config/define-config.d.ts
4
4
  export declare function defineConfig(config: StrykerConfig): StrykerConfig;
5
5
  export declare function defineConfig(config: Promise<StrykerConfig>): Promise<StrykerConfig>;
package/dist/config.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as mergeConfig } from "./merge-config-BYhhPA7r.mjs";
1
+ import { t as mergeConfig } from "./merge-config-ruui2TPS.mjs";
2
2
  //#region src/config/define-config.ts
3
3
  function defineConfig(config) {
4
4
  return config;
package/dist/events.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as StageError, t as PrepareError } from "./Run.schema-CgcTsB1w.mjs";
1
+ import { n as StageError, t as PrepareError } from "./Run.schema-7DBK1X32.mjs";
2
2
  export { PrepareError, StageError };
@@ -7,8 +7,10 @@ import * as Effect$1 from "effect/Effect";
7
7
  import * as Rpc from "effect/rpc/Rpc";
8
8
  import * as RpcGroup from "effect/rpc/RpcGroup";
9
9
  import * as RpcMiddleware from "effect/rpc/RpcMiddleware";
10
+ import * as Stream from "effect/Stream";
10
11
  import * as HashMap from "effect/HashMap";
11
12
  import { StandardSchemaV1 } from "effect/StandardSchema";
13
+ import * as RpcSchema from "effect/rpc/RpcSchema";
12
14
  //#region ../ignorers/interface/dist/index.d.ts
13
15
  declare interface AccessorProperty$1 extends Span$1 {
14
16
  type: AccessorPropertyType;
@@ -2738,6 +2740,36 @@ declare const MutantRunResultSchema: S.Union<readonly [S.Struct<{
2738
2740
  readonly status: S.Literal<"error">;
2739
2741
  readonly errorMessage: S.String;
2740
2742
  }>]>;
2743
+ declare const MutantRunStarted_base: S.Class<MutantRunStarted, S.TaggedStruct<"MutantRunStarted", {}>, {}>;
2744
+ declare class MutantRunStarted extends MutantRunStarted_base {}
2745
+ declare const MutantRunSettled_base: S.Class<MutantRunSettled, S.TaggedStruct<"MutantRunSettled", {
2746
+ readonly result: S.Union<readonly [S.Struct<{
2747
+ readonly status: S.Literal<"killed">;
2748
+ readonly killedBy: S.$Array<S.brand<S.NonEmptyString, "TestId">>;
2749
+ readonly failureMessage: S.String;
2750
+ readonly nrOfTests: S.Int;
2751
+ readonly executedTests: S.$Array<S.Struct<{
2752
+ readonly id: S.brand<S.NonEmptyString, "TestId">;
2753
+ readonly timeSpentMs: S.Finite;
2754
+ }>>;
2755
+ }>, S.Struct<{
2756
+ readonly status: S.Literal<"survived">;
2757
+ readonly nrOfTests: S.Int;
2758
+ readonly executedTests: S.$Array<S.Struct<{
2759
+ readonly id: S.brand<S.NonEmptyString, "TestId">;
2760
+ readonly timeSpentMs: S.Finite;
2761
+ }>>;
2762
+ }>, S.Struct<{
2763
+ readonly status: S.Literal<"timeout">;
2764
+ readonly reason: S.optionalKey<S.String>;
2765
+ }>, S.Struct<{
2766
+ readonly status: S.Literal<"error">;
2767
+ readonly errorMessage: S.String;
2768
+ }>]>;
2769
+ }>, {}>;
2770
+ declare class MutantRunSettled extends MutantRunSettled_base {}
2771
+ declare const MutantRunEventSchema: S.Union<readonly [typeof MutantRunStarted, typeof MutantRunSettled]>;
2772
+ type MutantRunEvent = typeof MutantRunEventSchema.Type;
2741
2773
  declare const CoverageAnalysisSchema: S.Literals<readonly ["off", "all", "perTest"]>;
2742
2774
  declare const DryRunOptionsSchema: S.Struct<{
2743
2775
  readonly timeout: S.Finite;
@@ -2996,7 +3028,7 @@ type TracedRpc<Tag extends string, Payload extends Schema.Top = Schema.Void, Suc
2996
3028
  //#region src/PluginRpcs.service.d.ts
2997
3029
  declare const capabilities: TracedRpc<'capabilities', Schema.Void, typeof TestRunnerCapabilitiesSchema, typeof TestRunnerFailed>;
2998
3030
  declare const dryRun: TracedRpc<'dryRun', typeof TestRunnerDryRunRequest, typeof DryRunResultSchema, typeof TestRunnerFailed>;
2999
- declare const mutantRun: TracedRpc<'mutantRun', typeof TestRunnerMutantRunRequest, typeof MutantRunResultSchema, typeof TestRunnerFailed>;
3031
+ declare const mutantRun: TracedRpc<'mutantRun', typeof TestRunnerMutantRunRequest, RpcSchema.Stream<typeof MutantRunEventSchema, typeof TestRunnerFailed>, typeof Schema.Never>;
3000
3032
  declare const check: TracedRpc<'check', typeof CheckerRequest, typeof CheckerCheckResult, typeof CheckerFailed>;
3001
3033
  declare const group: TracedRpc<'group', typeof CheckerRequest, typeof CheckerGroupResult, typeof CheckerFailed>;
3002
3034
  declare const init: TracedRpc<'init', typeof ReporterInitOptions, typeof ReporterAck, typeof ReporterFailed>;
@@ -3037,13 +3069,13 @@ interface TestRunnerService {
3037
3069
  readonly capabilities: Effect$1.Effect<TestRunnerCapabilities, TestRunnerFailed>;
3038
3070
  readonly init: Effect$1.Effect<void, TestRunnerFailed>;
3039
3071
  readonly dryRun: (options: DryRunOptions) => Effect$1.Effect<DryRunResult, TestRunnerFailed>;
3040
- readonly mutantRun: (options: MutantRunOptions) => Effect$1.Effect<MutantRunResult, TestRunnerFailed>;
3072
+ readonly mutantRun: (options: MutantRunOptions) => Stream.Stream<MutantRunEvent, TestRunnerFailed>;
3041
3073
  readonly dispose: Effect$1.Effect<void, TestRunnerFailed>;
3042
3074
  }
3043
3075
  declare const TestRunner_base: Context.ServiceClass<TestRunner, "@systemfsoftware/stryker-js-plugin-interface/TestRunner.service/TestRunner", TestRunnerService>;
3044
3076
  declare class TestRunner extends TestRunner_base {}
3045
3077
  declare namespace mod_d_exports$9 {
3046
- export { BaseTestResult, CompleteDryRunResult, CoverageAnalysis, CoverageAnalysisSchema, DryRunOptions, DryRunOptionsSchema, DryRunResult, DryRunResultSchema, DryRunStatus, ErrorDryRunResult, ErrorMutantRunResult, ExecutedTest, ExecutedTestSchema, FailedTestResult, HitLimitReason, HitLimitReasonPrefix, HitLimitReasonText, KilledMutantRunResult, MutantRunResult, MutantRunResultSchema, MutantRunStatus, SkippedTestResult, SuccessTestResult, SurvivedMutantRunResult, TestId, TestResult, TestResultSchema, TestRunner, TestRunnerCapabilities, TestRunnerCapabilitiesSchema, TestRunnerFailed, TestRunnerService, TestStatus, TimeoutDryRunResult, TimeoutMutantRunResult, WallClockTimeoutReason };
3078
+ export { BaseTestResult, CompleteDryRunResult, CoverageAnalysis, CoverageAnalysisSchema, DryRunOptions, DryRunOptionsSchema, DryRunResult, DryRunResultSchema, DryRunStatus, ErrorDryRunResult, ErrorMutantRunResult, ExecutedTest, ExecutedTestSchema, FailedTestResult, HitLimitReason, HitLimitReasonPrefix, HitLimitReasonText, KilledMutantRunResult, MutantRunEvent, MutantRunEventSchema, MutantRunResult, MutantRunResultSchema, MutantRunSettled, MutantRunStarted, MutantRunStatus, SkippedTestResult, SuccessTestResult, SurvivedMutantRunResult, TestId, TestResult, TestResultSchema, TestRunner, TestRunnerCapabilities, TestRunnerCapabilitiesSchema, TestRunnerFailed, TestRunnerService, TestStatus, TimeoutDryRunResult, TimeoutMutantRunResult, WallClockTimeoutReason };
3047
3079
  }
3048
3080
  //#endregion
3049
3081
  export { mod_d_exports$6 as a, mod_d_exports$9 as c, Program as d, Statement as f, mod_d_exports$5 as i, Ignorer as l, mod_d_exports$2 as n, mod_d_exports$7 as o, mod_d_exports$4 as r, mod_d_exports$8 as s, mod_d_exports as t, Node_2 as u };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { c as mod_d_exports$9, i as mod_d_exports$5$1, l as Ignorer, n as mod_d_exports$2$1, o as mod_d_exports$7$1, t as mod_d_exports$8, u as Node_2 } from "./index-DEphx668.mjs";
2
- import { a as ImmutablePrimitive, i as Immutable, n as mergeConfigs, o as Primitive } from "./merge-config-b06M-Ccx.mjs";
3
- import { n as StageError } from "./Run.schema-CgcTsB1w.mjs";
4
- import { $ as makeRunEventStream, A as ReporterWorkerClient, B as ProjectFile, C as PluginSource, D as TestCoverage, E as SandboxHandle, F as WorkerLauncherShape, G as git_diff_service_d_exports, H as mod_d_exports$2$11, I as WorkerSpawnParams, J as RunIdentity, K as git_diff_schema_d_exports, L as SpawnedSocketWorker, M as reporterWorkerFactory, N as spawnReporterWorker, O as REPORTER_EVENT_BATCH_BOUND, P as WorkerLauncher, Q as RunEventStream, R as make, S as PluginKind, T as WorkerPluginSource, U as Framework, V as IncrementalReportSchema, W as GitDiff, X as RunEventDrain, Y as RunIdentityShape, Z as RunEventDrainLive, _ as EvaluatorPluginDescriptor, a as StageServices, at as StrykerError, b as PluginDescriptor, c as IdGeneratorShape, ct as ConfigFileNotFoundError, d as InstrumentDone, dt as ChildProcessCrashedError, et as ResolvedModeInput, f as PrepareDone, ft as OutOfMemoryError, g as AnyWorkerPluginSource, h as AnyWorkerPluginDescriptor, ht as WorkerExit, i as RunStageServices, it as mod_d_exports$1$7, j as SpawnReporterWorkerParams, k as ReporterStage, l as MutationTestDone, lt as ConfigFileUnreadableError, m as AnyPluginDescriptor, mt as WorkerBootTimeoutError, n as RunEnvironmentShape, nt as PhaseClock, o as WiredRunLayer, ot as ConfigError, p as PrepareExecutorArgs, pt as WorkerBootError, q as RunEvents, r as EnginePorts, rt as mod_d_exports$10, s as IdGenerator, st as ConfigFileInvalidError, t as RunEnvironment, tt as ResolvedMode, u as DryRunDone, ut as ConfigFileUnsupportedError, v as EvaluatorPluginSource, w as WorkerPluginDescriptor, x as PluginDescriptorOf, y as LoadedPlugins, z as Project } from "./RunEnvironment.service-F8LgeCqh.mjs";
1
+ import { c as mod_d_exports$9, i as mod_d_exports$5$1, l as Ignorer, n as mod_d_exports$2$1, o as mod_d_exports$7$1, t as mod_d_exports$8, u as Node_2 } from "./index-y-Pg3XgT.mjs";
2
+ import { a as ImmutablePrimitive, i as Immutable, n as mergeConfigs, o as Primitive } from "./merge-config-52qu-jD7.mjs";
3
+ import { n as StageError } from "./Run.schema-7DBK1X32.mjs";
4
+ import { $ as makeRunEventStream, A as ReporterWorkerClient, B as ProjectFile, C as PluginSource, D as TestCoverage, E as SandboxHandle, F as WorkerLauncherShape, G as git_diff_service_d_exports, H as mod_d_exports$2$11, I as WorkerSpawnParams, J as RunIdentity, K as git_diff_schema_d_exports, L as SpawnedSocketWorker, M as reporterWorkerFactory, N as spawnReporterWorker, O as REPORTER_EVENT_BATCH_BOUND, P as WorkerLauncher, Q as RunEventStream, R as make, S as PluginKind, T as WorkerPluginSource, U as Framework, V as IncrementalReportSchema, W as GitDiff, X as RunEventDrain, Y as RunIdentityShape, Z as RunEventDrainLive, _ as EvaluatorPluginDescriptor, a as StageServices, at as StrykerError, b as PluginDescriptor, c as IdGeneratorShape, ct as ConfigFileNotFoundError, d as InstrumentDone, dt as ChildProcessCrashedError, et as ResolvedModeInput, f as PrepareDone, ft as OutOfMemoryError, g as AnyWorkerPluginSource, h as AnyWorkerPluginDescriptor, ht as WorkerExit, i as RunStageServices, it as mod_d_exports$1$7, j as SpawnReporterWorkerParams, k as ReporterStage, l as MutationTestDone, lt as ConfigFileUnreadableError, m as AnyPluginDescriptor, mt as WorkerBootTimeoutError, n as RunEnvironmentShape, nt as PhaseClock, o as WiredRunLayer, ot as ConfigError, p as PrepareExecutorArgs, pt as WorkerBootError, q as RunEvents, r as EnginePorts, rt as mod_d_exports$10, s as IdGenerator, st as ConfigFileInvalidError, t as RunEnvironment, tt as ResolvedMode, u as DryRunDone, ut as ConfigFileUnsupportedError, v as EvaluatorPluginSource, w as WorkerPluginDescriptor, x as PluginDescriptorOf, y as LoadedPlugins, z as Project } from "./RunEnvironment.service-Cluh-Bxt.mjs";
5
5
  import { Blueprint, Cell, Handle, Sandwich, Workflow } from "@systemfsoftware/effect-cell-types";
6
6
  import * as S from "effect/Schema";
7
7
  import * as Option from "effect/Option";
@@ -13,9 +13,11 @@ import "effect/Metric";
13
13
  import * as Cause from "effect/Cause";
14
14
  import * as FileSystem from "effect/FileSystem";
15
15
  import * as Path from "effect/Path";
16
+ import "effect/Stream";
16
17
  import * as Layer from "effect/Layer";
17
18
  import "effect/Queue";
18
19
  import * as Scope from "effect/Scope";
20
+ import "effect/Duration";
19
21
  import * as RpcClient from "effect/rpc/RpcClient";
20
22
  import "effect/DateTime";
21
23
  import * as Stdio from "effect/Stdio";
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
- import { i as Mutant_exports, l as Report_exports, n as mergeConfigs } from "./merge-config-BYhhPA7r.mjs";
3
- import { $ as WorkerLauncher, A as classifyWorkerExit, At as OutOfMemoryError, B as SurvivorRef, C as nodePlatformLayer, Ct as MergeResult, D as git_diff_schema_exports, Dt as survivorsPriorReport, E as git_diff_service_exports, Et as forkOptionsSchema, F as readConfig, Ft as CheckerAnsweredUnrequested, G as generateRunId, H as RunEvents, I as RunEnvironment, It as CheckerSkippedRequested, J as metricsResultFromFiles, K as VerdictEnvelope, L as IdGenerator, M as loadConfigCell, Mt as OutputMode_exports, N as describeErrors, Nt as RunEvent_exports$1, O as ClassifyWorkerExitCommand, Ot as checkGroupedPlans, P as forkCoreSchema, Pt as SpanTaxonomy_exports, Q as makeWorkerClient, R as surfacedSurvivorsOf, S as IncrementalReportSchema, St as MergeCommand, T as GitDiff, Tt as extendsPropertySchema, U as RunIdentity, V as StrykerPackage, W as buildVerdictEnvelope, X as reporterWorkerFactory, Y as MetricsResultFromReport, Z as spawnReporterWorker, _ as isCommandRunner, _t as defaultOptions, a as MachineConsole, at as initialExtendsStepState, b as readProjectCell, bt as ExtendsStepStateSchema, c as prepareCell, ct as ExtendsStepRead, d as buildTestRunner, dt as ConfigError, et as make, f as makeChildProcessTestRunner, ft as ConfigFileInvalidError, g as vmTestRunnerConfig, gt as createDefaultOptions, h as vmRunnerPluginUrl, ht as ConfigFileUnsupportedError, i as makeRunEventStream, it as importModule, j as validateOptions, jt as WorkerBootTimeoutError, k as ClassifyWorkerExitDecision, kt as ChildProcessCrashedError, l as mutantDetailEventsOf, lt as ExtendsStepRefused, m as testRunnerConfigOf, mt as ConfigFileUnreadableError, n as RunEventDrain, nt as FileMatcher, o as HtmlReporter_exports, ot as StrykerError, p as isVmRunner, pt as ConfigFileNotFoundError, q as staticVerdictOf, r as RunEventDrainLive, rt as decideExtendsStep, s as mutationTestCell, st as ExtendsStepDone, t as strykerCell, tt as ReproducerSchema, u as instrumentCell, ut as ExtendsStepResolve, v as import_closure_cell_exports, vt as ConfigDocumentSchema, w as layerWorkerProtocol, wt as ReadConfigCommand, x as concurrencyCell, xt as ImportedModuleSchema, y as relativeNormalizedFileName, yt as ExtendsStepDocumentSchema, z as SurfacingFields } from "./run-stages-DYuRm353.mjs";
2
+ import { i as Mutant_exports, l as Report_exports, n as mergeConfigs } from "./merge-config-ruui2TPS.mjs";
3
+ import { $ as WorkerLauncher, A as classifyWorkerExit, At as OutOfMemoryError, B as SurvivorRef, C as nodePlatformLayer, Ct as MergeResult, D as git_diff_schema_exports, Dt as survivorsPriorReport, E as git_diff_service_exports, Et as forkOptionsSchema, F as readConfig, Ft as CheckerAnsweredUnrequested, G as generateRunId, H as RunEvents, I as RunEnvironment, It as CheckerSkippedRequested, J as metricsResultFromFiles, K as VerdictEnvelope, L as IdGenerator, M as loadConfigCell, Mt as OutputMode_exports, N as describeErrors, Nt as RunEvent_exports$1, O as ClassifyWorkerExitCommand, Ot as checkGroupedPlans, P as forkCoreSchema, Pt as SpanTaxonomy_exports, Q as makeWorkerClient, R as surfacedSurvivorsOf, S as IncrementalReportSchema, St as MergeCommand, T as GitDiff, Tt as extendsPropertySchema, U as RunIdentity, V as StrykerPackage, W as buildVerdictEnvelope, X as reporterWorkerFactory, Y as MetricsResultFromReport, Z as spawnReporterWorker, _ as isCommandRunner, _t as defaultOptions, a as MachineConsole, at as initialExtendsStepState, b as readProjectCell, bt as ExtendsStepStateSchema, c as prepareCell, ct as ExtendsStepRead, d as buildTestRunner, dt as ConfigError, et as make, f as makeChildProcessTestRunner, ft as ConfigFileInvalidError, g as vmTestRunnerConfig, gt as createDefaultOptions, h as vmRunnerPluginUrl, ht as ConfigFileUnsupportedError, i as makeRunEventStream, it as importModule, j as validateOptions, jt as WorkerBootTimeoutError, k as ClassifyWorkerExitDecision, kt as ChildProcessCrashedError, l as mutantDetailEventsOf, lt as ExtendsStepRefused, m as testRunnerConfigOf, mt as ConfigFileUnreadableError, n as RunEventDrain, nt as FileMatcher, o as HtmlReporter_exports, ot as StrykerError, p as isVmRunner, pt as ConfigFileNotFoundError, q as staticVerdictOf, r as RunEventDrainLive, rt as decideExtendsStep, s as mutationTestCell, st as ExtendsStepDone, t as strykerCell, tt as ReproducerSchema, u as instrumentCell, ut as ExtendsStepResolve, v as import_closure_cell_exports, vt as ConfigDocumentSchema, w as layerWorkerProtocol, wt as ReadConfigCommand, x as concurrencyCell, xt as ImportedModuleSchema, y as relativeNormalizedFileName, yt as ExtendsStepDocumentSchema, z as SurfacingFields } from "./run-stages-B5YfftjV.mjs";
4
4
  import { n as StageError } from "./Run.schema-DuaneDGd.mjs";
5
5
  import { Cell, Sandwich, Workflow } from "@systemfsoftware/effect-cell-types";
6
6
  import * as S from "effect/Schema";