GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — node-api: handle no support for external buffers by mhdawson · Pull Request #45181 · nodejs/node

Conversation

@mhdawson

@mhdawson mhdawson commented Oct 25, 2022

Copy link
Copy Markdown
Member

Refs: electron/electron#35801 Refs: nodejs/abi-stable-node#441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:

  • hide the methods to create external buffers so they can avoid using them if they want the broadest compatibility.
  • call the methods that create external buffers at runtime to check if external buffers are supported and either use them or not based on the return code.

Signed-off-by: Michael Dawson [email protected]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Julusian, bricss, and erickzhao reacted with hooray emoji
All reactions
  • 🎉 3 reactions
@mhdawson
node-api: handle no support for external buffers
e29b2c0
Refs: electron/electron#35801
Refs: nodejs/abi-stable-node#441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented Oct 25, 2022

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/node-api
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Oct 25, 2022
@mhdawson

mhdawson commented Oct 25, 2022

Copy link
Copy Markdown
Member Author

I've manually tested the new status code and define by hacking our addon tests

To add a test to our test suite to test the status code we would need a build with pointer compression turned on as well as the pointer cage turned on. We don't build in our regular build/test in our CI so no easy way to add that test that I can think off.

To add a test to our test suite to test the #define we'd need to build an addon that would fail to compile, looking at the addon tests I don't think we do anything like that either. @legendecas I know you added some more complicated tests for some harder cases, any of those offer a possible answer to adding a test in this case?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Oct 25, 2022
Electron 21 breaks api compatability with some modules nodejs/abi-stable-node#441
Closed
[Bug]: Electron 21 breaks node-api stability guarantees electron/electron#35801
Closed
@MarshallOfSound

MarshallOfSound commented Oct 25, 2022

Copy link
Copy Markdown
Member

@mhdawson I think this was briefly mentioned in the Electron thread this started in but would it be reasonable to add a method that does this transparently for addon authors.

These changes are good because they (a) prevent crashes and (b) allow addon authors to opt out of external buffers completely. But I think the ideal for an addon author is they use a method like

napi_create_or_copy_external_buffer

which internally maps to

napi_status NAPI_CDECL napi_create_or_copy_external_buffer(napi_env env,
                                                   size_t length,
                                                   void* data,
                                                   napi_finalize finalize_cb,
                                                   void* finalize_hint,
                                                   napi_value* result) {
#if defined(V8_COMPRESS_POINTERS_IN_SHARED_CAGE)
  return napi_create_buffer(env, length, data, result);
#else
  return napi_create_external_buffer(env, length, data, finalize_cb, finalize_hint, result);
#fi
}

Not sure if it's reasonable to drop finalization info in the cage scenario but with that method addon authors could then just use napi_create_or_copy_external_buffer and in node it would be external and as performant as possible and in environments with the shared cage enabled it would transparently copy the contents of data.

There might be other implications I'm missing though 🤔

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

NickNaso
NickNaso reviewed Oct 25, 2022
View reviewed changes
Comment thread doc/api/n-api.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Julusian

Julusian commented Oct 25, 2022

Copy link
Copy Markdown

What versions of nodejs are we likely to see this in? Will it need to be released as part of node-api v9, as it adds a new value to an enum?

@MarshallOfSound a wrapper like that would be nice, but in my opinion could also live in node-addon-api. It will be easy to implement on top of this change by checking the return value instead of using an ifdef

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@legendecas

legendecas commented Oct 26, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

External array buffers have JavaScript observable differences with the copying semantics. JavaScript code can directly see the changes in the memory of the external array buffer and modify it without calling into the add-on. Implicitly copying with a function like napi_create_or_copy_external_buffer invalidates this behavior -- the change on the external buffer are no longer observable from the copied array buffer, and changes to the copied array buffer are not reflected in the external buffer.

So I'm -1 on a new function like napi_create_or_copy_external_buffer coded in the node-api. Rather, add-on authors can choose the best course for their own distinct use case, and a helper function is fairly straightforward to be added if they do not care about direct memory access from JavaScript.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

legendecas
legendecas reviewed Oct 26, 2022
View reviewed changes
Comment thread doc/api/n-api.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@legendecas

