electron/patches/node/build_add_gn_build_files.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

415 lines
14 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Tue, 26 Feb 2019 17:07:45 -0800
Subject: build: add GN build files
2019-12-13 09:18:45 -08:00
This adds GN build files for Node, so we don't have to build with GYP.
chore: bump node to v20.11.0 (main) (#40941) * chore: bump node in DEPS to v20.11.0 * module: bootstrap module loaders in shadow realm https://github.com/nodejs/node/pull/48655 * src: add commit hash shorthand in zlib version https://github.com/nodejs/node/pull/50158 * v8,tools: expose necessary V8 defines https://github.com/nodejs/node/pull/50820 * esm: do not call getSource when format is commonjs https://github.com/nodejs/node/pull/50465 * esm: fallback to readFileSync when source is nullish https://github.com/nodejs/node/pull/50825 * vm: allow dynamic import with a referrer realm https://github.com/nodejs/node/pull/50360 * test: skip test-diagnostics-channel-memory-leak.js https://github.com/nodejs/node/pull/50327 * esm: do not call getSource when format is commonjs https://github.com/nodejs/node/pull/50465 * lib: fix assert throwing different error messages in ESM and CJS https://github.com/nodejs/node/pull/50634 * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * deps: update base64 to 0.5.1 https://github.com/nodejs/node/pull/50629 * src: avoid silent coercion to signed/unsigned int https://github.com/nodejs/node/pull/50663 * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * chore: fix patch indices * chore: update patches * test: disable TLS cipher test This can't be enabled owing to BoringSSL incompatibilities. https://github.com/nodejs/node/pull/50186 * fix: check for Buffer and global definition in shadow realm https://github.com/nodejs/node/pull/51239 * test: disable parallel/test-shadow-realm-custom-loader Incompatible with our asar logic, resulting in the following failure: > Failed to CompileAndCall electron script: electron/js2c/asar_bundle * chore: remove deleted parallel/test-crypto-modp1-error test * test: make test-node-output-v8-warning generic https://github.com/nodejs/node/pull/50421 * chore: fixup ModuleWrap patch * test: match wpt/streams/transferable/transform-stream-members.any.js to upstream * fix: sandbox is not enabled on arm * chore: disable v8 sandbox on ia32/arm --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2024-01-18 16:16:45 -05:00
Note that there always GN files in upstream Node in 20/21 branches,
however those files were cherry-picked from main branch and do not
really in 20/21. We have to wait until 22 is released to be able to
build with upstream GN files.
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
diff --git a/deps/simdjson/unofficial.gni b/deps/simdjson/unofficial.gni
index d6909b95886f4de3f0b953c2a2992f69066b7434..972955f9144aafcd3a3fe278b7aaad401cadddda 100644
--- a/deps/simdjson/unofficial.gni
+++ b/deps/simdjson/unofficial.gni
@@ -18,5 +18,6 @@ template("simdjson_gn_build") {
forward_variables_from(invoker, "*")
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
public_configs = [ ":simdjson_config" ]
sources = gypi_values.simdjson_sources
+ cflags_c = [ "-Wdeprecated-literal-operator" ]
}
}
diff --git a/node.gni b/node.gni
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
index a2123cc6c6d21c53fafc8934203b3720393e7b11..245a43920c7baf000ba63192a84a4c3fd219be7d 100644
--- a/node.gni
+++ b/node.gni
@@ -5,10 +5,10 @@
# Embedder options.
declare_args() {
# The location of Node.js in source code tree.
- node_path = "//node"
+ node_path = "//third_party/electron_node"
chore: bump node to v20.11.0 (main) (#40941) * chore: bump node in DEPS to v20.11.0 * module: bootstrap module loaders in shadow realm https://github.com/nodejs/node/pull/48655 * src: add commit hash shorthand in zlib version https://github.com/nodejs/node/pull/50158 * v8,tools: expose necessary V8 defines https://github.com/nodejs/node/pull/50820 * esm: do not call getSource when format is commonjs https://github.com/nodejs/node/pull/50465 * esm: fallback to readFileSync when source is nullish https://github.com/nodejs/node/pull/50825 * vm: allow dynamic import with a referrer realm https://github.com/nodejs/node/pull/50360 * test: skip test-diagnostics-channel-memory-leak.js https://github.com/nodejs/node/pull/50327 * esm: do not call getSource when format is commonjs https://github.com/nodejs/node/pull/50465 * lib: fix assert throwing different error messages in ESM and CJS https://github.com/nodejs/node/pull/50634 * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * deps: update base64 to 0.5.1 https://github.com/nodejs/node/pull/50629 * src: avoid silent coercion to signed/unsigned int https://github.com/nodejs/node/pull/50663 * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * chore: fix patch indices * chore: update patches * test: disable TLS cipher test This can't be enabled owing to BoringSSL incompatibilities. https://github.com/nodejs/node/pull/50186 * fix: check for Buffer and global definition in shadow realm https://github.com/nodejs/node/pull/51239 * test: disable parallel/test-shadow-realm-custom-loader Incompatible with our asar logic, resulting in the following failure: > Failed to CompileAndCall electron script: electron/js2c/asar_bundle * chore: remove deleted parallel/test-crypto-modp1-error test * test: make test-node-output-v8-warning generic https://github.com/nodejs/node/pull/50421 * chore: fixup ModuleWrap patch * test: match wpt/streams/transferable/transform-stream-members.any.js to upstream * fix: sandbox is not enabled on arm * chore: disable v8 sandbox on ia32/arm --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2024-01-18 16:16:45 -05:00
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
# The location of V8 - use the one from node's deps by default.
- node_v8_path = "$node_path/deps/v8"
+ node_v8_path = "//v8"
chore: bump node to v20.11.0 (main) (#40941) * chore: bump node in DEPS to v20.11.0 * module: bootstrap module loaders in shadow realm https://github.com/nodejs/node/pull/48655 * src: add commit hash shorthand in zlib version https://github.com/nodejs/node/pull/50158 * v8,tools: expose necessary V8 defines https://github.com/nodejs/node/pull/50820 * esm: do not call getSource when format is commonjs https://github.com/nodejs/node/pull/50465 * esm: fallback to readFileSync when source is nullish https://github.com/nodejs/node/pull/50825 * vm: allow dynamic import with a referrer realm https://github.com/nodejs/node/pull/50360 * test: skip test-diagnostics-channel-memory-leak.js https://github.com/nodejs/node/pull/50327 * esm: do not call getSource when format is commonjs https://github.com/nodejs/node/pull/50465 * lib: fix assert throwing different error messages in ESM and CJS https://github.com/nodejs/node/pull/50634 * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * deps: update base64 to 0.5.1 https://github.com/nodejs/node/pull/50629 * src: avoid silent coercion to signed/unsigned int https://github.com/nodejs/node/pull/50663 * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * chore: fix patch indices * chore: update patches * test: disable TLS cipher test This can't be enabled owing to BoringSSL incompatibilities. https://github.com/nodejs/node/pull/50186 * fix: check for Buffer and global definition in shadow realm https://github.com/nodejs/node/pull/51239 * test: disable parallel/test-shadow-realm-custom-loader Incompatible with our asar logic, resulting in the following failure: > Failed to CompileAndCall electron script: electron/js2c/asar_bundle * chore: remove deleted parallel/test-crypto-modp1-error test * test: make test-node-output-v8-warning generic https://github.com/nodejs/node/pull/50421 * chore: fixup ModuleWrap patch * test: match wpt/streams/transferable/transform-stream-members.any.js to upstream * fix: sandbox is not enabled on arm * chore: disable v8 sandbox on ia32/arm --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2024-01-18 16:16:45 -05:00
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
# The location of OpenSSL - use the one from node's deps by default.
node_openssl_path = "$node_path/deps/openssl"
@@ -44,7 +44,7 @@ declare_args() {
node_openssl_system_ca_path = ""
chore: bump node to v20.11.0 (main) (#40941) * chore: bump node in DEPS to v20.11.0 * module: bootstrap module loaders in shadow realm https://github.com/nodejs/node/pull/48655 * src: add commit hash shorthand in zlib version https://github.com/nodejs/node/pull/50158 * v8,tools: expose necessary V8 defines https://github.com/nodejs/node/pull/50820 * esm: do not call getSource when format is commonjs https://github.com/nodejs/node/pull/50465 * esm: fallback to readFileSync when source is nullish https://github.com/nodejs/node/pull/50825 * vm: allow dynamic import with a referrer realm https://github.com/nodejs/node/pull/50360 * test: skip test-diagnostics-channel-memory-leak.js https://github.com/nodejs/node/pull/50327 * esm: do not call getSource when format is commonjs https://github.com/nodejs/node/pull/50465 * lib: fix assert throwing different error messages in ESM and CJS https://github.com/nodejs/node/pull/50634 * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * deps: update base64 to 0.5.1 https://github.com/nodejs/node/pull/50629 * src: avoid silent coercion to signed/unsigned int https://github.com/nodejs/node/pull/50663 * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * chore: fix patch indices * chore: update patches * test: disable TLS cipher test This can't be enabled owing to BoringSSL incompatibilities. https://github.com/nodejs/node/pull/50186 * fix: check for Buffer and global definition in shadow realm https://github.com/nodejs/node/pull/51239 * test: disable parallel/test-shadow-realm-custom-loader Incompatible with our asar logic, resulting in the following failure: > Failed to CompileAndCall electron script: electron/js2c/asar_bundle * chore: remove deleted parallel/test-crypto-modp1-error test * test: make test-node-output-v8-warning generic https://github.com/nodejs/node/pull/50421 * chore: fixup ModuleWrap patch * test: match wpt/streams/transferable/transform-stream-members.any.js to upstream * fix: sandbox is not enabled on arm * chore: disable v8 sandbox on ia32/arm --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2024-01-18 16:16:45 -05:00
# Initialize v8 platform during node.js startup.
- node_use_v8_platform = true
+ node_use_v8_platform = false
# Custom build tag.
node_tag = ""
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -64,10 +64,16 @@ declare_args() {
# TODO(zcbenz): There are few broken things for now:
# 1. cross-os compilation is not supported.
# 2. node_mksnapshot crashes when cross-compiling for x64 from arm64.
- node_use_node_snapshot = (host_os == target_os) && !(host_cpu == "arm64" && target_cpu == "x64")
+ node_use_node_snapshot = false
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
# Build with Amaro (TypeScript utils).
node_use_amaro = true
+
+ # Allows downstream packagers (eg. Linux distributions) to build against system shared libraries.
+ use_system_cares = false
+ use_system_nghttp2 = false
+ use_system_llhttp = false
+ use_system_histogram = false
chore: bump node to v20.11.0 (main) (#40941) * chore: bump node in DEPS to v20.11.0 * module: bootstrap module loaders in shadow realm https://github.com/nodejs/node/pull/48655 * src: add commit hash shorthand in zlib version https://github.com/nodejs/node/pull/50158 * v8,tools: expose necessary V8 defines https://github.com/nodejs/node/pull/50820 * esm: do not call getSource when format is commonjs https://github.com/nodejs/node/pull/50465 * esm: fallback to readFileSync when source is nullish https://github.com/nodejs/node/pull/50825 * vm: allow dynamic import with a referrer realm https://github.com/nodejs/node/pull/50360 * test: skip test-diagnostics-channel-memory-leak.js https://github.com/nodejs/node/pull/50327 * esm: do not call getSource when format is commonjs https://github.com/nodejs/node/pull/50465 * lib: fix assert throwing different error messages in ESM and CJS https://github.com/nodejs/node/pull/50634 * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * deps: update base64 to 0.5.1 https://github.com/nodejs/node/pull/50629 * src: avoid silent coercion to signed/unsigned int https://github.com/nodejs/node/pull/50663 * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * chore: fix patch indices * chore: update patches * test: disable TLS cipher test This can't be enabled owing to BoringSSL incompatibilities. https://github.com/nodejs/node/pull/50186 * fix: check for Buffer and global definition in shadow realm https://github.com/nodejs/node/pull/51239 * test: disable parallel/test-shadow-realm-custom-loader Incompatible with our asar logic, resulting in the following failure: > Failed to CompileAndCall electron script: electron/js2c/asar_bundle * chore: remove deleted parallel/test-crypto-modp1-error test * test: make test-node-output-v8-warning generic https://github.com/nodejs/node/pull/50421 * chore: fixup ModuleWrap patch * test: match wpt/streams/transferable/transform-stream-members.any.js to upstream * fix: sandbox is not enabled on arm * chore: disable v8 sandbox on ia32/arm --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2024-01-18 16:16:45 -05:00
}
assert(!node_enable_inspector || node_use_openssl,
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
index 9aaf5626fcfe4a9b168e069df0265df7b535b76e..ece9c4656919d8dc408112142367791628dd5f8b 100644
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -779,6 +779,7 @@ void BuiltinLoader::RegisterExternalReferences(
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
registry->Register(GetNatives);
RegisterExternalReferencesForInternalizedBuiltinCode(registry);
+ EmbedderRegisterExternalReferencesForInternalizedBuiltinCode(registry);
}
} // namespace builtins
diff --git a/src/node_builtins.h b/src/node_builtins.h
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
index a73de23a1debfdac66873e0baccf882e383bfc36..7ac5291be093773ee7efd39e77e01bf5d5ce5247 100644
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
--- a/src/node_builtins.h
+++ b/src/node_builtins.h
@@ -74,6 +74,8 @@ using BuiltinCodeCacheMap =
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
// Generated by tools/js2c.cc as node_javascript.cc
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
void RegisterExternalReferencesForInternalizedBuiltinCode(
ExternalReferenceRegistry* registry);
+void EmbedderRegisterExternalReferencesForInternalizedBuiltinCode(
+ ExternalReferenceRegistry* registry);
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
// Handles compilation and caching of built-in JavaScript modules and
// bootstrap scripts, whose source are bundled into the binary as static data.
diff --git a/tools/install.py b/tools/install.py
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
index 17515720ba9c85d533465365188021074a8d30f4..7232be863d517c8445059a57c5938c2cbdeaf81b 100755
--- a/tools/install.py
+++ b/tools/install.py
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -291,6 +291,7 @@ def headers(options, action):
'include/v8-promise.h',
'include/v8-proxy.h',
'include/v8-regexp.h',
+ 'include/v8-sandbox.h',
'include/v8-script.h',
'include/v8-snapshot.h',
'include/v8-source-location.h',
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
diff --git a/tools/js2c.cc b/tools/js2c.cc
old mode 100644
new mode 100755
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
index 21992cbe894a880e3223c379326b62db22f2f12d..1296a5457422099035ba34f2b02624f2e9dfb0f0
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
--- a/tools/js2c.cc
+++ b/tools/js2c.cc
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -28,6 +28,7 @@ namespace js2c {
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
int Main(int argc, char* argv[]);
static bool is_verbose = false;
+static bool only_js = false;
void Debug(const char* format, ...) {
va_list arguments;
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -175,6 +176,7 @@ const char* kTemplate = R"(
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
#include "node_builtins.h"
#include "node_external_reference.h"
#include "node_internals.h"
+#include "node_threadsafe_cow-inl.h"
namespace node {
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -190,7 +192,11 @@ const ThreadsafeCopyOnWrite<BuiltinSourceMap> global_source_map {
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
} // anonymous namespace
void BuiltinLoader::LoadJavaScriptSource() {
- source_ = global_source_map;
+ BuiltinSourceMap map = *source_.read();
+ BuiltinSourceMap new_map = *global_source_map.read();
+
+ map.merge(new_map);
+ source_ = ThreadsafeCopyOnWrite<BuiltinSourceMap>(map);
}
void RegisterExternalReferencesForInternalizedBuiltinCode(
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -207,6 +213,45 @@ UnionBytes BuiltinLoader::GetConfig() {
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
} // namespace node
)";
+const char* kEmbedderTemplate = R"(
+#include "env-inl.h"
+#include "node_builtins.h"
+#include "node_external_reference.h"
+#include "node_internals.h"
+#include "node_threadsafe_cow-inl.h"
+
+namespace node {
+
+namespace builtins {
+
+%.*s
+namespace {
+const ThreadsafeCopyOnWrite<BuiltinSourceMap> global_source_map {
+ BuiltinSourceMap {
+%.*s
+ } // BuiltinSourceMap
+
+}; // ThreadsafeCopyOnWrite
+} // anonymous namespace
+
+void BuiltinLoader::LoadEmbedderJavaScriptSource() {
+ BuiltinSourceMap map = *source_.read();
+ BuiltinSourceMap new_map = *global_source_map.read();
+
+ map.merge(new_map);
+ source_ = ThreadsafeCopyOnWrite<BuiltinSourceMap>(map);
+}
+
+void EmbedderRegisterExternalReferencesForInternalizedBuiltinCode(
+ ExternalReferenceRegistry* registry) {
+%.*s
+}
+
+} // namespace builtins
+
+} // namespace node
+)";
+
Fragment Format(const Fragments& definitions,
const Fragments& initializers,
const Fragments& registrations) {
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -216,13 +261,12 @@ Fragment Format(const Fragments& definitions,
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
size_t init_size = init_buf.size();
std::vector<char> reg_buf = Join(registrations, "\n");
size_t reg_size = reg_buf.size();
-
- size_t result_size =
- def_size + init_size + reg_size + strlen(kTemplate) + 100;
+ size_t result_size = def_size + init_size + reg_size +
+ strlen(only_js ? kEmbedderTemplate: kTemplate) + 300;
std::vector<char> result(result_size, 0);
int r = snprintf(result.data(),
result_size,
- kTemplate,
+ only_js ? kEmbedderTemplate: kTemplate,
static_cast<int>(def_buf.size()),
def_buf.data(),
static_cast<int>(init_buf.size()),
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -846,12 +890,15 @@ int JS2C(const FileList& js_files,
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
}
}
chore: bump node to v12.16.1 (master) (#22168) * chore: bump node in DEPS to v12.16.0 * Fixup asar support setup patch https://github.com/nodejs/node/pull/30862 * Fixup InternalCallbackScope patch https://github.com/nodejs/node/pull/30236 * Fixup GN buildfiles patch https://github.com/nodejs/node/pull/30755 * Fixup low-level hooks patch https://github.com/nodejs/node/pull/30466 * Fixup globals require patch https://github.com/nodejs/node/pull/31643 * Fixup process stream patch https://github.com/nodejs/node/pull/30862 * Fixup js2c modification patch https://github.com/nodejs/node/pull/30755 * Fixup internal fs override patch https://github.com/nodejs/node/pull/30610 * Fixup context-aware warn patch https://github.com/nodejs/node/pull/30336 * Fixup Node.js with ltcg config https://github.com/nodejs/node/pull/29388 * Fixup oaepLabel patch https://github.com/nodejs/node/pull/30917 * Remove redundant ESM test patch https://github.com/nodejs/node/pull/30997 * Remove redundant cli flag patch https://github.com/nodejs/node/pull/30466 * Update filenames.json * Remove macro generation in GN build files https://github.com/nodejs/node/pull/30755 * Fix some compilation errors upstream * Add uvwasi to deps https://github.com/nodejs/node/pull/30258 * Fix BoringSSL incompatibilities * Fixup linked module patch https://github.com/nodejs/node/pull/30274 * Add missing sources to GN uv build https://github.com/libuv/libuv/pull/2347 * Patch some uvwasi incompatibilities * chore: bump Node.js to v12.6.1 * Remove mark_arraybuffer_as_untransferable.patch https://github.com/nodejs/node/pull/30549 * Fix uvwasi build failure on win * Fixup --perf-prof cli option error * Fixup early cjs module loading * fix: initialize diagnostics properly https://github.com/nodejs/node/pull/30025 * Disable new esm syntax specs https://github.com/nodejs/node/pull/30219 * Fixup v8 weakref hook spec https://github.com/nodejs/node/pull/29874 * Fix async context timer issue * Disable monkey-patch-main spec It relies on https://github.com/nodejs/node/pull/29777, and we don't override prepareStackTrace. * Disable new tls specs https://github.com/nodejs/node/pull/23188 We don't support much of TLS owing to schisms between BoringSSL and OpenSSL. Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2020-02-24 13:02:04 -08:00
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
+ if (!only_js) {
assert(FilenameIsConfigGypi(config));
// "config.gypi" -> config_raw.
int r = AddGypi("config", config, &definitions);
if (r != 0) {
return r;
}
+ }
+
Fragment out = Format(definitions, initializers, registrations);
return WriteIfChanged(out, dest);
}
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -877,6 +924,8 @@ int Main(int argc, char* argv[]) {
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
std::string arg(argv[i]);
if (arg == "--verbose") {
is_verbose = true;
+ } else if (arg == "--only-js") {
+ only_js = true;
} else if (arg == "--root") {
if (i == argc - 1) {
fprintf(stderr, "--root must be followed by a path\n");
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -925,6 +974,14 @@ int Main(int argc, char* argv[]) {
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
}
}
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
+ if (only_js) {
+ auto js_it = file_map.find(".js");
+
+ assert(file_map.size() == 1);
+ assert(js_it != file_map.end());
+
+ return JS2C(js_it->second, FileList(), std::string(), output);
+ } else {
// Should have exactly 3 types: `.js`, `.mjs` and `.gypi`.
assert(file_map.size() == 3);
auto gypi_it = file_map.find(".gypi");
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -951,6 +1008,7 @@ int Main(int argc, char* argv[]) {
chore: upgrade to Node.js v20 (#40545) * chore: upgrade to Node.js v20 * src: allow embedders to override NODE_MODULE_VERSION https://github.com/nodejs/node/pull/49279 * src: fix missing trailing , https://github.com/nodejs/node/pull/46909 * src,tools: initialize cppgc https://github.com/nodejs/node/pull/45704 * tools: allow passing absolute path of config.gypi in js2c https://github.com/nodejs/node/pull/49162 * tools: port js2c.py to C++ https://github.com/nodejs/node/pull/46997 * doc,lib: disambiguate the old term, NativeModule https://github.com/nodejs/node/pull/45673 * chore: fixup Node.js BSSL tests * https://github.com/nodejs/node/pull/49492 * https://github.com/nodejs/node/pull/44498 * deps: upgrade to libuv 1.45.0 https://github.com/nodejs/node/pull/48078 * deps: update V8 to 10.7 https://github.com/nodejs/node/pull/44741 * test: use gcUntil() in test-v8-serialize-leak https://github.com/nodejs/node/pull/49168 * module: make CJS load from ESM loader https://github.com/nodejs/node/pull/47999 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * chore: address changes to CJS/ESM loading * module: make CJS load from ESM loader (https://github.com/nodejs/node/pull/47999) * lib: improve esm resolve performance (https://github.com/nodejs/node/pull/46652) * bootstrap: optimize modules loaded in the built-in snapshot https://github.com/nodejs/node/pull/45849 * test: mark test-runner-output as flaky https://github.com/nodejs/node/pull/49854 * lib: lazy-load deps in modules/run_main.js https://github.com/nodejs/node/pull/45849 * url: use private properties for brand check https://github.com/nodejs/node/pull/46904 * test: refactor `test-node-output-errors` https://github.com/nodejs/node/pull/48992 * assert: deprecate callTracker https://github.com/nodejs/node/pull/47740 * src: cast v8::Object::GetInternalField() return value to v8::Value https://github.com/nodejs/node/pull/48943 * test: adapt test-v8-stats for V8 update https://github.com/nodejs/node/pull/45230 * tls: ensure TLS Sockets are closed if the underlying wrap closes https://github.com/nodejs/node/pull/49327 * test: deflake test-tls-socket-close https://github.com/nodejs/node/pull/49575 * net: fix crash due to simultaneous close/shutdown on JS Stream Sockets https://github.com/nodejs/node/pull/49400 * net: use asserts in JS Socket Stream to catch races in future https://github.com/nodejs/node/pull/49400 * lib: fix BroadcastChannel initialization location https://github.com/nodejs/node/pull/46864 * src: create BaseObject with node::Realm https://github.com/nodejs/node/pull/44348 * src: implement DataQueue and non-memory resident Blob https://github.com/nodejs/node/pull/45258 * sea: add support for V8 bytecode-only caching https://github.com/nodejs/node/pull/48191 * chore: fixup patch indices * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * build: modify js2c.py into GN executable * fix: (WIP) handle string replacement of fs -> original-fs * [v20.x] backport vm-related memory fixes https://github.com/nodejs/node/pull/49874 * src: make BuiltinLoader threadsafe and non-global https://github.com/nodejs/node/pull/45942 * src: avoid copying string in fs_permission https://github.com/nodejs/node/pull/47746 * look upon my works ye mighty and dispair * chore: patch cleanup * [api] Remove AllCan Read/Write https://chromium-review.googlesource.com/c/v8/v8/+/5006387 * fix: missing include for NODE_EXTERN * chore: fixup patch indices * fix: fail properly when js2c fails in Node.js * build: fix js2c root_gen_dir * fix: lib/fs.js -> lib/original-fs.js * build: fix original-fs file xforms * fixup! module: make CJS load from ESM loader * build: get rid of CppHeap for now * build: add patch to prevent extra fs lookup on esm load * build: greatly simplify js2c modifications Moves our original-fs modifications back into a super simple python script action, wires up the output of that action into our call to js2c * chore: update to handle moved internal/modules/helpers file * test: update @types/node test * feat: enable preventing cppgc heap creation * feat: optionally prevent calling V8::EnableWebAssemblyTrapHandler * fix: no cppgc initialization in the renderer * gyp: put filenames in variables https://github.com/nodejs/node/pull/46965 * test: disable single executable tests * fix: nan tests failing on node headers missing file * tls,http2: send fatal alert on ALPN mismatch https://github.com/nodejs/node/pull/44031 * test: disable snapshot tests * https://github.com/nodejs/node/pull/47887 * https://github.com/nodejs/node/pull/49684 * https://github.com/nodejs/node/pull/44193 * build: use deps/v8 for v8/tools Node.js hard depends on these in their builtins * test: fix edge snapshot stack traces https://github.com/nodejs/node/pull/49659 * build: remove js2c //base dep * build: use electron_js2c_toolchain to build node_js2c * fix: don't create SafeSet outside packageResolve Fixes failure in parallel/test-require-delete-array-iterator: === release test-require-delete-array-iterator === Path: parallel/test-require-delete-array-iterator node:internal/per_context/primordials:426 constructor(i) { super(i); } // eslint-disable-line no-useless-constructor ^ TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at new Set (<anonymous>) at new SafeSet (node:internal/per_context/primordials:426:22) * fix: failing crashReporter tests on Linux These were failing because our change from node::InitializeNodeWithArgs to node::InitializeOncePerProcess meant that we now inadvertently called PlatformInit, which reset signal handling. This meant that our intentional crash function ElectronBindings::Crash no longer worked and the renderer process no longer crashed when process.crash() was called. We don't want to use Node.js' default signal handling in the renderer process, so we disable it by passing kNoDefaultSignalHandling to node::InitializeOncePerProcess. * build: only create cppgc heap on non-32 bit platforms * chore: clean up util:CompileAndCall * src: fix compatility with upcoming V8 12.1 APIs https://github.com/nodejs/node/pull/50709 * fix: use thread_local BuiltinLoader * chore: fixup v8 patch indices --------- Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
2023-11-30 15:51:35 +01:00
std::sort(mjs_it->second.begin(), mjs_it->second.end());
return JS2C(js_it->second, mjs_it->second, gypi_it->second[0], output);
+ }
}
} // namespace js2c
} // namespace node
diff --git a/tools/search_files.py b/tools/search_files.py
index 65d0e1be42f0a85418491ebb548278cf431aa6a0..d4a31342f1c6107b029394c6e1d00a1d1e877e03 100755
--- a/tools/search_files.py
+++ b/tools/search_files.py
@@ -14,6 +14,7 @@ if __name__ == '__main__':
try:
files = SearchFiles(*sys.argv[2:])
files = [ os.path.relpath(x, sys.argv[1]) for x in files ]
+ files = [os.path.normpath(x).replace(os.sep, '/') for x in files]
print('\n'.join(files))
except Exception as e:
print(str(e))
diff --git a/unofficial.gni b/unofficial.gni
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f7c87f00e 100644
--- a/unofficial.gni
+++ b/unofficial.gni
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -145,6 +145,7 @@ template("node_gn_build") {
public_deps = [
"deps/ada",
"deps/uv",
+ "//electron:electron_js2c",
"deps/simdjson",
"$node_v8_path",
]
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -156,7 +157,6 @@ template("node_gn_build") {
"deps/llhttp",
"deps/nbytes",
"deps/nghttp2",
- "deps/ngtcp2",
"deps/postject",
"deps/sqlite",
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
"deps/uvwasi",
@@ -165,7 +165,11 @@ template("node_gn_build") {
"$node_v8_path:v8_libplatform",
]
+ cflags_cc = [ "-Wno-unguarded-availability-new" ]
+
sources = [
+ "src/node_snapshot_stub.cc",
+ "$root_gen_dir/electron_natives.cc",
"$target_gen_dir/node_javascript.cc",
] + gypi_values.node_sources
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -185,7 +189,7 @@ template("node_gn_build") {
}
if (node_use_openssl) {
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
deps += [ "deps/ncrypto" ]
- public_deps += [ "$node_openssl_path" ]
+ public_deps += [ "//third_party/boringssl" ]
sources += gypi_values.node_crypto_sources
}
if (node_enable_inspector) {
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -282,6 +286,7 @@ template("node_gn_build") {
}
executable("node_js2c") {
+ defines = []
deps = [
"deps/uv",
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
"$node_simdutf_path",
@@ -292,26 +297,75 @@ template("node_gn_build") {
"src/embedded_data.cc",
"src/embedded_data.h",
]
- include_dirs = [ "src" ]
+ include_dirs = [ "src", "tools" ]
+
+ if (!is_win) {
+ defines += [ "NODE_JS2C_USE_STRING_LITERALS" ]
+ }
+ }
+
+ node_deps_files = gypi_values.deps_files + node_builtin_shareable_builtins
+ node_library_files = exec_script("./tools/search_files.py",
+ [ rebase_path(".", root_build_dir),
+ rebase_path("lib", root_build_dir),
+ "js" ],
+ "list lines")
+
+ fs_files = [
+ "lib/internal/fs/cp/cp-sync.js",
+ "lib/internal/fs/cp/cp.js",
+ "lib/internal/fs/dir.js",
+ "lib/internal/fs/glob.js",
+ "lib/internal/fs/promises.js",
+ "lib/internal/fs/read/context.js",
+ "lib/internal/fs/recursive_watch.js",
+ "lib/internal/fs/rimraf.js",
+ "lib/internal/fs/streams.js",
+ "lib/internal/fs/sync_write_stream.js",
+ "lib/internal/fs/utils.js",
+ "lib/internal/fs/watchers.js",
+ "lib/fs.js",
+ "lib/fs/promises.js"
+ ]
+
+ original_fs_files = []
+ foreach(file, fs_files) {
+ original_fs_files += [string_replace(string_replace(string_replace(file, "internal/fs/", "internal/original-fs/"), "lib/fs.js", "lib/original-fs.js"), "lib/fs/", "lib/original-fs/")]
+ }
+
+ copy("node_js2c_inputs") {
+ sources = node_deps_files + node_library_files
+ outputs = [
+ "$target_gen_dir/js2c_inputs/{{source_target_relative}}",
+ ]
+ }
+
+ action("node_js2c_original_fs") {
+ script = "//electron/script/node/generate_original_fs.py"
+ inputs = fs_files
+ deps = [ ":node_js2c_inputs" ]
+
+ outputs = []
+ foreach(file, original_fs_files) {
+ outputs += ["$target_gen_dir/js2c_inputs/$file"]
+ }
+
+ args = [rebase_path("$target_gen_dir/js2c_inputs")] + fs_files
}
action("run_node_js2c") {
- script = "$node_v8_path/tools/run.py"
+ script = "//electron/build/run-in-dir.py"
deps = [
+ ":node_js2c_original_fs",
":node_js2c($host_toolchain)",
":generate_config_gypi",
]
- node_deps_files = gypi_values.deps_files + node_builtin_shareable_builtins
- node_library_files = exec_script("./tools/search_files.py",
- [ rebase_path(".", root_build_dir),
- rebase_path("lib", root_build_dir),
- "js" ],
- "list lines")
-
+ config_gypi = [ "$target_gen_dir/config.gypi" ]
inputs = node_library_files +
node_deps_files +
- [ "$target_gen_dir/config.gypi" ]
+ get_target_outputs(":node_js2c_original_fs") +
+ config_gypi
outputs = [ "$target_gen_dir/node_javascript.cc" ]
# Get the path to node_js2c executable of the host toolchain.
chore: bump node to v22.13.1 (35-x-y) (#45216) * chore: bump node in DEPS to v22.13.0 * chore: bump node in DEPS to v22.13.1 * src: move evp stuff to ncrypto https://github.com/nodejs/node/pull/54911 * crypto: add Date fields for validTo and validFrom https://github.com/nodejs/node/pull/54159 * module: fix discrepancy between .ts and .js https://github.com/nodejs/node/pull/54461 * esm: do not interpret "main" as a URL https://github.com/nodejs/node/pull/55003 * src: modernize likely/unlikely hints https://github.com/nodejs/node/pull/55155 * chore: update patch indices * crypto: add validFromDate and validToDate fields to X509Certificate https://github.com/nodejs/node/pull/54159 * chore: fixup perfetto patch * fix: clang warning in simdjson * src: add receiver to fast api callback methods https://github.com/nodejs/node/pull/54408 * chore: fixup revert patch * fixup! esm: do not interpret "main" as a URL * fixup! crypto: add Date fields for validTo and validFrom * fix: move ArrayBuffer test patch * src: fixup Error.stackTraceLimit during snapshot building https://github.com/nodejs/node/pull/55121 * fix: bad rebase * chore: fixup amaro * chore: address feedback from review * src: revert filesystem::path changes https://github.com/nodejs/node/pull/55015 * chore: fixup GN build file * https://github.com/nodejs/node/pull/55529 * https://github.com/nodejs/node/pull/55798 * https://github.com/nodejs/node/pull/55530 * module: simplify --inspect-brk handling https://github.com/nodejs/node/pull/55679 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * crypto: include openssl/rand.h explicitly https://github.com/nodejs/node/pull/55425 * build: use variable for crypto dep path https://github.com/nodejs/node/pull/55928 * crypto: fix RSA_PKCS1_PADDING error message https://github.com/nodejs/node/pull/55629 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: suppress clang -Wdeprecated-declarations in libuv https://github.com/libuv/libuv/pull/4486 * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 * test: make test-node-output-v8-warning more flexible https://github.com/nodejs/node/pull/55401 * [v22.x] Revert "v8: enable maglev on supported architectures" https://github.com/nodejs/node/pull/54384 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update nghttp2 to 1.64.0 https://github.com/nodejs/node/pull/55559 * src: provide workaround for container-overflow https://github.com/nodejs/node/pull/55591 * build: use variable for simdutf path https://github.com/nodejs/node/pull/56196 * chore: fixup patch indices * fixup! module: simplify --inspect-brk handling * lib: fix fs.readdir recursive async https://github.com/nodejs/node/pull/56041 * lib: avoid excluding symlinks in recursive fs.readdir with filetypes https://github.com/nodejs/node/pull/55714/ This doesn't currently play well with ASAR - this should be fixed in a follow up * test: disable CJS permission test for config.main This has diverged as a result of our revert of src,lb: reducing C++ calls of esm legacy main resolve * fixup! lib: fix fs.readdir recursive async * deps: update libuv to 1.49.1 https://github.com/nodejs/node/pull/55114 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-02-14 15:53:34 +01:00
@@ -325,11 +379,11 @@ template("node_gn_build") {
get_label_info(":node_js2c($host_toolchain)", "name") +
host_executable_suffix
- args = [ rebase_path(node_js2c_path),
- rebase_path("$target_gen_dir/node_javascript.cc"),
- "--root", rebase_path("."),
- "lib", rebase_path("$target_gen_dir/config.gypi") ] +
- node_deps_files
+ args = [ rebase_path("$target_gen_dir/js2c_inputs"),
+ rebase_path(node_js2c_path),
+ rebase_path("$target_gen_dir/node_javascript.cc")] +
+ rebase_path(config_gypi) + node_deps_files +
+ original_fs_files + node_library_files
}
executable("node_cctest") {