@shivaedev/vitest-rerun 0.2.0 → 0.3.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 (86) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +5 -3
  3. package/dist/{internal/junit.d.ts → adapters/RerunJunitReporter.d.ts} +3 -2
  4. package/dist/adapters/RerunJunitReporter.d.ts.map +1 -0
  5. package/dist/{internal/junit.js → adapters/RerunJunitReporter.js} +7 -4
  6. package/dist/adapters/RerunJunitReporter.js.map +1 -0
  7. package/dist/adapters/TimedJsonReporter.d.ts.map +1 -0
  8. package/dist/{internal/adapters → adapters}/TimedJsonReporter.js +1 -1
  9. package/dist/adapters/TimedJsonReporter.js.map +1 -0
  10. package/dist/adapters/VitestRunner.d.ts +48 -0
  11. package/dist/adapters/VitestRunner.d.ts.map +1 -0
  12. package/dist/adapters/VitestRunner.js +67 -0
  13. package/dist/adapters/VitestRunner.js.map +1 -0
  14. package/dist/adapters/deferCoverageThresholds.d.ts +4 -0
  15. package/dist/adapters/deferCoverageThresholds.d.ts.map +1 -0
  16. package/dist/adapters/deferCoverageThresholds.js +46 -0
  17. package/dist/adapters/deferCoverageThresholds.js.map +1 -0
  18. package/dist/adapters/mergeSnapshotSummary.d.ts +4 -0
  19. package/dist/adapters/mergeSnapshotSummary.d.ts.map +1 -0
  20. package/dist/adapters/mergeSnapshotSummary.js +19 -0
  21. package/dist/adapters/mergeSnapshotSummary.js.map +1 -0
  22. package/dist/adapters/tasks.d.ts +4 -0
  23. package/dist/adapters/tasks.d.ts.map +1 -0
  24. package/dist/adapters/tasks.js +2 -0
  25. package/dist/adapters/tasks.js.map +1 -0
  26. package/dist/adapters/writeMergedReports.d.ts +8 -0
  27. package/dist/adapters/writeMergedReports.d.ts.map +1 -0
  28. package/dist/adapters/writeMergedReports.js +21 -0
  29. package/dist/adapters/writeMergedReports.js.map +1 -0
  30. package/dist/cli.js +6 -3
  31. package/dist/cli.js.map +1 -1
  32. package/dist/flakyTests.d.ts +1 -1
  33. package/dist/flakyTests.d.ts.map +1 -1
  34. package/dist/internal/attempt.js +5 -6
  35. package/dist/internal/attempt.js.map +1 -1
  36. package/dist/internal/junitClassname.d.ts +2 -0
  37. package/dist/internal/junitClassname.d.ts.map +1 -0
  38. package/dist/internal/junitClassname.js +4 -0
  39. package/dist/internal/junitClassname.js.map +1 -0
  40. package/dist/internal/mergeAttempt.d.ts +21 -1
  41. package/dist/internal/mergeAttempt.d.ts.map +1 -1
  42. package/dist/internal/mergeAttempt.js +15 -19
  43. package/dist/internal/mergeAttempt.js.map +1 -1
  44. package/dist/internal/refuseDeclaredRetries.d.ts +4 -0
  45. package/dist/internal/refuseDeclaredRetries.d.ts.map +1 -0
  46. package/dist/internal/refuseDeclaredRetries.js +17 -0
  47. package/dist/internal/refuseDeclaredRetries.js.map +1 -0
  48. package/dist/internal/runAttempt.d.ts +2 -2
  49. package/dist/internal/runAttempt.d.ts.map +1 -1
  50. package/dist/internal/runAttempt.js +37 -73
  51. package/dist/internal/runAttempt.js.map +1 -1
  52. package/dist/internal/snapshot.d.ts +62 -6
  53. package/dist/internal/snapshot.d.ts.map +1 -1
  54. package/dist/internal/snapshot.js +19 -0
  55. package/dist/internal/snapshot.js.map +1 -1
  56. package/dist/internal/summaryLine.d.ts +3 -0
  57. package/dist/internal/summaryLine.d.ts.map +1 -0
  58. package/dist/internal/summaryLine.js +10 -0
  59. package/dist/internal/summaryLine.js.map +1 -0
  60. package/dist/rerun.d.ts.map +1 -1
  61. package/dist/rerun.js +2 -2
  62. package/dist/rerun.js.map +1 -1
  63. package/package.json +7 -4
  64. package/src/{internal/junit.ts → adapters/RerunJunitReporter.ts} +7 -4
  65. package/src/{internal/adapters → adapters}/TimedJsonReporter.ts +1 -1
  66. package/src/adapters/VitestRunner.ts +97 -0
  67. package/src/adapters/deferCoverageThresholds.ts +48 -0
  68. package/src/adapters/mergeSnapshotSummary.ts +21 -0
  69. package/src/adapters/tasks.ts +4 -0
  70. package/src/adapters/writeMergedReports.ts +27 -0
  71. package/src/cli.ts +6 -3
  72. package/src/flakyTests.ts +1 -1
  73. package/src/internal/SnapshotFiles.ts +1 -1
  74. package/src/internal/attempt.ts +7 -6
  75. package/src/internal/junitClassname.ts +3 -0
  76. package/src/internal/mergeAttempt.ts +18 -22
  77. package/src/internal/refuseDeclaredRetries.ts +22 -0
  78. package/src/internal/runAttempt.ts +36 -89
  79. package/src/internal/snapshot.ts +21 -4
  80. package/src/internal/summaryLine.ts +10 -0
  81. package/src/rerun.ts +2 -2
  82. package/dist/internal/adapters/TimedJsonReporter.d.ts.map +0 -1
  83. package/dist/internal/adapters/TimedJsonReporter.js.map +0 -1
  84. package/dist/internal/junit.d.ts.map +0 -1
  85. package/dist/internal/junit.js.map +0 -1
  86. /package/dist/{internal/adapters → adapters}/TimedJsonReporter.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0 - 2026-11-02
