Skip to content

Commit 0b3b234

Browse files
committed
Update minimum supported node version
This change updates the minimum support node version for the generated code and the for running the compiler to 18.20.4. For the generated code this is a change from v12.22.9. For the compiler this is a change from v18.3. This new minimum is supported by both debian/stable and debian/oldstable as well as the current Ubuntu 24.04 LTS (Noble Numbat).
1 parent 57df161 commit 0b3b234

18 files changed

+42
-150
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ commands:
106106
cat ~/emsdk/.emscripten
107107
echo "export PATH=\"$HOME/node-v${version}-linux-x64/bin:\$PATH\"" >> $BASH_ENV
108108
install-node-oldest:
109-
description: "install node 12.22.9 (oldest)"
109+
description: "install node 18.19.1 (oldest)"
110110
steps:
111111
- install-node-version:
112112
# Keep this in sync with `OLDEST_SUPPORTED_NODE` in `feature_matrix.py`
113-
node_version: "12.22.9"
113+
node_version: "18.19.1"
114114
install-node-lts:
115115
description: "install node 22.21.0 (current LTS)"
116116
steps:
@@ -962,16 +962,16 @@ jobs:
962962
# version.
963963
# Keep this in sync with MINIMUM_NODE_VERSION in tools/shared.py.
964964
- install-node-version:
965-
node_version: "18.3.0"
965+
node_version: "18.19.1"
966966
- run:
967-
name: configure compiler to use 18.3.0
967+
name: configure compiler to use 18.19.1
968968
command: echo "NODE_JS = '$(which node)'" >> ~/emsdk/.emscripten
969969
# Run some basic tests with the minimum version of node that we currently
970970
# support in the generated code.
971971
- install-node-oldest
972972
- run-tests:
973-
title: "node (oldest / 12.22.9)"
974-
extra-cflags: "-sMIN_NODE_VERSION=122209"
973+
title: "node (oldest / 18.19.1)"
974+
extra-cflags: "-sMIN_NODE_VERSION=181901"
975975
# We include most but not all of the nodefs and node rawfs tests here.
976976
# test_fs_nodefs_rw, test_fs_nodefs_statvfs, and test_unistd_io_nodefs_bigint fail.
977977
test_targets: "

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ See docs/process.md for more on how version tagging works.
2929
- SDL3 port updated from 3.2.30 to 3.4.2 (#26572)
3030
- Fixed a race condition in syscall proxying that caused some hangs and ASan
3131
errors (#26582)
32+
- The minimum supported version of node (both for the running the generated
33+
code and for running the compiler) was bumped to v18.19.1. (#26604)
3234

3335
5.0.4 - 03/23/26
3436
----------------

site/source/docs/tools_reference/settings_reference.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,10 +2919,10 @@ MIN_NODE_VERSION
29192919
Specifies minimum node version to target for the generated code. This is
29202920
distinct from the minimum version required to run the emscripten compiler.
29212921
Version is encoded in MMmmVV, e.g. 181401 denotes Node 18.14.01.
2922-
Minimum supported value is 122209, which was released 2022-01-11 (see
2923-
feature_matrix.py). This version aligns with the Ubuntu TLS 22.04 (Jammy).
2922+
Minimum supported value is 189101, which was released 2024-02-14 (see
2923+
feature_matrix.py). This version aligns with the Ubuntu TLS 24.04 (Noble).
29242924

2925-
Default value: 160000
2925+
Default value: 181901
29262926

29272927
.. _minimal_runtime:
29282928

src/babel-plugins/strip-node-prefix.mjs

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/runtime_common.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,6 @@ function updateMemoryViews() {
136136
#endif
137137
}
138138

139-
#if ENVIRONMENT_MAY_BE_NODE && MIN_NODE_VERSION < 160000
140-
// The performance global was added to node in v16.0.0:
141-
// https://nodejs.org/api/globals.html#performance
142-
if (ENVIRONMENT_IS_NODE) {
143-
// This is needed for emscripten_get_now and for pthreads support which
144-
// depends on it for accurate timing.
145-
// Use `global` rather than `globalThis` here since older versions of node
146-
// don't have `globalThis`.
147-
global.performance ??= require('perf_hooks').performance;
148-
}
149-
#endif
150-
151139
#if IMPORTED_MEMORY
152140
// In non-standalone/normal mode, we create the memory here.
153141
#include "runtime_init_memory.js"

src/settings.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,9 +1920,9 @@ var MIN_CHROME_VERSION = 85;
19201920
// Specifies minimum node version to target for the generated code. This is
19211921
// distinct from the minimum version required to run the emscripten compiler.
19221922
// Version is encoded in MMmmVV, e.g. 181401 denotes Node 18.14.01.
1923-
// Minimum supported value is 122209, which was released 2022-01-11 (see
1924-
// feature_matrix.py). This version aligns with the Ubuntu TLS 22.04 (Jammy).
1925-
var MIN_NODE_VERSION = 160000;
1923+
// Minimum supported value is 189101, which was released 2024-02-14 (see
1924+
// feature_matrix.py). This version aligns with the Ubuntu TLS 24.04 (Noble).
1925+
var MIN_NODE_VERSION = 181901;
19261926

19271927
// If true, uses minimal sized runtime without POSIX features, Module,
19281928
// preRun/preInit/etc., Emscripten built-in XHR loading or library_browser.js.

test/codesize/test_codesize_hello_O0.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"a.out.js": 24261,
3-
"a.out.js.gz": 8714,
2+
"a.out.js": 24262,
3+
"a.out.js.gz": 8723,
44
"a.out.nodebug.wasm": 14850,
55
"a.out.nodebug.wasm.gz": 7311,
6-
"total": 39111,
7-
"total_gz": 16025,
6+
"total": 39112,
7+
"total_gz": 16034,
88
"sent": [
99
"fd_write"
1010
],

test/codesize/test_codesize_minimal_O0.expected.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
// Note: We use a typeof check here instead of optional chaining using
2020
// globalThis because older browsers might not have globalThis defined.
2121
var currentNodeVersion = typeof process !== 'undefined' && process.versions?.node ? humanReadableVersionToPacked(process.versions.node) : TARGET_NOT_SUPPORTED;
22-
if (currentNodeVersion < 160000) {
23-
throw new Error(`This emscripten-generated code requires node v${ packedVersionToHumanReadable(160000) } (detected v${packedVersionToHumanReadable(currentNodeVersion)})`);
22+
if (currentNodeVersion < 181901) {
23+
throw new Error(`This emscripten-generated code requires node v${ packedVersionToHumanReadable(181901) } (detected v${packedVersionToHumanReadable(currentNodeVersion)})`);
2424
}
2525

2626
var userAgent = typeof navigator !== 'undefined' && navigator.userAgent;

test/codesize/test_codesize_minimal_O0.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"a.out.js": 19452,
3-
"a.out.js.gz": 6998,
2+
"a.out.js": 19453,
3+
"a.out.js.gz": 7007,
44
"a.out.nodebug.wasm": 1015,
55
"a.out.nodebug.wasm.gz": 602,
6-
"total": 20467,
7-
"total_gz": 7600,
6+
"total": 20468,
7+
"total_gz": 7609,
88
"sent": [],
99
"imports": [],
1010
"exports": [
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"hello_world.js": 57078,
3-
"hello_world.js.gz": 17753,
3+
"hello_world.js.gz": 17757,
44
"hello_world.wasm": 14850,
55
"hello_world.wasm.gz": 7311,
66
"no_asserts.js": 26654,
77
"no_asserts.js.gz": 8901,
88
"no_asserts.wasm": 12010,
99
"no_asserts.wasm.gz": 5880,
1010
"strict.js": 54896,
11-
"strict.js.gz": 17061,
11+
"strict.js.gz": 17065,
1212
"strict.wasm": 14850,
1313
"strict.wasm.gz": 7311,
1414
"total": 180338,
15-
"total_gz": 64217
15+
"total_gz": 64225
1616
}

0 commit comments

Comments
 (0)