Skip to content

Commit 5dc5801

Browse files
electron-roller[bot]ckerr
authored and
win32ss
committed
chore: bump node to v18.17.0 (main) (electron#39154)
* 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]>
1 parent fbb92de commit 5dc5801

File tree

37 files changed

+362
-250
lines changed

37 files changed

+362
-250
lines changed

DEPS

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ vars = {
44
'chromium_version':
55
'117.0.5921.0',
66
'node_version':
7-
'v18.16.1',
7+
'v18.17.0',
88
'nan_version':
99
'16fa32231e2ccd89d2804b3f765319128b20c4ac',
1010
'squirrel.mac_version':

patches/node/.patches

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@ fix_parallel_test-v8-stats.patch
2727
fix_expose_the_built-in_electron_module_via_the_esm_loader.patch
2828
api_pass_oomdetails_to_oomerrorcallback.patch
2929
fix_expose_lookupandcompile_with_parameters.patch
30-
fix_prevent_changing_functiontemplateinfo_after_publish.patch
3130
enable_crashpad_linux_node_processes.patch
3231
test_formally_mark_some_tests_as_flaky.patch
3332
fix_adapt_debugger_tests_for_upstream_v8_changes.patch
34-
fix_libc_buffer_overflow_in_string_view_ctor.patch
35-
fix_preventing_potential_oob_in_ada_no_scheme_parsing.patch
3633
chore_remove_--no-harmony-atomics_related_code.patch
3734
fix_account_for_createexternalizablestring_v8_global.patch
3835
fix_wunreachable-code_warning_in_ares_init_rand_engine.patch
3936
fix_-wshadow_warning.patch
4037
fix_do_not_resolve_electron_entrypoints.patch
4138
fix_adapt_generator_tostringtag_prototype_to_v8.patch
39+
fix_ftbfs_werror_wunreachable-code-break.patch
40+
fix_ftbfs_werror_wextra-semi.patch
41+
fix_isurl_implementation.patch
42+
ci_ensure_node_tests_set_electron_run_as_node.patch
43+
chore_update_fixtures_errors_force_colors_snapshot.patch

patches/node/api_pass_oomdetails_to_oomerrorcallback.patch

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,31 @@ Introduced in https://chromium-review.googlesource.com/c/v8/v8/+/3647827.
88
This patch can be removed when Electron updates to Node.js v20.
99

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

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

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

3737
// Helpers to construct errors similar to the ones provided by
3838
// lib/internal/errors.js.

patches/node/build_add_gn_build_files.patch

+14-12
Original file line numberDiff line numberDiff line change
@@ -887,12 +887,12 @@ index 0000000000000000000000000000000000000000..0daf8c006cef89e76d7eccec3e924bd2
887887
+}
888888
diff --git a/deps/histogram/BUILD.gn b/deps/histogram/BUILD.gn
889889
new file mode 100644
890-
index 0000000000000000000000000000000000000000..8ba89a379fa2937b4b2fa5092f18727c7d0788a6
890+
index 0000000000000000000000000000000000000000..02bc887db7c8545e1d8adc57f73f203eec2f2592
891891
--- /dev/null
892892
+++ b/deps/histogram/BUILD.gn
893893
@@ -0,0 +1,19 @@
894894
+config("histogram_config") {
895-
+ include_dirs = [ "src" ]
895+
+ include_dirs = [ "include" ]
896896
+
897897
+ cflags = [
898898
+ "-Wno-implicit-function-declaration",
@@ -910,6 +910,7 @@ index 0000000000000000000000000000000000000000..8ba89a379fa2937b4b2fa5092f18727c
910910
+ "src/hdr_histogram.h",
911911
+ ]
912912
+}
913+
\ No newline at end of file
913914
diff --git a/deps/llhttp/BUILD.gn b/deps/llhttp/BUILD.gn
914915
new file mode 100644
915916
index 0000000000000000000000000000000000000000..fb000f8ee7647c375bc190d1729d67bb7770d109
@@ -1261,10 +1262,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
12611262
+}
12621263
diff --git a/filenames.json b/filenames.json
12631264
new file mode 100644
1264-
index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84d82b57f3
1265+
index 0000000000000000000000000000000000000000..7d86765bf229275ba55d37a452ef24832a7afadb
12651266
--- /dev/null
12661267
+++ b/filenames.json
1267-
@@ -0,0 +1,663 @@
1268+
@@ -0,0 +1,664 @@
12681269
+// This file is automatically generated by generate_gn_filenames_json.py
12691270
+// DO NOT EDIT
12701271
+{
@@ -1470,6 +1471,7 @@ index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84
14701471
+ "lib/internal/crypto/sig.js",
14711472
+ "lib/internal/crypto/util.js",
14721473
+ "lib/internal/crypto/webcrypto.js",
1474+
+ "lib/internal/crypto/webidl.js",
14731475
+ "lib/internal/crypto/x509.js",
14741476
+ "lib/internal/debugger/inspect.js",
14751477
+ "lib/internal/debugger/inspect_client.js",
@@ -1616,14 +1618,11 @@ index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84
16161618
+ "lib/internal/test_runner/reporter/dot.js",
16171619
+ "lib/internal/test_runner/reporter/spec.js",
16181620
+ "lib/internal/test_runner/reporter/tap.js",
1621+
+ "lib/internal/test_runner/reporter/v8-serializer.js",
16191622
+ "lib/internal/test_runner/runner.js",
1620-
+ "lib/internal/test_runner/tap_checker.js",
1621-
+ "lib/internal/test_runner/tap_lexer.js",
1622-
+ "lib/internal/test_runner/tap_parser.js",
16231623
+ "lib/internal/test_runner/test.js",
16241624
+ "lib/internal/test_runner/tests_stream.js",
16251625
+ "lib/internal/test_runner/utils.js",
1626-
+ "lib/internal/test_runner/yaml_to_js.js",
16271626
+ "lib/internal/timers.js",
16281627
+ "lib/internal/tls/secure-context.js",
16291628
+ "lib/internal/tls/secure-pair.js",
@@ -1649,6 +1648,7 @@ index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84
16491648
+ "lib/internal/wasm_web_api.js",
16501649
+ "lib/internal/watch_mode/files_watcher.js",
16511650
+ "lib/internal/watchdog.js",
1651+
+ "lib/internal/webidl.js",
16521652
+ "lib/internal/webstreams/adapters.js",
16531653
+ "lib/internal/webstreams/compression.js",
16541654
+ "lib/internal/webstreams/encoding.js",
@@ -1681,6 +1681,7 @@ index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84
16811681
+ "lib/string_decoder.js",
16821682
+ "lib/sys.js",
16831683
+ "lib/test.js",
1684+
+ "lib/test/reporters.js",
16841685
+ "lib/timers.js",
16851686
+ "lib/timers/promises.js",
16861687
+ "lib/tls.js",
@@ -1707,6 +1708,7 @@ index 0000000000000000000000000000000000000000..bfed2576bda1371c35533bcf50888f84
17071708
+ "//v8/tools/tickprocessor-driver.mjs",
17081709
+ "deps/acorn/acorn/dist/acorn.js",
17091710
+ "deps/acorn/acorn-walk/dist/walk.js",
1711+
+ "deps/minimatch/index.js",
17101712
+ "deps/cjs-module-lexer/lexer.js",
17111713
+ "deps/cjs-module-lexer/dist/lexer.js",
17121714
+ "deps/undici/undici.js"
@@ -1964,10 +1966,10 @@ index 0000000000000000000000000000000000000000..9b1a4048a4a64c36d88de0bbe1a548c9
19641966
+ }
19651967
+}
19661968
diff --git a/node.gyp b/node.gyp
1967-
index cf52281bb4479ba20fbe852518edadc2185f0dae..81254f1d4fff9be925ecbb85fb0811c0909900dd 100644
1969+
index 6b554d75d89077f0fcfcaaf1636c8a537478f679..7f88a4466cb4a6b55b91345bb3af6b3600afd47a 100644
19681970
--- a/node.gyp
19691971
+++ b/node.gyp
1970-
@@ -687,7 +687,7 @@
1972+
@@ -688,7 +688,7 @@
19711973
'src/util-inl.h',
19721974
# Dependency headers
19731975
'deps/v8/include/v8.h',
@@ -2183,7 +2185,7 @@ index 0000000000000000000000000000000000000000..4ab828dcbf322a9e28674e48c4a6868b
21832185
+ args = rebase_path(inputs + outputs, root_build_dir)
21842186
+}
21852187
diff --git a/src/node_version.h b/src/node_version.h
2186-
index d08a0d731f6c14b0e66076a858214147821b5a32..67c008ee7724f10de476e7e523e902fa087eb2c8 100644
2188+
index 5509ad145e59ce62341a479c2b2fdc377ede1c30..0bbfeabf2966734d5c6b143be89d7a914e7d9b99 100644
21872189
--- a/src/node_version.h
21882190
+++ b/src/node_version.h
21892191
@@ -89,7 +89,10 @@
@@ -2457,7 +2459,7 @@ index f13f2ecd662a5fb985839b394b45319c091b56d4..21bc48324946d52ed2b1c9eec35c1fcd
24572459
if 'false' == variables.get('node_shared_libuv'):
24582460
subdir_files('deps/uv/include', 'include/node/', action)
24592461
diff --git a/tools/js2c.py b/tools/js2c.py
2460-
index f9c202e861b986e3171aa21079c3b29f51fe0398..ef24c4de0aaa2cd5f3c06e5bd8dd90de2b30ffcb 100755
2462+
index 54c7dfce3631001e108570b19d34966edafd624f..077bba1572f05f1aa16553894703b12abc19a985 100755
24612463
--- a/tools/js2c.py
24622464
+++ b/tools/js2c.py
24632465
@@ -131,6 +131,14 @@ def NormalizeFileName(filename):

patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ index f3e0047fea1319034bf8b05b8d54d8a4ef181b4b..be0289ea7df50d7c2cb002c6343b7501
4040
'defines': [
4141
'V8_COMPRESS_POINTERS',
4242
diff --git a/configure.py b/configure.py
43-
index 03ccbae0a1a837a382b98b828990d5a511f7a9d7..b5c747971a10b549007a8a3247aa5bd8058f311f 100755
43+
index 875d83e5db0037b902cff03c74852ea347513b03..8776cd057607ffe913bdd822a0aed5f9f1aa4a7a 100755
4444
--- a/configure.py
4545
+++ b/configure.py
46-
@@ -1529,6 +1529,7 @@ def configure_library(lib, output, pkgname=None):
46+
@@ -1524,6 +1524,7 @@ def configure_library(lib, output, pkgname=None):
4747

4848

4949
def configure_v8(o):
5050
+ o['variables']['using_electron_config_gypi'] = 1
51-
o['variables']['v8_enable_webassembly'] = 1
51+
o['variables']['v8_enable_webassembly'] = 0 if options.v8_lite_mode else 1
5252
o['variables']['v8_enable_javascript_promise_hooks'] = 1
5353
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
5454
diff --git a/src/node.h b/src/node.h
55-
index 4b9b416e77b07407eae7b9587705b74ad3e6f211..deefda5c684c062f3c707fbdee30878a74d5dbb0 100644
55+
index c4cce244359d893acf31e78f935152d4d47b14cd..26368061a909e6abc62a4cf261a5dbbd79404f1a 100644
5656
--- a/src/node.h
5757
+++ b/src/node.h
5858
@@ -22,6 +22,12 @@

patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ index 543ede0020fd79251bdd9eac897d9a0e330ef239..f3e0047fea1319034bf8b05b8d54d8a4
4242
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'],
4343
}],
4444
diff --git a/configure.py b/configure.py
45-
index 40e0395ebd2c3cbcff587294bf9f1646dcab21aa..03ccbae0a1a837a382b98b828990d5a511f7a9d7 100755
45+
index 7006ee65816989976b1648374565ebbae4b188f1..875d83e5db0037b902cff03c74852ea347513b03 100755
4646
--- a/configure.py
4747
+++ b/configure.py
48-
@@ -1542,6 +1542,7 @@ def configure_v8(o):
48+
@@ -1537,6 +1537,7 @@ def configure_v8(o):
4949
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
5050
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
5151
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0

patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch

+7-6
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ index ce885c154c81c5703365fa34957697698da9aff6..229b0d522aeee3632145c86715bea139
3737
async function* watch(filename, options = kEmptyObject) {
3838
const path = toNamespacedPath(getValidatedPath(filename));
3939
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
40-
index 40d9025746d3c39cf9ea27b6cffc8f2eb7e62c1e..d3a0dd7cedb0d239ae427d1af2335e155345a454 100644
40+
index 2220869fa76f35fdfba72eba993b20748b07c546..522670ed5c9951c506dcdf2745585552ad2a081f 100644
4141
--- a/src/node_builtins.cc
4242
+++ b/src/node_builtins.cc
4343
@@ -33,6 +33,7 @@ BuiltinLoader BuiltinLoader::instance_;
@@ -61,7 +61,7 @@ index 90b158b84bb2a66781cf92f5b4c1a64f9e2ee651..8d9f7c409659a30747e5feeac6cfec42
6161

6262
std::vector<std::string> GetBuiltinIds();
6363
diff --git a/tools/js2c.py b/tools/js2c.py
64-
index ef24c4de0aaa2cd5f3c06e5bd8dd90de2b30ffcb..ece70a8d7a1fdca051d4b821ba114be54bd34e4e 100755
64+
index 077bba1572f05f1aa16553894703b12abc19a985..bb9f26e3adc863757ad8ede5069d299c2d138369 100755
6565
--- a/tools/js2c.py
6666
+++ b/tools/js2c.py
6767
@@ -39,6 +39,8 @@ import codecs
@@ -159,22 +159,23 @@ index ef24c4de0aaa2cd5f3c06e5bd8dd90de2b30ffcb..ece70a8d7a1fdca051d4b821ba114be5
159159
write_if_chaged(out, target)
160160

161161

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

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

174174
- # Should have exactly 3 types: `.js`, `.mjs` and `.gypi`
175175
- assert len(source_files) == 3
176176
- # Currently config.gypi is the only `.gypi` file allowed
177-
- assert source_files['.gypi'] == ['config.gypi']
177+
- assert len(source_files['.gypi']) == 1
178+
- assert os.path.basename(source_files['.gypi'][0]) == 'config.gypi'
178179
- source_files['config.gypi'] = source_files.pop('.gypi')[0]
179180
- JS2C(source_files, options.target)
180181
+ if options.only_js:

patches/node/chore_add_context_to_context_aware_module_prevention.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ modules from being used in the renderer process. This should be upstreamed as
88
a customizable error message.
99

1010
diff --git a/src/node_binding.cc b/src/node_binding.cc
11-
index 5093c3e53cee6d0ad9a9100b487549c3b4e7ae46..3e7b796fe5d285289e409985a5dba77b0d230910 100644
11+
index a82763cc5ad47f25b63b8c72e08bdc09ab841448..eb25fb4a81f53e2e443d0276bb1acbbf5700533a 100644
1212
--- a/src/node_binding.cc
1313
+++ b/src/node_binding.cc
1414
@@ -4,6 +4,7 @@
@@ -19,7 +19,7 @@ index 5093c3e53cee6d0ad9a9100b487549c3b4e7ae46..3e7b796fe5d285289e409985a5dba77b
1919
#include "util.h"
2020

2121
#include <string>
22-
@@ -475,7 +476,12 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
22+
@@ -481,7 +482,12 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
2323
if (mp->nm_context_register_func == nullptr) {
2424
if (env->force_context_aware()) {
2525
dlib->Close();

patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ they use themselves as the entry point. We should try to upstream some form
88
of this.
99

1010
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
11-
index 9783d9235ed43c7919ed2f26e35c96ae7ff1a08b..e4fd5e7dadb8230c9e07dbb7bc70b2117135c59a 100644
11+
index 8ce3d78839944ddd15bed299d89aeb61a7fd53e5..b3a54aecb06b07834e38f9c94c5246df31c7a47a 100644
1212
--- a/lib/internal/modules/cjs/loader.js
1313
+++ b/lib/internal/modules/cjs/loader.js
1414
@@ -1230,6 +1230,13 @@ Module.prototype._compile = function(content, filename) {
@@ -26,10 +26,10 @@ index 9783d9235ed43c7919ed2f26e35c96ae7ff1a08b..e4fd5e7dadb8230c9e07dbb7bc70b211
2626
try {
2727
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
2828
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
29-
index f91a32c0348f805d01d9c198c39cff4c5c72c88b..421b0ada67e281b4d269c7d3154e42f63e1e2cc7 100644
29+
index 2e35cbba2ac02494c44821af395fe0195b1ab6b5..f5b6fecf6843a6204ec532a77f39a36d33bf061d 100644
3030
--- a/lib/internal/process/pre_execution.js
3131
+++ b/lib/internal/process/pre_execution.js
32-
@@ -150,11 +150,13 @@ function patchProcessObject(expandArgv1) {
32+
@@ -149,11 +149,13 @@ function patchProcessObject(expandArgv1) {
3333
if (expandArgv1 && process.argv[1] &&
3434
!StringPrototypeStartsWith(process.argv[1], '-')) {
3535
// Expand process.argv[1] into a full path.

patches/node/chore_remove_--no-harmony-atomics_related_code.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ index 7fbfb64984c290a1d71c99c92084975c31ce18fe..be4d82086199855a10108528b3dacc66
3737
// not to workers created by other workers.
3838
let cachedCwd = '';
3939
diff --git a/lib/internal/worker.js b/lib/internal/worker.js
40-
index 59de3085cf65d532c1d8a9a3ff7fe75447639a10..9a2b8c06ec807fa62ef5130ad7b8aea21c7f049a 100644
40+
index 3d828d2f6f2b19554f7fc01ea880c0c144d8837d..78fcaec8d694580798783c83c3282ec1aaac4aa7 100644
4141
--- a/lib/internal/worker.js
4242
+++ b/lib/internal/worker.js
4343
@@ -93,8 +93,7 @@ let cwdCounter;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Charles Kerr <[email protected]>
3+
Date: Mon, 7 Aug 2023 20:29:10 -0500
4+
Subject: chore: update fixtures/errors/force_colors.snapshot
5+
6+
The line numbers in the stacktrace from our v8 build don't match what
7+
Node's tests are expecting, so update the stacktrace to match our build.
8+
9+
The specific probably isn't needed for the force_colors test, which is
10+
trying to see whether or not the lines are greyed out. One possibility
11+
would be to upstream a changed test that doesn't hardcode line numbers.
12+
13+
diff --git a/test/fixtures/errors/force_colors.snapshot b/test/fixtures/errors/force_colors.snapshot
14+
index 0334a0b4faa3633aa8617b9538873e7f3540513b..d8c710e07602b68c9ad4eaaeab2bdf399ed5150b 100644
15+
--- a/test/fixtures/errors/force_colors.snapshot
16+
+++ b/test/fixtures/errors/force_colors.snapshot
17+
@@ -4,11 +4,12 @@ throw new Error('Should include grayed stack trace')
18+
19+
Error: Should include grayed stack trace
20+
at Object.<anonymous> (/test*force_colors.js:1:7)
21+
- at Module._compile (node:internal*modules*cjs*loader:1256:14)
22+
- at Module._extensions..js (node:internal*modules*cjs*loader:1310:10)
23+
- at Module.load (node:internal*modules*cjs*loader:1119:32)
24+
- at Module._load (node:internal*modules*cjs*loader:960:12)
25+
- at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:81:12)
26+
+ at Module._compile (node:internal*modules*cjs*loader:1271:14)
27+
+ at Object..js (node:internal*modules*cjs*loader:1326:10)
28+
+ at Module.load (node:internal*modules*cjs*loader:1126:32)
29+
+ at node:internal*modules*cjs*loader:967:12
30+
+ at Function._load (node:electron*js2c*asar_bundle:756:32)
31+
+ at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:87:12)
32+
 at node:internal*main*run_main_module:23:47
33+
34+
Node.js *

0 commit comments

Comments
 (0)