Two TODOs mark tests that assert less than they appear to.
verify-prebuilds skips the Info.plist it just found
packages/node-addon-examples/scripts/verify-prebuilds.mts walks each framework in the XCFramework and continues past Info.plist without reading it. That file is written by writeFrameworkInfoPlist in packages/host/src/node/prebuilds/apple.ts from the library name and bundle identifier, and a wrong CFBundleExecutable or CFBundleIdentifier is exactly the kind of failure that passes every build step and then fails at load time on device. Parsing it and asserting that the executable name matches the library, and that the identifier matches what was requested (escapeBundleIdentifier is the shared escaping helper), takes a handful of lines with @expo/plist, which packages/host already depends on.
"does not touch required JS files" doesn't prove what it claims
The test fixture in packages/host/src/node/babel-plugin/plugin.test.ts has my-addon.js and asserts the plugin does not emit requireNodeAddon. With no my-addon.node in the fixture there is nothing for the plugin to have found, so the assertion passes for the wrong reason and would keep passing even if the precedence between a .js and a sibling addon were broken. Adding a ./my-addon.node alongside it, as the TODO says, makes the test meaningful: with both present, require('./my-addon') must still resolve to the JS file.
Completing the fixture also exposes a real bug: isNodeApiModule in packages/host/src/node/path-utils.ts accepts an existing <path>.node as an addon before considering anything else, so the require is rewritten to requireNodeAddon(...) even when my-addon.js sits beside my-addon.node. The fix has to preserve Node's .js/.json-before-.node resolution before addon rewriting.
Current state
Both TODOs are still present on next (the default branch). The open candidate is #426, which covers both gaps and is approved, but it currently conflicts with next and its branch carries unrelated commits, so it needs a rebase before it can merge. Earlier attempts (#448, #449, #450, #455) were closed without merging.
Two
TODOs mark tests that assert less than they appear to.verify-prebuildsskips theInfo.plistit just foundpackages/node-addon-examples/scripts/verify-prebuilds.mtswalks each framework in the XCFramework andcontinues pastInfo.plistwithout reading it. That file is written bywriteFrameworkInfoPlistinpackages/host/src/node/prebuilds/apple.tsfrom the library name and bundle identifier, and a wrongCFBundleExecutableorCFBundleIdentifieris exactly the kind of failure that passes every build step and then fails at load time on device. Parsing it and asserting that the executable name matches the library, and that the identifier matches what was requested (escapeBundleIdentifieris the shared escaping helper), takes a handful of lines with@expo/plist, whichpackages/hostalready depends on."does not touch required JS files" doesn't prove what it claims
The test fixture in
packages/host/src/node/babel-plugin/plugin.test.tshasmy-addon.jsand asserts the plugin does not emitrequireNodeAddon. With nomy-addon.nodein the fixture there is nothing for the plugin to have found, so the assertion passes for the wrong reason and would keep passing even if the precedence between a.jsand a sibling addon were broken. Adding a./my-addon.nodealongside it, as theTODOsays, makes the test meaningful: with both present,require('./my-addon')must still resolve to the JS file.Completing the fixture also exposes a real bug:
isNodeApiModuleinpackages/host/src/node/path-utils.tsaccepts an existing<path>.nodeas an addon before considering anything else, so the require is rewritten torequireNodeAddon(...)even whenmy-addon.jssits besidemy-addon.node. The fix has to preserve Node's.js/.json-before-.noderesolution before addon rewriting.Current state
Both
TODOs are still present onnext(the default branch). The open candidate is #426, which covers both gaps and is approved, but it currently conflicts withnextand its branch carries unrelated commits, so it needs a rebase before it can merge. Earlier attempts (#448, #449, #450, #455) were closed without merging.