Commit 709601b
fix(ci): declare allowScripts in package.json instead of imperative CI step
npm approve-scripts writes a persistent, version-pinned allowScripts
entry into package.json rather than just approving for one run — so the
correct fix is to commit that declaration (covering ryugraph, tree-sitter*,
and esbuild, the package's actual native/build-tool deps with install
scripts) rather than run an imperative `npm approve-scripts` step in CI.
A plain `npm install` now picks it up with no extra step.
Verified locally in Docker (node:24-trixie, linux/amd64 — matching
ubuntu-latest's Ubuntu 24.04 glibc, not node:24's Debian 12 bookworm
default): install/build/typecheck succeed cleanly; 5 structural-memory
L3 tests (god-nodes/communities) timed out waiting on ryugraph's algo
extension download, matching a known sandboxed-network limitation of
this nested container (extension.ryugraph.io unreachable) — the same
suite passed 81/81 on the real dev machine (normal internet) earlier
today, so this is not expected to reproduce on GitHub's actual runners.
npm approve-scripts 會把核准結果寫成 package.json 裡持久化、版本綁定的
allowScripts 項目,不只是核准當次執行——所以正確做法是直接 commit 這個宣告
(涵蓋 ryugraph、tree-sitter*、esbuild,這個套件實際會跑 install script 的
原生/建置工具依賴),而非在 CI 裡跑一次性的 `npm approve-scripts` 指令。
現在單純的 `npm install` 就會自動套用,不需要額外步驟。
已在本機 Docker 驗證(node:24-trixie,linux/amd64——對應 ubuntu-latest 實際
是 Ubuntu 24.04 的 glibc,而非 node:24 預設的 Debian 12 bookworm):
install/build/typecheck 全部乾淨通過;5 個 structural-memory L3 測試
(god-nodes/communities)在等待 ryugraph 的 algo 擴充下載時逾時,符合這個
巢狀容器已知的網路受限現況(連不到 extension.ryugraph.io)——同一套測試
今天稍早在真實開發機(正常網路)跑過 81/81 全過,預期不會在 GitHub 真正
的 runner 上重現。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 6cd70e6 commit 709601b
2 files changed
Lines changed: 17 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | 37 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
51 | 48 | | |
52 | 49 | | |
53 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
0 commit comments