Commit bc68bf0
fix(test,hooks): a spawnSync option that does not exist, and the gate that would have caught it. 一個並不存在的 spawnSync 選項,以及本來該抓到它的閘門。
0.12.0-rc.1 failed to publish on `tsc --noEmit`: the new concurrency test
passed `detached: true` to `spawnSync`, which is not in SpawnSyncOptions —
spawnSync is synchronous, so the option never meant anything. Removed.
The local run was green, which is the part worth fixing. The last `tsc` on this
machine predated the file: after adding the test I only ran vitest, and vitest
executes code without typing it. Same shape this project has recorded before —
it ran, but it ran against the previous version of the tree.
So `pre-commit` now typechecks before testing. A few seconds locally against
minutes of CI round-trip, and it catches the class rather than this instance.
0.12.0-rc.1 在 `tsc --noEmit` 上發布失敗:新的併發測試傳了 `detached: true`
給 `spawnSync`,而它不在 SpawnSyncOptions 裡——spawnSync 是同步的,這個選項
從來就沒有意義。已移除。
本機是綠的,而那才是值得修的部分。這台機器上最後一次 `tsc` 早於這個檔案:
加完測試之後我只跑了 vitest,而 vitest 執行程式碼但不對它做型別檢查。與本專案
先前記錄過的形狀相同——它跑過了,但跑的是這棵樹的上一個版本。
因此 `pre-commit` 現在會先 typecheck 再跑測試。用本機的幾秒換 CI 的數分鐘往返,
而且它抓的是整個類別,不是這一個實例。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 67b4ba9 commit bc68bf0
3 files changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
1 | 8 | | |
2 | 9 | | |
3 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
| |||
0 commit comments