legendecas commented Oct 26, 2022

Copy link
Copy Markdown
Member

I've manually tested the new status code and define by hacking our addon tests
To add a test to our test suite to test the status code we would need a build with pointer compression turned on as well as the pointer cage turned on. We don't build in our regular build/test in our CI so no easy way to add that test that I can think off.

As Electron is embedding Node.js with pointer compression and the sandboxed pointers, maybe it would be worth setting up a CI job to verify Node.js with pointer compression and the sandboxed pointers (which is enabled by default if pointer compression is enabled) too?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson @legendecas
Update doc/api/n-api.md
9d67a66
Co-authored-by: Chengzhong Wu <[email protected]>
@mhdawson

mhdawson commented Oct 26, 2022

Copy link
Copy Markdown
Member Author

@lovell adding a new method would definitely require a new Node-API version, would spend some time as experimental, and that node-API version would need to make it through the backporting process to earlier versions (which is easier for more recent Node.js verions, harder for older ones).

I think the changes in this PR may not require a new Node-API version (@nodejs/node-api keep me honest on that) and therefore might be easier to backport. Having said that, until it was backported to all current LTS versions a crash could occur on some versions so maybe only fixing under a new Node-API version makes more sense.

All that makes me think we might want to keep adding a new method to be in a separate PR. I guess the question is if these changes solve the problem at all on their own or not.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson
Update n-api.md
ac56ab0
@lovell

lovell commented Oct 26, 2022

Copy link
Copy Markdown
Contributor

@mhdawson The change proposed in this PR is sufficient to detect the presence of the V8 memory cage at runtime, thank you. 👍

My original thoughts around adding an explicit Napi::Buffer::NewOrCopy() method were that it might be useful albeit syntactic sugar for possible inclusion in the node-addon-api wrapper rather than Node-API itself.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

legendecas
legendecas reviewed Oct 27, 2022
View reviewed changes
Comment thread src/js_native_api.h
void** data,
napi_value* result);
NAPI_EXTERN napi_status NAPI_CDECL
#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED

@legendecas legendecas Oct 27, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This line should be moved one line up, above the NAPI_EXTERN napi_status NAPI_CDECL, as it is part of the declaration.

Maybe we should simply add a testing addon that defines NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED and it can correctly compile to verify that the new macro doesn't introduce any flaws?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mhdawson mhdawson Oct 27, 2022

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@legendecas thats a good idea, I had manually tested defining it, but I only checked that I got an error, not that would not get an error. I'll plan to add that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mhdawson mhdawson Oct 28, 2022

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@legendecas fixed and added to the two flavors of test_general

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mhdawson
Update js_native_api.h
5ba9934
@mhdawson

mhdawson commented Oct 27, 2022

Copy link
Copy Markdown
Member Author

@lovell

@mhdawson The change proposed in this PR is sufficient to detect the presence of the V8 memory cage at runtime, thank you.

Thanks I'll continue to move this PR forward and then once we get it landed, I'll explore adding the additional method you suggest, it does seem like something that could make sense as an addition in a next step.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mhdawson
mhdawson commented Oct 28, 2022
View reviewed changes
Comment thread src/js_native_api_types.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson
squash: address review comments
ebefb2b
Signed-off-by: Michael Dawson <[email protected]>
@mhdawson

mhdawson commented Oct 28, 2022

Copy link
Copy Markdown
Member Author

What versions of nodejs are we likely to see this in? Will it need to be released as part of node-api v9, as it adds a new value to an enum?

We will need to discuss this further. We've never guarded the error codes based on Node-API version or EXPERIMENTAL. In the case of EXPERIMENTAL ones there could be a situation where an EXPERIMENTAL return code was before one that was released and we could never remove that one or hide it as that would mess up the enum ordering.

So in that context, since error codes can be present without a guard in newever versions anyway, it does not add a lot of value to try to force a Node-API version update when adding it. I can see the argument for it needing one since if you compile with a check for it, and depend on it not to crash then maybe it should be. Practically though, its probably better if we don't tie it to a Node-API versions and try to backport quicklyish.

@nodejs/node-api what are your thoughts?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ronag
ronag reviewed Oct 29, 2022
View reviewed changes
Comment thread doc/api/n-api.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vmoroz

