You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build: derive libc verifier scope from optionalDependencies (#1172)
* build: derive libc verifier scope from optionalDependencies
EXPECTED_LIBC was a hand-maintained map duplicating knowledge already in
package.json's optionalDependencies. Adding a new linux-* platform required
updating both, and #1168 exists because they drifted (arm64-musl is mapped
in the CI parity job but absent here).
Derive the package list from optionalDependencies and infer expected libc
from the napi-rs -gnu/-musl suffix. New linux platforms added to
optionalDependencies are now covered automatically. An unknown suffix
fails loudly so silent gaps cannot reappear.
* fix: derive LINUX_PKG_PATTERN from LIBC_BY_SUFFIX keys (#1172)
Greptile flagged that the unknown-suffix error message told developers to
extend LIBC_BY_SUFFIX, but the regex (gnu|musl) capture group is the actual
gatekeeper — adding only a map entry would leave the package permanently
unmatched. Derive LINUX_PKG_PATTERN from Object.keys(LIBC_BY_SUFFIX) so the
regex and map can never drift apart, and update the error to reflect that
adding a map entry is now genuinely the only required change.
Also switch the script path interpolation to use fileURLToPath(import.meta.url)
instead of string-replacing the file:// scheme, per Claude's review note.
0 commit comments