Skip to content

Commit db77efe

Browse files
committed
Bump minimum supported node version 10.19.0 -> 12.22.9
This is the minimum version that we support for running the generated code. The version is old enough to cover both Ubuntu LTS (22.04) (Jammy) and Debian/stable (bookworm).
1 parent 3c1f975 commit db77efe

File tree

7 files changed

+19
-23
lines changed

7 files changed

+19
-23
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -835,10 +835,10 @@ jobs:
835835
# support in the generated code.
836836
# Keep this in sync with `OLDEST_SUPPORTED_NODE` in `feature_matrix.py`
837837
- install-node-version:
838-
node_version: "10.19.0"
838+
node_version: "12.22.9"
839839
- run-tests:
840-
title: "node (oldest / 10.19.0)"
841-
extra-cflags: "-sMIN_NODE_VERSION=101900"
840+
title: "node (oldest / 12.22.9)"
841+
extra-cflags: "-sMIN_NODE_VERSION=122209"
842842
# We include most but not all of the nodefs and node rawfs tests here.
843843
# test_fs_nodefs_rw, test_fs_nodefs_statvfs, and test_unistd_io_nodefs_bigint fail.
844844
test_targets: "

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ See docs/process.md for more on how version tagging works.
2020

2121
4.0.12 (in development)
2222
-----------------------
23+
- The oldest supported node version was bumped from 10.19.0 to 12.22.9. Ths
24+
means the smallest value that can now be passed to `-sMIN_NODE_VERSION` is
25+
`122209`.
2326
- In `-sMODULARIZE` mode the factory function will now always return a promise,
2427
even when `WASM_ASYNC_COMPILATION` is disabled. This is because emscripten
2528
has other features that might also return async module creation (e.g. loading

site/source/docs/tools_reference/settings_reference.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2908,9 +2908,9 @@ MIN_NODE_VERSION
29082908

29092909
Specifies minimum node version to target for the generated code. This is
29102910
distinct from the minimum version required run the emscripten compiler.
2911-
This version aligns with the current Ubuuntu TLS 20.04 (Focal).
2911+
This version aligns with the current Ubuuntu TLS 22.04 (Jammy).
29122912
Version is encoded in MMmmVV, e.g. 181401 denotes Node 18.14.01.
2913-
Minimum supported value is 101900, which was released 2020-02-05 (see
2913+
Minimum supported value is 122209, which was released 2022-01-11 (see
29142914
feature_matrix.py).
29152915

29162916
Default value: 160000

src/settings.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,9 +1903,9 @@ var MIN_CHROME_VERSION = 85;
19031903

19041904
// Specifies minimum node version to target for the generated code. This is
19051905
// distinct from the minimum version required run the emscripten compiler.
1906-
// This version aligns with the current Ubuuntu TLS 20.04 (Focal).
1906+
// This version aligns with the current Ubuuntu TLS 22.04 (Jammy).
19071907
// Version is encoded in MMmmVV, e.g. 181401 denotes Node 18.14.01.
1908-
// Minimum supported value is 101900, which was released 2020-02-05 (see
1908+
// Minimum supported value is 122209, which was released 2022-01-11 (see
19091909
// feature_matrix.py).
19101910
var MIN_NODE_VERSION = 160000;
19111911

test/common.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from tools.shared import get_canonical_temp_dir, path_from_root
4040
from tools.utils import MACOS, WINDOWS, read_file, read_binary, write_binary, exit_with_error
4141
from tools.settings import COMPILE_TIME_SETTINGS
42-
from tools import shared, feature_matrix, building, config, utils
42+
from tools import shared, building, config, utils
4343

4444
logger = logging.getLogger('common')
4545

@@ -1204,16 +1204,15 @@ def setUp(self):
12041204
nodejs = self.get_nodejs()
12051205
if nodejs:
12061206
node_version = shared.get_node_version(nodejs)
1207-
if node_version < (11, 0, 0):
1207+
if node_version < (15, 0, 0):
1208+
# The default behaviour changes in v15:
1209+
# https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode
12081210
self.node_args.append('--unhandled-rejections=strict')
1211+
if node_version < (11, 0, 0):
12091212
self.node_args.append('--experimental-wasm-se')
12101213
else:
12111214
# Include backtrace for all uncuaght exceptions (not just Error).
12121215
self.node_args.append('--trace-uncaught')
1213-
if node_version < (15, 0, 0):
1214-
# Opt in to node v15 default behaviour:
1215-
# https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode
1216-
self.node_args.append('--unhandled-rejections=throw')
12171216
self.node_args += shared.node_bigint_flags(nodejs)
12181217

12191218
# If the version we are running tests in is lower than the version that
@@ -1228,11 +1227,6 @@ def setUp(self):
12281227
self.cflags += building.get_emcc_node_flags(node_version)
12291228
self.cflags.append('-Wno-transpile')
12301229

1231-
# This allows much of the test suite to be run on older versions of node that don't
1232-
# support wasm bigint integration
1233-
if node_version[0] < feature_matrix.min_browser_versions[feature_matrix.Feature.JS_BIGINT_INTEGRATION]['node'] / 10000:
1234-
self.cflags.append('-sWASM_BIGINT=0')
1235-
12361230
self.v8_args = ['--wasm-staging']
12371231
self.env = {}
12381232
self.temp_files_before_run = []

tools/feature_matrix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
OLDEST_SUPPORTED_CHROME = 55 # December 1, 2016
2222
OLDEST_SUPPORTED_FIREFOX = 50 # November 15, 2016
2323
OLDEST_SUPPORTED_SAFARI = 101000 # September 20, 2016
24-
# 10.19.0 is the oldest version of node that we do any testing with.
24+
# 12.22.9 is the oldest version of node that we do any testing with.
2525
# Keep this in sync with the test-node-compat in .circleci/config.yml.
26-
OLDEST_SUPPORTED_NODE = 101900
26+
OLDEST_SUPPORTED_NODE = 122209 # Janurary 11, 2022
2727

2828

2929
class Feature(IntEnum):

tools/shared.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,8 @@ def check_node_version():
346346

347347
def node_bigint_flags(nodejs):
348348
node_version = get_node_version(nodejs)
349-
# The --experimental-wasm-bigint flag was added in v12, and then removed (enabled by default)
350-
# in v16.
351-
if node_version and node_version < (16, 0, 0) and node_version >= (12, 0, 0):
349+
# The --experimental-wasm-bigint was removed (enabled by default) in v16.
350+
if node_version and node_version < (16, 0, 0):
352351
return ['--experimental-wasm-bigint']
353352
else:
354353
return []

0 commit comments

Comments
 (0)