vmoroz commented Oct 31, 2022

Copy link
Copy Markdown
Member

@mhdawson, per our discussion in Node-API meeting on 10/28/2022 I am adding a few links to Electron code where they implemented the support for the caged pointers. There were several PRs, but the changes to Node.JS code are mostly in these two patch files (the related PRs can be seen in their history):

  • https://github.com/electron/electron/blob/main/patches/node/support_v8_sandboxed_pointers.patch
  • https://github.com/electron/electron/blob/main/patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch

We most probably do not need these changes for the Node-API part in this PR, but we might consider them if we ever want to add the V8 pointer cage mode to Node.JS.

I guess the most important question is to understand if we must use V8_ENABLE_SANDBOX or the V8_COMPRESS_POINTERS_IN_SHARED_CAGE macro. In the patch files they use V8_ENABLE_SANDBOX to modify the Node.JS behavior.

legendecas reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@legendecas

legendecas commented Oct 31, 2022

Copy link
Copy Markdown
Member

v8_enable_sandbox requires v8_enable_pointer_compression_shared_cage to be set, as asserted in BUILD.gn.

I found the definition of V8_ENABLE_SANDBOX is used more widely in the codebase, e.g.
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/api/api.cc;l=360?q=V8_ENABLE_SANDBOX.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhdawson @ronag
Update doc/api/n-api.md
a8038ac
Co-authored-by: Robert Nagy <[email protected]>
@mhdawson

mhdawson commented Oct 31, 2022

Copy link
Copy Markdown
Member Author

@john-yang looks like we might need to enable V8_ENABLE_SANDBOX instead of V8_COMPRESS_POINTERS_IN_SHARED_CAGE, does that make sense to you?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@john-yan

john-yan commented Oct 31, 2022

Copy link
Copy Markdown

I agree that checking V8_ENABLE_SANDBOX might make more sense here based on the error returned. V8_COMPRESS_POINTERS_IN_SHARED_CAGE macro is used to check if pointer cage feature is enabled. It doesn't directly relate to external buffers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