4
+
5
+ ### Fixed
6
+
7
+ - Refuse per-test and per-suite Vitest retries after each attempt, naming every affected file and test. Use `--reruns` for global fresh-process retries whose recoveries are recorded in `flaky-tests.json`.
8
+ - Rerun a file in full when its `beforeAll` or `afterAll` fails, including nested suite hooks. Keep unresolved hook diagnostics and new failures in the merged results.
9
+ - Judge coverage thresholds against merged coverage, preserve rerun unhandled errors in JUnit and snapshot totals and coverage in JSON, and remove attempt snapshots when a run is interrupted.
10
+ - Refuse reruns that change a test name, suite name or task kind at the same Vitest ID, preserving the earlier final reports instead of reporting a false recovery.
11
+
12
+ ### Breaking
13
+
14
+ - Code constructing `Snapshot` values for the exported internal merge API must supply `summary` with Vitest's snapshot summary. The runner creates this field automatically.
15
+
16
+ ## 0.2.1 - 2026-11-01
17
+
18
+ ### Fixed
19
+
20
+ - Report production imports of the `@effect/platform-node` barrel with module subpaths that avoid loading optional integrations such as redis.
21
+ - Recognize native Effect `catchTags` record keys regardless of the handler body while retaining diagnostics for actual nested component and hook factories.
22
+ - Keep a constant's matching filename valid when the constant becomes private.
23
+ - Name each conflicting fix and format pass's file and line/column range when `quality fix` cannot settle.
24
+ - Use Node platform module subpaths in package runtimes and commands instead of loading the barrel.
25
+
3
26
  ## 0.2.0 - 2026-10-30
4
27
 
5
28
  ### Added
package/README.md CHANGED
@@ -30,11 +30,13 @@ The final JUnit and JSON reports still describe the whole run, so CI, coverage a
30
30
 
31
31
  ### How a run works
32
32
 
33
- `vitest-rerun` runs `vitest run` once in a child process with Vitest's own retries turned off. If tests failed, it starts a new process that runs only the failed tests: tests that passed are skipped by their Vitest test IDs, including passing tests in a failed file. A file that failed to load runs again in full. Each rerun is one more attempt, and only tests still failing take part in the next one. The run ends when every test passes or the reruns are used up, and its exit code is the last attempt's: `0` when everything passed, `1` when a test is still failing, and `2` for invalid options.
33
+ `vitest-rerun` runs `vitest run` once in a child process with Vitest's project retry set to `0`. If tests failed, it starts a new process that runs only the failed tests: tests that passed are skipped by their Vitest test IDs, including passing tests in a failed file. A file that failed to load runs again in full. A failed `beforeAll` or `afterAll`, at file level or in a nested suite, also reruns the whole file so its hooks run again. Tests that passed in that file run again too; any new failure counts. A hook that fails again keeps the run failed and its diagnostic in the final JUnit report. A hook skipped by the rerun keeps its earlier failure and diagnostic. Each rerun is one more attempt, and only tests still failing take part in the next one. The run ends when every test passes or the reruns are used up, and its exit code is the last attempt's: `0` when everything passed, `1` when a test is still failing, and `2` for invalid options.
34
34
 
35
35
  An unhandled error, such as an exception thrown after a test finished, cannot be fixed by running a test again, so a run with one is not rerun and fails.
36
36
 
37
- A rerun must collect the same tests as the attempt before it. When a rerun collects a test that attempt did not have, or no longer collects one it had, for example because a test's name changes between runs, `vitest-rerun` refuses to merge it: it prints a `vitest-rerun:` message naming the test or file, the run fails with exit code `1`, and the final reports keep the results of the attempt before it.
37
+ Retries are global only, and every recovery is recorded in `flaky-tests.json`. Per-test and per-suite retry options that enable Vitest retries are refused: after an attempt, the run fails with a message naming every affected file and test, including tests that inherit a suite's retry. Remove those retry options and use `--reruns` to set the global fresh-process retry policy.
38
+
39
+ A rerun must collect the same tests as the attempt before it, with the same test names, suite names and task kinds at each Vitest ID. When an identity changes, a new test appears or an original test disappears, `vitest-rerun` refuses to merge it: it prints a `vitest-rerun:` message naming the test or file, the run fails with exit code `1`, and the final reports keep the results of the attempt before it.
38
40
 
