Skip to content

Commit

Permalink
chore: bump node to v18.17.0 (main) (electron#39154)
Browse files Browse the repository at this point in the history
* chore: bump node in DEPS to v18.17.0

* chore: update build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch

Xref: nodejs/node#46930

manually sync patch to minor upstream code shear

* chore: update build_ensure_native_module_compilation_fails_if_not_using_a_new.patch

Xref: nodejs/node#48248

manually sync patch to minor upstream code shear

* chore: update fix_expose_the_built-in_electron_module_via_the_esm_loader.patch

Xref: nodejs/node#47824

chore: upstream func throwIfUnsupportedURLProtocol() has been removed, so no need to patch it

* chore: update api_pass_oomdetails_to_oomerrorcallback.patch

Xref: nodejs/node#47695

manually sync patch to minor upstream code shear

* chore: remove fix_prevent_changing_functiontemplateinfo_after_publish.patch

Xref: nodejs/node#46979 (upstreamed patch)

Xref: https://chromium-review.googlesource.com/c/v8/v8/+/2718147 (related)

* chore: update fix_adapt_debugger_tests_for_upstream_v8_changes.patch

Xref: nodejs/node#47274

manually sync patch to minor upstream code shear

some tests moved from sequential to parallel

* chore: remove fix_libc_buffer_overflow_in_string_view_ctor.patch

Xref: fix_libc_buffer_overflow_in_string_view_ctor.patch

patch is no longer needed due to upstream bump to ada 2.2.0

* chore: remove fix_preventing_potential_oob_in_ada_no_scheme_parsing.patch

Xref: nodejs/node#47339

patch is no longer needed due to upstream bump to ada 2.2.0

* chore: rebuild filenames.json

several files removed/added/changed upstream

* chore: update build_add_gn_build_files.patch

upstream dep histogram 0.11.7 moved its include path from src/ to include/

Xref: nodejs/node#47742

* chore: update fix_crypto_tests_to_run_with_bssl.patch

Xref: nodejs/node#47160

BoringSSL doesn't support BIO_s_secmem() (a secure heap variant of
BIO_s_mem()), so use BIO_s_mem() instead.

Related discussion of secure heap support in BoringSSL:
https://boringssl-review.googlesource.com/c/boringssl/+/54309

* fix: ftbfs in node dep ada

* fix: ftbfs in node dep uvwasi

* chore: rebuild patches

* chore: update fix_handle_boringssl_and_openssl_incompatibilities.patch

Upstream used `BIO_s_secmem()`, a secure heap variant of `BIO_s_mem()`.
BoringSSL doesn't support it, so this PR opts for `BIO_s_mem()` instead.

Upstream Node.js change that prompted this:
nodejs/node#47160

Related discussion of BoringSSL support of secure heap:
https://boringssl-review.googlesource.com/c/boringssl/+/54309

* fix: work around Node 18 isURL() regression

* chore: sort script/node-disabled-tests.json alphabetically

* test: add parallel/test-snapshot-argv1 to disabled list

test: add parallel/test-snapshot-namespaced-builtin to disabled list

We don't support that type of snapshotting at the moment.

* chore: disable flaky node test parallel/test-dgram-send-cb-quelches-error

fails upstream in v18.x on my box as well

* ci: ensure spawned node tests have ELECTRON_RUN_AS_NODE set

* fixup! fix: work around Node 18 isURL() regression

fix: infinite loop regression

* fixup! fix: work around Node 18 isURL() regression

* chore: patch fixtures/errors/force_colors.snapshot

The line numbers in the stacktrace from our v8 build don't match what
Node's tests are expecting, so update the stacktrace to match our build.

The specific numbers probably aren't t needed for the force_colors test,
which is trying to see whether or not the lines are greyed out. One option
is to upstream a test change to stop hardcoding the stacktrace.

* fixup! fix: work around Node 18 isURL() regression

fix; pull in upstream bugfix

* fixup! ci: ensure spawned node tests have ELECTRON_RUN_AS_NODE set

chore: do not inject ELECTRON_RUN_AS_NODE in test-assert-colors.js

