@systemfsoftware/stryker-js 9.0.0 → 10.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.
Files changed (28) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/Run.schema-BBKIZ81u.d.mts +165 -0
  3. package/dist/Run.schema-C0Cxsfe9.mjs +8746 -0
  4. package/dist/config.d.mts +2 -1
  5. package/dist/events.d.mts +2 -0
  6. package/dist/events.mjs +2 -0
  7. package/dist/{getMachineId-bsd-C6bLIaiv.mjs → getMachineId-bsd-DGLFi8Ia.mjs} +1 -1
  8. package/dist/{getMachineId-bsd-CXSiHDga.mjs → getMachineId-bsd-YZILidse.mjs} +1 -1
  9. package/dist/{getMachineId-darwin-DPZ0kdKD.mjs → getMachineId-darwin-B_CgClId.mjs} +1 -1
  10. package/dist/{getMachineId-darwin-D3cIKeqx.mjs → getMachineId-darwin-Bfwczd9V.mjs} +1 -1
  11. package/dist/{getMachineId-linux-Ci8OVJU0.mjs → getMachineId-linux-CPAE174r.mjs} +1 -1
  12. package/dist/{getMachineId-linux-CQwLSlZk.mjs → getMachineId-linux-DprzjpT3.mjs} +1 -1
  13. package/dist/{getMachineId-unsupported-PX0hnW6X.mjs → getMachineId-unsupported-Ce9f061A.mjs} +1 -1
  14. package/dist/{getMachineId-unsupported-_ExL3Avl.mjs → getMachineId-unsupported-j7fStyPQ.mjs} +1 -1
  15. package/dist/{getMachineId-win-D9Tb0p7w.mjs → getMachineId-win-DETv1PQd.mjs} +1 -1
  16. package/dist/{getMachineId-win-BCsS9pC_.mjs → getMachineId-win-ZJtT3h1l.mjs} +1 -1
  17. package/dist/{output-mode-CE6VNHfH.d.mts → index-DnAm4mSL.d.mts} +52 -93
  18. package/dist/index.d.mts +88 -78
  19. package/dist/index.mjs +3 -2
  20. package/dist/main.mjs +11105 -10791
  21. package/dist/{mutation-test.cell-BTa-up9u.d.mts → mutation-test.cell-m9T-X2Qx.d.mts} +11 -126
  22. package/dist/output-mode-CfGHDpi5.d.mts +17 -0
  23. package/dist/promises.d.mts +2 -2
  24. package/dist/promises.mjs +1 -1
  25. package/dist/src-Bu4i-Lt2.mjs +6600 -0
  26. package/dist/{wasm-Dr7kZatW.mjs → wasm-Dg4JcQ2d.mjs} +1 -1
  27. package/package.json +8 -4
  28. package/dist/src-BQuaL-fB.mjs +0 -15629
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @systemfsoftware/stryker-js
2
2
 
3
+ ## 10.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - The machine-mode event stream now tags every event document with `_tag` (previously `kind`), matching the `RunEvent` schema tags. The wire line schema `RunEventWireLine` is exported, so consumers can decode machine-mode stdout lines with the same schema the CLI encodes them with. The event stream's composition surface is now public: `makeRunEventStream`, `RunEventStream`, `RunEventDrain`, `RunEventDrainLive`, and `ResolvedModeInput`.
8
+
9
+ Consumers parsing machine-mode stdout must read the `_tag` field instead of `kind`.
10
+
11
+ ### Patch Changes
12
+
13
+ - A checker that fails now fails mutation testing with that checker's cause, instead of crashing with an empty error. The TypeScript checker type-checks each mutant, so compile errors appear in the report. Verdict counts are non-negative integers; `Metrics` is a class you can build from mutant statuses; a threshold `low` may not exceed `high`.
14
+
3
15
  ## 9.0.0
4
16
 
5
17
  ### Major Changes