39
41
  ### Options
40
42
 
@@ -93,5 +95,5 @@ npm install --save-dev @shivaedev/vitest-rerun vitest effect @effect/platform-no
93
95
  ```
94
96
 
95
97
  `vitest`, `effect` and the Effect Node platform packages are peers, so your own versions run the tests. The package needs Node 24 or later.
96
- - Vitest's `retry` is always `0`; the fresh-process rerun replaces it.
98
+ - Vitest's project `retry` is set to `0`; per-test and per-suite retries are refused in favor of the global, recorded fresh-process reruns.
97
99
  - The package is built for ShivaeDev repositories and may change without a deprecation period.
@@ -1,8 +1,9 @@
1
1
  import { JUnitReporter, type Vitest } from "vitest/node";
2
- export declare function junitClassname(file: string, project: string): string;
3
2
  export declare class RerunJunitReporter extends JUnitReporter {
4
3
  #private;
4
+ unhandledErrors: NonNullable<Parameters<JUnitReporter["onTestRunEnd"]>[1]>;
5
5
  constructor(outputFile: string);
6
+ onTestRunEnd(...args: Parameters<JUnitReporter["onTestRunEnd"]>): Promise<void>;
6
7
  onInit(vitest: Vitest): Promise<void>;
7
8
  }
8
- //# sourceMappingURL=junit.d.ts.map
9
+ //# sourceMappingURL=RerunJunitReporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RerunJunitReporter.d.ts","sourceRoot":"","sources":["../../src/adapters/RerunJunitReporter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAGzD,qBAAa,kBAAmB,SAAQ,aAAa;;IACpD,eAAe,EAAE,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAM;IAGhF,YAAY,UAAU,EAAE,MAAM,EAQ7B;IAEQ,YAAY,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,iBAGvE;IAEQ,MAAM,CAAC,MAAM,EAAE,MAAM,iBAG7B;CACD"}
@@ -1,9 +1,8 @@
1
1
  import { relative } from "node:path";
2
2
  import { JUnitReporter } from "vitest/node";
3
- export function junitClassname(file, project) {
4
- return project === "" ? file : `|${project}| ${file}`;
5
- }
3
+ import { junitClassname } from "#internal/junitClassname.ts";
6
4
  export class RerunJunitReporter extends JUnitReporter {
5
+ unhandledErrors = [];
7
6
  #root;
8
7
  constructor(outputFile) {
9
8
  const root = { path: "" };
@@ -14,9 +13,13 @@ export class RerunJunitReporter extends JUnitReporter {
14
13
  });
15
14
  this.#root = root;
16
15
  }
16
+ onTestRunEnd(...args) {
17
+ this.unhandledErrors = args[1] ?? [];
18
+ return super.onTestRunEnd(...args);
19
+ }
17
20
  onInit(vitest) {
18
21
  this.#root.path = vitest.config.root;
19
22
  return super.onInit(vitest);
20
23
  }
21
24
  }
22
- //# sourceMappingURL=junit.js.map
25
+ //# sourceMappingURL=RerunJunitReporter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RerunJunitReporter.js","sourceRoot":"","sources":["../../src/adapters/RerunJunitReporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,aAAa,EAAe,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,MAAM,OAAO,kBAAmB,SAAQ,aAAa;IACpD,eAAe,GAA8D,EAAE,CAAC;IACvE,KAAK,CAAmB;IAEjC,YAAY,UAAkB;QAC7B,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QAC1B,KAAK,CAAC;YACL,gBAAgB,EAAE,IAAI;YACtB,iBAAiB,EAAE,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC;YAC5G,UAAU;SACV,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACnB,CAAC;IAEQ,YAAY,CAAC,GAAG,IAA+C;QACvE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACrC,OAAO,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;IAEQ,MAAM,CAAC,MAAc;QAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACrC,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;CACD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimedJsonReporter.d.ts","sourceRoot":"","sources":["../../src/adapters/TimedJsonReporter.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8B,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAIxF,qBAAa,iBAAkB,SAAQ,YAAY;IACnC,YAAY,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,iBAYzD;CACD"}
@@ -1,4 +1,4 @@
1
- import { NodeServices } from "@effect/platform-node";
1
+ import * as NodeServices from "@effect/platform-node/NodeServices";
2
2
  import { Effect } from "effect";
3
3
  import { experimental_getRunnerTask, JsonReporter } from "vitest/node";
4
4
  import { VitestRerunError } from "#error.ts";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimedJsonReporter.js","sourceRoot":"","sources":["../../src/adapters/TimedJsonReporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,0BAA0B,EAAE,YAAY,EAAmB,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,OAAO,iBAAkB,SAAQ,YAAY;IACzC,KAAK,CAAC,YAAY,CAAC,OAA8B;QACzD,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,IAAI,gBAAgB,CAAC,EAAE,OAAO,EAAE,2CAA2C,EAAE,CAAC,CAAC;QACtF,CAAC;QACD,MAAM,MAAM,CAAC,UAAU,CACtB,gBAAgB,CACf,IAAI,EACJ,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,QAAQ,IAAI,CAAC,CAAC,CACjF,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAC1C,CAAC;IACH,CAAC;CACD"}
@@ -0,0 +1,48 @@
1
+ import { Effect } from "effect";
2
+ import * as VitestNode from "vitest/node";
3
+ import type { Snapshot } from "#internal/snapshot.ts";
4
+ import type { Files } from "./tasks.ts";
5
+ interface RunOptions {
6
+ readonly cacheDir?: string;
7
+ readonly reports: {
8
+ readonly json: string;
9
+ readonly junit: string;
10
+ };
11
+ readonly rerun: boolean;
12
+ readonly vitestArgs: readonly string[];
13
+ }
14
+ export interface Selection {
15
+ readonly fileId: string;
16
+ readonly testIds?: string[];
17
+ }
18
+ declare const open: (input: RunOptions) => Effect.Effect<{
19
+ collect: (files: Files, summary: Snapshot["summary"]) => Effect.Effect<void, never, never>;
20
+ finish: (outputDir: string, attempt: number, reports: RunOptions["reports"]) => Effect.Effect<void, import("effect/PlatformError").PlatformError | import("effect/Schema").SchemaError | import("#error.ts").VitestRerunError, import("effect/FileSystem").FileSystem>;
21
+ read: () => Effect.Effect<{
22
+ errors: unknown[];
23
+ files: VitestNode.RunnerTestFile[];
24
+ root: string;
25
+ summary: import("vitest").SnapshotSummary;
26
+ }, never, never>;
27
+ rerun: (selected: readonly Selection[]) => Effect.Effect<undefined, import("#error.ts").VitestRerunError, never>;
28
+ start: () => Effect.Effect<void, import("#error.ts").VitestRerunError, never>;
29
+ }, import("#error.ts").VitestRerunError, import("effect/Scope").Scope>;
30
+ export declare const VitestRunner: import("effect/Context").Service<"@shivaedev/vitest-rerun/VitestRunner", Readonly<{
31
+ readonly open: (input: RunOptions) => Effect.Effect<{
32
+ collect: (files: Files, summary: Snapshot["summary"]) => Effect.Effect<void, never, never>;
33
+ finish: (outputDir: string, attempt: number, reports: RunOptions["reports"]) => Effect.Effect<void, import("effect/PlatformError").PlatformError | import("effect/Schema").SchemaError | import("#error.ts").VitestRerunError, import("effect/FileSystem").FileSystem>;
34
+ read: () => Effect.Effect<{
35
+ errors: unknown[];
36
+ files: VitestNode.RunnerTestFile[];
37
+ root: string;
38
+ summary: import("vitest").SnapshotSummary;
39
+ }, never, never>;
40
+ rerun: (selected: readonly Selection[]) => Effect.Effect<undefined, import("#error.ts").VitestRerunError, never>;
41
+ start: () => Effect.Effect<void, import("#error.ts").VitestRerunError, never>;
42
+ }, import("#error.ts").VitestRerunError, import("effect/Scope").Scope>;
43
+ }>> & {
44
+ readonly layer: import("effect/Layer").Layer<"@shivaedev/vitest-rerun/VitestRunner", never, never>;
45
+ };
46
+ export type AttemptRunner = Effect.Success<ReturnType<typeof open>>;
47
+ export {};
48
+ //# sourceMappingURL=VitestRunner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VitestRunner.d.ts","sourceRoot":"","sources":["../../src/adapters/VitestRunner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAG1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGxC,UAAU,UAAU;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACpE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,SAAS;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAMD,QAAA,MAAM,IAAI;qBAuBS,KAAK,WAAW,QAAQ,CAAC,SAAS,CAAC;wBAOhC,MAAM,WAAW,MAAM,WAAW,UAAU,CAAC,SAAS,CAAC;;;;;;;sBAYzD,SAAS,SAAS,EAAE;;sEAiBtC,CAAC;AAEH,eAAO,MAAM,YAAY;;yBAtCN,KAAK,WAAW,QAAQ,CAAC,SAAS,CAAC;4BAOhC,MAAM,WAAW,MAAM,WAAW,UAAU,CAAC,SAAS,CAAC;;;;;;;0BAYzD,SAAS,SAAS,EAAE;;;;;CAwBtC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { Effect } from "effect";
2
+ import * as VitestNode from "vitest/node";
3
+ import { defineService } from "@shivaedev/service/defineService.ts";
4
+ import { failWith } from "#error.ts";
5
+ import { deferCoverageThresholds } from "./deferCoverageThresholds.js";
6
+ import { mergeSnapshotSummary } from "./mergeSnapshotSummary.js";
7
+ import { RerunJunitReporter } from "./RerunJunitReporter.js";
8
+ import { TimedJsonReporter } from "./TimedJsonReporter.js";
9
+ import { writeMergedReports } from "./writeMergedReports.js";
10
+ function promise(message, run) {
11
+ return Effect.tryPromise({ catch: failWith(message), try: run });
12
+ }
13
+ const open = Effect.fn("VitestRerun.open")(function* (input) {
14
+ const { filter, options } = yield* Effect.try({
15
+ catch: (cause) => failWith(`Could not parse Vitest arguments: ${cause instanceof Error ? cause.message : String(cause)}`)(cause),
16
+ try: () => VitestNode.parseCLI(["vitest", "run", ...input.vitestArgs]),
17
+ });
18
+ const { shard: _shard, ...unsharded } = options;
19
+ const junit = new RerunJunitReporter(input.reports.junit);
20
+ const vitest = yield* Effect.acquireRelease(promise("Vitest could not start", () => VitestNode.createVitest({
21
+ ...(input.rerun ? unsharded : options),
22
+ reporters: ["default", new TimedJsonReporter({ outputFile: input.reports.json }), junit],
23
+ retry: 0,
24
+ watch: false,
25
+ }, input.cacheDir === undefined ? {} : { cacheDir: input.cacheDir })), (instance) => Effect.promise(() => instance.close()));
26
+ const finishCoverage = yield* deferCoverageThresholds(vitest);
27
+ return {
28
+ collect: (files, summary) => Effect.sync(() => {
29
+ for (const file of files) {
30
+ vitest.state.collectFiles(vitest.getProjectByName(file.projectName ?? ""), [file]);
31
+ }
32
+ vitest.snapshot.summary = mergeSnapshotSummary(summary, vitest.snapshot.summary);
33
+ }),
34
+ finish: (outputDir, attempt, reports) => Effect.gen(function* () {
35
+ const coverage = yield* finishCoverage(outputDir, attempt, input.reports.json);
36
+ yield* writeMergedReports(vitest, reports, coverage, junit.unhandledErrors);
37
+ }),
38
+ read: () => Effect.sync(() => ({
39
+ errors: vitest.state.getUnhandledErrors(),
40
+ files: vitest.state.getFiles(),
41
+ root: vitest.config.root,
42
+ summary: vitest.snapshot.summary,
43
+ })),
44
+ rerun: (selected) => Effect.gen(function* () {
45
+ yield* promise("Vitest could not prepare the rerun", () => vitest.standalone());
46
+ const specifications = yield* promise("Vitest could not list test files", () => vitest.globTestSpecifications());
47
+ const failed = specifications.flatMap((spec) => {
48
+ const selection = selected.find((item) => item.fileId === spec.taskId);
49
+ return selection === undefined
50
+ ? []
51
+ : [spec.project.createSpecification(spec.moduleId, selection.testIds === undefined ? {} : { testIds: selection.testIds }, spec.pool)];
52
+ });
53
+ if (failed.length === 0) {
54
+ return yield* Effect.fail(failWith("No failed specifications found for the fresh rerun")(undefined));
55
+ }
56
+ yield* promise("Vitest could not rerun the failed tests", () => vitest.runTestSpecifications(failed));
57
+ }),
58
+ start: () => promise("Vitest could not run the tests", () => vitest.start(filter)).pipe(Effect.asVoid),
59
+ };
60
+ });
61
+ export const VitestRunner = defineService({
62
+ id: "@shivaedev/vitest-rerun/VitestRunner",
63
+ initialize: Effect.void,
64
+ methods: () => ({ open }),
65
+ requires: [],
66
+ });
67
+ //# sourceMappingURL=VitestRunner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VitestRunner.js","sourceRoot":"","sources":["../../src/adapters/VitestRunner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAc7D,SAAS,OAAO,CAAI,OAAe,EAAE,GAAqB;IACzD,OAAO,MAAM,CAAC,UAAU,CAAC,EAA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AO,CAAC,yCAAyC,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;QACvG,CAAC,CAAC;QACH,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,gCAAgC,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;KACtG,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;IACzC,EAAE,EAAE,sCAAsC;IAC1C,UAAU,EAAE,MAAM,CAAC,IAAI;IACvB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IACzB,QAAQ,EAAE,EAAE;CACZ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Effect, FileSystem, Schema } from "effect";
2
+ import { type Vitest } from "vitest/node";
3
+ export declare const deferCoverageThresholds: (vitest: Vitest) => Effect.Effect<(outputDir: string, attempt: number, json: string) => Effect.Effect<unknown, import("effect/PlatformError").PlatformError | Schema.SchemaError | import("#error.ts").VitestRerunError, FileSystem.FileSystem>, import("#error.ts").VitestRerunError, never>;
4
+ //# sourceMappingURL=deferCoverageThresholds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferCoverageThresholds.d.ts","sourceRoot":"","sources":["../../src/adapters/deferCoverageThresholds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,EAA+C,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAOvF,eAAO,MAAM,uBAAuB,+RA0BlC,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { Effect, FileSystem, Schema } from "effect";
2
+ import { BaseCoverageProvider } from "vitest/node";
3
+ import { failWith } from "#error.ts";
4
+ import { attemptPaths } from "#internal/reportPaths.ts";
5
+ const CoverageReport = Schema.Struct({ coverageMap: Schema.optional(Schema.Unknown) });
6
+ const decodeCoverage = Schema.decodeUnknownEffect(Schema.fromJsonString(CoverageReport));
7
+ export const deferCoverageThresholds = Effect.fn("VitestRerun.deferCoverageThresholds")(function* (vitest) {
8
+ const provider = yield* Effect.tryPromise({
9
+ catch: failWith("Vitest could not load its coverage provider"),
10
+ try: () => vitest.createCoverageProvider(),
11
+ });
12
+ const options = provider?.resolveOptions();
13
+ const thresholds = options?.thresholds;
14
+ if (options !== undefined) {
15
+ options.thresholds = {};
16
+ }
17
+ return Effect.fn("VitestRerun.finishCoverage")(function* (outputDir, attempt, json) {
18
+ if (provider === null || options === undefined) {
19
+ return undefined;
20
+ }
21
+ const fs = yield* FileSystem.FileSystem;
22
+ const maps = [];
23
+ for (let earlier = 1; earlier <= attempt; earlier += 1) {
24
+ const path = earlier === attempt ? json : attemptPaths(outputDir, earlier).json;
25
+ const { coverageMap } = yield* decodeCoverage(yield* fs.readFileString(path));
26
+ if (coverageMap !== undefined) {
27
+ maps.push(coverageMap);
28
+ }
29
+ }
30
+ options.thresholds = thresholds ?? {};
31
+ return yield* Effect.tryPromise({ catch: failWith("Vitest could not merge coverage"), try: () => reportMergedCoverage(provider, maps) });
32
+ });
33
+ });
34
+ async function reportMergedCoverage(provider, maps) {
35
+ let merged;
36
+ if (provider instanceof BaseCoverageProvider) {
37
+ const generate = provider.generateReports.bind(provider);
38
+ provider.generateReports = async (map, allTestsRun) => {
39
+ merged = map;
40
+ await generate(map, allTestsRun);
41
+ };
42
+ }
43
+ await provider.mergeReports?.(maps);
44
+ return merged;
45
+ }
46
+ //# sourceMappingURL=deferCoverageThresholds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferCoverageThresholds.js","sourceRoot":"","sources":["../../src/adapters/deferCoverageThresholds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,QAAQ,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AACf,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { SnapshotSummary } from "vitest";
2
+ import type { Snapshot } from "#internal/snapshot.ts";
3
+ export declare function mergeSnapshotSummary(previous: Snapshot["summary"], current: SnapshotSummary): SnapshotSummary;
4
+ //# sourceMappingURL=mergeSnapshotSummary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeSnapshotSummary.d.ts","sourceRoot":"","sources":["../../src/adapters/mergeSnapshotSummary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,eAAe,GAAG,eAAe,CAiB7G"}
@@ -0,0 +1,19 @@
1
+ export function mergeSnapshotSummary(previous, current) {
2
+ return {
3
+ added: previous.added + current.added,
4
+ didUpdate: previous.didUpdate || current.didUpdate,
5
+ failure: previous.failure || current.failure,
6
+ filesAdded: previous.filesAdded + current.filesAdded,
7
+ filesRemoved: previous.filesRemoved + current.filesRemoved,
8
+ filesRemovedList: [...previous.filesRemovedList, ...current.filesRemovedList],
9
+ filesUnmatched: previous.filesUnmatched + current.filesUnmatched,
10
+ filesUpdated: previous.filesUpdated + current.filesUpdated,
11
+ matched: previous.matched + current.matched,
12
+ total: previous.total + current.total,
13
+ unchecked: previous.unchecked + current.unchecked,
14
+ uncheckedKeysByFile: [...previous.uncheckedKeysByFile.map((file) => ({ ...file, keys: [...file.keys] })), ...current.uncheckedKeysByFile],
15
+ unmatched: previous.unmatched + current.unmatched,
16
+ updated: previous.updated + current.updated,
17
+ };
18
+ }
19
+ //# sourceMappingURL=mergeSnapshotSummary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeSnapshotSummary.js","sourceRoot":"","sources":["../../src/adapters/mergeSnapshotSummary.ts"],"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ReturnType<Vitest["state"]["getFiles"]>;
3
+ export type Task = Files[number]["tasks"][number];
4
+ //# sourceMappingURL=tasks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/adapters/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AAC5D,MAAM,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tasks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/adapters/tasks.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { Effect } from "effect";
2
+ import type { Vitest } from "vitest/node";
3
+ import { RerunJunitReporter } from "./RerunJunitReporter.ts";
4
+ export declare function writeMergedReports(vitest: Vitest, reports: {
5
+ json: string;
6
+ junit: string;
7
+ }, coverage: unknown, errors: RerunJunitReporter["unhandledErrors"]): Effect.Effect<void, import("#error.ts").VitestRerunError, never>;
8
+ //# sourceMappingURL=writeMergedReports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writeMergedReports.d.ts","sourceRoot":"","sources":["../../src/adapters/writeMergedReports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EACxC,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,oEAgB7C"}
@@ -0,0 +1,21 @@
1
+ import { Effect } from "effect";
2
+ import { failWith } from "#error.ts";
3
+ import { RerunJunitReporter } from "./RerunJunitReporter.js";
4
+ import { TimedJsonReporter } from "./TimedJsonReporter.js";
5
+ export function writeMergedReports(vitest, reports, coverage, errors) {
6
+ return Effect.tryPromise({
7
+ catch: failWith("Vitest could not write the merged reports"),
8
+ try: async () => {
9
+ const json = new TimedJsonReporter({ outputFile: reports.json });
10
+ const junit = new RerunJunitReporter(reports.junit);
11
+ await json.onInit(vitest);
12
+ if (coverage !== undefined) {
13
+ json.onCoverage(coverage);
14
+ }
15
+ await json.onTestRunEnd(vitest.state.getTestModules());
16
+ await junit.onInit(vitest);
17
+ await junit.onTestRunEnd(vitest.state.getTestModules(), errors);
18
+ },
19
+ });
20
+ }
21
+ //# sourceMappingURL=writeMergedReports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writeMergedReports.js","sourceRoot":"","sources":["../../src/adapters/writeMergedReports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,UAAU,kBAAkB,CACjC,MAAc,EACd,OAAwC,EACxC,QAAiB,EACjB,MAA6C;IAE7C,OAAO,MAAM,CAAC,UAAU,CAAC;QACxB,KAAK,EAAE,QAAQ,CAAC,2CAA2C,CAAC;QAC5D,GAAG,EAAE,KAAK,IAAI,EAAE;YACf,MAAM,IAAI,GAAG,IAAI,iBAAiB,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;YACjE,MAAM,KAAK,GAAG,IAAI,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACpD,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC1B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC5B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YAC3B,CAAC;YACD,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC;YACvD,MAAM,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC3B,MAAM,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,MAAM,CAAC,CAAC;QACjE,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
package/dist/cli.js CHANGED
@@ -1,7 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import process from "node:process";
3
- import { NodeServices } from "@effect/platform-node";
4
- import { Effect } from "effect";
3
+ import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
4
+ import * as NodeServices from "@effect/platform-node/NodeServices";
5
+ import { Effect, Exit, Runtime } from "effect";
5
6
  import { main } from "#internal/main.ts";
6
- process.exitCode = await Effect.runPromise(main(process.argv.slice(2), process.cwd()).pipe(Effect.provide(NodeServices.layer)));
7
+ NodeRuntime.runMain(main(process.argv.slice(2), process.cwd()).pipe(Effect.provide(NodeServices.layer)), {
8
+ teardown: (exit, onExit) => (Exit.isSuccess(exit) ? onExit(Number(exit.value)) : Runtime.defaultTeardown(exit, onExit)),
9
+ });
7
10
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,CAAC,QAAQ,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,YAAY,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE;IACxG,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;CACvH,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Effect, FileSystem, Schema } from "effect";
2
- import type { Task } from "#internal/snapshot.ts";
2
+ import type { Task } from "#adapters/tasks.ts";
3
3
  export declare const FlakyTest: Schema.Struct<{
4
4
  readonly attempts: Schema.Number;
5
5
  readonly classname: Schema.String;
@@ -1 +1 @@
1
- {"version":3,"file":"flakyTests.d.ts","sourceRoot":"","sources":["../src/flakyTests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAElD,eAAO,MAAM,SAAS;;;;;;EAMpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAC;AAE9C,eAAO,MAAM,UAAU;;;;;;GAA0B,CAAC;AAElD,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,EAAE,SAAS,SAAK,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;CAAE,EAAE,CAKlH;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEjD;AAID,eAAO,MAAM,eAAe;;;;;;qHAG1B,CAAC"}
1
+ {"version":3,"file":"flakyTests.d.ts","sourceRoot":"","sources":["../src/flakyTests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,eAAO,MAAM,SAAS;;;;;;EAMpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAC;AAE9C,eAAO,MAAM,UAAU;;;;;;GAA0B,CAAC;AAElD,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,EAAE,SAAS,SAAK,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;CAAE,EAAE,CAKlH;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEjD;AAID,eAAO,MAAM,eAAe;;;;;;qHAG1B,CAAC"}
@@ -1,13 +1,12 @@
1
1
  import process from "node:process";
2
2
  import { fileURLToPath } from "node:url";
3
- import { NodeServices } from "@effect/platform-node";
4
- import { Console, Effect } from "effect";
3
+ import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
4
+ import * as NodeServices from "@effect/platform-node/NodeServices";
5
+ import { Console, Effect, Exit, Runtime } from "effect";
6
+ import { VitestRunner } from "#adapters/VitestRunner.ts";
5
7
  import { runAttempt } from "#internal/runAttempt.ts";
6
8
  if (fileURLToPath(import.meta.url) === process.argv[1]) {
7
9
  const [attempt = "1", outputDir = ".", ...vitestArgs] = process.argv.slice(2);
8
- const failed = await Effect.runPromise(runAttempt({ attempt: Number(attempt), outputDir, vitestArgs }).pipe(Effect.catchTag("VitestRerunError", (error) => Effect.as(Console.error(`vitest-rerun: ${error.message}`, ...(error.cause === undefined ? [] : [error.cause])), true)), Effect.provide(NodeServices.layer)));
9
- if (failed) {
10
- process.exitCode = 1;
11
- }
10
+ NodeRuntime.runMain(runAttempt({ attempt: Number(attempt), outputDir, vitestArgs }).pipe(Effect.catchTag("VitestRerunError", (error) => Effect.as(Console.error(`vitest-rerun: ${error.message}`, ...(error.cause === undefined ? [] : [error.cause])), true)), Effect.provide(VitestRunner.layer), Effect.provide(NodeServices.layer)), { teardown: (exit, onExit) => (Exit.isSuccess(exit) ? onExit(Number(exit.value)) : Runtime.defaultTeardown(exit, onExit)) });
12
11
  }
13
12
  //# sourceMappingURL=attempt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"attempt.js","sourceRoot":"","sources":["../../src/internal/attempt.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YA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CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAC3H,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function junitClassname(file: string, project: string): string;
2
+ //# sourceMappingURL=junitClassname.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"junitClassname.d.ts","sourceRoot":"","sources":["../../src/internal/junitClassname.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpE"}
@@ -0,0 +1,4 @@
1
+ export function junitClassname(file, project) {
2
+ return project === "" ? file : `|${project}| ${file}`;
3
+ }
4
+ //# sourceMappingURL=junitClassname.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"junitClassname.js","sourceRoot":"","sources":["../../src/internal/junitClassname.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,OAAe;IAC3D,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;AACvD,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import { Effect } from "effect";
2
+ import type { Files } from "#adapters/tasks.ts";
2
3
  import { VitestRerunError } from "#error.ts";
3
4
  import { type FlakyTest } from "#flakyTests.ts";
4
- import { type FailureHistory, type Files } from "#internal/snapshot.ts";
5
+ import { type FailureHistory } from "#internal/snapshot.ts";
5
6
  interface Merged {
6
7
  readonly failures: Readonly<Record<string, FailureHistory>>;
7
8
  readonly files: Files;
@@ -23,6 +24,25 @@ export declare const mergeAttempt: (previous: {
23
24
  readonly messages: readonly string[];
24
25
  readonly name: string;
25
26
  }[];
27
+ readonly summary: {
28
+ readonly added: number;
29
+ readonly didUpdate: boolean;
30
+ readonly failure: boolean;
31
+ readonly filesAdded: number;
32
+ readonly filesRemoved: number;
33
+ readonly filesRemovedList: readonly string[];
34
+ readonly filesUnmatched: number;
35
+ readonly filesUpdated: number;
36
+ readonly matched: number;
37
+ readonly total: number;
38
+ readonly unchecked: number;
39
+ readonly uncheckedKeysByFile: readonly {
40
+ readonly filePath: string;
41
+ readonly keys: readonly string[];
42
+ }[];
43
+ readonly unmatched: number;
44
+ readonly updated: number;
45
+ };
26
46
  }, rerun: import("vitest").RunnerTestFile[], root: string, summary: (line: string) => void) => Effect.Effect<Merged, VitestRerunError, never>;
27
47
  export {};
28
48
  //# sourceMappingURL=mergeAttempt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mergeAttempt.d.ts","sourceRoot":"","sources":["../../src/internal/mergeAttempt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,KAAK,EAAmC,MAAM,uBAAuB,CAAC;AAiFzG,UAAU,MAAM;IACf,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;IAC5D,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;CACrC;AAkCD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;2EAIR,MAAM,KAAK,IAAI,mDAiB9B,CAAC"}
1
+ {"version":3,"file":"mergeAttempt.d.ts","sourceRoot":"","sources":["../../src/internal/mergeAttempt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,KAAK,EAAQ,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OA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