Commit 610c697
authored
build: restore libc discriminator on linux lockfile entries (#1163)
* build: restore libc discriminator on linux lockfile entries
npm 11 silently strips the `libc` field from @optave/codegraph-linux-*
entries in package-lock.json on `npm install`, even though the published
packages declare it correctly. Without the discriminator, npm cannot tell
linux-x64-gnu apart from linux-x64-musl when resolving the lockfile, so
the wrong native binary may load on Alpine/musl hosts.
Restore the field and add a CI guard (run before `npm install` in the
lint job) that fails any PR which lands a lockfile missing the
discriminator — Dependabot bumps and contributor installs would
otherwise silently regress this again.
Closes #1160
* fix: resolve lockfile path relative to script location (#1163)
Use import.meta.url to find package-lock.json regardless of the
process CWD. Previously running 'node scripts/verify-lockfile-libc.mjs'
from the scripts/ subdirectory failed with a confusing ENOENT instead
of running the actual check.1 parent a029d43 commit 610c697
3 files changed
Lines changed: 70 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 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 | + | |
0 commit comments