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

オープン
#424 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
15/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript, node.js, typescript

調査の方向性

TODO とマークされたテストおよび packages/host/src/node/prebuilds/apple.ts(writeFrameworkInfoPlist を含む)から始め、その後、関連するユニットテストを実行します。完了条件は、prebuild テストで生成された Info.plist の値が検証され、Babel プラグインの fixture に my-addon.js と my-addon.node の両方が含まれ、意図した解決が維持されていることです。PR #426 でこの作業はすでにカバーされています。

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
TypeScript
スター
188
フォーク
10
平均マージ
2日 17時間
マージ済み PR(30日)
3

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstackincubator/react-native-node-api のほかの issue

callstackincubator/react-native-node-api の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。