From 8041d4460394a216fb042f772e2e8b88c283249d Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 24 Aug 2023 11:05:05 +0900 Subject: [PATCH] Update to Node 20.5.1 --- common.gypi | 9 +++++---- node | 2 +- src/bootstrap.js | 11 +++-------- src/node_integration.cc | 7 ------- src/node_integration_win.cc | 2 +- src/yode.cc | 2 +- yode.gyp | 3 ++- 7 files changed, 13 insertions(+), 23 deletions(-) diff --git a/common.gypi b/common.gypi index 5b88d26..d249779 100644 --- a/common.gypi +++ b/common.gypi @@ -73,15 +73,15 @@ 'v8_random_seed': 0, 'v8_trace_maps': 0, 'v8_use_siphash': 1, - 'icu_data_file': 'icudt72l.dat', - 'icu_data_in': '../../deps/icu-tmp/icudt72l.dat', + 'icu_data_file': 'icudt73l.dat', + 'icu_data_in': '../../deps/icu-tmp/icudt73l.dat', 'icu_default_data': '', 'icu_endianness': 'l', 'icu_gyp_path': 'node/tools/icu/icu-generic.gyp', 'icu_locales': 'en,root', 'icu_path': '../../deps/icu-small', 'icu_small': 'true', - 'icu_ver_major': '72', + 'icu_ver_major': '73', }, 'target_defaults': { 'includes': [ @@ -119,7 +119,7 @@ 'node/deps/icu-small/source/tools/toolutil', ], }], - ['_target_name in ["libuv", "http_parser", "openssl", "openssl-cli", "cares", "libnode", "nghttp2", "zlib", "mksnapshot", "genrb", "genccode"] or _target_name.startswith("v8") or _target_name.startswith("icu") or _target_name.startswith("node")', { + ['_target_name in ["libuv", "http_parser", "openssl", "openssl-cli", "cares", "libnode", "nghttp2", "zlib", "mksnapshot", "genrb", "genccode", "simdutf"] or _target_name.startswith("v8") or _target_name.startswith("icu") or _target_name.startswith("node") or _target_name.startswith("torque")', { # Suppress all the warnings in Node. 'msvs_settings': { 'VCCLCompilerTool': { @@ -158,6 +158,7 @@ '-Wno-inconsistent-missing-override', ], 'cflags_c': [ + '-Wno-deprecated-non-prototype', '-Wno-implicit-function-declaration', ], 'cflags!': [ diff --git a/node b/node index 10378ee..53926c7 160000 --- a/node +++ b/node @@ -1 +1 @@ -Subproject commit 10378ee6127e040f32a2a4ab728f37db61cca1b4 +Subproject commit 53926c7677cdfe25b874f79112f32e6f9e9770e9 diff --git a/src/bootstrap.js b/src/bootstrap.js index 71b1f99..f107be1 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -15,7 +15,7 @@ function wrapWithActivateUvLoop(func) { delete process.bootstrap // The |require| here is actually |nativeModuleRequire|. - const {BuiltinModule, internalBinding, require} = internalRequire('internal/bootstrap/loaders') + const {BuiltinModule, internalBinding, require} = internalRequire('internal/bootstrap/realm') // Make async method work. const timers = require('timers') @@ -60,13 +60,8 @@ function wrapWithActivateUvLoop(func) { const AsarArchive = require('asar_archive') process.asarArchive = new AsarArchive(execPath/* REPLACE_WITH_OFFSET */) - // If it is (i.e. no exception), then patch the fs module after bootstrap - // is over. - process.finishBootstrap = () => { - delete process.finishBootstrap - // Monkey patch built-in modules. - require('asar_monkey_patch').wrapFsWithAsar(require('fs')) - } + // Monkey patch built-in modules. + require('asar_monkey_patch').wrapFsWithAsar(require('fs')) // Redirect Node to execute from current ASAR archive, using a virtual // "asar" directory as root. diff --git a/src/node_integration.cc b/src/node_integration.cc index 1422dad..8894ae8 100644 --- a/src/node_integration.cc +++ b/src/node_integration.cc @@ -7,7 +7,6 @@ #include #include -#include "node/deps/uv/src/uv-common.h" #include "node/src/env-inl.h" #include "node/src/node.h" #include "node/src/node_internals.h" @@ -107,12 +106,6 @@ void NodeIntegration::EmbedThreadRunner(void *arg) { if (self->embed_closed_) break; - // Break the loop when uv has decided to quit. - if (self->uv_loop_->stop_flag != 0 || - (!uv__has_active_handles(self->uv_loop_) && - !uv__has_active_reqs(self->uv_loop_))) - break; - // Deal with event in main thread. self->WakeupMainThread(); } diff --git a/src/node_integration_win.cc b/src/node_integration_win.cc index a4fb420..173785d 100644 --- a/src/node_integration_win.cc +++ b/src/node_integration_win.cc @@ -4,7 +4,7 @@ #include "src/node_integration_win.h" -#include "node/deps/uv/src/uv-common.h" +#include "node/deps/uv/include/uv.h" // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx extern "C" IMAGE_DOS_HEADER __ImageBase; diff --git a/src/yode.cc b/src/yode.cc index 4fb660d..f3dbfd1 100644 --- a/src/yode.cc +++ b/src/yode.cc @@ -85,7 +85,7 @@ bool InitWrapper(node::Environment* env) { v8::Local versions = env->process_object()->Get( env->context(), ToV8(env, "versions")).ToLocalChecked(); versions.As()->Set( - env->context(), ToV8(env, "yode"), ToV8(env, "0.7.1")).ToChecked(); + env->context(), ToV8(env, "yode"), ToV8(env, "0.11.0")).ToChecked(); env->process_object()->DefineOwnProperty( env->context(), ToV8(env, "versions"), versions, v8::ReadOnly).Check(); return true; diff --git a/yode.gyp b/yode.gyp index f2518c5..78aa319 100644 --- a/yode.gyp +++ b/yode.gyp @@ -29,10 +29,11 @@ 'node/src', # for node things ], 'defines': [ + 'NODE_HAVE_I18N_SUPPORT=1', 'NODE_WANT_INTERNALS=1', + 'NODE_SHARED_MODE', 'HAVE_OPENSSL=1', 'HAVE_INSPECTOR=1', - 'NODE_SHARED_MODE', ], 'dependencies': [ 'yode_js2c#host',