Skip to content

feat(nodex-api): upgrade Node-API headers and add v9/v10 surface#6

Merged
uuhan merged 4 commits into
devfrom
copilot/update-napi-header-dependency
Apr 2, 2026
Merged

feat(nodex-api): upgrade Node-API headers and add v9/v10 surface#6
uuhan merged 4 commits into
devfrom
copilot/update-napi-header-dependency

Conversation

Copilot AI commented Apr 2, 2026

Copy link
Copy Markdown
Contributor
  • 定位 node_api_create_buffer_from_arraybuffer 的 feature gate 与影响范围
  • 运行基线校验(check/fmt/clippy/feature tests)确认当前状态
  • 将该绑定从 v9/v10 共用改为仅 v10 暴露
  • 运行针对性校验,确认 v9 不再暴露且 v10 可用
  • 进行代码审查与安全扫描并处理反馈

@uuhan uuhan marked this pull request as ready for review April 2, 2026 01:50
Copilot AI requested a review from uuhan April 2, 2026 01:53
Copilot stopped work on behalf of uuhan due to an error April 2, 2026 01:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4bbf084adb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/nodex-api/src/api.rs Outdated
result: *mut napi_value,
) -> NapiStatus;
}
#[cfg(any(feature = "v9", feature = "v10"))]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate node_api_create_buffer_from_arraybuffer behind v10 only

The new binding is exposed for v9 via #[cfg(any(feature = "v9", feature = "v10"))], but the updated node-api-headers snapshot this commit points to (663251b...) declares node_api_create_buffer_from_arraybuffer only for NAPI_VERSION >= 10. Exposing it in v9 lets downstream code compile against a symbol that is outside the advertised API level and can fail when loaded/run against a v9-capable runtime.

Useful? React with 👍 / 👎.

Comment thread crates/nodex-api/src/api.rs
Copilot finished work on behalf of uuhan April 2, 2026 02:10
@uuhan uuhan merged commit 5e28949 into dev Apr 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants