Skip to content

node-api: add napi_create_external_sharedarraybuffer#62623

Merged
nodejs-github-bot merged 13 commits intonodejs:mainfrom
bnoordhuis:fix62259
Apr 17, 2026
Merged

node-api: add napi_create_external_sharedarraybuffer#62623
nodejs-github-bot merged 13 commits intonodejs:mainfrom
bnoordhuis:fix62259

Conversation

@bnoordhuis
Copy link
Copy Markdown
Member

Creates a SharedArrayBuffer from externally managed memory.

Fixes: #62259

Creates a SharedArrayBuffer from externally managed memory.

Fixes: nodejs#62259
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/node-api

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. node-api Issues and PRs related to the Node-API. labels Apr 7, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 72.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.80%. Comparing base (f48ac91) to head (bfed127).
⚠️ Report is 91 commits behind head on main.

Files with missing lines Patch % Lines
src/js_native_api_v8.cc 72.00% 0 Missing and 7 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #62623      +/-   ##
==========================================
+ Coverage   89.77%   89.80%   +0.03%     
==========================================
  Files         697      699       +2     
  Lines      215749   216404     +655     
  Branches    41304    41379      +75     
==========================================
+ Hits       193681   194344     +663     
+ Misses      14161    14139      -22     
- Partials     7907     7921      +14     
Files with missing lines Coverage Δ
src/js_native_api_v8.cc 76.43% <72.00%> (-0.06%) ⬇️

... and 67 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@ronag ronag added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 7, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 7, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@ronag ronag added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 7, 2026
@ronag ronag requested a review from vmoroz April 7, 2026 14:16
Comment thread src/js_native_api.h Outdated
Comment thread test/node-api/test_buffer/test.js
Comment thread doc/api/n-api.md Outdated
Comment thread doc/api/n-api.md
@legendecas legendecas removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 7, 2026
@legendecas legendecas moved this from Need Triage to In Progress in Node-API Team Project Apr 7, 2026
Comment thread src/js_native_api.h Outdated
Comment thread src/js_native_api_v8.cc Outdated
Comment thread doc/api/n-api.md Outdated
Comment thread src/js_native_api.h Outdated
Comment thread src/js_native_api_v8.cc Outdated
Comment thread test/node-api/test_buffer/test.js
Comment thread test/node-api/test_buffer/binding.gyp Outdated
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 10, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 10, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@ronag ronag added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 13, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 13, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@bnoordhuis
Copy link
Copy Markdown
Member Author

Test failures look like unrelated flakes. Concur/disagree?

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@ronag ronag added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 17, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Apr 17, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/62623
✔  Done loading data for nodejs/node/pull/62623
----------------------------------- PR info ------------------------------------
Title      node-api: add napi_create_external_sharedarraybuffer (#62623)
Author     Ben Noordhuis <info@bnoordhuis.nl> (@bnoordhuis)
Branch     bnoordhuis:fix62259 -> nodejs:main
Labels     c++, node-api, needs-ci
Commits    13
 - node-api: add napi_create_external_sharedarraybuffer
 - squash! lint
 - squash! more lint
 - squash! more lint
 - squash! more more lint
 - squash! review feedback
 - squash! preamble
 - squash! lint
 - squash! update binding.gyp
 - squash! review feedback
 - squash! introduce node_api_noenv_finalize
 - squash! lint
 - squash! lint
Committers 1
 - Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/62623
Fixes: https://github.com/nodejs/node/issues/62259
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/62623
Fixes: https://github.com/nodejs/node/issues/62259
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Tue, 07 Apr 2026 09:16:02 GMT
   ✔  Approvals: 4
   ✔  - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/62623#pullrequestreview-4067842600
   ✔  - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/62623#pullrequestreview-4085641875
   ✔  - Vladimir Morozov (@vmoroz): https://github.com/nodejs/node/pull/62623#pullrequestreview-4090466256
   ✔  - Robert Nagy (@ronag) (TSC): https://github.com/nodejs/node/pull/62623#pullrequestreview-4099636726
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2026-04-17T00:48:36Z: https://ci.nodejs.org/job/node-test-pull-request/72728/
- Querying data for job/node-test-pull-request/72728/
✔  Build data downloaded
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 62623
From https://github.com/nodejs/node
 * branch                  refs/pull/62623/merge -> FETCH_HEAD
✔  Fetched commits as b17884248282..bfed127d0ae3
--------------------------------------------------------------------------------
[main f1207fe5eb] node-api: add napi_create_external_sharedarraybuffer
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Tue Apr 7 11:11:15 2026 +0200
 5 files changed, 130 insertions(+)
[main 7159a586ee] squash! lint
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Tue Apr 7 11:21:05 2026 +0200
 3 files changed, 29 insertions(+), 32 deletions(-)
[main 3964c082cc] squash! more lint
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Tue Apr 7 11:40:41 2026 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
[main 676f03badb] squash! more lint
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Tue Apr 7 11:49:16 2026 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
[main 8473e978f8] squash! more more lint
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Tue Apr 7 12:13:31 2026 +0200
 1 file changed, 2 insertions(+), 2 deletions(-)
[main d4e74061d6] squash! review feedback
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Thu Apr 9 22:48:09 2026 +0200
 4 files changed, 55 insertions(+), 58 deletions(-)
[main bc31f30dcc] squash! preamble
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Thu Apr 9 22:53:52 2026 +0200
 1 file changed, 2 insertions(+)
[main eda9894d34] squash! lint
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Thu Apr 9 23:16:58 2026 +0200
 1 file changed, 2 insertions(+), 3 deletions(-)
[main 41af729d99] squash! update binding.gyp
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Thu Apr 9 23:19:58 2026 +0200
 1 file changed, 3 insertions(+), 1 deletion(-)
[main c38c77a77b] squash! review feedback
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Sun Apr 12 17:04:07 2026 +0200
 2 files changed, 3 insertions(+), 2 deletions(-)
[main 46c8ce4f4d] squash! introduce node_api_noenv_finalize
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Sun Apr 12 17:11:36 2026 +0200
 4 files changed, 7 insertions(+), 5 deletions(-)
[main ca7335e260] squash! lint
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Sun Apr 12 17:17:46 2026 +0200
 2 files changed, 14 insertions(+), 14 deletions(-)
[main 000b2014b1] squash! lint
 Author: Ben Noordhuis <info@bnoordhuis.nl>
 Date: Sun Apr 12 17:55:29 2026 +0200
 1 file changed, 1 insertion(+), 1 deletion(-)
   ✔  Patches applied
Please run the following commands to complete landing

$ git rebase origin/main --no-keep-empty -i -x "git node land --amend" --autosquash
$ git node land --continue

https://github.com/nodejs/node/actions/runs/24549787442

@legendecas legendecas added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Apr 17, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 17, 2026
@nodejs-github-bot nodejs-github-bot merged commit c1d7150 into nodejs:main Apr 17, 2026
83 checks passed
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Landed in c1d7150

@github-project-automation github-project-automation bot moved this from In Progress to Done in Node-API Team Project Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. node-api Issues and PRs related to the Node-API.

Projects

Development

Successfully merging this pull request may close these issues.

Missing napi_create_external_sharedarraybuffer

7 participants