Skip to content

Commit

Permalink
chore: bump node to v20.13.1 (main) (electron#42088)
Browse files Browse the repository at this point in the history
* chore: bump node in DEPS to v20.13.0

* crypto: enable NODE_EXTRA_CA_CERTS with BoringSSL

nodejs/node#52217

* test: skip test for dynamically linked OpenSSL

nodejs/node#52542

* lib, url: add a `windows` option to path parsing

nodejs/node#52509

* src: use dedicated routine to compile function for builtin CJS loader

nodejs/node#52016

* test: mark test as flaky

nodejs/node#52671

* build,tools: add test-ubsan ci

nodejs/node#46297

* src: preload function for Environment

nodejs/node#51539

* chore: fixup patch indices

* deps: update c-ares to 1.28.1

nodejs/node#52285

* chore: handle updated filenames

- nodejs/node#51999
- nodejs/node#51927

* chore: bump node in DEPS to v20.13.1

* events: extract addAbortListener for safe internal use

nodejs/node#52081

* module: print location of unsettled top-level await in entry points

nodejs/node#51999

* fs: add stacktrace to fs/promises

nodejs/node#49849

* chore: update patches

---------

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: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored and Mrnikifabio committed May 14, 2024
1 parent addaa71 commit 0410a38
Show file tree
Hide file tree
Showing 36 changed files with 139 additions and 447 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ vars = {
'chromium_version':
'126.0.6445.0',
'node_version':
'v20.12.2',
'v20.13.1',
'nan_version':
'e14bdcd1f72d62bca1d541b66da43130384ec213',
'squirrel.mac_version':
Expand Down
6 changes: 3 additions & 3 deletions lib/browser/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ delete process.appCodeLoaded;
if (packagePath) {
// Finally load app's main.js and transfer control to C++.
if ((packageJson.type === 'module' && !mainStartupScript.endsWith('.cjs')) || mainStartupScript.endsWith('.mjs')) {
const { loadESM } = __non_webpack_require__('internal/process/esm_loader');
const { runEntryPointWithESMLoader } = __non_webpack_require__('internal/modules/run_main');
const main = (require('url') as typeof url).pathToFileURL(path.join(packagePath, mainStartupScript));
loadESM(async (esmLoader: any) => {
runEntryPointWithESMLoader(async (cascadedLoader: any) => {
try {
await esmLoader.import(main.toString(), undefined, Object.create(null));
await cascadedLoader.import(main.toString(), undefined, Object.create(null));
appCodeLoaded!();
} catch (err) {
appCodeLoaded!();
Expand Down
13 changes: 11 additions & 2 deletions lib/node/asar-fs-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
};

const { access } = fs;
fs.access = function (pathArgument: string, mode: any, callback: any) {
fs.access = function (pathArgument: string, mode: number, callback: any) {
const pathInfo = splitPath(pathArgument);
if (!pathInfo.isAsar) return access.apply(this, arguments);
const { asarPath, filePath } = pathInfo;
Expand Down Expand Up @@ -539,7 +539,16 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
nextTick(callback);
};

fs.promises.access = util.promisify(fs.access);
const { access: accessPromise } = fs.promises;
fs.promises.access = function (pathArgument: string, mode: number) {
const pathInfo = splitPath(pathArgument);
if (!pathInfo.isAsar) {
return accessPromise.apply(this, arguments);
}

const p = util.promisify(fs.access);
return p(pathArgument, mode);
};

const { accessSync } = fs;
fs.accessSync = function (pathArgument: string, mode: any) {
Expand Down
6 changes: 3 additions & 3 deletions lib/renderer/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ if (cjsPreloads.length) {
}
}
if (esmPreloads.length) {
const { loadESM } = __non_webpack_require__('internal/process/esm_loader');
const { runEntryPointWithESMLoader } = __non_webpack_require__('internal/modules/run_main');

loadESM(async (esmLoader: any) => {
runEntryPointWithESMLoader(async (cascadedLoader: any) => {
// Load the preload scripts.
for (const preloadScript of esmPreloads) {
await esmLoader.import(pathToFileURL(preloadScript).toString(), undefined, Object.create(null)).catch((err: Error) => {
await cascadedLoader.import(pathToFileURL(preloadScript).toString(), undefined, Object.create(null)).catch((err: Error) => {
console.error(`Unable to load preload script: ${preloadScript}`);
console.error(err);

Expand Down
7 changes: 4 additions & 3 deletions lib/utility/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ parentPort.on('removeListener', (name: string) => {
});

// Finally load entry script.
const { loadESM } = __non_webpack_require__('internal/process/esm_loader');
const { runEntryPointWithESMLoader } = __non_webpack_require__('internal/modules/run_main');
const mainEntry = pathToFileURL(entryScript);
loadESM(async (esmLoader: any) => {

runEntryPointWithESMLoader(async (cascadedLoader: any) => {
try {
await esmLoader.import(mainEntry.toString(), undefined, Object.create(null));
await cascadedLoader.import(mainEntry.toString(), undefined, Object.create(null));
} catch (err) {
// @ts-ignore internalBinding is a secret internal global that we shouldn't
// really be using, so we ignore the type error instead of declaring it in types
Expand Down
1 change: 0 additions & 1 deletion patches/node/.patches
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ test_make_test-node-output-v8-warning_generic.patch
test_match_wpt_streams_transferable_transform-stream-members_any_js.patch
build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch
fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch
src_preload_function_for_environment.patch
deprecate_vector_v8_local_in_v8.patch
fix_remove_deprecated_errno_constants.patch
build_enable_perfetto.patch
Expand Down
16 changes: 7 additions & 9 deletions patches/node/build_add_gn_build_files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,10 @@ index 0e69d7383762f6b81c5b57698aa9d121d5a9c401..35bbeb37acc7ccb14b4b8a644ec3d4c7
cflags_c = [
"-mavx512vl",
diff --git a/deps/cares/BUILD.gn b/deps/cares/BUILD.gn
index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..1717143998ae15e65e9af12650b796226508a137 100644
index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..3f253daee0f9b1faa50857f61d76de001bd8947e 100644
--- a/deps/cares/BUILD.gn
+++ b/deps/cares/BUILD.gn
@@ -1,14 +1,165 @@
@@ -1,14 +1,163 @@
-##############################################################################
-# #
-# DO NOT EDIT THIS FILE! #
Expand Down Expand Up @@ -587,7 +587,6 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..1717143998ae15e65e9af12650b79622
+ "src/lib/ares__llist.c",
+ "src/lib/ares__llist.h",
+ "src/lib/ares__parse_into_addrinfo.c",
+ "src/lib/ares__read_line.c",
+ "src/lib/ares__slist.c",
+ "src/lib/ares__slist.h",
+ "src/lib/ares__socket.c",
Expand Down Expand Up @@ -635,7 +634,6 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..1717143998ae15e65e9af12650b79622
+ "src/lib/ares_library_init.c",
+ "src/lib/ares_ipv6.h",
+ "src/lib/ares_math.c",
+ "src/lib/ares_mkquery.c",
+ "src/lib/ares_options.c",
+ "src/lib/ares_parse_a_reply.c",
+ "src/lib/ares_parse_aaaa_reply.c",
Expand Down Expand Up @@ -1258,7 +1256,7 @@ index 0000000000000000000000000000000000000000..af9cbada10203b387fb9732b346583b1
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..424b6f4f9d89c43a2c0404d1a5cb03828f29d906
index 0000000000000000000000000000000000000000..1a9cba024f1762b0dfe31da92213b51e112101ec
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,739 @@
Expand Down Expand Up @@ -1532,6 +1530,7 @@ index 0000000000000000000000000000000000000000..424b6f4f9d89c43a2c0404d1a5cb0382
+ "lib/internal/error_serdes.js",
+ "lib/internal/errors.js",
+ "lib/internal/event_target.js",
+ "lib/internal/events/abort_listener.js",
+ "lib/internal/events/symbols.js",
+ "lib/internal/file.js",
+ "lib/internal/fixed_queue.js",
Expand Down Expand Up @@ -1568,7 +1567,6 @@ index 0000000000000000000000000000000000000000..424b6f4f9d89c43a2c0404d1a5cb0382
+ "lib/internal/modules/esm/fetch_module.js",
+ "lib/internal/modules/esm/formats.js",
+ "lib/internal/modules/esm/get_format.js",
+ "lib/internal/modules/esm/handle_process_exit.js",
+ "lib/internal/modules/esm/hooks.js",
+ "lib/internal/modules/esm/initialize_import_meta.js",
+ "lib/internal/modules/esm/load.js",
Expand Down Expand Up @@ -1603,7 +1601,6 @@ index 0000000000000000000000000000000000000000..424b6f4f9d89c43a2c0404d1a5cb0382
+ "lib/internal/policy/manifest.js",
+ "lib/internal/policy/sri.js",
+ "lib/internal/priority_queue.js",
+ "lib/internal/process/esm_loader.js",
+ "lib/internal/process/execution.js",
+ "lib/internal/process/per_thread.js",
+ "lib/internal/process/permission.js",
Expand Down Expand Up @@ -1781,6 +1778,7 @@ index 0000000000000000000000000000000000000000..424b6f4f9d89c43a2c0404d1a5cb0382
+ "src/handle_wrap.cc",
+ "src/heap_utils.cc",
+ "src/histogram.cc",
+ "src/internal_only_v8.cc",
+ "src/js_native_api.h",
+ "src/js_native_api_types.h",
+ "src/js_native_api_v8.cc",
Expand Down Expand Up @@ -2365,7 +2363,7 @@ index 0000000000000000000000000000000000000000..9be3ac447f9a4dde23fefc26e0b922b4
+ transformed_f.write(transformed_contents)
+
diff --git a/tools/install.py b/tools/install.py
index 17b0947aaca4cd63ce6b57ffc4835eae7f74e76e..c6fa8a931f6a1357592a8447b1abbfe0c894aefd 100755
index b132c7bf26c02886a7ab341a1973bf449744ba0f..171b383a4b6c2528d11dd5f89a6837fd071bcf4b 100755
--- a/tools/install.py
+++ b/tools/install.py
@@ -284,6 +284,7 @@ def headers(options, action):
Expand All @@ -2388,7 +2386,7 @@ index 17b0947aaca4cd63ce6b57ffc4835eae7f74e76e..c6fa8a931f6a1357592a8447b1abbfe0
diff --git a/tools/js2c.cc b/tools/js2c.cc
old mode 100644
new mode 100755
index 0fa9c5954d24a555a1e7c50fdb4b43c17cb1452d..9a77af51630aec5437a09aae1d7296e2e1238809
index e0f3d8844718ab8a6478c40ff713c1fd6bcff95a..c73a5b666dbaf555c749d836c20a7ae19a840847
--- a/tools/js2c.cc
+++ b/tools/js2c.cc
@@ -30,6 +30,7 @@ namespace js2c {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Subject: build: ensure native module compilation fails if not using a new
This should not be upstreamed, it is a quality-of-life patch for downstream module builders.

diff --git a/common.gypi b/common.gypi
index 292cd621dd6d2a6bfcbf959c5910563446492fd9..722b4c3d376ce6eaa683397b693f9bad8f2aa584 100644
index 096cb79db88ce65c3cc57111feb673f37cfd3bb1..a2b0c2a12160b1f59379c552b30b91c3ee65cc12 100644
--- a/common.gypi
+++ b/common.gypi
@@ -86,6 +86,8 @@
@@ -87,6 +87,8 @@
'v8_use_perfetto': 0,
'tsan%': 0,

Expand All @@ -19,15 +19,15 @@ index 292cd621dd6d2a6bfcbf959c5910563446492fd9..722b4c3d376ce6eaa683397b693f9bad
##### end V8 defaults #####

# When building native modules using 'npm install' with the system npm,
@@ -285,6 +287,7 @@
@@ -286,6 +288,7 @@
# Defines these mostly for node-gyp to pickup.
'defines': [
'_GLIBCXX_USE_CXX11_ABI=1',
+ 'ELECTRON_ENSURE_CONFIG_GYPI',
],

# Forcibly disable -Werror. We support a wide range of compilers, it's
@@ -391,6 +394,11 @@
@@ -415,6 +418,11 @@
}],
],
}],
Expand All @@ -40,10 +40,10 @@ index 292cd621dd6d2a6bfcbf959c5910563446492fd9..722b4c3d376ce6eaa683397b693f9bad
# list in v8/BUILD.gn.
['v8_enable_v8_checks == 1', {
diff --git a/configure.py b/configure.py
index 00c8513d6820ec862bffb06063e9b1ae27d6043d..8169c674d672b7206b3765bcbf68cde04ba2d915 100755
index 11c0df455451d4ab4bea066a8361246cbf10bf1d..c30052f02f97df78e0d9294784cb3efb3fd2d1a7 100755
--- a/configure.py
+++ b/configure.py
@@ -1496,6 +1496,7 @@ def configure_library(lib, output, pkgname=None):
@@ -1501,6 +1501,7 @@ def configure_library(lib, output, pkgname=None):


def configure_v8(o):
Expand All @@ -52,7 +52,7 @@ index 00c8513d6820ec862bffb06063e9b1ae27d6043d..8169c674d672b7206b3765bcbf68cde0
o['variables']['v8_enable_javascript_promise_hooks'] = 1
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
diff --git a/src/node.h b/src/node.h
index 13e29b98d0c91badee41b53c37b4763f73e02e87..16c3ad349e942b83764c7772178baa5057cd64f3 100644
index c267ed1eeaa2d8b6ecd5a1563a4e9440bf0cca00..e55256996f2c85b0ae3854cbd1b83ca88a3e22cb 100644
--- a/src/node.h
+++ b/src/node.h
@@ -22,6 +22,12 @@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ in.
This should be upstreamed.

diff --git a/common.gypi b/common.gypi
index 722b4c3d376ce6eaa683397b693f9bad8f2aa584..b003ddf5763a0f5c3289a7ff39d71f3d828b73db 100644
index a2b0c2a12160b1f59379c552b30b91c3ee65cc12..0c0ac7920f00ed1a1561f17fa7cfe9a127f02820 100644
--- a/common.gypi
+++ b/common.gypi
@@ -133,6 +133,7 @@
@@ -134,6 +134,7 @@
['target_arch in "arm ia32 mips mipsel ppc"', {
'v8_enable_pointer_compression': 0,
'v8_enable_31bit_smis_on_64bit_arch': 0,
Expand All @@ -22,10 +22,10 @@ index 722b4c3d376ce6eaa683397b693f9bad8f2aa584..b003ddf5763a0f5c3289a7ff39d71f3d
['target_arch in "ppc64 s390x"', {
'v8_enable_backtrace': 1,
diff --git a/configure.py b/configure.py
index 8169c674d672b7206b3765bcbf68cde04ba2d915..ac5990cf48703ae2e10ad86915aacdad25206f0e 100755
index c30052f02f97df78e0d9294784cb3efb3fd2d1a7..5fb89e56fde52d01b3806ec4e8549cbeb5ffca66 100755
--- a/configure.py
+++ b/configure.py
@@ -1510,6 +1510,7 @@ def configure_v8(o):
@@ -1515,6 +1515,7 @@ def configure_v8(o):
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
o['variables']['v8_enable_maglev'] = 1 if options.v8_enable_maglev else 0
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ index 2ce1e8a7dcca2ba153d387d11970c72b5f43c167..590303d1b78e2c28d7c3338196b12fcf
node_platform = "win32"
} else if (target_os == "mac") {
diff --git a/src/env.cc b/src/env.cc
index 9f83720fefc77342dd45cdf1eebfac613262ad63..309b39fb2b1116824c0c1c2ae86d8e1113e31c3d 100644
index 5c75e5b99d9415163640ab90f5891c0fee067a88..5f8bb37d117d82123b81f5f4b32735150184fa74 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -557,7 +557,8 @@ IsolateData::IsolateData(Isolate* isolate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ modules from being used in the renderer process. This should be upstreamed as
a customizable error message.

diff --git a/src/node_binding.cc b/src/node_binding.cc
index 8cdee730101fbdc79415654aa6fe401573979c0e..34d5e146ffef255019dd33d8c23b0847d91ddee9 100644
index 4e750be66452de47040e3a46555c062dfccf7807..5e1caeee18e447cc76b980df712521cf8b60e8da 100644
--- a/src/node_binding.cc
+++ b/src/node_binding.cc
@@ -4,6 +4,7 @@
Expand All @@ -19,7 +19,7 @@ index 8cdee730101fbdc79415654aa6fe401573979c0e..34d5e146ffef255019dd33d8c23b0847
#include "util.h"

#include <string>
@@ -480,7 +481,12 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
@@ -483,7 +484,12 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
if (mp->nm_context_register_func == nullptr) {
if (env->force_context_aware()) {
dlib->Close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form
of this.

diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 46140285cf6b73c154a067c5f0f0931add5e9275..fb4e675c9dca33b99dbbf347adf6a6938ff91a7a 100644
index 155485dbab0d46bb225fa40e99f555d805659c4f..8183cffe9d7060571c08f696abb7c090e6df3be8 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -1342,6 +1342,13 @@ Module.prototype._compile = function(content, filename) {
@@ -1331,6 +1331,13 @@ Module.prototype._compile = function(content, filename) {
if (getOptionValue('--inspect-brk') && process._eval == null) {
if (!resolvedArgv) {
// We enter the repl if we're not given a filename argument.
Expand All @@ -26,10 +26,10 @@ index 46140285cf6b73c154a067c5f0f0931add5e9275..fb4e675c9dca33b99dbbf347adf6a693
try {
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
index 9d80d2a55c72d2035480ddfb5d54c14ef52844ea..2fc9e2da8aa920acffc101b2c341a5d9b16fe90a 100644
index 16e291484bfe85d5614557f070ab0d2ae59655d4..b4272f01e84d7fec263dcad444d92459743780a8 100644
--- a/lib/internal/process/pre_execution.js
+++ b/lib/internal/process/pre_execution.js
@@ -241,12 +241,14 @@ function patchProcessObject(expandArgv1) {
@@ -244,12 +244,14 @@ function patchProcessObject(expandArgv1) {
if (expandArgv1 && process.argv[1] &&
!StringPrototypeStartsWith(process.argv[1], '-')) {
// Expand process.argv[1] into a full path.
Expand Down
4 changes: 2 additions & 2 deletions patches/node/chore_expose_importmoduledynamically_and.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ its own blended handler between Node and Blink.
Not upstreamable.

diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js
index 39e87338dc5a799a8a30bd2399b8ec5d6b554fad..7b1939fa25379b333f2be07f4ff483f53d8a2ac6 100644
index d7867864bba7141b7ba12b171d185a94ed25d01d..d93a248d8a96fe1dffa08b39cfe3ea7b368db54a 100644
--- a/lib/internal/modules/esm/utils.js
+++ b/lib/internal/modules/esm/utils.js
@@ -24,7 +24,7 @@ const {
Expand All @@ -23,7 +23,7 @@ index 39e87338dc5a799a8a30bd2399b8ec5d6b554fad..7b1939fa25379b333f2be07f4ff483f5
const {
loadPreloadModules,
initializeFrozenIntrinsics,
@@ -239,12 +239,13 @@ let _forceDefaultLoader = false;
@@ -236,12 +236,13 @@ let _forceDefaultLoader = false;
* @param {boolean} [forceDefaultLoader=false] - A boolean indicating disabling custom loaders.
*/
function initializeESM(forceDefaultLoader = false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ This patch can be removed when Node.js upgrades to a version of V8 containing
the above CL.

diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml
index 834e2a1d814d7a215284554b95e38100f54f6471..dbd563061b01bc8796f95e004e07dd0097b8499b 100644
index 0cf84a0da5ee9e63d7b01d0a27946fc29090e516..ee16099ddc9abe5c19b319c111d1319c33b17be4 100644
--- a/lib/.eslintrc.yaml
+++ b/lib/.eslintrc.yaml
@@ -33,10 +33,6 @@ rules:
@@ -30,10 +30,6 @@ rules:
message: Use `const { AbortController } = require('internal/abort_controller');` instead of the global.
- name: AbortSignal
message: Use `const { AbortSignal } = require('internal/abort_controller');` instead of the global.
Expand All @@ -24,7 +24,7 @@ index 834e2a1d814d7a215284554b95e38100f54f6471..dbd563061b01bc8796f95e004e07dd00
message: Use `const { Blob } = require('buffer');` instead of the global.
- name: BroadcastChannel
diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js
index 56697c3b2c2209ff58b8fefbccec03c7e3d9f9a0..4eb7230edcd0fb3d21e80218f6a912eb308fc89d 100644
index 30f7a5f79e50fdeb4e1775a0e56dafa4c6908898..f7250985277c4127425ef36dff566c1fe06603e2 100644
--- a/lib/internal/main/worker_thread.js
+++ b/lib/internal/main/worker_thread.js
@@ -112,7 +112,7 @@ port.on('message', (message) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ index af23e674cb361ed81dafa22670d5633559cd1144..1dd59990cb7cdba8aecf4f499ee6b92e
+ await once(spawn(process.execPath, ['-r', reset, '--test', '--test-reporter', 'tap', test], { stdio: 'inherit', env: { ELECTRON_RUN_AS_NODE: 1 } }), 'exit');
})().then(common.mustCall());
diff --git a/test/parallel/test-node-output-console.mjs b/test/parallel/test-node-output-console.mjs
index 5a1b9feb6c8bedb50b89f5c4f3c5983455bb042d..efca7811dc0b6a590c5ee023c71801703a642882 100644
index f995c170540ffaa80b1b5f8b95dbd8f52bbd5431..6455dbdd015477e16c414b6d2113139327fea4b3 100644
--- a/test/parallel/test-node-output-console.mjs
+++ b/test/parallel/test-node-output-console.mjs
@@ -31,6 +31,7 @@ describe('console output', { concurrency: true }, () => {
.transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths, replaceStackTrace);
for (const { name, transform, env } of tests) {
it(name, async () => {
+ if (env) env.ELECTRON_RUN_AS_NODE = 1;
await snapshot.spawnAndAssert(fixtures.path(name), transform ?? defaultTransform, { env });
});
}
await snapshot.spawnAndAssert(
fixtures.path(name),
transform ?? defaultTransform,
diff --git a/test/parallel/test-node-output-errors.mjs b/test/parallel/test-node-output-errors.mjs
index c0acee2bfc8c124e9d9b254041589a49c8301b8f..0e266899ffc0918b2f94e8f636043a6ec5f0870f 100644
--- a/test/parallel/test-node-output-errors.mjs
Expand Down
2 changes: 1 addition & 1 deletion patches/node/enable_crashpad_linux_node_processes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ to child processes spawned with `ELECTRON_RUN_AS_NODE` which is used
by the crashpad client to connect with the handler process.

diff --git a/lib/child_process.js b/lib/child_process.js
index 449013906e93e59568a90264d5372a3962db6cb0..168163001f13b641bc284fd01a71f075e1ada94f 100644
index c09fca512584ce2c674ae1d05136ff4cd8ea8471..3947e231f4e641b97d12c9639a736fab8836787b 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -61,6 +61,7 @@ let debug = require('internal/util/debuglog').debuglog(
Expand Down
4 changes: 2 additions & 2 deletions patches/node/expose_get_builtin_module_function.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ modules to sandboxed renderers.
TODO(codebytere): remove and replace with a public facing API.

diff --git a/src/node_binding.cc b/src/node_binding.cc
index 97257d47c6173872e55facf6f92801bd2fc3564b..8cdee730101fbdc79415654aa6fe401573979c0e 100644
index 6b0297d8984ccb34b8d0019fedd1307d48cf49f8..4e750be66452de47040e3a46555c062dfccf7807 100644
--- a/src/node_binding.cc
+++ b/src/node_binding.cc
@@ -638,6 +638,10 @@ void GetInternalBinding(const FunctionCallbackInfo<Value>& args) {
@@ -641,6 +641,10 @@ void GetInternalBinding(const FunctionCallbackInfo<Value>& args) {
args.GetReturnValue().Set(exports);
}

Expand Down
Loading

0 comments on commit 0410a38

Please sign in to comment.