Two test gaps: unverified prebuild `Info.plist` and a missing `.node` fixture in the Babel plugin tests

Aperta
#424 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
15/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
javascript, node.js, typescript

Direzione di ricerca

Inizia dai test contrassegnati con TODO e da packages/host/src/node/prebuilds/apple.ts, incluso writeFrameworkInfoPlist, quindi esegui i test unitari pertinenti. Il lavoro è completato quando il test di prebuild verifica i valori generati di Info.plist e il fixture del plugin Babel include sia my-addon.js sia my-addon.node, preservando la risoluzione prevista. PR #426 copre già questo lavoro.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Automatable good first issue

Two TODOs marking tests that assert less than they appear to.

verify-prebuilds skips the Info.plist it just found


The verifier walks each framework in the XCFramework and `continue`s 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 the executable name matches the library, and the identifier matches what was requested, is a handful of lines given `@expo/plist` is already a dependency.

## "does not touch required JS files" doesn't prove what it claims

The test fixture has my-addon.js and asserts the plugin does not emit requireNodeAddon. But with no my-addon.node in the fixture there is nothing for the plugin to have found in the first place — the assertion passes for the wrong reason, and would keep passing even if the plugin's precedence between a .js and a sibling addon were broken. Adding a ./my-addon.node alongside it, as the TODO says, is what makes the test meaningful: with both present, require('./my-addon') must still resolve to the JS file.


Current status (as of 2026-09-14)

Both gaps above are fixed by #426, the only open PR against this issue. It's mergeable (clean), has two maintainer approvals, and CI is fully green (Lint + Unit tests on ubuntu/macos/windows; native app/device jobs skipped, which is expected for a fork PR without runner secrets/labels). Nothing further is needed here besides merging it — no competing implementation work is warranted.

Earlier independent attempts (#448, #449, #450, #455) were closed in favor of #426 once it became clear it already covered the same fixes (the shared isNodeApiModule .js/.node precedence bug, plus zod-validated Info.plist verification).

Lingua principale
TypeScript
Stelle
188
Fork
10
Merge medio
2g 17h
PR unite (30g)
3

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/react-native-node-api

Tutte le issue di callstackincubator/react-native-node-api

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.