Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Fix TODOs in the TurboModule implementation

未关闭
#30 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@mani3xis 已经在做这个了。

开始于 2025年5月14日。

评估

这个 Issue 还没有评估数据。

描述

C++

Umbrella for the TODO/FIXME markers left in the C++ TurboModule implementation.

[!NOTE]
The permalinks originally in this issue pointed at react-native-node-api-modules and the pre-rename packages/react-native-node-api-modules/cpp/ paths, so none of them resolved any more. Refreshed below against 29a527d, with each marker mapped to the issue that now covers it.

CxxNodeApiHostModule.cpprequireNodeAddon returns undefined on bad arguments

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/cpp/CxxNodeApiHostModule.cpp#L54-L63

Covered by #50.

CxxNodeApiHostModule.cpp — the addon's declared Node-API version is never read

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/cpp/CxxNodeApiHostModule.cpp#L127-L131

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/cpp/CxxNodeApiHostModule.cpp#L142-L145

Covered by #4 (sub-issue), which also depends on #3 for the napi_module_register half. Both call sites already carry @see links to #4 in the source.

CxxNodeApiHostModule.hpp + AddonLoaders.hpp — Windows loaders

The LoaderPolicy alias is hardcoded to PosixLoader, so Win32Loader/WinRTLoader are never selected, and all four Windows failure paths detect an error and discard it instead of calling GetLastError():

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/cpp/CxxNodeApiHostModule.hpp#L45-L46

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/cpp/AddonLoaders.hpp#L45-L100

Covered by #419.

Markers added since this issue was filed

  • HermesNapiHost.cppnapi_fatal_exception aborts instead of routing through React Native's error handling → #402
  • Logger.cpplog_debug is not compiled out or gated in release builds → #420
主要语言
TypeScript
星标
188
派生
10
平均合并
2 天 17 小时
30 天内合并 PR
3

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstackincubator/react-native-node-api 的其他 Issue

查看 callstackincubator/react-native-node-api 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。