Repository navigation
Commit 4f830b3
Add @useblacksmith/mocha beside the Vitest plugin in one pnpm workspace, so Mocha projects can run only the spec files a change affects (#1)
* Turn the repository into a pnpm workspace with the Vitest plugin under packages/vitest
The code both plugins use (fs and child recording, the git anchor, the Actions cache client, the shard hash) moves to packages/shared, which is never published: each plugin compiles it into its own dist/.
Releases are cut per package, from <package>-v<version> tags.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* Add @useblacksmith/mocha: run only the Mocha spec files a change affects
A preload records import edges, fs reads, child processes, worker threads and socket endpoints per spec file and per test; a wrapper command and a .mocharc.cjs helper select from that record.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* mocha: keep test fixtures off the CI job's real Actions cache, and print only JSON on stdout for affected --json
On a Blacksmith runner ACTIONS_RESULTS_URL is set, so the fixture repositories (identical commits, identical keys) restored each other's records. With --json the cache log lines now go to stderr.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* vitest: restore the git-ignored fixture file the first commit dropped
test/fixture-affected/src/generated/value.json is tracked in useblacksmith/vitest despite the fixture's own .gitignore; the copy into this repository skipped it, which failed 68 tests in CI.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* mocha: a lockfile or config change drops every stored test record
The change reran everything, but a test the run left out (--grep, --bail) kept its old pass and was skipped next time.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* vitest: bring in useblacksmith/vitest main up to v0.6.5 (shadow marked deprecated and dropped from the README)
The first commit here was taken before vitest main had #26 and the v0.6.5 release.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* mocha: remove the --shadow flag
The Vitest plugin has deprecated its shadow option; the Mocha plugin should not start with one.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* mocha: refuse an option the command does not know
run --shadow, now removed, was silently ignored and ran the affected selection; so was any mistyped option.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 66fc37c commit 4f830b3
175 files changed
Lines changed: 5032 additions & 2148 deletions
File tree
- .github/workflows
- packages
- mocha
- src
- test
- fixtures
- attribution
- data
- scripts
- src
- test
- imports
- src
- esm
- test
- selection
- src
- test
- services
- db/migrations
- docker
- mocks
- src
- test
- vitest
- src
- test
- fixture-affected
- mapped
- src
- __snapshots__
- fixtures
- alias
- child
- five
- six
- worker
- generated
- lib
- scripts
- fixture-browser
- src
- lib
- fixture-projects
- src
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 19 | | |
27 | 20 | | |
28 | 21 | | |
29 | 22 | | |
30 | 23 | | |
31 | 24 | | |
32 | 25 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | | - | |
31 | | - | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
41 | | - | |
42 | | - | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
72 | 12 | | |
73 | 13 | | |
74 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
75 | 19 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
80 | 25 | | |
| 26 | + | |
| 27 | + | |
0 commit comments