Skip to content

Commit

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

* chore: update patches

* src: improve buffer.transcode performance

nodejs/node#54153

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <[email protected]>
  • Loading branch information
2 people authored and yangannyx committed Oct 21, 2024
1 parent 5225360 commit db7dbd0
Show file tree
Hide file tree
Showing 29 changed files with 216 additions and 247 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':
'131.0.6754.0',
'node_version':
'v20.17.0',
'v20.18.0',
'nan_version':
'e14bdcd1f72d62bca1d541b66da43130384ec213',
'squirrel.mac_version':
Expand Down
2 changes: 0 additions & 2 deletions patches/node/.patches
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ src_do_not_use_deprecated_v8_api.patch
src_use_new_v8_api_to_define_stream_accessor.patch
src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch
test_update_v8-stats_test_for_v8_12_6.patch
chore_remove_calls_to_v8_functioncallbackinfo_holder.patch
src_do_not_use_soon-to-be-deprecated_v8_api.patch
fix_add_property_query_interceptors.patch
src_account_for_openssl_unexpected_version.patch
src_stop_using_deprecated_fields_of_fastapicallbackoptions.patch
src_use_supported_api_to_get_stalled_tla_messages.patch
build_don_t_redefine_win32_lean_and_mean.patch
Expand Down
153 changes: 83 additions & 70 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..d083aea4cb895d8425041879f1b22a6ee43a0b60 100644
index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..7f4885631a85a25692e8969991951be02e5d73f1 100644
--- a/deps/cares/BUILD.gn
+++ b/deps/cares/BUILD.gn
@@ -1,14 +1,172 @@
@@ -1,14 +1,175 @@
-##############################################################################
-# #
-# DO NOT EDIT THIS FILE! #
Expand Down Expand Up @@ -569,60 +569,18 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..d083aea4cb895d8425041879f1b22a6e
+ "include/ares_version.h",
+ "src/lib/ares__addrinfo2hostent.c",
+ "src/lib/ares__addrinfo_localhost.c",
+ "src/lib/ares__buf.c",
+ "src/lib/ares__buf.h",
+ "src/lib/ares__close_sockets.c",
+ "src/lib/ares__hosts_file.c",
+ "src/lib/ares__htable.c",
+ "src/lib/ares__htable.h",
+ "src/lib/ares__htable_asvp.c",
+ "src/lib/ares__htable_asvp.h",
+ "src/lib/ares__htable_strvp.c",
+ "src/lib/ares__htable_strvp.h",
+ "src/lib/ares__htable_szvp.c",
+ "src/lib/ares__htable_szvp.h",
+ "src/lib/ares__htable_vpvp.c",
+ "src/lib/ares__htable_vpvp.h",
+ "src/lib/ares__iface_ips.c",
+ "src/lib/ares__iface_ips.h",
+ "src/lib/ares__llist.c",
+ "src/lib/ares__llist.h",
+ "src/lib/ares__parse_into_addrinfo.c",
+ "src/lib/ares__slist.c",
+ "src/lib/ares__slist.h",
+ "src/lib/ares__socket.c",
+ "src/lib/ares__sortaddrinfo.c",
+ "src/lib/ares__threads.c",
+ "src/lib/ares__threads.h",
+ "src/lib/ares__timeval.c",
+ "src/lib/ares_android.c",
+ "src/lib/ares_android.h",
+ "src/lib/ares_cancel.c",
+ "src/lib/ares_create_query.c",
+ "src/lib/ares_cookie.c",
+ "src/lib/ares_data.c",
+ "src/lib/ares_data.h",
+ "src/lib/ares_destroy.c",
+ "src/lib/ares_dns_mapping.c",
+ "src/lib/ares_dns_multistring.c",
+ "src/lib/ares_dns_multistring.h",
+ "src/lib/ares_dns_name.c",
+ "src/lib/ares_dns_parse.c",
+ "src/lib/ares_dns_record.c",
+ "src/lib/ares_dns_private.h",
+ "src/lib/ares_dns_write.c",
+ "src/lib/ares_event_configchg.c",
+ "src/lib/ares_event.h",
+ "src/lib/ares_event_win32.h",
+ "src/lib/ares_event_epoll.c",
+ "src/lib/ares_event_kqueue.c",
+ "src/lib/ares_event_poll.c",
+ "src/lib/ares_event_select.c",
+ "src/lib/ares_event_thread.c",
+ "src/lib/ares_event_wake_pipe.c",
+ "src/lib/ares_event_win32.c",
+ "src/lib/ares_expand_name.c",
+ "src/lib/ares_expand_string.c",
+ "src/lib/ares_fds.c",
+ "src/lib/ares_free_hostent.c",
+ "src/lib/ares_free_string.c",
+ "src/lib/ares_freeaddrinfo.c",
Expand All @@ -632,49 +590,94 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..d083aea4cb895d8425041879f1b22a6e
+ "src/lib/ares_gethostbyaddr.c",
+ "src/lib/ares_gethostbyname.c",
+ "src/lib/ares_getnameinfo.c",
+ "src/lib/ares_getsock.c",
+ "src/lib/ares_inet_net_pton.h",
+ "src/lib/ares_init.c",
+ "src/lib/ares_library_init.c",
+ "src/lib/ares_ipv6.h",
+ "src/lib/ares_math.c",
+ "src/lib/ares_library_init.c",
+ "src/lib/ares_metrics.c",
+ "src/lib/ares_options.c",
+ "src/lib/ares_parse_a_reply.c",
+ "src/lib/ares_parse_aaaa_reply.c",
+ "src/lib/ares_parse_caa_reply.c",
+ "src/lib/ares_parse_mx_reply.c",
+ "src/lib/ares_parse_naptr_reply.c",
+ "src/lib/ares_parse_ns_reply.c",
+ "src/lib/ares_parse_ptr_reply.c",
+ "src/lib/ares_parse_soa_reply.c",
+ "src/lib/ares_parse_srv_reply.c",
+ "src/lib/ares_parse_txt_reply.c",
+ "src/lib/ares_parse_uri_reply.c",
+ "src/lib/ares_platform.c",
+ "src/lib/ares_platform.h",
+ "src/lib/ares_private.h",
+ "src/lib/ares_process.c",
+ "src/lib/ares_qcache.c",
+ "src/lib/ares_query.c",
+ "src/lib/ares_rand.c",
+ "src/lib/ares_search.c",
+ "src/lib/ares_send.c",
+ "src/lib/ares_setup.h",
+ "src/lib/ares_strcasecmp.c",
+ "src/lib/ares_strcasecmp.h",
+ "src/lib/ares_str.c",
+ "src/lib/ares_str.h",
+ "src/lib/ares_strerror.c",
+ "src/lib/ares_strsplit.c",
+ "src/lib/ares_strsplit.h",
+ "src/lib/ares_sysconfig.c",
+ "src/lib/ares_sysconfig_files.c",
+ "src/lib/ares_timeout.c",
+ "src/lib/ares_update_servers.c",
+ "src/lib/ares_version.c",
+ "src/lib/dsa/ares__array.c",
+ "src/lib/dsa/ares__array.h",
+ "src/lib/dsa/ares__htable.c",
+ "src/lib/dsa/ares__htable.h",
+ "src/lib/dsa/ares__htable_asvp.c",
+ "src/lib/dsa/ares__htable_asvp.h",
+ "src/lib/dsa/ares__htable_strvp.c",
+ "src/lib/dsa/ares__htable_strvp.h",
+ "src/lib/dsa/ares__htable_szvp.c",
+ "src/lib/dsa/ares__htable_szvp.h",
+ "src/lib/dsa/ares__htable_vpvp.c",
+ "src/lib/dsa/ares__htable_vpvp.h",
+ "src/lib/dsa/ares__llist.c",
+ "src/lib/dsa/ares__llist.h",
+ "src/lib/dsa/ares__slist.c",
+ "src/lib/dsa/ares__slist.h",
+ "src/lib/event/ares_event.h",
+ "src/lib/event/ares_event_configchg.c",
+ "src/lib/event/ares_event_epoll.c",
+ "src/lib/event/ares_event_kqueue.c",
+ "src/lib/event/ares_event_poll.c",
+ "src/lib/event/ares_event_select.c",
+ "src/lib/event/ares_event_thread.c",
+ "src/lib/event/ares_event_wake_pipe.c",
+ "src/lib/event/ares_event_win32.c",
+ "src/lib/event/ares_event_win32.h",
+ "src/lib/inet_net_pton.c",
+ "src/lib/inet_ntop.c",
+ "src/lib/legacy/ares_create_query.c",
+ "src/lib/legacy/ares_expand_name.c",
+ "src/lib/legacy/ares_expand_string.c",
+ "src/lib/legacy/ares_fds.c",
+ "src/lib/legacy/ares_getsock.c",
+ "src/lib/legacy/ares_parse_a_reply.c",
+ "src/lib/legacy/ares_parse_aaaa_reply.c",
+ "src/lib/legacy/ares_parse_caa_reply.c",
+ "src/lib/legacy/ares_parse_mx_reply.c",
+ "src/lib/legacy/ares_parse_naptr_reply.c",
+ "src/lib/legacy/ares_parse_ns_reply.c",
+ "src/lib/legacy/ares_parse_ptr_reply.c",
+ "src/lib/legacy/ares_parse_soa_reply.c",
+ "src/lib/legacy/ares_parse_srv_reply.c",
+ "src/lib/legacy/ares_parse_txt_reply.c",
+ "src/lib/legacy/ares_parse_uri_reply.c",
+ "src/lib/record/ares_dns_mapping.c",
+ "src/lib/record/ares_dns_multistring.c",
+ "src/lib/record/ares_dns_multistring.h",
+ "src/lib/record/ares_dns_name.c",
+ "src/lib/record/ares_dns_parse.c",
+ "src/lib/record/ares_dns_private.h",
+ "src/lib/record/ares_dns_record.c",
+ "src/lib/record/ares_dns_write.c",
+ "src/lib/str/ares__buf.c",
+ "src/lib/str/ares__buf.h",
+ "src/lib/str/ares_str.c",
+ "src/lib/str/ares_str.h",
+ "src/lib/str/ares_strcasecmp.c",
+ "src/lib/str/ares_strcasecmp.h",
+ "src/lib/str/ares_strsplit.c",
+ "src/lib/str/ares_strsplit.h",
+ "src/lib/util/ares__iface_ips.c",
+ "src/lib/util/ares__iface_ips.h",
+ "src/lib/util/ares__threads.c",
+ "src/lib/util/ares__threads.h",
+ "src/lib/util/ares__timeval.c",
+ "src/lib/util/ares_math.c",
+ "src/lib/util/ares_rand.c",
+ "src/tools/ares_getopt.c",
+ "src/tools/ares_getopt.h",
+ ]
Expand Down Expand Up @@ -1265,10 +1268,10 @@ index 0000000000000000000000000000000000000000..af9cbada10203b387fb9732b346583b1
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..646df853a2b985f14fd66cae6af854977c074706
index 0000000000000000000000000000000000000000..889a487e24721a8ecfef91f5a655892a607bb12f
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,737 @@
@@ -0,0 +1,741 @@
+// This file is automatically generated by generate_gn_filenames_json.py
+// DO NOT EDIT
+{
Expand Down Expand Up @@ -1477,6 +1480,7 @@ index 0000000000000000000000000000000000000000..646df853a2b985f14fd66cae6af85497
+ "lib/internal/assert.js",
+ "lib/internal/assert/assertion_error.js",
+ "lib/internal/assert/calltracker.js",
+ "lib/internal/assert/utils.js",
+ "lib/internal/async_hooks.js",
+ "lib/internal/blob.js",
+ "lib/internal/blocklist.js",
Expand Down Expand Up @@ -1548,6 +1552,7 @@ index 0000000000000000000000000000000000000000..646df853a2b985f14fd66cae6af85497
+ "lib/internal/http2/util.js",
+ "lib/internal/idna.js",
+ "lib/internal/inspector_async_hook.js",
+ "lib/internal/inspector_network_tracking.js",
+ "lib/internal/js_stream_socket.js",
+ "lib/internal/legacy/processbinding.js",
+ "lib/internal/linkedlist.js",
Expand Down Expand Up @@ -1655,13 +1660,15 @@ index 0000000000000000000000000000000000000000..646df853a2b985f14fd66cae6af85497
+ "lib/internal/test/transfer.js",
+ "lib/internal/test_runner/coverage.js",
+ "lib/internal/test_runner/harness.js",
+ "lib/internal/test_runner/mock/loader.js",
+ "lib/internal/test_runner/mock/mock.js",
+ "lib/internal/test_runner/mock/mock_timers.js",
+ "lib/internal/test_runner/reporter/dot.js",
+ "lib/internal/test_runner/reporter/junit.js",
+ "lib/internal/test_runner/reporter/lcov.js",
+ "lib/internal/test_runner/reporter/spec.js",
+ "lib/internal/test_runner/reporter/tap.js",
+ "lib/internal/test_runner/reporter/utils.js",
+ "lib/internal/test_runner/reporter/v8-serializer.js",
+ "lib/internal/test_runner/runner.js",
+ "lib/internal/test_runner/test.js",
Expand Down Expand Up @@ -2007,10 +2014,10 @@ index 0000000000000000000000000000000000000000..646df853a2b985f14fd66cae6af85497
+ ]
+}
diff --git a/src/inspector/BUILD.gn b/src/inspector/BUILD.gn
index 909fd14345fcd988c381e640280f4b33f2e0c351..800431e6659f95f0495cb90b8fa2cccbc9f34661 100644
index 909fd14345fcd988c381e640280f4b33f2e0c351..3b430a666a7d5cb52ec41f8d828284625f916701 100644
--- a/src/inspector/BUILD.gn
+++ b/src/inspector/BUILD.gn
@@ -1,14 +1,202 @@
@@ -1,14 +1,208 @@
-##############################################################################
-# #
-# DO NOT EDIT THIS FILE! #
Expand All @@ -2034,6 +2041,8 @@ index 909fd14345fcd988c381e640280f4b33f2e0c351..800431e6659f95f0495cb90b8fa2cccb
+ "protocol/NodeTracing.h",
+ "protocol/NodeRuntime.cpp",
+ "protocol/NodeRuntime.h",
+ "protocol/Network.cpp",
+ "protocol/Network.h",
+]

