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
{{ message }}
Repository navigation
Two test gaps: unverified prebuild Info.plist and a missing .node fixture in the Babel plugin tests #424
Two TODOs marked tests that asserted less than they appeared to. Both are now fixed on main and next.
verify-prebuilds skipped the Info.plist it just found
packages/node-addon-examples/scripts/verify-prebuilds.mts walked each framework in the XCFramework and continued past Info.plist without reading it. That file is written by writeFrameworkInfoPlist in packages/host/src/node/prebuilds/apple.ts, and a wrong CFBundleExecutable or CFBundleIdentifier passes every build step and then fails at load time on device. The script now validates Info.plist with a zod schema.
"does not touch required JS files" didn't prove what it claimed
The fixture in packages/host/src/node/babel-plugin/plugin.test.ts had my-addon.js but no sibling my-addon.node, so the assertion passed for the wrong reason. Completing the fixture exposed a real bug: isNodeApiModule in packages/host/src/node/path-utils.ts accepted an existing <path>.node before considering a .js/.json file beside it, so require('./my-addon') was rewritten to requireNodeAddon(...). The .js/.json-before-.node precedence now lives in isNodeApiModule and the plugin test has the sibling addon.
Resolution
Fixed by #426 (8d125fa), released via #471, and merged from main into next, where neither TODO remains. The competing implementations (#467 and earlier attempts) are closed.
Completing the Babel fixture exposed an actual precedence bug: require("./my-addon") was transformed to requireNodeAddon(...) even with my-addon.js beside my-addon.node. The PR now preserves Node JS/JSON resolution before addon rewriting.
It also parses generated framework plists, verifies executable and bundle ID, and adds three portable verifier tests to the root test gate. Local evidence: 10/10 focused Babel tests, 3/3 plist verifier tests, and 88/88 across the root test command.
Activity
chore: trigger CI with labels attached (#424)
Move .js/.node precedence fix into isNodeApiModule, dedupe plist checks
Move .js/.node precedence fix into isNodeApiModule, dedupe plist checks
huytdps13400 commentedon Aug 23, 2026
Fix PR is open: #455.
Completing the Babel fixture exposed an actual precedence bug:
require("./my-addon")was transformed torequireNodeAddon(...)even withmy-addon.jsbesidemy-addon.node. The PR now preserves Node JS/JSON resolution before addon rewriting.It also parses generated framework plists, verifies executable and bundle ID, and adds three portable verifier tests to the root test gate. Local evidence: 10/10 focused Babel tests, 3/3 plist verifier tests, and 88/88 across the root test command.
fix: keep .js/.json precedence over .node and verify prebuild Info.plist
Move .js/.node precedence fix into isNodeApiModule, dedupe plist checks
Move .js/.node precedence fix into isNodeApiModule, dedupe plist checks
fix: verify native prebuild fixtures (#426)