@shivaedev/vitest-rerun 0.1.2 → 0.1.3
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/README.md +21 -22
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.3 - 2026-10-30
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Require Effect 4.0.6 and align the Effect companion package peers and generated starter catalog to the same exact release. Install the 4.0.6 Effect stack together.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Register hosted RPC cache-control handling through Effect 4.0.6's request-scoped pre-response API so responses keep `private, no-store`.
|
|
12
|
+
- Accept native RPC's `application/x-ndjson` media type while preserving `application/ndjson` callers at the transport guard.
|
|
13
|
+
- Keep subscriptions open after their HTTP request body completes; closing the socket still cancels them.
|
|
14
|
+
|
|
3
15
|
## 0.1.2 - 2026-10-24
|
|
4
16
|
|
|
5
17
|
### Changed
|
package/README.md
CHANGED
|
@@ -14,13 +14,13 @@ When a test fails once and then passes, the run succeeds and `test-results/flaky
|
|
|
14
14
|
|
|
15
15
|
```json
|
|
16
16
|
[
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
{
|
|
18
|
+
"classname": "src/checkout.test.ts",
|
|
19
|
+
"name": "checkout > charges the card once",
|
|
20
|
+
"file": "src/checkout.test.ts",
|
|
21
|
+
"attempts": 2,
|
|
22
|
+
"messages": ["expected 2 to be 1"]
|
|
23
|
+
}
|
|
24
24
|
]
|
|
25
25
|
```
|
|
26
26
|
|
|
@@ -46,12 +46,12 @@ vitest-rerun [--reruns <count>] [--output-dir <directory>] [--] [vitest run argu
|
|
|
46
46
|
|
|
47
47
|
A run first deletes the reports of an earlier run in its output directory, then writes:
|
|
48
48
|
|
|
49
|
-
| File
|
|
50
|
-
|
|
|
51
|
-
| `tests.json`
|
|
52
|
-
| `tests.junit.xml`
|
|
53
|
-
| `flaky-tests.json`
|
|
54
|
-
| `tests.attempt-<n>.json`, `tests.attempt-<n>.junit.xml` | The raw reports of each attempt, kept once a rerun happens.
|
|
49
|
+
| File | Contents |
|
|
50
|
+
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
51
|
+
| `tests.json` | Vitest's JSON report for the whole run, with each test's final result and a `durationMs` per file that adds up every attempt. |
|
|
52
|
+
| `tests.junit.xml` | The JUnit report for the whole run, written with `addFileAttribute`. |
|
|
53
|
+
| `flaky-tests.json` | Written only when a test failed and then passed on a rerun. |
|
|
54
|
+
| `tests.attempt-<n>.json`, `tests.attempt-<n>.junit.xml` | The raw reports of each attempt, kept once a rerun happens. |
|
|
55
55
|
|
|
56
56
|
Coverage, when enabled, merges every attempt into the configured reports directory, so tests that passed the first time keep their coverage and rerun coverage adds to it. Reruns use their own Vite cache in `<output-dir>/vite-rerun`, so the first attempt's results cache, which Vitest uses to order test files, stays intact. Each recovered test also prints a `- Flaky:` line, which is appended to the GitHub Actions job summary when `GITHUB_STEP_SUMMARY` is set; a file that failed to load and then passed is reported there as a collection failure.
|
|
57
57
|
|
|
@@ -59,13 +59,13 @@ Coverage, when enabled, merges every attempt into the configured reports directo
|
|
|
59
59
|
|
|
60
60
|
The file holds one entry per test that passed only on a rerun:
|
|
61
61
|
|
|
62
|
-
| Field
|
|
63
|
-
|
|
|
64
|
-
| `classname` | The JUnit `classname` of the test's `testcase`, exactly as in `tests.junit.xml`.
|
|
65
|
-
| `name`
|
|
66
|
-
| `file`
|
|
67
|
-
| `attempts`
|
|
68
|
-
| `messages`
|
|
62
|
+
| Field | Value |
|
|
63
|
+
| ----------- | ----------------------------------------------------------------------------------------- |
|
|
64
|
+
| `classname` | The JUnit `classname` of the test's `testcase`, exactly as in `tests.junit.xml`. |
|
|
65
|
+
| `name` | The JUnit `name` of the test's `testcase`: its describe blocks and title joined by `>`. |
|
|
66
|
+
| `file` | The test file's path relative to the Vitest root, the same as the JUnit `file` attribute. |
|
|
67
|
+
| `attempts` | How many attempts the test took, counting the one that passed. |
|
|
68
|
+
| `messages` | The error message of each failed attempt, in order. |
|
|
69
69
|
|
|
70
70
|
The JUnit `classname` is the file's path relative to the Vitest root. When the test runs in a named Vitest project, the project comes first, as in `|unit| src/checkout.test.ts`, so a file that runs in two projects has a distinct `classname` in each. A file that failed to load has no test to name, so it appears only in the job summary.
|
|
71
71
|
|
|
@@ -85,10 +85,9 @@ The command line is a thin wrapper over two Effect functions. `parseOptions(args
|
|
|
85
85
|
### Install and limits
|
|
86
86
|
|
|
87
87
|
```sh
|
|
88
|
-
npm install --save-dev @shivaedev/vitest-rerun vitest
|
|
88
|
+
npm install --save-dev @shivaedev/vitest-rerun vitest effect @effect/platform-node @effect/platform-node-shared
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
`vitest`, `effect` and the Effect Node platform packages are peers, so your own versions run the tests. The package needs Node 24 or later.
|
|
92
|
-
|
|
93
92
|
- Vitest's `retry` is always `0`; the fresh-process rerun replaces it.
|
|
94
93
|
- The package is built for ShivaeDev repositories and may change without a deprecation period.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/vitest-rerun",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Reruns failed Vitest tests in a fresh process and reports which tests were flaky",
|
|
5
5
|
"homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/vitest-rerun#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -44,22 +44,22 @@
|
|
|
44
44
|
"README.md"
|
|
45
45
|
],
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@effect/platform-node": "4.0.
|
|
48
|
-
"@effect/platform-node-shared": "4.0.
|
|
49
|
-
"@effect/vitest": "4.0.
|
|
50
|
-
"@shivaedev/
|
|
51
|
-
"@shivaedev/
|
|
52
|
-
"@shivaedev/test-story": "0.
|
|
47
|
+
"@effect/platform-node": "4.0.6",
|
|
48
|
+
"@effect/platform-node-shared": "4.0.6",
|
|
49
|
+
"@effect/vitest": "4.0.6",
|
|
50
|
+
"@shivaedev/quality": "0.45.0",
|
|
51
|
+
"@shivaedev/test": "0.10.1",
|
|
52
|
+
"@shivaedev/test-story": "0.24.0",
|
|
53
53
|
"@types/node": "24.19.2",
|
|
54
54
|
"@vitest/coverage-v8": "5.0.5",
|
|
55
|
-
"effect": "4.0.
|
|
55
|
+
"effect": "4.0.6",
|
|
56
56
|
"typescript": "7.0.2",
|
|
57
57
|
"vitest": "5.0.5"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@effect/platform-node": "4.0.
|
|
61
|
-
"@effect/platform-node-shared": "4.0.
|
|
62
|
-
"effect": "4.0.
|
|
60
|
+
"@effect/platform-node": "4.0.6",
|
|
61
|
+
"@effect/platform-node-shared": "4.0.6",
|
|
62
|
+
"effect": "4.0.6",
|
|
63
63
|
"vitest": "5.0.5"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|