-inspector_gn_build("inspector") {
Expand Down Expand Up @@ -2066,6 +2075,10 @@ index 909fd14345fcd988c381e640280f4b33f2e0c351..800431e6659f95f0495cb90b8fa2cccb
+ "tracing_agent.h",
+ "worker_agent.cc",
+ "worker_agent.h",
+ "network_inspector.cc",
+ "network_inspector.h",
+ "network_agent.cc",
+ "network_agent.h",
+ "worker_inspector.cc",
+ "worker_inspector.h",
+ ]
Expand Down
8 changes: 4 additions & 4 deletions patches/node/build_compile_with_c_20_support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8
This can be removed when Electron upgrades to a version of Node.js containing the required V8 version.

diff --git a/common.gypi b/common.gypi
index 8736ad12eec294070a5160a64248044cd16347c9..216200c279c599f6dee228120ff5f3943fa52ffd 100644
index bdf1a1f33f3ea09d933757c7fee87c563cc833ab..2eb62610db2f0ebf68fa9a55ffba98291ecfe451 100644
--- a/common.gypi
+++ b/common.gypi
@@ -307,7 +307,7 @@
@@ -305,7 +305,7 @@
'VCCLCompilerTool': {
'AdditionalOptions': [
'/Zc:__cplusplus',
Expand All @@ -22,7 +22,7 @@ index 8736ad12eec294070a5160a64248044cd16347c9..216200c279c599f6dee228120ff5f394
],
'BufferSecurityCheck': 'true',
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
@@ -489,7 +489,7 @@
@@ -487,7 +487,7 @@
}],
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
Expand All @@ -31,7 +31,7 @@ index 8736ad12eec294070a5160a64248044cd16347c9..216200c279c599f6dee228120ff5f394
'defines': [ '__STDC_FORMAT_MACROS' ],
'ldflags': [ '-rdynamic' ],
'target_conditions': [
@@ -660,7 +660,7 @@
@@ -658,7 +658,7 @@
['clang==1', {
'xcode_settings': {
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
Expand Down
6 changes: 3 additions & 3 deletions patches/node/build_enable_perfetto.patch
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ index 8d7204f6cb48f783adc4d1c1eb2de0c83b7fffe2..a154559a56bf383d3c26af523c9bb07b

// Non-alphabetic chars.
diff --git a/lib/internal/http.js b/lib/internal/http.js
index c26c322aafc64ed9ca2a7c1fd703555a251db9de..f94bc5824d6c83fd1feca31c572dcfd3ac130bda 100644
index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327199acfd5 100644
--- a/lib/internal/http.js
+++ b/lib/internal/http.js
@@ -10,8 +10,8 @@ const {
@@ -8,8 +8,8 @@ const {
const { setUnrefTimeout } = require('internal/timers');
const { getCategoryEnabledBuffer, trace } = internalBinding('trace_events');
const {
Expand All @@ -47,7 +47,7 @@ index c26c322aafc64ed9ca2a7c1fd703555a251db9de..f94bc5824d6c83fd1feca31c572dcfd3
} = require('internal/constants');

let utcCache;
@@ -46,11 +46,13 @@ function isTraceHTTPEnabled() {
@@ -44,11 +44,13 @@ function isTraceHTTPEnabled() {
const traceEventCategory = 'node,node.http';

function traceBegin(...args) {
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 689e7fb2339253d0f2be3ccf33ecd76660ccf176..8736ad12eec294070a5160a64248044cd16347c9 100644
index 697b8bba6a55358924d6986f2eb347a99ff73889..bdf1a1f33f3ea09d933757c7fee87c563cc833ab 100644
--- a/common.gypi
+++ b/common.gypi
@@ -87,6 +87,8 @@
@@ -86,6 +86,8 @@
'v8_use_perfetto': 0,
'tsan%': 0,

Expand All @@ -19,15 +19,15 @@ index 689e7fb2339253d0f2be3ccf33ecd76660ccf176..8736ad12eec294070a5160a64248044c
##### end V8 defaults #####

# When building native modules using 'npm install' with the system npm,
@@ -287,6 +289,7 @@
@@ -285,6 +287,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
@@ -416,6 +419,11 @@
@@ -414,6 +417,11 @@
}],
],
}],
Expand All @@ -40,10 +40,10 @@ index 689e7fb2339253d0f2be3ccf33ecd76660ccf176..8736ad12eec294070a5160a64248044c
# list in v8/BUILD.gn.
['v8_enable_v8_checks == 1', {
diff --git a/configure.py b/configure.py
index 3084cc964cbe6d02f98d08cd6f847ea7f4a3d0db..5b6a3b62082985debf6ebc4bc09a7d056f58514a 100755
index a6f66c41f75bffcfaf75d4415c694300b7624136..7ca0762fe3590fef7b88ba684de44d99aaecace4 100755
--- a/configure.py
+++ b/configure.py
@@ -1559,6 +1559,7 @@ def configure_library(lib, output, pkgname=None):
@@ -1585,6 +1585,7 @@ def configure_library(lib, output, pkgname=None):


def configure_v8(o):
Expand Down
Loading

0 comments on commit db7dbd0

Please sign in to comment.