* chore: disable flaky node test parallel/test-debugger-random-port-with-inspect-port

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <[email protected]>
  • Loading branch information
2 people authored and win32ss committed Sep 24, 2023
1 parent fbb92de commit 5dc5801
Show file tree
Hide file tree
Showing 37 changed files with 362 additions and 250 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':
'117.0.5921.0',
'node_version':
'v18.16.1',
'v18.17.0',
'nan_version':
'16fa32231e2ccd89d2804b3f765319128b20c4ac',
'squirrel.mac_version':
Expand Down
8 changes: 5 additions & 3 deletions patches/node/.patches
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ fix_parallel_test-v8-stats.patch
fix_expose_the_built-in_electron_module_via_the_esm_loader.patch
api_pass_oomdetails_to_oomerrorcallback.patch
fix_expose_lookupandcompile_with_parameters.patch
fix_prevent_changing_functiontemplateinfo_after_publish.patch
enable_crashpad_linux_node_processes.patch
test_formally_mark_some_tests_as_flaky.patch
fix_adapt_debugger_tests_for_upstream_v8_changes.patch
fix_libc_buffer_overflow_in_string_view_ctor.patch
fix_preventing_potential_oob_in_ada_no_scheme_parsing.patch
chore_remove_--no-harmony-atomics_related_code.patch
fix_account_for_createexternalizablestring_v8_global.patch
fix_wunreachable-code_warning_in_ares_init_rand_engine.patch
fix_-wshadow_warning.patch
fix_do_not_resolve_electron_entrypoints.patch
fix_adapt_generator_tostringtag_prototype_to_v8.patch
fix_ftbfs_werror_wunreachable-code-break.patch
fix_ftbfs_werror_wextra-semi.patch
fix_isurl_implementation.patch
ci_ensure_node_tests_set_electron_run_as_node.patch
chore_update_fixtures_errors_force_colors_snapshot.patch
16 changes: 8 additions & 8 deletions patches/node/api_pass_oomdetails_to_oomerrorcallback.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ Introduced in https://chromium-review.googlesource.com/c/v8/v8/+/3647827.
This patch can be removed when Electron updates to Node.js v20.

