Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-api: handle no support for external buffers #45181

Closed
wants to merge 11 commits into from

Conversation

mhdawson
Copy link
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 mdawson@devrus.com

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 <mdawson@devrus.com>
@nodejs-github-bot
Copy link
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++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Oct 25, 2022
@mhdawson
Copy link
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?

@MarshallOfSound
Copy link
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 🤔

doc/api/n-api.md Outdated Show resolved Hide resolved
@Julusian
Copy link

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

@legendecas
Copy link
Member

legendecas commented Oct 26, 2022

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.

doc/api/n-api.md Outdated Show resolved Hide resolved
@legendecas
Copy link
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?

Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
@mhdawson
Copy link
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.

@lovell
Copy link
Contributor

lovell commented Oct 26, 2022

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

@@ -402,12 +402,14 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_create_arraybuffer(napi_env env,
void** data,
napi_value* result);
NAPI_EXTERN napi_status NAPI_CDECL
#ifndef NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED
Copy link
Member

@legendecas legendecas Oct 27, 2022

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?

Copy link
Member Author

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.

Copy link
Member Author

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

@mhdawson
Copy link
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.

Signed-off-by: Michael Dawson <mdawson@devrus.com>
@mhdawson
Copy link
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?

doc/api/n-api.md Outdated Show resolved Hide resolved
@vmoroz
Copy link
Member

vmoroz commented Oct 31, 2022

@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):

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
Copy link
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.

Co-authored-by: Robert Nagy <ronagy@icloud.com>
@mhdawson
Copy link
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?

@john-yan
Copy link

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.

@mhdawson
Copy link
Member Author

@richardlau thanks for the heads up, working on it.

@mhdawson
Copy link
Member Author

@richardlau backport PR - #45616

richardlau pushed a commit that referenced this pull request Dec 7, 2022
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 <mdawson@devrus.com>

PR-URL: #45181
Backport-PR-URL: #45616
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
This was referenced Dec 7, 2022
mwalbeck pushed a commit to mwalbeck/docker-jellyfin-livestream that referenced this pull request Dec 14, 2022
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 <bot@walbeck.it>
Co-committed-by: renovate-bot <bot@walbeck.it>
mwalbeck pushed a commit to mwalbeck/docker-cyberchef that referenced this pull request Dec 14, 2022
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 <bot@walbeck.it>
Co-committed-by: renovate-bot <bot@walbeck.it>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
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 <mdawson@devrus.com>

PR-URL: #45181
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
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 <mdawson@devrus.com>

PR-URL: #45181
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Jan 3, 2023
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 <mdawson@devrus.com>

PR-URL: nodejs/node#45181
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Jan 3, 2023
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 <mdawson@devrus.com>

PR-URL: nodejs/node#45181
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
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 <mdawson@devrus.com>

PR-URL: #45181
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 4, 2023
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 <mdawson@devrus.com>

PR-URL: #45181
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
@targos targos added backported-to-v18.x PRs backported to the v18.x-staging branch. and removed lts-watch-v18.x PRs that may need to be released in v18.x. labels Oct 27, 2023
abhishekumar-tyagi pushed a commit to abhishekumar-tyagi/node that referenced this pull request May 5, 2024
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 <mdawson@devrus.com>

PR-URL: nodejs/node#45181
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-to-v18.x PRs backported to the v18.x-staging branch. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.