chore: bump node to v22.14.0 (35-x-y) (#45641)

* chore: bump node in DEPS to v22.14.0

* src: move more crypto impl detail to ncrypto dep

https://github.com/nodejs/node/pull/56421

* test: move crypto related common utilities in common/crypto

https://github.com/nodejs/node/pull/56714

* module: add findPackageJSON util

https://github.com/nodejs/node/pull/55412

* module: mark evaluation rejection in require(esm) as handled

https://github.com/nodejs/node/pull/56122

* chore: fixup patch indices

* deps: move inspector_protocol to deps

https://github.com/nodejs/node/pull/56649

* fixup! src: move more crypto impl detail to ncrypto dep

* fixup! deps: move inspector_protocol to deps

* fixup! src: move more crypto impl detail to ncrypto dep

* crypto: fix checkPrime crash with large buffers

https://github.com/nodejs/node/pull/56559

* tls: fix error stack conversion in cryptoErrorListToException()

https://github.com/nodejs/node/pull/56554

* module: add findPackageJSON util

https://github.com/nodejs/node/pull/55412

Our revert of native legacyMainResolve makes this very difficult to make
work, so disable for now.

* lib: add typescript support to STDIN eval

https://github.com/nodejs/node/pull/56359

* chore: fix patch

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
electron-roller[bot] 2025-02-20 08:56:51 +01:00 committed by GitHub
parent f29559e46c
commit d291fa6ced
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 509 additions and 306 deletions

View file

@ -10,17 +10,6 @@ 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.
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, "*")
public_configs = [ ":simdjson_config" ]
sources = gypi_values.simdjson_sources
+ cflags_c = [ "-Wdeprecated-literal-operator" ]
}
}
diff --git a/node.gni b/node.gni
index a2123cc6c6d21c53fafc8934203b3720393e7b11..245a43920c7baf000ba63192a84a4c3fd219be7d 100644
--- a/node.gni
@ -65,11 +54,71 @@ index a2123cc6c6d21c53fafc8934203b3720393e7b11..245a43920c7baf000ba63192a84a4c3f
}
assert(!node_enable_inspector || node_use_openssl,
diff --git a/src/inspector/unofficial.gni b/src/inspector/unofficial.gni
index 5d87f3c901ab509e534598ed1eb0796a96355b5e..3d7aa148678b2646b88fa7c32abec91791b02b82 100644
--- a/src/inspector/unofficial.gni
+++ b/src/inspector/unofficial.gni
@@ -13,7 +13,7 @@ template("inspector_gn_build") {
}
node_gen_dir = get_label_info("../..", "target_gen_dir")
- protocol_tool_path = "../../tools/inspector_protocol"
+ protocol_tool_path = "../../deps/inspector_protocol"
gypi_values = exec_script(
"../../tools/gypi_to_gn.py",
@@ -35,6 +35,8 @@ template("inspector_gn_build") {
]
args = [
+ "--inspector_protocol_dir",
+ rebase_path(protocol_tool_path, root_build_dir),
"--jinja_dir",
# jinja is in third_party.
rebase_path("//third_party/", root_build_dir),
@@ -72,4 +74,37 @@ template("inspector_gn_build") {
outputs = [ "$node_gen_dir/src/{{source_name_part}}.json" ]
args = [ "{{source}}" ] + rebase_path(outputs, root_build_dir)
}
+
+ config("crdtp_config") {
+ include_dirs = [ protocol_tool_path ]
+ }
+
+ static_library("crdtp") {
+ public_configs = [ ":crdtp_config" ]
+ sources = [
+ "$protocol_tool_path/crdtp/cbor.cc",
+ "$protocol_tool_path/crdtp/cbor.h",
+ "$protocol_tool_path/crdtp/dispatch.cc",
+ "$protocol_tool_path/crdtp/dispatch.h",
+ "$protocol_tool_path/crdtp/error_support.cc",
+ "$protocol_tool_path/crdtp/error_support.h",
+ "$protocol_tool_path/crdtp/export.h",
+ "$protocol_tool_path/crdtp/find_by_first.h",
+ "$protocol_tool_path/crdtp/frontend_channel.h",
+ "$protocol_tool_path/crdtp/glue.h",
+ "$protocol_tool_path/crdtp/json.cc",
+ "$protocol_tool_path/crdtp/json.h",
+ "$protocol_tool_path/crdtp/parser_handler.h",
+ "$protocol_tool_path/crdtp/protocol_core.cc",
+ "$protocol_tool_path/crdtp/protocol_core.h",
+ "$protocol_tool_path/crdtp/serializable.cc",
+ "$protocol_tool_path/crdtp/serializable.h",
+ "$protocol_tool_path/crdtp/span.cc",
+ "$protocol_tool_path/crdtp/span.h",
+ "$protocol_tool_path/crdtp/status.cc",
+ "$protocol_tool_path/crdtp/status.h",
+ "$protocol_tool_path/crdtp/json_platform.cc",
+ "$protocol_tool_path/crdtp/json_platform.h",
+ ]
+ }
}
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 9aaf5626fcfe4a9b168e069df0265df7b535b76e..ece9c4656919d8dc408112142367791628dd5f8b 100644
index 894fd515202cc3a1f933c2bbc618dd09869ad904..4f1ed661e9c432f3b50f2e7e348ad9794ff773d0 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -779,6 +779,7 @@ void BuiltinLoader::RegisterExternalReferences(
@@ -781,6 +781,7 @@ void BuiltinLoader::RegisterExternalReferences(
registry->Register(GetNatives);
RegisterExternalReferencesForInternalizedBuiltinCode(registry);
@ -261,7 +310,7 @@ index 65d0e1be42f0a85418491ebb548278cf431aa6a0..d4a31342f1c6107b029394c6e1d00a1d
except Exception as e:
print(str(e))
diff --git a/unofficial.gni b/unofficial.gni
index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f7c87f00e 100644
index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..a2f3a769ceaa08db6d7438223884dc5aeab1340d 100644
--- a/unofficial.gni
+++ b/unofficial.gni
@@ -145,6 +145,7 @@ template("node_gn_build") {
@ -292,7 +341,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f
"$target_gen_dir/node_javascript.cc",
] + gypi_values.node_sources
@@ -185,7 +189,7 @@ template("node_gn_build") {
@@ -185,11 +189,12 @@ template("node_gn_build") {
}
if (node_use_openssl) {
deps += [ "deps/ncrypto" ]
@ -301,7 +350,12 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f
sources += gypi_values.node_crypto_sources
}
if (node_enable_inspector) {
@@ -282,6 +286,7 @@ template("node_gn_build") {
deps += [
+ "src/inspector:crdtp",
"src/inspector:node_protocol_generated_sources",
"src/inspector:v8_inspector_compress_protocol_json",
]
@@ -282,6 +287,7 @@ template("node_gn_build") {
}
executable("node_js2c") {
@ -309,7 +363,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f
deps = [
"deps/uv",
"$node_simdutf_path",
@@ -292,26 +297,75 @@ template("node_gn_build") {
@@ -292,26 +298,75 @@ template("node_gn_build") {
"src/embedded_data.cc",
"src/embedded_data.h",
]
@ -395,7 +449,7 @@ index 9e496d99d7141bf42ef7374a3c676c7b333eeeab..3632d5bd21e277fcbd8d62dc65598a7f
outputs = [ "$target_gen_dir/node_javascript.cc" ]
# Get the path to node_js2c executable of the host toolchain.
@@ -325,11 +379,11 @@ template("node_gn_build") {
@@ -325,11 +380,11 @@ template("node_gn_build") {
get_label_info(":node_js2c($host_toolchain)", "name") +
host_executable_suffix