diff --git a/src/node_errors.cc b/src/node_errors.cc
index 2dc9e085269222c70902698020fc5c7b1af2f004..655f54e369c35efefa75c69cc57776249405dc76 100644
index e58e45be7bbb642f2277361d6312d444cfa27d16..54402bd5663666425b17fd267ba05ba7b800791c 100644
--- a/src/node_errors.cc
+++ b/src/node_errors.cc
@@ -527,9 +527,9 @@ void OnFatalError(const char* location, const char* message) {
@@ -521,9 +521,9 @@ static void ReportFatalException(Environment* env,
ABORT();
}

-void OOMErrorHandler(const char* location, bool is_heap_oom) {
+void OOMErrorHandler(const char* location, const v8::OOMDetails& details) {
-[[noreturn]] void OOMErrorHandler(const char* location, bool is_heap_oom) {
+[[noreturn]] void OOMErrorHandler(const char* location, const v8::OOMDetails& details) {
const char* message =
- is_heap_oom ? "Allocation failed - JavaScript heap out of memory"
+ details.is_heap_oom ? "Allocation failed - JavaScript heap out of memory"
: "Allocation failed - process out of memory";
if (location) {
FPrintF(stderr, "FATAL ERROR: %s %s\n", location, message);
diff --git a/src/node_errors.h b/src/node_errors.h
index 850d437acdfe09fc43a7a37790c2926e6109749d..5a33d17b0e90e8ca8dc670e14f93de8fef99d526 100644
index cc336536af0170e63cf9ccde99f9fa0a0be3f216..1687eed35717ae385aedad952c03ebab4f0f3bf7 100644
--- a/src/node_errors.h
+++ b/src/node_errors.h
@@ -21,7 +21,7 @@ void AppendExceptionLine(Environment* env,

[[noreturn]] void FatalError(const char* location, const char* message);
void OnFatalError(const char* location, const char* message);
-void OOMErrorHandler(const char* location, bool is_heap_oom);
+void OOMErrorHandler(const char* location, const v8::OOMDetails& details);
[[noreturn]] void OnFatalError(const char* location, const char* message);
-[[noreturn]] void OOMErrorHandler(const char* location, bool is_heap_oom);
+[[noreturn]] void OOMErrorHandler(const char* location, const v8::OOMDetails& details);

// Helpers to construct errors similar to the ones provided by
// lib/internal/errors.js.
26 changes: 14 additions & 12 deletions patches/node/build_add_gn_build_files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -887,12 +887,12 @@ index 0000000000000000000000000000000000000000..0daf8c006cef89e76d7eccec3e924bd2
+}
diff --git a/deps/histogram/BUILD.gn b/deps/histogram/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..8ba89a379fa2937b4b2fa5092f18727c7d0788a6
index 0000000000000000000000000000000000000000..02bc887db7c8545e1d8adc57f73f203eec2f2592
--- /dev/null
+++ b/deps/histogram/BUILD.gn
@@ -0,0 +1,19 @@
+config("histogram_config") {
+ include_dirs = [ "src" ]
+ include_dirs = [ "include" ]
+
+ cflags = [
+ "-Wno-implicit-function-declaration",
Expand All @@ -910,6 +910,7 @@ index 0000000000000000000000000000000000000000..8ba89a379fa2937b4b2fa5092f18727c
+ "src/hdr_histogram.h",
+ ]
+}
\ No newline at end of file
diff --git a/deps/llhttp/BUILD.gn b/deps/llhttp/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..fb000f8ee7647c375bc190d1729d67bb7770d109
Expand Down Expand Up @@ -1261,10 +1262,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84d82b57f3
index 0000000000000000000000000000000000000000..7d86765bf229275ba55d37a452ef24832a7afadb
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,663 @@
@@ -0,0 +1,664 @@
+// This file is automatically generated by generate_gn_filenames_json.py
+// DO NOT EDIT
+{
Expand Down Expand Up @@ -1470,6 +1471,7 @@ index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84
+ "lib/internal/crypto/sig.js",
+ "lib/internal/crypto/util.js",
+ "lib/internal/crypto/webcrypto.js",
+ "lib/internal/crypto/webidl.js",
+ "lib/internal/crypto/x509.js",
+ "lib/internal/debugger/inspect.js",
+ "lib/internal/debugger/inspect_client.js",
Expand Down Expand Up @@ -1616,14 +1618,11 @@ index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84
+ "lib/internal/test_runner/reporter/dot.js",
+ "lib/internal/test_runner/reporter/spec.js",
+ "lib/internal/test_runner/reporter/tap.js",
+ "lib/internal/test_runner/reporter/v8-serializer.js",
+ "lib/internal/test_runner/runner.js",
+ "lib/internal/test_runner/tap_checker.js",
+ "lib/internal/test_runner/tap_lexer.js",
+ "lib/internal/test_runner/tap_parser.js",
+ "lib/internal/test_runner/test.js",
+ "lib/internal/test_runner/tests_stream.js",
+ "lib/internal/test_runner/utils.js",
+ "lib/internal/test_runner/yaml_to_js.js",
+ "lib/internal/timers.js",
+ "lib/internal/tls/secure-context.js",
+ "lib/internal/tls/secure-pair.js",
Expand All @@ -1649,6 +1648,7 @@ index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84
+ "lib/internal/wasm_web_api.js",
+ "lib/internal/watch_mode/files_watcher.js",
+ "lib/internal/watchdog.js",
+ "lib/internal/webidl.js",
+ "lib/internal/webstreams/adapters.js",
+ "lib/internal/webstreams/compression.js",
+ "lib/internal/webstreams/encoding.js",
Expand Down Expand Up @@ -1681,6 +1681,7 @@ index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84
+ "lib/string_decoder.js",
+ "lib/sys.js",
+ "lib/test.js",
+ "lib/test/reporters.js",
+ "lib/timers.js",
+ "lib/timers/promises.js",
+ "lib/tls.js",
Expand All @@ -1707,6 +1708,7 @@ index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84
+ "//v8/tools/tickprocessor-driver.mjs",
+ "deps/acorn/acorn/dist/acorn.js",
+ "deps/acorn/acorn-walk/dist/walk.js",
+ "deps/minimatch/index.js",
+ "deps/cjs-module-lexer/lexer.js",
+ "deps/cjs-module-lexer/dist/lexer.js",
+ "deps/undici/undici.js"
Expand Down Expand Up @@ -1964,10 +1966,10 @@ index 0000000000000000000000000000000000000000..9b1a4048a4a64c36d88de0bbe1a548c9
+ }
+}
diff --git a/node.gyp b/node.gyp
index cf52281bb4479ba20fbe852518edadc2185f0dae..81254f1d4fff9be925ecbb85fb0811c0909900dd 100644
index 6b554d75d89077f0fcfcaaf1636c8a537478f679..7f88a4466cb4a6b55b91345bb3af6b3600afd47a 100644
--- a/node.gyp
+++ b/node.gyp
@@ -687,7 +687,7 @@
@@ -688,7 +688,7 @@
'src/util-inl.h',
# Dependency headers
'deps/v8/include/v8.h',
Expand Down Expand Up @@ -2183,7 +2185,7 @@ index 0000000000000000000000000000000000000000..4ab828dcbf322a9e28674e48c4a6868b
+ args = rebase_path(inputs + outputs, root_build_dir)
+}
diff --git a/src/node_version.h b/src/node_version.h
index d08a0d731f6c14b0e66076a858214147821b5a32..67c008ee7724f10de476e7e523e902fa087eb2c8 100644
index 5509ad145e59ce62341a479c2b2fdc377ede1c30..0bbfeabf2966734d5c6b143be89d7a914e7d9b99 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -89,7 +89,10 @@
Expand Down Expand Up @@ -2457,7 +2459,7 @@ index f13f2ecd662a5fb985839b394b45319c091b56d4..21bc48324946d52ed2b1c9eec35c1fcd
if 'false' == variables.get('node_shared_libuv'):
subdir_files('deps/uv/include', 'include/node/', action)
diff --git a/tools/js2c.py b/tools/js2c.py
index f9c202e861b986e3171aa21079c3b29f51fe0398..ef24c4de0aaa2cd5f3c06e5bd8dd90de2b30ffcb 100755
index 54c7dfce3631001e108570b19d34966edafd624f..077bba1572f05f1aa16553894703b12abc19a985 100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -131,6 +131,14 @@ def NormalizeFileName(filename):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ index f3e0047fea1319034bf8b05b8d54d8a4ef181b4b..be0289ea7df50d7c2cb002c6343b7501
'defines': [
'V8_COMPRESS_POINTERS',
diff --git a/configure.py b/configure.py
index 03ccbae0a1a837a382b98b828990d5a511f7a9d7..b5c747971a10b549007a8a3247aa5bd8058f311f 100755
index 875d83e5db0037b902cff03c74852ea347513b03..8776cd057607ffe913bdd822a0aed5f9f1aa4a7a 100755
--- a/configure.py
+++ b/configure.py
@@ -1529,6 +1529,7 @@ def configure_library(lib, output, pkgname=None):
@@ -1524,6 +1524,7 @@ def configure_library(lib, output, pkgname=None):


def configure_v8(o):
+ o['variables']['using_electron_config_gypi'] = 1
o['variables']['v8_enable_webassembly'] = 1
o['variables']['v8_enable_webassembly'] = 0 if options.v8_lite_mode else 1
o['variables']['v8_enable_javascript_promise_hooks'] = 1
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
diff --git a/src/node.h b/src/node.h
index 4b9b416e77b07407eae7b9587705b74ad3e6f211..deefda5c684c062f3c707fbdee30878a74d5dbb0 100644
index c4cce244359d893acf31e78f935152d4d47b14cd..26368061a909e6abc62a4cf261a5dbbd79404f1a 100644
--- a/src/node.h
+++ b/src/node.h
@@ -22,6 +22,12 @@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ index 543ede0020fd79251bdd9eac897d9a0e330ef239..f3e0047fea1319034bf8b05b8d54d8a4
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'],
}],
diff --git a/configure.py b/configure.py
index 40e0395ebd2c3cbcff587294bf9f1646dcab21aa..03ccbae0a1a837a382b98b828990d5a511f7a9d7 100755
index 7006ee65816989976b1648374565ebbae4b188f1..875d83e5db0037b902cff03c74852ea347513b03 100755
--- a/configure.py
+++ b/configure.py
@@ -1542,6 +1542,7 @@ def configure_v8(o):
@@ -1537,6 +1537,7 @@ def configure_v8(o):
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ index ce885c154c81c5703365fa34957697698da9aff6..229b0d522aeee3632145c86715bea139
async function* watch(filename, options = kEmptyObject) {
const path = toNamespacedPath(getValidatedPath(filename));
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 40d9025746d3c39cf9ea27b6cffc8f2eb7e62c1e..d3a0dd7cedb0d239ae427d1af2335e155345a454 100644
index 2220869fa76f35fdfba72eba993b20748b07c546..522670ed5c9951c506dcdf2745585552ad2a081f 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -33,6 +33,7 @@ BuiltinLoader BuiltinLoader::instance_;
Expand All @@ -61,7 +61,7 @@ index 90b158b84bb2a66781cf92f5b4c1a64f9e2ee651..8d9f7c409659a30747e5feeac6cfec42

std::vector<std::string> GetBuiltinIds();
diff --git a/tools/js2c.py b/tools/js2c.py
index ef24c4de0aaa2cd5f3c06e5bd8dd90de2b30ffcb..ece70a8d7a1fdca051d4b821ba114be54bd34e4e 100755
index 077bba1572f05f1aa16553894703b12abc19a985..bb9f26e3adc863757ad8ede5069d299c2d138369 100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -39,6 +39,8 @@ import codecs
Expand Down Expand Up @@ -159,22 +159,23 @@ index ef24c4de0aaa2cd5f3c06e5bd8dd90de2b30ffcb..ece70a8d7a1fdca051d4b821ba114be5
write_if_chaged(out, target)


@@ -218,6 +237,7 @@ def main():
@@ -222,6 +241,7 @@ def main():
default=None,
help='input file directory')
help='root directory containing the sources')
parser.add_argument('--verbose', action='store_true', help='output file')
+ parser.add_argument('--only-js', action='store_true', help='do not require or parse any config.gypi files')
parser.add_argument('sources', nargs='*', help='input files')
options = parser.parse_args()
global is_verbose
@@ -230,12 +250,15 @@ def main():
@@ -238,13 +258,15 @@ def main():

source_files = functools.reduce(SourceFileByExt, sources, {})

- # Should have exactly 3 types: `.js`, `.mjs` and `.gypi`
- assert len(source_files) == 3
- # Currently config.gypi is the only `.gypi` file allowed
- assert source_files['.gypi'] == ['config.gypi']
- assert len(source_files['.gypi']) == 1
- assert os.path.basename(source_files['.gypi'][0]) == 'config.gypi'
- source_files['config.gypi'] = source_files.pop('.gypi')[0]
- JS2C(source_files, options.target)
+ if options.only_js:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ modules from being used in the renderer process. This should be upstreamed as
a customizable error message.

diff --git a/src/node_binding.cc b/src/node_binding.cc
index 5093c3e53cee6d0ad9a9100b487549c3b4e7ae46..3e7b796fe5d285289e409985a5dba77b0d230910 100644
index a82763cc5ad47f25b63b8c72e08bdc09ab841448..eb25fb4a81f53e2e443d0276bb1acbbf5700533a 100644
--- a/src/node_binding.cc
+++ b/src/node_binding.cc
@@ -4,6 +4,7 @@
Expand All @@ -19,7 +19,7 @@ index 5093c3e53cee6d0ad9a9100b487549c3b4e7ae46..3e7b796fe5d285289e409985a5dba77b
#include "util.h"

#include <string>
@@ -475,7 +476,12 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
@@ -481,7 +482,12 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
if (mp->nm_context_register_func == nullptr) {
if (env->force_context_aware()) {
dlib->Close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ they use themselves as the entry point. We should try to upstream some form
of this.

diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 9783d9235ed43c7919ed2f26e35c96ae7ff1a08b..e4fd5e7dadb8230c9e07dbb7bc70b2117135c59a 100644
index 8ce3d78839944ddd15bed299d89aeb61a7fd53e5..b3a54aecb06b07834e38f9c94c5246df31c7a47a 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -1230,6 +1230,13 @@ Module.prototype._compile = function(content, filename) {
Expand All @@ -26,10 +26,10 @@ index 9783d9235ed43c7919ed2f26e35c96ae7ff1a08b..e4fd5e7dadb8230c9e07dbb7bc70b211
try {
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
index f91a32c0348f805d01d9c198c39cff4c5c72c88b..421b0ada67e281b4d269c7d3154e42f63e1e2cc7 100644
index 2e35cbba2ac02494c44821af395fe0195b1ab6b5..f5b6fecf6843a6204ec532a77f39a36d33bf061d 100644
--- a/lib/internal/process/pre_execution.js
+++ b/lib/internal/process/pre_execution.js
@@ -150,11 +150,13 @@ function patchProcessObject(expandArgv1) {
@@ -149,11 +149,13 @@ function patchProcessObject(expandArgv1) {
if (expandArgv1 && process.argv[1] &&
!StringPrototypeStartsWith(process.argv[1], '-')) {
// Expand process.argv[1] into a full path.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ index 7fbfb64984c290a1d71c99c92084975c31ce18fe..be4d82086199855a10108528b3dacc66
// not to workers created by other workers.
let cachedCwd = '';
diff --git a/lib/internal/worker.js b/lib/internal/worker.js
index 59de3085cf65d532c1d8a9a3ff7fe75447639a10..9a2b8c06ec807fa62ef5130ad7b8aea21c7f049a 100644
index 3d828d2f6f2b19554f7fc01ea880c0c144d8837d..78fcaec8d694580798783c83c3282ec1aaac4aa7 100644
--- a/lib/internal/worker.js
+++ b/lib/internal/worker.js
@@ -93,8 +93,7 @@ let cwdCounter;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <[email protected]>
Date: Mon, 7 Aug 2023 20:29:10 -0500
Subject: chore: update fixtures/errors/force_colors.snapshot

The line numbers in the stacktrace from our v8 build don't match what
Node's tests are expecting, so update the stacktrace to match our build.

The specific probably isn't needed for the force_colors test, which is
trying to see whether or not the lines are greyed out. One possibility
would be to upstream a changed test that doesn't hardcode line numbers.

diff --git a/test/fixtures/errors/force_colors.snapshot b/test/fixtures/errors/force_colors.snapshot
index 0334a0b4faa3633aa8617b9538873e7f3540513b..d8c710e07602b68c9ad4eaaeab2bdf399ed5150b 100644
--- a/test/fixtures/errors/force_colors.snapshot
+++ b/test/fixtures/errors/force_colors.snapshot
@@ -4,11 +4,12 @@ throw new Error('Should include grayed stack trace')

Error: Should include grayed stack trace
at Object.<anonymous> (/test*force_colors.js:1:7)
- at Module._compile (node:internal*modules*cjs*loader:1256:14)
- at Module._extensions..js (node:internal*modules*cjs*loader:1310:10)
- at Module.load (node:internal*modules*cjs*loader:1119:32)
- at Module._load (node:internal*modules*cjs*loader:960:12)
- at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:81:12)
+ at Module._compile (node:internal*modules*cjs*loader:1271:14)
+ at Object..js (node:internal*modules*cjs*loader:1326:10)
+ at Module.load (node:internal*modules*cjs*loader:1126:32)
+ at node:internal*modules*cjs*loader:967:12
+ at Function._load (node:electron*js2c*asar_bundle:756:32)
+ at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:87:12)
 at node:internal*main*run_main_module:23:47

Node.js *
Loading

0 comments on commit 5dc5801

Please sign in to comment.