Skip to content

Commit 4d8bddf

Browse files
electron-roller[bot]jkleinsccodebytere
committed
chore: bump node to v24.11.1 (main) (#48917)
* chore: bump node in DEPS to v24.11.1 * src: add a default branch for module phase nodejs/node#60261 * src: conditionally disable source phase imports by default nodejs/node#60364 * chore: update patches * src: update locks to use DictionaryTemplate and other minor cleanups nodejs/node#60061 * deps: update simdjson to 4.0.7 nodejs/node#59883 * test: move sea tests into test/sea nodejs/node#60250 * fixup deps: update simdjson to 4.0.7a * src: conditionally disable source phase imports by default nodejs/node#60364 * module: handle null source from async loader hooks in sync hooks nodejs/node#59929 * Revert "src: conditionally disable source phase imports by default" This reverts commit 5f85b84. * src: allow disabling JS source phase imports nodejs/node#60364 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
1 parent 051f17e commit 4d8bddf

27 files changed

+190
-1066
lines changed

patches/node/.patches

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ fix_allow_disabling_fetch_in_renderer_and_worker_processes.patch
3737
feat_disable_js_source_phase_imports_by_default.patch
3838
fix_avoid_external_memory_leak_on_invalid_tls_protocol_versions.patch
3939
lib_check_sharedarraybuffer_existence_in_fast-utf8-stream.patch
40-
chore_handle_support_for_import_defer_as_ns_and_import_defer.patch
4140
api_delete_deprecated_fields_on_v8_isolate.patch
4241
api_promote_deprecation_of_v8_context_and_v8_object_api_methods.patch
4342
src_use_cp_utf8_for_wide_file_names_on_win32.patch

patches/node/api_delete_deprecated_fields_on_v8_isolate.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Subject: Delete deprecated fields on v8::Isolate
66
https://chromium-review.googlesource.com/c/v8/v8/+/7081397
77

88
diff --git a/src/api/environment.cc b/src/api/environment.cc
9-
index 14be033113bfb13c64e5f99446afaf0cb2aa16a9..3eccf4ce7fcd13091186086456e60334f95f643e 100644
9+
index ea3e9374c30be92ba5668e33773ffbb2aef55b30..44ba3c42c7a980eee19e1aadcbe7999eefeda989 100644
1010
--- a/src/api/environment.cc
1111
+++ b/src/api/environment.cc
12-
@@ -225,8 +225,6 @@ void SetIsolateCreateParamsForNode(Isolate::CreateParams* params) {
12+
@@ -231,8 +231,6 @@ void SetIsolateCreateParamsForNode(Isolate::CreateParams* params) {
1313
// heap based on the actual physical memory.
1414
params->constraints.ConfigureDefaults(total_memory, 0);
1515
}

patches/node/api_remove_deprecated_getisolate.patch

Lines changed: 50 additions & 41 deletions
Large diffs are not rendered by default.

patches/node/build_add_gn_build_files.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ really in 20/21. We have to wait until 22 is released to be able to
1111
build with upstream GN files.
1212

1313
diff --git a/configure.py b/configure.py
14-
index 7f73f084ef1a8336089e6a16423c2eb310c0b9f2..96eedd5d9ae05ee6704724290973251059d5dd78 100755
14+
index 750ddc8ace6cad894e738f6e1d983b5906acc10f..e063f9131d4d547d231811dafea03c8c52b611e6 100755
1515
--- a/configure.py
1616
+++ b/configure.py
17-
@@ -1730,7 +1730,7 @@ def configure_v8(o, configs):
17+
@@ -1736,7 +1736,7 @@ def configure_v8(o, configs):
1818
# Until we manage to get rid of all those, v8_enable_sandbox cannot be used.
1919
# Note that enabling pointer compression without enabling sandbox is unsupported by V8,
2020
# so this can be broken at any time.
2121
- o['variables']['v8_enable_sandbox'] = 0
2222
+ o['variables']['v8_enable_sandbox'] = 1 if options.enable_pointer_compression else 0
23-
o['variables']['v8_enable_pointer_compression_shared_cage'] = 1 if options.enable_pointer_compression else 0
24-
o['variables']['v8_enable_external_code_space'] = 1 if options.enable_pointer_compression else 0
25-
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
23+
# We set v8_enable_pointer_compression_shared_cage to 0 always, even when
24+
# pointer compression is enabled so that we don't accidentally enable shared
25+
# cage mode when pointer compression is on.
2626
diff --git a/node.gni b/node.gni
2727
index d4438f7fd61598afac2c1e3184721a759d22b10c..e2407027ab05e59b2f0f1c213b98ea469db7a91b 100644
2828
--- a/node.gni

patches/node/build_enable_perfetto.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ index 9bf929f7f3360f13058d3f446c18a36cd15bea58..abf9a06d891488288bccd98c437746c1
6464

6565
function ipToInt(ip) {
6666
diff --git a/node.gyp b/node.gyp
67-
index 420d57135f48df59b2cbd33497ef90b6148017e6..eefb1e0577b881da7a1570fd7ac465fe8b06747c 100644
67+
index a598de39f13e7069e75484463fb096b771fa45fb..975f3897dd1ce1074626925b9fbf22f15632a0b1 100644
6868
--- a/node.gyp
6969
+++ b/node.gyp
7070
@@ -176,7 +176,6 @@

patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch

Lines changed: 4 additions & 4 deletions
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 29a912f58e7b522ae21fddac510946cbcbaaa4cc..aea3a882c338eb757bef9e85fabab3fc7e7495f7 100644
10+
index 088e7ebbfe07d273691c86c7ab2dce00fcb475c8..a3f7415dba63828bec94ac8503420f14e3fea14c 100644
1111
--- a/common.gypi
1212
+++ b/common.gypi
1313
@@ -89,6 +89,8 @@
@@ -42,10 +42,10 @@ index 29a912f58e7b522ae21fddac510946cbcbaaa4cc..aea3a882c338eb757bef9e85fabab3fc
4242
# list in v8/BUILD.gn.
4343
['v8_enable_v8_checks == 1', {
4444
diff --git a/configure.py b/configure.py
45-
index 96eedd5d9ae05ee6704724290973251059d5dd78..52060f9c6dc1bcec67a0fd4710e01e73a6cf276c 100755
45+
index e063f9131d4d547d231811dafea03c8c52b611e6..a5c764d9e7fb0ffa219202015ec67ed6d3e14c04 100755
4646
--- a/configure.py
4747
+++ b/configure.py
48-
@@ -1711,6 +1711,7 @@ def configure_library(lib, output, pkgname=None):
48+
@@ -1717,6 +1717,7 @@ def configure_library(lib, output, pkgname=None):
4949
def configure_v8(o, configs):
5050
set_configuration_variable(configs, 'v8_enable_v8_checks', release=1, debug=0)
5151

@@ -54,7 +54,7 @@ index 96eedd5d9ae05ee6704724290973251059d5dd78..52060f9c6dc1bcec67a0fd4710e01e73
5454
o['variables']['v8_enable_javascript_promise_hooks'] = 1
5555
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
5656
diff --git a/src/node.h b/src/node.h
57-
index c5ade4bd30456cde33379c6202b65709650d3ec0..f7b3f90b0c2cfbeacc5bc50112dd711df8d3c364 100644
57+
index 27f5bb1571920c963e05644a5fc5858aa4b88288..9c624e4ef26c1b06a6c4bca7def245935189ce07 100644
5858
--- a/src/node.h
5959
+++ b/src/node.h
6060
@@ -22,6 +22,12 @@

patches/node/build_restore_clang_as_default_compiler_on_macos.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ node-gyp will use the result of `process.config` that reflects the environment
1111
in which the binary got built.
1212

1313
diff --git a/common.gypi b/common.gypi
14-
index aea3a882c338eb757bef9e85fabab3fc7e7495f7..9303217fb05190c734e410a524a6921723d665d5 100644
14+
index a3f7415dba63828bec94ac8503420f14e3fea14c..c08f65b0448806c613b27eb91f9dd512adab938c 100644
1515
--- a/common.gypi
1616
+++ b/common.gypi
1717
@@ -128,6 +128,7 @@

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
@@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form
88
of this.
99

1010
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
11-
index c7f86098bdb00b6be84d547a0ac41919fa1bbb0f..35b43990c8f24f0888f89173f5662050a11b26ed 100644
11+
index 6585c52e4bd997b20d5a297c536844dea1b8fdc8..fd0a81f5216d8bcf662c7e8bb972ed789eda8645 100644
1212
--- a/lib/internal/process/pre_execution.js
1313
+++ b/lib/internal/process/pre_execution.js
14-
@@ -243,12 +243,14 @@ function patchProcessObject(expandArgv1) {
14+
@@ -276,12 +276,14 @@ function patchProcessObject(expandArgv1) {
1515
// the entry point.
1616
if (expandArgv1 && process.argv[1] && process.argv[1][0] !== '-') {
1717
// Expand process.argv[1] into a full path.

patches/node/chore_disable_deprecation_ftbfs_in_simdjson_header.patch

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ Without this patch, building with simdjson fails with
88
> error: identifier '_padded' preceded by whitespace in a literal operator
99
> declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
1010

11+
and
12+
> error: declaration requires an exit-time destructor [-Werror,-Wexit-time-destructors]
13+
1114
This patch can be removed once this is fixed upstream in simdjson.
1215

1316
diff --git a/deps/simdjson/simdjson.h b/deps/simdjson/simdjson.h
14-
index 8f52a4331d59996786450eec982659da9244cac1..74729673d87b068dff5f24166bbb77d844f15f42 100644
17+
index a8bd86b28acc16cb04c193a1afbeb8171b314107..e200835e3ae6042f5af62f7ea3e082c677a9d0cf 100644
1518
--- a/deps/simdjson/simdjson.h
1619
+++ b/deps/simdjson/simdjson.h
17-
@@ -3899,12 +3899,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string
20+
@@ -4160,12 +4160,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result<padded_string
1821

1922
} // namespace simdjson
2023

@@ -32,7 +35,7 @@ index 8f52a4331d59996786450eec982659da9244cac1..74729673d87b068dff5f24166bbb77d8
3235
namespace simdjson {
3336
namespace internal {
3437

35-
@@ -4304,6 +4309,9 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen
38+
@@ -4617,6 +4622,9 @@ inline simdjson_result<padded_string> padded_string::load(std::string_view filen
3639

3740
} // namespace simdjson
3841

@@ -42,7 +45,7 @@ index 8f52a4331d59996786450eec982659da9244cac1..74729673d87b068dff5f24166bbb77d8
4245
inline simdjson::padded_string operator ""_padded(const char *str, size_t len) {
4346
return simdjson::padded_string(str, len);
4447
}
45-
@@ -4312,6 +4320,8 @@ inline simdjson::padded_string operator ""_padded(const char8_t *str, size_t len
48+
@@ -4625,6 +4633,8 @@ inline simdjson::padded_string operator ""_padded(const char8_t *str, size_t len
4649
return simdjson::padded_string(reinterpret_cast<const char8_t *>(str), len);
4750
}
4851
#endif
@@ -51,3 +54,37 @@ index 8f52a4331d59996786450eec982659da9244cac1..74729673d87b068dff5f24166bbb77d8
5154
#endif // SIMDJSON_PADDED_STRING_INL_H
5255
/* end file simdjson/padded_string-inl.h */
5356
/* skipped duplicate #include "simdjson/padded_string_view.h" */
57+
@@ -43655,12 +43665,16 @@ simdjson_inline simdjson_warn_unused std::unique_ptr<ondemand::parser>& parser::
58+
return parser_instance;
59+
}
60+
61+
+#pragma clang diagnostic push
62+
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
63+
+
64+
simdjson_inline simdjson_warn_unused std::unique_ptr<ondemand::parser>& parser::get_threadlocal_parser_if_exists() {
65+
// @the-moisrex points out that this could be implemented with std::optional (C++17).
66+
thread_local std::unique_ptr<ondemand::parser> parser_instance = nullptr;
67+
return parser_instance;
68+
}
69+
70+
+#pragma clang diagnostic pop
71+
72+
} // namespace ondemand
73+
} // namespace arm64
74+
@@ -56961,12 +56975,16 @@ simdjson_inline simdjson_warn_unused std::unique_ptr<ondemand::parser>& parser::
75+
return parser_instance;
76+
}
77+
78+
+#pragma clang diagnostic push
79+
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
80+
+
81+
simdjson_inline simdjson_warn_unused std::unique_ptr<ondemand::parser>& parser::get_threadlocal_parser_if_exists() {
82+
// @the-moisrex points out that this could be implemented with std::optional (C++17).
83+
thread_local std::unique_ptr<ondemand::parser> parser_instance = nullptr;
84+
return parser_instance;
85+
}
86+
87+
+#pragma clang diagnostic pop
88+
89+
} // namespace ondemand
90+
} // namespace fallback

patches/node/chore_expose_importmoduledynamically_and.patch

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

1313
diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js
14-
index 4a4279459341e87784ee8efa832dc74371c4a708..88d84786e72cf8712e0b9bda16c418d4087fe549 100644
14+
index a9076a7ae941284d4585829292e2ece25c2b90e4..7335fe20f34fdd822276575686379dd954f1c8e1 100644
1515
--- a/lib/internal/modules/esm/utils.js
1616
+++ b/lib/internal/modules/esm/utils.js
1717
@@ -34,7 +34,7 @@ const {
@@ -21,14 +21,14 @@ index 4a4279459341e87784ee8efa832dc74371c4a708..88d84786e72cf8712e0b9bda16c418d4
2121
-const { getOptionValue } = require('internal/options');
2222
+const { getOptionValue, getEmbedderOptions } = require('internal/options');
2323
const {
24-
loadPreloadModules,
25-
initializeFrozenIntrinsics,
26-
@@ -291,12 +291,13 @@ let _forceDefaultLoader = false;
27-
* @param {boolean} [forceDefaultLoader] - A boolean indicating disabling custom loaders.
24+
emitExperimentalWarning,
25+
kEmptyObject,
26+
@@ -285,12 +285,13 @@ let _shouldSpawnLoaderHookWorker = true;
27+
* should be spawned later.
2828
*/
29-
function initializeESM(forceDefaultLoader = false) {
29+
function initializeESM(shouldSpawnLoaderHookWorker = true) {
3030
+ const shouldSetOnIsolate = !getEmbedderOptions().shouldNotRegisterESMLoader;
31-
_forceDefaultLoader = forceDefaultLoader;
31+
_shouldSpawnLoaderHookWorker = shouldSpawnLoaderHookWorker;
3232
initializeDefaultConditions();
3333
// Setup per-realm callbacks that locate data or callbacks that we keep
3434
// track of for different ESM modules.
@@ -40,10 +40,10 @@ index 4a4279459341e87784ee8efa832dc74371c4a708..88d84786e72cf8712e0b9bda16c418d4
4040

4141
/**
4242
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
43-
index 5783728da2894270f902f47b210008df0e911bde..8fed194cbae9ce75bd0805b4df30b4de64fbbefa 100644
43+
index 26e6bcfa30be8b22b20e66ffe2f8d0b7d60fc6cc..fa2f28989be19e8ea8f53b990ae96be92ef3c3a3 100644
4444
--- a/src/module_wrap.cc
4545
+++ b/src/module_wrap.cc
46-
@@ -1097,7 +1097,7 @@ Maybe<ModuleWrap*> ModuleWrap::ResolveModule(
46+
@@ -1098,7 +1098,7 @@ Maybe<ModuleWrap*> ModuleWrap::ResolveModule(
4747
return Just(module_wrap);
4848
}
4949

@@ -52,7 +52,7 @@ index 5783728da2894270f902f47b210008df0e911bde..8fed194cbae9ce75bd0805b4df30b4de
5252
Local<Context> context,
5353
Local<Data> host_defined_options,
5454
Local<Value> resource_name,
55-
@@ -1185,14 +1185,16 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
55+
@@ -1186,14 +1186,16 @@ void ModuleWrap::SetImportModuleDynamicallyCallback(
5656
Realm* realm = Realm::GetCurrent(args);
5757
HandleScope handle_scope(isolate);
5858

@@ -72,7 +72,7 @@ index 5783728da2894270f902f47b210008df0e911bde..8fed194cbae9ce75bd0805b4df30b4de
7272
}
7373

7474
void ModuleWrap::HostInitializeImportMetaObjectCallback(
75-
@@ -1234,13 +1236,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
75+
@@ -1235,13 +1237,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback(
7676
Realm* realm = Realm::GetCurrent(args);
7777
Isolate* isolate = realm->isolate();
7878

0 commit comments

Comments
 (0)