richardlau pushed a commit that referenced this pull request Dec 7, 2022
@mhdawson @richardlau
node-api: handle no support for external buffers
2dbeb88
Refs: electron/electron#35801
Refs: nodejs/abi-stable-node#441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #45181
Backport-PR-URL: #45616
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
@richardlau richardlau added backported-to-v14.x and removed backport-requested-v14.x labels Dec 7, 2022
This was referenced Dec 7, 2022
v14.21.2 proposal #45775
Merged
v16.19.0 proposal #45791
Merged
This was referenced Dec 9, 2022
chore: cherry-pick 09ae62b from node electron/electron#36623
Merged
chore: cherry-pick 09ae62b from node electron/electron#36624
Merged
chore: cherry-pick 09ae62b from node electron/electron#36625
Merged
chore: cherry-pick 09ae62b from node electron/electron#36626
Merged
mwalbeck pushed a commit to mwalbeck/docker-jellyfin-livestream that referenced this pull request Dec 14, 2022
renovate-bot @mwalbeck
Update Node.js to v14.21.2 (#210)
02fcc17
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [node](https://github.com/nodejs/node) | stage | patch | `14.21.1-bullseye-slim` -> `14.21.2-bullseye-slim` |

---

### Release Notes

<details>
<summary>nodejs/node</summary>

### [`v14.21.2`](https://github.com/nodejs/node/releases/tag/v14.21.2): 2022-12-13, Version 14.21.2 &#x27;Fermium&#x27; (LTS), @&#8203;richardlau

[Compare Source](nodejs/node@v14.21.1...v14.21.2)

##### Notable Changes

##### OpenSSL 1.1.1s

This update is a bugfix release and does not address any security
vulnerabilities.

##### Root certificates updated to NSS 3.85

Certificates added:

-   Autoridad de Certificacion Firmaprofesional CIF [`A626340`](nodejs/node@A62634068)
-   Certainly Root E1
-   Certainly Root R1
-   D-TRUST BR Root CA 1 2020
-   D-TRUST EV Root CA 1 2020
-   DigiCert TLS ECC P384 Root G5
-   DigiCert TLS RSA4096 Root G5
-   E-Tugra Global Root CA ECC v3
-   E-Tugra Global Root CA RSA v3
-   HiPKI Root CA - G1
-   ISRG Root X2
-   Security Communication ECC RootCA1
-   Security Communication RootCA3
-   Telia Root CA v2
-   vTrus ECC Root CA
-   vTrus Root CA

Certificates removed:

-   Cybertrust Global Root
-   DST Root CA X3
-   GlobalSign Root CA - R2
-   Hellenic Academic and Research Institutions RootCA 2011

##### Time zone update to 2022f

Time zone data has been updated to 2022f. This includes changes to Daylight
Savings Time (DST) for Fiji and Mexico. For more information, see
<https://mm.icann.org/pipermail/tz-announce/2022-October/000075.html>.

##### Commits

-   \[[`436a596e99`](nodejs/node@436a596e99)] - **crypto**: update root certificates (Luigi Pinca) [#&#8203;45490](nodejs/node#45490)
-   \[[`4b422d34af`](nodejs/node@4b422d34af)] - **deps**: V8: cherry-pick [`d2db7fa`](nodejs/node@d2db7fa7f786) (Richard Lau) [#&#8203;45785](nodejs/node#45785)
-   \[[`625f4bf3a9`](nodejs/node@625f4bf3a9)] - **deps**: update corepack to 0.15.1 (Node.js GitHub Bot) [#&#8203;45331](nodejs/node#45331)
-   \[[`48a9810de8`](nodejs/node@48a9810de8)] - **deps**: update corepack to 0.15.0 (Node.js GitHub Bot) [#&#8203;45235](nodejs/node#45235)
-   \[[`9f4e64b603`](nodejs/node@9f4e64b603)] - **deps**: update timezone to 2022f (Richard Lau) [#&#8203;45521](nodejs/node#45521)
-   \[[`f297b6bd21`](nodejs/node@f297b6bd21)] - **deps**: update archs files for OpenSSL-1.1.1s (RafaelGSS) [#&#8203;45272](nodejs/node#45272)
-   \[[`11629fef15`](nodejs/node@11629fef15)] - **deps**: upgrade openssl sources to 1.1.1s (RafaelGSS) [#&#8203;45272](nodejs/node#45272)
-   \[[`c3a90c4b44`](nodejs/node@c3a90c4b44)] - **http2**: fix memory leak when nghttp2 hd threshold is reached (rogertyang) [#&#8203;41502](nodejs/node#41502)
-   \[[`785dc3efee`](nodejs/node@785dc3efee)] - **module**: cjs-module-lexer WebAssembly fallback (Guy Bedford) [#&#8203;43612](nodejs/node#43612)
-   \[[`2dbeb889f6`](nodejs/node@2dbeb889f6)] - **node-api**: handle no support for external buffers (Michael Dawson) [#&#8203;45181](nodejs/node#45181)
-   \[[`5b2ea124f3`](nodejs/node@5b2ea124f3)] - **test**: add test to validate changelogs for releases (Richard Lau) [#&#8203;45325](nodejs/node#45325)
-   \[[`f13f889956`](nodejs/node@f13f889956)] - **test**: add a test to ensure the correctness of timezone upgrades (Darshan Sen) [#&#8203;45299](nodejs/node#45299)
-   \[[`5608e6fa72`](nodejs/node@5608e6fa72)] - **tools**: update certdata.txt (Luigi Pinca) [#&#8203;45490](nodejs/node#45490)
-   \[[`d6f1d7107b`](nodejs/node@d6f1d7107b)] - **tools**: have test-asan use ubuntu-20.04 (Filip Skokan) [#&#8203;45581](nodejs/node#45581)
-   \[[`370a00f737`](nodejs/node@370a00f737)] - **tools**: make license-builder.sh comply with shellcheck 0.8.0 (Rich Trott) [#&#8203;41258](nodejs/node#41258)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC41NS4wIiwidXBkYXRlZEluVmVyIjoiMzQuNTUuMCJ9-->

Reviewed-on: https://git.walbeck.it/mwalbeck/docker-jellyfin-livestream/pulls/210
Co-authored-by: renovate-bot <[email protected]>
Co-committed-by: renovate-bot <[email protected]>
mwalbeck pushed a commit to mwalbeck/docker-cyberchef that referenced this pull request Dec 14, 2022
renovate-bot @mwalbeck
Update Node.js to v16.19.0 (#143)
f134e26
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [node](https://github.com/nodejs/node) | stage | minor | `16.18.1-bullseye` -> `16.19.0-bullseye` |

---

### Release Notes

<details>
<summary>nodejs/node</summary>

### [`v16.19.0`](https://github.com/nodejs/node/releases/tag/v16.19.0): 2022-12-13, Version 16.19.0 &#x27;Gallium&#x27; (LTS), @&#8203;richardlau

[Compare Source](nodejs/node@v16.18.1...v16.19.0)

##### Notable Changes

##### OpenSSL 1.1.1s

This update is a bugfix release and does not address any security
vulnerabilities.

##### Root certificates updated to NSS 3.85

Certificates added:

-   Autoridad de Certificacion Firmaprofesional CIF [`A626340`](nodejs/node@A62634068)
-   Certainly Root E1
-   Certainly Root R1
-   D-TRUST BR Root CA 1 2020
-   D-TRUST EV Root CA 1 2020
-   DigiCert TLS ECC P384 Root G5
-   DigiCert TLS RSA4096 Root G5
-   E-Tugra Global Root CA ECC v3
-   E-Tugra Global Root CA RSA v3
-   HiPKI Root CA - G1
-   ISRG Root X2
-   Security Communication ECC RootCA1
-   Security Communication RootCA3
-   Telia Root CA v2
-   vTrus ECC Root CA
-   vTrus Root CA

Certificates removed:

-   Cybertrust Global Root
-   DST Root CA X3
-   GlobalSign Root CA - R2
-   Hellenic Academic and Research Institutions RootCA 2011

##### Time zone update to 2022f

Time zone data has been updated to 2022f. This includes changes to Daylight
Savings Time (DST) for Fiji and Mexico. For more information, see
<https://mm.icann.org/pipermail/tz-announce/2022-October/000075.html>.

##### Other Notable Changes

-   \[[`33707dcd03`](nodejs/node@33707dcd03)] - **dgram**: add dgram send queue info (theanarkh) [#&#8203;44149](nodejs/node#44149)

Dependency updates:

-   \[[`3b2b70d792`](nodejs/node@3b2b70d792)] - **deps**: upgrade npm to 8.19.3 (npm team) [#&#8203;45322](nodejs/node#45322)

Experimental features:

-   \[[`1e0dcd1ee0`](nodejs/node@1e0dcd1ee0)] - **cli**: add `--watch` (Moshe Atlow) [#&#8203;44366](nodejs/node#44366)
-   \[[`8c73279ebb`](nodejs/node@8c73279ebb)] - **util**: add default value option to parsearg (Manuel Spigolon) [#&#8203;44631](nodejs/node#44631)

##### Commits

-   \[[`bbef3c42f6`](nodejs/node@bbef3c42f6)] - **build**: add version info to timezone update PR (Darshan Sen) [#&#8203;45021](nodejs/node#45021)
-   \[[`cc2c7648e0`](nodejs/node@cc2c7648e0)] - **build**: support Python 3.11 (Luigi Pinca) [#&#8203;45191](nodejs/node#45191)
-   \[[`ac24c80663`](nodejs/node@ac24c80663)] - **build**: remove redundant condition from common.gypi (Richard Lau) [#&#8203;45076](nodejs/node#45076)
-   \[[`03dcbe3030`](nodejs/node@03dcbe3030)] - **build**: fix bad upstream merge (Stephen Gallagher) [#&#8203;44642](nodejs/node#44642)
-   \[[`1e0dcd1ee0`](nodejs/node@1e0dcd1ee0)] - **cli**: add `--watch` (Moshe Atlow) [#&#8203;44366](nodejs/node#44366)
-   \[[`96d131665e`](nodejs/node@96d131665e)] - **cluster**: use inspector utils (Moshe Atlow) [#&#8203;44592](nodejs/node#44592)
-   \[[`704836033a`](nodejs/node@704836033a)] - **crypto**: update root certificates (Luigi Pinca) [#&#8203;45490](nodejs/node#45490)
-   \[[`5a776d4a69`](nodejs/node@5a776d4a69)] - **deps**: update timezone to 2022f (Richard Lau) [#&#8203;45613](nodejs/node#45613)
-   \[[`3b2b70d792`](nodejs/node@3b2b70d792)] - **deps**: upgrade npm to 8.19.3 (npm team) [#&#8203;45322](nodejs/node#45322)
-   \[[`9fbc8b21db`](nodejs/node@9fbc8b21db)] - **deps**: update corepack to 0.15.1 (Node.js GitHub Bot) [#&#8203;45331](nodejs/node#45331)
-   \[[`87e3d002ca`](nodejs/node@87e3d002ca)] - **deps**: update corepack to 0.15.0 (Node.js GitHub Bot) [#&#8203;45235](nodejs/node#45235)
-   \[[`e972ff7b13`](nodejs/node@e972ff7b13)] - **deps**: V8: backport [`bbd800c`](nodejs/node@bbd800c6e359) (Chengzhong Wu) [#&#8203;44947](nodejs/node#44947)
-   \[[`af9d8217c0`](nodejs/node@af9d8217c0)] - **deps**: V8: cherry-pick [`b953542`](nodejs/node@b95354290941) (Chengzhong Wu) [#&#8203;44947](nodejs/node#44947)
-   \[[`38202d321b`](nodejs/node@38202d321b)] - **deps**: update undici to 5.12.0 (Node.js GitHub Bot) [#&#8203;45236](nodejs/node#45236)
-   \[[`7c0da6adf9`](nodejs/node@7c0da6adf9)] - **deps**: update archs files for OpenSSL-1.1.1s (RafaelGSS) [#&#8203;45274](nodejs/node#45274)
-   \[[`1149ead6f7`](nodejs/node@1149ead6f7)] - **deps**: upgrade openssl sources to OpenSSL\_1\_1\_1s (RafaelGSS) [#&#8203;45274](nodejs/node#45274)
-   \[[`cd54bce4f5`](nodejs/node@cd54bce4f5)] - **deps**: update timezone (Node.js GitHub Bot) [#&#8203;44950](nodejs/node#44950)
-   \[[`2901abe4f0`](nodejs/node@2901abe4f0)] - **deps**: update undici to 5.11.0 (Node.js GitHub Bot) [#&#8203;44929](nodejs/node#44929)
-   \[[`c80cf97033`](nodejs/node@c80cf97033)] - **deps**: update corepack to 0.14.2 (Node.js GitHub Bot) [#&#8203;44775](nodejs/node#44775)
-   \[[`33707dcd03`](nodejs/node@33707dcd03)] - **dgram**: add dgram send queue info (theanarkh) [#&#8203;44149](nodejs/node#44149)
-   \[[`c708d9bb94`](nodejs/node@c708d9bb94)] - **doc**: fix typo in parseArgs default value (Tobias Nießen) [#&#8203;45083](nodejs/node#45083)
-   \[[`5a0efa05d2`](nodejs/node@5a0efa05d2)] - **node-api**: handle no support for external buffers (Michael Dawson) [#&#8203;45181](nodejs/node#45181)
-   \[[`db31de634e`](nodejs/node@db31de634e)] - **readline**: refactor to avoid unsafe regex primordials (Antoine du Hamel) [#&#8203;43475](nodejs/node#43475)
-   \[[`fbc52e5729`](nodejs/node@fbc52e5729)] - **src**: disambiguate terms used to refer to builtins and addons (Joyee Cheung) [#&#8203;44135](nodejs/node#44135)
-   \[[`953072d3db`](nodejs/node@953072d3db)] - **src**: let http2 streams end after session close (Santiago Gimeno) [#&#8203;45153](nodejs/node#45153)
-   \[[`54608d8dc3`](nodejs/node@54608d8dc3)] - **src**: split property helpers from node::Environment (Chengzhong Wu) [#&#8203;44056](nodejs/node#44056)
-   \[[`6733556783`](nodejs/node@6733556783)] - **test**: add test to validate changelogs for releases (Richard Lau) [#&#8203;45325](nodejs/node#45325)
-   \[[`821d832cef`](nodejs/node@821d832cef)] - **test**: mark test-watch-mode\* as flaky on all platforms (Pierrick Bouvier) [#&#8203;45049](nodejs/node#45049)
-   \[[`02a18eac69`](nodejs/node@02a18eac69)] - **test**: fix test-runner-inspect (Moshe Atlow) [#&#8203;44620](nodejs/node#44620)
-   \[[`197df63f74`](nodejs/node@197df63f74)] - **test**: add a test to ensure the correctness of timezone upgrades (Darshan Sen) [#&#8203;45299](nodejs/node#45299)
-   \[[`42e9d8016a`](nodejs/node@42e9d8016a)] - **test**: fix textdecoder test for small-icu builds (Richard Lau) [#&#8203;45225](nodejs/node#45225)
-   \[[`6d736a56d8`](nodejs/node@6d736a56d8)] - **test**: fix watch mode test flake (Moshe Atlow) [#&#8203;44739](nodejs/node#44739)
-   \[[`543d3d2bf3`](nodejs/node@543d3d2bf3)] - **test**: deflake watch mode tests (Moshe Atlow) [#&#8203;44621](nodejs/node#44621)
-   \[[`97f6caf4eb`](nodejs/node@97f6caf4eb)] - **test**: split watch mode inspector tests to sequential (Moshe Atlow) [#&#8203;44551](nodejs/node#44551)
-   \[[`499750ff7a`](nodejs/node@499750ff7a)] - **test**: update list of known globals (Antoine du Hamel) [#&#8203;45255](nodejs/node#45255)
-   \[[`64d343af74`](nodejs/node@64d343af74)] - **test_runner**: support using `--inspect` with `--test` (Moshe Atlow) [#&#8203;44520](nodejs/node#44520)
-   \[[`99ee5e484d`](nodejs/node@99ee5e484d)] - **test_runner**: fix `duration_ms` to be milliseconds (Moshe Atlow) [#&#8203;44450](nodejs/node#44450)
-   \[[`37e909251c`](nodejs/node@37e909251c)] - **test_runner**: support programmatically running `--test` (Moshe Atlow) [#&#8203;44241](nodejs/node#44241)
-   \[[`0ae5694f88`](nodejs/node@0ae5694f88)] - **tools**: update certdata.txt (Luigi Pinca) [#&#8203;45490](nodejs/node#45490)
-   \[[`891368cefd`](nodejs/node@891368cefd)] - **tools**: remove faulty early termination logic from update-timezone.mjs (Darshan Sen) [#&#8203;44870](nodejs/node#44870)
-   \[[`543493c242`](nodejs/node@543493c242)] - **tools**: fix timezone update tool (Darshan Sen) [#&#8203;44870](nodejs/node#44870)
-   \[[`c77f660b75`](nodejs/node@c77f660b75)] - **tools**: fix `create-or-update-pull-request-action` hash on GHA (Antoine du Hamel) [#&#8203;45166](nodejs/node#45166)
-   \[[`58c30dd049`](nodejs/node@58c30dd049)] - **tools**: update gr2m/create-or-update-pull-request-action (Luigi Pinca) [#&#8203;45022](nodejs/node#45022)
-   \[[`749a4b3e5e`](nodejs/node@749a4b3e5e)] - **tools**: use Python 3.11 in GitHub Actions workflows (Luigi Pinca) [#&#8203;45191](nodejs/node#45191)
-   \[[`6f541d99a5`](nodejs/node@6f541d99a5)] - **tools**: have test-asan use ubuntu-20.04 (Filip Skokan) [#&#8203;45581](nodejs/node#45581)
-   \[[`e7ed56f501`](nodejs/node@e7ed56f501)] - **tools**: make license-builder.sh comply with shellcheck 0.8.0 (Rich Trott) [#&#8203;41258](nodejs/node#41258)
-   \[[`cc819b4bf8`](nodejs/node@cc819b4bf8)] - **tools**: fix typo in `avoid-prototype-pollution` lint rule (Antoine du Hamel) [#&#8203;44446](nodejs/node#44446)
-   \[[`254358c81e`](nodejs/node@254358c81e)] - **tools**: refactor `avoid-prototype-pollution` lint rule (Antoine du Hamel) [#&#8203;43476](nodejs/node#43476)
-   \[[`8c73279ebb`](nodejs/node@8c73279ebb)] - **util**: add default value option to parsearg (Manuel Spigolon) [#&#8203;44631](nodejs/node#44631)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC41NS4wIiwidXBkYXRlZEluVmVyIjoiMzQuNTUuMCJ9-->

Reviewed-on: https://git.walbeck.it/mwalbeck/docker-cyberchef/pulls/143
Co-authored-by: renovate-bot <[email protected]>
Co-committed-by: renovate-bot <[email protected]>
@sprocketc sprocketc mentioned this pull request Dec 15, 2022
Chore(deps): Upgrade electron to 20 logseq/logseq#7692
Merged
3 tasks done
@Julusian Julusian mentioned this pull request Dec 29, 2022
Provide a new Buffer::NewOrCopy method nodejs/node-addon-api#1257
Closed
@danielleadams danielleadams mentioned this pull request Dec 30, 2022
v18.13.0 release proposal #46025
Merged
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
@mhdawson @danielleadams
node-api: handle no support for external buffers
8e89610
Refs: electron/electron#35801
Refs: nodejs/abi-stable-node#441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #45181
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
guangwong pushed a commit to noslate-project/node that referenced this pull request Jan 3, 2023
@mhdawson @guangwong
node-api: handle no support for external buffers
97edb07
Refs: electron/electron#35801
Refs: nodejs/abi-stable-node#441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: nodejs/node#45181
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
guangwong pushed a commit to noslate-project/node that referenced this pull request Jan 3, 2023
@mhdawson @guangwong
node-api: handle no support for external buffers
cd41356
Refs: electron/electron#35801
Refs: nodejs/abi-stable-node#441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: nodejs/node#45181
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
@mhdawson @danielleadams
node-api: handle no support for external buffers
746175a
Refs: electron/electron#35801
Refs: nodejs/abi-stable-node#441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #45181
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
@legendecas legendecas mentioned this pull request Jan 17, 2023
src: handle no support for external buffers nodejs/node-addon-api#1273
Closed
@targos targos added backported-to-v18.x and removed lts-watch-v18.x labels Oct 27, 2023
@xiazhvera xiazhvera mentioned this pull request Nov 28, 2023
Hardcoded napi_no_external_buffers_allowed value for Node 21 and below awslabs/aws-crt-nodejs#508
Merged
abhishekumar-tyagi pushed a commit to abhishekumar-tyagi/node that referenced this pull request May 5, 2024
@mhdawson
node-api: handle no support for external buffers
bc62153
Refs: electron/electron#35801
Refs: nodejs/abi-stable-node#441

Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
  avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
  to check if external buffers are supported and either
  use them or not based on the return code.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: nodejs/node#45181
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
This was referenced Sep 30, 2024
TypedArray / Memory<T> marshalling fails in Electron due to disabled external buffers microsoft/node-api-dotnet#384
Closed
Memory<T> to TypedArray<T> on Electron 19.1.9 Worked fine. But did not worked on higher Electron microsoft/node-api-dotnet#383
Open
@Brooooooklyn Brooooooklyn mentioned this pull request Nov 27, 2024
Add Node-API to Hermes meta/hermes#1377
Closed
@opalmedapps-bot opalmedapps-bot mentioned this pull request Jan 28, 2025
chore: update node.js to v16.19.0 opalmedapps/docs#55
Closed
1 task
@legendecas legendecas mentioned this pull request Jul 17, 2025
node-api: clarify enum value ABI stability #59085
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vmoroz vmoroz vmoroz left review comments
@ronag ronag ronag left review comments
@JungMinu JungMinu JungMinu approved these changes
@legendecas legendecas legendecas approved these changes
+1 more reviewer
@NickNaso NickNaso NickNaso left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

14 participants

@mhdawson @nodejs-github-bot @MarshallOfSound @Julusian @legendecas @lovell @vmoroz @john-yan @KevinEady @richardlau @NickNaso @ronag @JungMinu @targos
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.