bivium 0.6.2 → 0.8.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/README.md +26 -22
- package/cli.js +652 -298
- package/compute.js +20 -0
- package/config.js +15 -0
- package/docs/api.md +5 -1
- package/docs/ci.md +4 -2
- package/docs/cli.md +93 -13
- package/docs/config.md +19 -12
- package/docs/how-it-works.md +18 -3
- package/docs/recipes.md +6 -4
- package/docs/tuning.md +35 -29
- package/errors.js +8 -0
- package/index.d.ts +22 -27
- package/index.js +8 -7
- package/package.json +1 -1
- package/shared-211m8fjt.js +69 -0
- package/shared-550cvwt2.js +503 -0
- package/{shared.js → shared-9qcbzxw3.js} +1652 -2046
package/README.md
CHANGED
|
@@ -8,32 +8,37 @@ break, and hands those to your test runner: Vitest, Jest, Playwright,
|
|
|
8
8
|
When it can't tell what a change touches, it runs everything,
|
|
9
9
|
and says why.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
<picture>
|
|
12
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/metonym/bivium/master/.github/assets/plan-dark.png">
|
|
13
|
+
<img alt="bivium plan main on Hono, a branch that documents its cookie helper: 18 of 103 tests run for 1 changed file, counted by directory, ending Planned 18 tests in 67 ms" src="https://raw.githubusercontent.com/metonym/bivium/master/.github/assets/plan-light.png">
|
|
14
|
+
</picture>
|
|
15
|
+
|
|
16
|
+
That's [Hono](https://github.com/honojs/hono),
|
|
17
|
+
a branch that edits its cookie helper.
|
|
18
|
+
|
|
19
|
+
Piped, or with `--list`, it prints the files, one per line.
|
|
19
20
|
|
|
20
21
|
**Every selection has a reason.**
|
|
21
22
|
`why` shows how a change reaches a test, file by file,
|
|
22
23
|
with the line that connects each one:
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
<picture>
|
|
26
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/metonym/bivium/master/.github/assets/why-dark.png">
|
|
27
|
+
<img alt="bivium why on Hono: the JWT middleware's test imports the middleware, which imports jwt.ts, which imports the changed cookie helper, each hop with the line that makes it" src="https://raw.githubusercontent.com/metonym/bivium/master/.github/assets/why-light.png">
|
|
28
|
+
</picture>
|
|
29
|
+
|
|
30
|
+
**It says what it can't see.**
|
|
31
|
+
`check` lists every file whose dependencies it can't read,
|
|
32
|
+
what each costs, and the fix:
|
|
33
|
+
|
|
34
|
+
<picture>
|
|
35
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/metonym/bivium/master/.github/assets/check-dark.png">
|
|
36
|
+
<img alt="bivium check on Hono: 1 file bivium can't follow sends 6 tests to every change, then each cause with three places and its fix, ending 4 undeclared paths in 77 ms" src="https://raw.githubusercontent.com/metonym/bivium/master/.github/assets/check-light.png">
|
|
37
|
+
</picture>
|
|
34
38
|
|
|
35
39
|
It has no dependencies and runs on Node ≥ 22 or Bun.
|
|
36
|
-
It started as the `test:changed` script
|
|
40
|
+
It started as the `test:changed` script
|
|
41
|
+
in
|
|
37
42
|
[carbon-components-svelte](https://github.com/carbon-design-system/carbon-components-svelte).
|
|
38
43
|
|
|
39
44
|
## Quick start
|
|
@@ -108,9 +113,8 @@ result.suites.unit; // { mode: "some", files: [...] }; result.suites.e2e is a ty
|
|
|
108
113
|
Vitest, Jest, Playwright, pnpm workspaces, generated code
|
|
109
114
|
- [CLI](https://github.com/metonym/bivium/blob/master/docs/cli.md):
|
|
110
115
|
every command and option, the JSON, and reading `why`
|
|
111
|
-
- [CI](https://github.com/metonym/bivium/blob/master/docs/ci.md):
|
|
112
|
-
|
|
113
|
-
and what a plan costs
|
|
116
|
+
- [CI](https://github.com/metonym/bivium/blob/master/docs/ci.md): GitHub
|
|
117
|
+
Actions, the checkout a plan needs, the cache, and what a plan costs
|
|
114
118
|
- [API](https://github.com/metonym/bivium/blob/master/docs/api.md):
|
|
115
119
|
`plan()`, and narrowers for generated files
|
|
116
120
|
- [How it works](https://github.com/metonym/bivium/blob/master/docs/how-it-works.md):
|