Skip to content

Commit a848ba1

Browse files
electron-roller[bot]codebytere
authored andcommitted
chore: bump node to v18.18.0 (main) (electron#39915)
* chore: bump node in DEPS to v18.18.0 * child_process: harden against prototype pollution nodejs/node#48726 * deps: upgrade to libuv 1.46.0 nodejs/node#49591 * module: reduce url invocations in esm/load.js nodejs/node#48337 * Revert "test: remove test-crypto-keygen flaky designation" nodejs/node#48652 * fix: FTBTFS in ada dep ada-url/ada#464 ada-url/idna#31 * fix: force_colors snapshot line number * chore: fixup patch indices * chore: update filenames.json --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <[email protected]>
1 parent b34dbfd commit a848ba1

27 files changed

+102
-142
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ vars = {
44
'chromium_version':
55
'119.0.6019.2',
66
'node_version':
7-
'v18.17.1',
7+
'v18.18.0',
88
'nan_version':
99
'e14bdcd1f72d62bca1d541b66da43130384ec213',
1010
'squirrel.mac_version':

patches/node/.patches

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ fix_account_for_createexternalizablestring_v8_global.patch
3737
fix_wunreachable-code_warning_in_ares_init_rand_engine.patch
3838
fix_-wshadow_warning.patch
3939
fix_do_not_resolve_electron_entrypoints.patch
40-
fix_ftbfs_werror_wunreachable-code-break.patch
4140
fix_ftbfs_werror_wextra-semi.patch
4241
fix_isurl_implementation.patch
4342
ci_ensure_node_tests_set_electron_run_as_node.patch

patches/node/build_add_gn_build_files.patch

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -929,10 +929,10 @@ index 0000000000000000000000000000000000000000..bfbd4e656db1a6c73048443f96f1d576
929929
+}
930930
diff --git a/deps/uv/BUILD.gn b/deps/uv/BUILD.gn
931931
new file mode 100644
932-
index 0000000000000000000000000000000000000000..e90becfab51beb090394db9d3c94d73e546b39ef
932+
index 0000000000000000000000000000000000000000..ae4d3bf68882f1aa6d7440448050fbdd9a17dca7
933933
--- /dev/null
934934
+++ b/deps/uv/BUILD.gn
935-
@@ -0,0 +1,198 @@
935+
@@ -0,0 +1,194 @@
936936
+config("libuv_config") {
937937
+ include_dirs = [ "include" ]
938938
+
@@ -978,6 +978,7 @@ index 0000000000000000000000000000000000000000..e90becfab51beb090394db9d3c94d73e
978978
+ "-Wno-string-conversion",
979979
+ "-Wno-switch",
980980
+ "-Wno-unused-function",
981+
+ "-Wno-unused-result",
981982
+ "-Wno-unused-variable",
982983
+ "-Wno-unreachable-code",
983984
+ "-Wno-unreachable-code-return",
@@ -1004,6 +1005,7 @@ index 0000000000000000000000000000000000000000..e90becfab51beb090394db9d3c94d73e
10041005
+ "src/strscpy.h",
10051006
+ "src/strtok.c",
10061007
+ "src/strtok.h",
1008+
+ "src/thread-common.c",
10071009
+ "src/threadpool.c",
10081010
+ "src/timer.c",
10091011
+ "src/uv-common.c",
@@ -1067,7 +1069,6 @@ index 0000000000000000000000000000000000000000..e90becfab51beb090394db9d3c94d73e
10671069
+ "include/uv/sunos.h",
10681070
+ "include/uv/unix.h",
10691071
+ "src/unix/async.c",
1070-
+ "src/unix/atomic-ops.h",
10711072
+ "src/unix/core.c",
10721073
+ "src/unix/dl.c",
10731074
+ "src/unix/fs.c",
@@ -1079,7 +1080,6 @@ index 0000000000000000000000000000000000000000..e90becfab51beb090394db9d3c94d73e
10791080
+ "src/unix/pipe.c",
10801081
+ "src/unix/poll.c",
10811082
+ "src/unix/process.c",
1082-
+ "src/unix/pthread-fixes.c",
10831083
+ "src/unix/random-devurandom.c",
10841084
+ "src/unix/signal.c",
10851085
+ "src/unix/spinlock.h",
@@ -1110,11 +1110,7 @@ index 0000000000000000000000000000000000000000..e90becfab51beb090394db9d3c94d73e
11101110
+ if (is_linux) {
11111111
+ defines += [ "_GNU_SOURCE" ]
11121112
+ sources += [
1113-
+ "src/unix/epoll.c",
1114-
+ "src/unix/linux-core.c",
1115-
+ "src/unix/linux-inotify.c",
1116-
+ "src/unix/linux-syscalls.c",
1117-
+ "src/unix/linux-syscalls.h",
1113+
+ "src/unix/linux.c",
11181114
+ "src/unix/procfs-exepath.c",
11191115
+ "src/unix/random-getrandom.c",
11201116
+ "src/unix/random-sysctl-linux.c",
@@ -1177,10 +1173,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
11771173
+}
11781174
diff --git a/filenames.json b/filenames.json
11791175
new file mode 100644
1180-
index 0000000000000000000000000000000000000000..7d86765bf229275ba55d37a452ef24832a7afadb
1176+
index 0000000000000000000000000000000000000000..12d4706fae0d8253db8de1fc2c4e31a6380cc122
11811177
--- /dev/null
11821178
+++ b/filenames.json
1183-
@@ -0,0 +1,664 @@
1179+
@@ -0,0 +1,663 @@
11841180
+// This file is automatically generated by generate_gn_filenames_json.py
11851181
+// DO NOT EDIT
11861182
+{
@@ -1294,7 +1290,6 @@ index 0000000000000000000000000000000000000000..7d86765bf229275ba55d37a452ef2483
12941290
+ "deps/uv/include/uv/linux.h",
12951291
+ "deps/uv/include/uv/os390.h",
12961292
+ "deps/uv/include/uv/posix.h",
1297-
+ "deps/uv/include/uv/stdint-msvc2008.h",
12981293
+ "deps/uv/include/uv/sunos.h",
12991294
+ "deps/uv/include/uv/threadpool.h",
13001295
+ "deps/uv/include/uv/tree.h",
@@ -2105,7 +2100,7 @@ index 0000000000000000000000000000000000000000..4ab828dcbf322a9e28674e48c4a6868b
21052100
+ args = rebase_path(inputs + outputs, root_build_dir)
21062101
+}
21072102
diff --git a/src/node_version.h b/src/node_version.h
2108-
index 1e898ffcc9104bc50079a9850dc89767199c646e..0f5c5f1cc0845b5d005697d8ab1ab6167c541ced 100644
2103+
index 7e90c796f3bd076048a2114a1ba31db7ee876440..60a17104e0b1b19038efc1a1468ee92642d3ffd6 100644
21092104
--- a/src/node_version.h
21102105
+++ b/src/node_version.h
21112106
@@ -89,7 +89,10 @@

patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Subject: build: ensure native module compilation fails if not using a new
77
This should not be upstreamed, it is a quality-of-life patch for downstream module builders.
88

99
diff --git a/common.gypi b/common.gypi
10-
index f3e0047fea1319034bf8b05b8d54d8a4ef181b4b..be0289ea7df50d7c2cb002c6343b75014729c923 100644
10+
index 62cb46b328871d929f16ced2a4741bc6e6b004db..53ab7c255317d2280e2579435bc7097705f19c6e 100644
1111
--- a/common.gypi
1212
+++ b/common.gypi
1313
@@ -79,6 +79,8 @@

patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Aligns common.gypi with the current build flag state of //v8.
88
Specifically enables `V8_ENABLE_SANDBOX`, `V8_SANDBOXED_POINTERS`, `V8_COMPRESS_POINTERS` and `V8_COMPRESS_POINTERS_IN_SHARED_CAGE`.
99

1010
diff --git a/common.gypi b/common.gypi
11-
index 543ede0020fd79251bdd9eac897d9a0e330ef239..f3e0047fea1319034bf8b05b8d54d8a4ef181b4b 100644
11+
index 10d11f1e9aacfbe4bb53e1220afab1e68db98313..62cb46b328871d929f16ced2a4741bc6e6b004db 100644
1212
--- a/common.gypi
1313
+++ b/common.gypi
1414
@@ -65,6 +65,7 @@

patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ index ce885c154c81c5703365fa34957697698da9aff6..229b0d522aeee3632145c86715bea139
3737
async function* watch(filename, options = kEmptyObject) {
3838
const path = toNamespacedPath(getValidatedPath(filename));
3939
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
40-
index 2220869fa76f35fdfba72eba993b20748b07c546..522670ed5c9951c506dcdf2745585552ad2a081f 100644
40+
index 356ec3acd0bf3ac1e7518b32a5a58b042a03f598..4d4b59916bfdb203702c4e878ff2659b79de8c52 100644
4141
--- a/src/node_builtins.cc
4242
+++ b/src/node_builtins.cc
4343
@@ -33,6 +33,7 @@ BuiltinLoader BuiltinLoader::instance_;

patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ index 001343b74ce236f89dca030c0fc9dd0299df0b39..6f277daf4ce846f093f634c473daec07
2626
try {
2727
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
2828
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
29-
index 4e7a9e7a7585fea2013ff70161672568477172b1..f96d19969aa59a9964d947a9fd6295cf25ad3b03 100644
29+
index fcbd9ee1af002bc176937e6bb5af55791b2f64b2..cbfb6e3620a7e77658c86a4730c50661b8a937f7 100644
3030
--- a/lib/internal/process/pre_execution.js
3131
+++ b/lib/internal/process/pre_execution.js
32-
@@ -151,11 +151,13 @@ function patchProcessObject(expandArgv1) {
32+
@@ -164,11 +164,13 @@ function patchProcessObject(expandArgv1) {
3333
if (expandArgv1 && process.argv[1] &&
3434
!StringPrototypeStartsWith(process.argv[1], '-')) {
3535
// Expand process.argv[1] into a full path.

patches/node/chore_expose_importmoduledynamically_and.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ its own blended handler between Node and Blink.
1111
Not upstreamable.
1212

1313
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
14-
index f96d19969aa59a9964d947a9fd6295cf25ad3b03..15116b78f82c977bba67ce98ce57232500dfaef8 100644
14+
index cbfb6e3620a7e77658c86a4730c50661b8a937f7..ccd48027e3dfebd563fcbe83239174c79c693dd7 100644
1515
--- a/lib/internal/process/pre_execution.js
1616
+++ b/lib/internal/process/pre_execution.js
17-
@@ -554,7 +554,7 @@ function initializeESMLoader() {
17+
@@ -567,7 +567,7 @@ function initializeESMLoader() {
1818
// Create this WeakMap in js-land because V8 has no C++ API for WeakMap.
1919
internalBinding('module_wrap').callbackMap = new SafeWeakMap();
2020

@@ -23,7 +23,7 @@ index f96d19969aa59a9964d947a9fd6295cf25ad3b03..15116b78f82c977bba67ce98ce572325
2323

2424
const {
2525
setImportModuleDynamicallyCallback,
26-
@@ -563,8 +563,8 @@ function initializeESMLoader() {
26+
@@ -576,8 +576,8 @@ function initializeESMLoader() {
2727
const esm = require('internal/process/esm_loader');
2828
// Setup per-isolate callbacks that locate data or callbacks that we keep
2929
// track of for different ESM modules.

patches/node/chore_update_fixtures_errors_force_colors_snapshot.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ trying to see whether or not the lines are greyed out. One possibility
1111
would be to upstream a changed test that doesn't hardcode line numbers.
1212

1313
diff --git a/test/fixtures/errors/force_colors.snapshot b/test/fixtures/errors/force_colors.snapshot
14-
index 0334a0b4faa3633aa8617b9538873e7f3540513b..8c047001ede7b66cab5146444fe2b48190b64359 100644
14+
index 4c33acbc2d5c12ac8750b72e0796284176af3da2..5ba11dadad6d905a1eb67ed1c89c59f3c3f686ec 100644
1515
--- a/test/fixtures/errors/force_colors.snapshot
1616
+++ b/test/fixtures/errors/force_colors.snapshot
1717
@@ -4,11 +4,12 @@ throw new Error('Should include grayed stack trace')
@@ -22,13 +22,13 @@ index 0334a0b4faa3633aa8617b9538873e7f3540513b..8c047001ede7b66cab5146444fe2b481
2222
- at Module._extensions..js (node:internal*modules*cjs*loader:1310:10)
2323
- at Module.load (node:internal*modules*cjs*loader:1119:32)
2424
- at Module._load (node:internal*modules*cjs*loader:960:12)
25-
-[90m at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:81:12)[39m
25+
-[90m at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:86:12)[39m
2626
+ at Module._compile (node:internal*modules*cjs*loader:1271:14)
27-
+[90m at Object..js (node:internal*modules*cjs*loader:1326:10)[39m
27+
+[90m at Module._extensions..js (node:internal*modules*cjs*loader:1326:10)[39m
2828
+ at Module.load (node:internal*modules*cjs*loader:1126:32)
29-
+[90m at node:internal*modules*cjs*loader:967:12[39m
30-
+[90m at Function._load (node:electron*js2c*asar_bundle:777:32)[39m
31-
+[90m at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:96:12)[39m
29+
+[90m at Module._load (node:internal*modules*cjs*loader:967:12)[39m
30+
+[90m at Module._load (node:electron*js2c*asar_bundle:777:32)[39m
31+
+[90m at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:101:12)[39m
3232
 at node:internal*main*run_main_module:23:47
3333

3434
Node.js *

patches/node/enable_crashpad_linux_node_processes.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ to child processes spawned with `ELECTRON_RUN_AS_NODE` which is used
88
by the crashpad client to connect with the handler process.
99

1010
diff --git a/lib/child_process.js b/lib/child_process.js
11-
index da553f6556a06d57d7490d74a3b4dd8f0132600c..168a6c72520d6540f0dbf84a62bc5e2b2f3ae022 100644
11+
index ec39a00ddb791e6e1ebe31aa45d290e7dcc4ebfc..1cd5d8969471b276211c45a9d8d76e9b10b1bb66 100644
1212
--- a/lib/child_process.js
1313
+++ b/lib/child_process.js
14-
@@ -60,6 +60,7 @@ let debug = require('internal/util/debuglog').debuglog(
14+
@@ -61,6 +61,7 @@ let debug = require('internal/util/debuglog').debuglog(
1515
);
1616
const { Buffer } = require('buffer');
1717
const { Pipe, constants: PipeConstants } = internalBinding('pipe_wrap');
1818
+const { getCrashdumpSignalFD, getCrashpadHandlerPID } = process._linkedBinding('electron_common_crashpad_support');
1919

2020
const {
2121
AbortError,
22-
@@ -163,7 +164,6 @@ function fork(modulePath, args = [], options) {
22+
@@ -162,7 +163,6 @@ function fork(modulePath, args = [], options) {
2323
ArrayPrototypeSplice(execArgv, index - 1, 2);
2424
}
2525
}

0 commit comments

Comments
 (0)