File tree Expand file tree Collapse file tree 5 files changed +29
-8
lines changed Expand file tree Collapse file tree 5 files changed +29
-8
lines changed Original file line number Diff line number Diff line change @@ -642,7 +642,7 @@ jobs:
642
642
# version of node (node canary) when running the compiler output (e.g.
643
643
# in configure tests.
644
644
- run :
645
- name : configure node canary
645
+ name : configure compiler to use node- canary
646
646
command : echo "NODE_JS = NODE_JS_TEST" >> ~/emsdk/.emscripten
647
647
- run-tests :
648
648
title : " wasm64"
@@ -746,6 +746,18 @@ jobs:
746
746
command : git submodule update --init
747
747
- pip-install
748
748
- install-emsdk
749
+ # `install-node-version` only changes the NODE_JS_TEST (the version of
750
+ # node used to run test), not NODE_JS (the version of node used to run the
751
+ # compiler itself).
752
+ # In order to test that the compiler itself can run under the oldest
753
+ # supported version of node, we run all the tests in the runner under that
754
+ # version.
755
+ # Keep this in sync with MINIMUM_NODE_VERSION in tools/shared.py.
756
+ - install-node-version :
757
+ node_version : " 18.0.0"
758
+ - run :
759
+ name : configure compiler to use 18.0.0
760
+ command : echo "NODE_JS = '$(which node)'" >> ~/emsdk/.emscripten
749
761
- install-node-canary
750
762
- run-tests :
751
763
title : " node (canary)"
@@ -760,7 +772,8 @@ jobs:
760
772
core0.test_async_ccall_promise_exit_runtime_jspi
761
773
core0.test_cubescript_jspi"
762
774
# Run some basic tests with the minimum version of node that we currently
763
- # support.
775
+ # support in the generated code.
776
+ # Keep this in sync with `OLDEST_SUPPORTED_NODE` in `feature_matrix.py`
764
777
- install-node-version :
765
778
node_version : " 10.19.0"
766
779
- run-tests :
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ See docs/process.md for more on how version tagging works.
20
20
21
21
4.0.1 (in development)
22
22
----------------------
23
+ - The minimum version of node required to run emscripten was bumped from v16.20
24
+ to v18. Version 4.0 was mistakenly shipped with a change that required v20,
25
+ but that was revered. (#23410 )
23
26
24
27
4.0.0 - 01/14/25
25
28
----------------
Original file line number Diff line number Diff line change 7
7
// General JS utilities - things that might be useful in any JS project.
8
8
// Nothing specific to Emscripten appears here.
9
9
10
+ import * as url from 'node:url' ;
10
11
import * as path from 'node:path' ;
11
12
import * as fs from 'node:fs' ;
12
13
import * as vm from 'node:vm' ;
@@ -230,8 +231,11 @@ export function read(filename) {
230
231
return fs . readFileSync ( absolute , 'utf8' ) ;
231
232
}
232
233
234
+ // Use import.meta.dirname here once we drop support for node v18.
235
+ const __dirname = url . fileURLToPath ( new URL ( '.' , import . meta. url ) ) ;
236
+
233
237
function find ( filename ) {
234
- for ( const prefix of [ process . cwd ( ) , import . meta . dirname ] ) {
238
+ for ( const prefix of [ process . cwd ( ) , __dirname ] ) {
235
239
const combined = path . join ( prefix , filename ) ;
236
240
if ( fs . existsSync ( combined ) ) {
237
241
return combined ;
Original file line number Diff line number Diff line change @@ -286,8 +286,9 @@ def test_node(self):
286
286
for version , succeed in (('v0.8.0' , False ),
287
287
('v4.1.0' , False ),
288
288
('v10.18.0' , False ),
289
- ('v16.20.0' , True ),
290
- ('v16.20.1-pre' , True ),
289
+ ('v16.20.0' , False ),
290
+ ('v18.0.0' , True ),
291
+ ('v18.0.1-pre' , True ),
291
292
('cheez' , False )):
292
293
print (version , succeed )
293
294
delete_file (SANITY_FILE )
Original file line number Diff line number Diff line change 57
57
# Minimum node version required to run the emscripten compiler. This is
58
58
# distinct from the minimum version required to execute the generated code
59
59
# (settings.MIN_NODE_VERSION).
60
- # This version currently matches the node version that we ship with emsdk
61
- # which means that we can say for sure that this version is well supported .
62
- MINIMUM_NODE_VERSION = (16 , 20 , 0 )
60
+ # This is currently set to v18 since this is the version of node available
61
+ # in debian/stable (bookworm) .
62
+ MINIMUM_NODE_VERSION = (18 , 0 , 0 )
63
63
EXPECTED_LLVM_VERSION = 20
64
64
65
65
# These get set by setup_temp_dirs
You can’t perform that action at this time.
0 commit comments