@@ -0,0 +1,165 @@
1
+ import { C as Metrics, _ as ExitClass } from "./index-DnAm4mSL.mjs";
2
+ import * as S from "effect/Schema";
3
+ //#region src/RunEvent.schema.d.ts
4
+ declare const RunPhase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
5
+ type RunPhase = typeof RunPhase.Type;
6
+ declare const OutputMode: S.Literals<readonly ["human", "machine"]>;
7
+ type OutputMode = typeof OutputMode.Type;
8
+ declare const ModeSignal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
9
+ type ModeSignal = typeof ModeSignal.Type;
10
+ declare const RunStarted_base: S.Class<RunStarted, S.TaggedStruct<"stream", {
11
+ readonly schemaVersion: S.String;
12
+ readonly runId: S.String;
13
+ readonly mode: S.Literals<readonly ["human", "machine"]>;
14
+ readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
15
+ }>, {}>;
16
+ declare class RunStarted extends RunStarted_base {}
17
+ declare const PhaseEntered_base: S.Class<PhaseEntered, S.TaggedStruct<"phase", {
18
+ readonly phase: S.Literals<readonly ["prepare", "instrument", "dry-run", "mutation-test"]>;
19
+ readonly elapsedMs: S.Finite;
20
+ }>, {}>;
21
+ declare class PhaseEntered extends PhaseEntered_base {}
22
+ declare const PlanKnown_base: S.Class<PlanKnown, S.TaggedStruct<"plan", {
23
+ readonly total: S.Int;
24
+ }>, {}>;
25
+ declare class PlanKnown extends PlanKnown_base {}
26
+ declare const RunMutantTested_base: S.Class<RunMutantTested, S.TaggedStruct<"mutant", {
27
+ readonly id: S.String;
28
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
29
+ readonly file: S.String;
30
+ readonly location: S.Struct<{
31
+ readonly start: S.Struct<{
32
+ readonly line: S.Finite;
33
+ readonly column: S.Finite;
34
+ }>;
35
+ readonly end: S.Struct<{
36
+ readonly line: S.Finite;
37
+ readonly column: S.Finite;
38
+ }>;
39
+ }>;
40
+ readonly mutator: S.String;
41
+ readonly replacement: S.NullOr<S.String>;
42
+ readonly completed: S.Int;
43
+ readonly total: S.Int;
44
+ }>, {}>;
45
+ declare class RunMutantTested extends RunMutantTested_base {}
46
+ declare const Heartbeat_base: S.Class<Heartbeat, S.TaggedStruct<"tick", {
47
+ readonly elapsedMs: S.Finite;
48
+ readonly completed: S.Int;
49
+ readonly total: S.NullOr<S.Int>;
50
+ }>, {}>;
51
+ declare class Heartbeat extends Heartbeat_base {}
52
+ declare const VerdictThresholds: S.Struct<{
53
+ readonly high: S.Finite;
54
+ readonly low: S.Finite;
55
+ readonly break: S.NullOr<S.Finite>;
56
+ }>;
57
+ type VerdictThresholds = typeof VerdictThresholds.Type;
58
+ declare const VerdictMutant: S.Struct<{
59
+ readonly id: S.String;
60
+ readonly file: S.String;
61
+ readonly location: S.Struct<{
62
+ readonly start: S.Struct<{
63
+ readonly line: S.Finite;
64
+ readonly column: S.Finite;
65
+ }>;
66
+ readonly end: S.Struct<{
67
+ readonly line: S.Finite;
68
+ readonly column: S.Finite;
69
+ }>;
70
+ }>;
71
+ readonly mutator: S.String;
72
+ readonly replacement: S.NullOr<S.String>;
73
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
74
+ }>;
75
+ type VerdictMutant = typeof VerdictMutant.Type;
76
+ type VerdictCounts = Metrics;
77
+ declare const VerdictReached_base: S.Class<VerdictReached, S.TaggedStruct<"verdict", {
78
+ readonly schemaVersion: S.String;
79
+ readonly runId: S.String;
80
+ readonly mode: S.Literals<readonly ["human", "machine"]>;
81
+ readonly signal: S.Literals<readonly ["flag", "env", "tty", "agent", "tool"]>;
82
+ readonly score: S.NullOr<S.Finite>;
83
+ readonly thresholds: S.Struct<{
84
+ readonly high: S.Finite;
85
+ readonly low: S.Finite;
86
+ readonly break: S.NullOr<S.Finite>;
87
+ }>;
88
+ readonly reportFile: S.NullOr<S.String>;
89
+ readonly counts: typeof Metrics;
90
+ readonly mutants: S.$Array<S.Struct<{
91
+ readonly id: S.String;
92
+ readonly file: S.String;
93
+ readonly location: S.Struct<{
94
+ readonly start: S.Struct<{
95
+ readonly line: S.Finite;
96
+ readonly column: S.Finite;
97
+ }>;
98
+ readonly end: S.Struct<{
99
+ readonly line: S.Finite;
100
+ readonly column: S.Finite;
101
+ }>;
102
+ }>;
103
+ readonly mutator: S.String;
104
+ readonly replacement: S.NullOr<S.String>;
105
+ readonly status: S.Literals<readonly ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]>;
106
+ }>>;
107
+ }>, {}>;
108
+ declare class VerdictReached extends VerdictReached_base {}
109
+ declare const RunFailed_base: S.Class<RunFailed, S.TaggedStruct<"error", {
110
+ readonly schemaVersion: S.String;
111
+ readonly code: S.Finite;
112
+ readonly error: S.String;
113
+ readonly remediation: S.String;
114
+ }>, {}>;
115
+ declare class RunFailed extends RunFailed_base {}
116
+ declare const HelpRendered_base: S.Class<HelpRendered, S.TaggedStruct<"help", {
117
+ readonly schemaVersion: S.String;
118
+ readonly code: S.Literals<readonly [0]>;
119
+ readonly help: S.String;
120
+ }>, {}>;
121
+ declare class HelpRendered extends HelpRendered_base {}
122
+ declare const RunEvent: S.Union<readonly [typeof RunStarted, typeof PhaseEntered, typeof PlanKnown, typeof RunMutantTested, typeof Heartbeat, typeof VerdictReached, typeof RunFailed, typeof HelpRendered]>;
123
+ type RunEvent = typeof RunEvent.Type;
124
+ type RunTerminalEvent = VerdictReached | RunFailed | HelpRendered;
125
+ declare const RunDecodeError_base: S.Class<RunDecodeError, S.TaggedStruct<"RunDecodeError", {
126
+ readonly message: S.String;
127
+ }>, import("effect/Cause").YieldableError>;
128
+ declare class RunDecodeError extends RunDecodeError_base {}
129
+ declare const RunReadError_base: S.Class<RunReadError, S.TaggedStruct<"RunReadError", {
130
+ readonly message: S.String;
131
+ }>, import("effect/Cause").YieldableError>;
132
+ declare class RunReadError extends RunReadError_base {}
133
+ declare const PlanMutationRunCommand_base: S.Class<PlanMutationRunCommand, S.TaggedStruct<"PlanMutationRunCommand", {
134
+ readonly configMutatePatterns: S.$Array<S.String>;
135
+ readonly configMutatorNames: S.$Array<S.String>;
136
+ readonly targetMutatePatterns: S.$Array<S.String>;
137
+ readonly availableMutators: S.$Array<S.String>;
138
+ }>, {}>;
139
+ declare class PlanMutationRunCommand extends PlanMutationRunCommand_base {}
140
+ declare const MutationRunPlan_base: S.Class<MutationRunPlan, S.TaggedStruct<"MutationRunPlan", {
141
+ readonly mutatePatterns: S.$Array<S.String>;
142
+ readonly mutatorNames: S.$Array<S.String>;
143
+ }>, {}>;
144
+ declare class MutationRunPlan extends MutationRunPlan_base {}
145
+ //#endregion
146
+ //#region src/Run.schema.d.ts
147
+ declare const TypeId: '~stryker/mutation-run/StageError';
148
+ declare const StageError_base: S.Class<StageError, S.TaggedStruct<"StageError", {
149
+ readonly stage: S.Literals<readonly ["prepare", "instrument", "dryRun", "dryRunNoTests", "mutationTest"]>;
150
+ readonly reason: S.String;
151
+ readonly cause: S.optional<S.Defect>;
152
+ readonly command: S.optional<S.String>;
153
+ }>, import("effect/Cause").YieldableError>;
154
+ declare class StageError extends StageError_base {
155
+ readonly [TypeId]: "~stryker/mutation-run/StageError";
156
+ get exitClass(): ExitClass;
157
+ get message(): string;
158
+ }
159
+ declare const PrepareError_base: S.Class<PrepareError, S.TaggedStruct<"PrepareError", {
160
+ readonly stage: S.Literal<"prepare">;
161
+ readonly reason: S.String;
162
+ }>, import("effect/Cause").YieldableError>;
163
+ declare class PrepareError extends PrepareError_base {}
164
+ //#endregion
165
+ export { VerdictThresholds as S, RunStarted as _, ModeSignal as a, VerdictMutant as b, PhaseEntered as c, RunDecodeError as d, RunEvent as f, RunReadError as g, RunPhase as h, HelpRendered as i, PlanKnown as l, RunMutantTested as m, StageError as n, MutationRunPlan as o, RunFailed as p, Heartbeat as r, OutputMode as s, PrepareError as t, PlanMutationRunCommand as u, RunTerminalEvent as v, VerdictReached as x, VerdictCounts as y };