diff --git a/.circleci/config.yml b/.circleci/config.yml index 8f2790beeec7f..6c7fd06480720 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -835,10 +835,10 @@ jobs: # support in the generated code. # Keep this in sync with `OLDEST_SUPPORTED_NODE` in `feature_matrix.py` - install-node-version: - node_version: "10.19.0" + node_version: "12.22.9" - run-tests: - title: "node (oldest / 10.19.0)" - extra-cflags: "-sMIN_NODE_VERSION=101900" + title: "node (oldest / 12.22.9)" + extra-cflags: "-sMIN_NODE_VERSION=122209" # We include most but not all of the nodefs and node rawfs tests here. # test_fs_nodefs_rw, test_fs_nodefs_statvfs, and test_unistd_io_nodefs_bigint fail. test_targets: " diff --git a/ChangeLog.md b/ChangeLog.md index c521c50f09df7..87da88da48561 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -20,6 +20,9 @@ See docs/process.md for more on how version tagging works. 4.0.12 (in development) ----------------------- +- The oldest supported node version was bumped from 10.19.0 to 12.22.9. Ths + means the smallest value that can now be passed to `-sMIN_NODE_VERSION` is + `122209`. - In `-sMODULARIZE` mode the factory function will now always return a promise, even when `WASM_ASYNC_COMPILATION` is disabled. This is because emscripten has other features that might also return async module creation (e.g. loading diff --git a/site/source/docs/tools_reference/settings_reference.rst b/site/source/docs/tools_reference/settings_reference.rst index 4597d3c8c67b0..deda5e1f20ebf 100644 --- a/site/source/docs/tools_reference/settings_reference.rst +++ b/site/source/docs/tools_reference/settings_reference.rst @@ -2908,9 +2908,9 @@ MIN_NODE_VERSION Specifies minimum node version to target for the generated code. This is distinct from the minimum version required run the emscripten compiler. -This version aligns with the current Ubuuntu TLS 20.04 (Focal). +This version aligns with the current Ubuuntu TLS 22.04 (Jammy). Version is encoded in MMmmVV, e.g. 181401 denotes Node 18.14.01. -Minimum supported value is 101900, which was released 2020-02-05 (see +Minimum supported value is 122209, which was released 2022-01-11 (see feature_matrix.py). Default value: 160000 diff --git a/src/settings.js b/src/settings.js index 4ebb276ea88f3..76b07ddae3799 100644 --- a/src/settings.js +++ b/src/settings.js @@ -1903,9 +1903,9 @@ var MIN_CHROME_VERSION = 85; // Specifies minimum node version to target for the generated code. This is // distinct from the minimum version required run the emscripten compiler. -// This version aligns with the current Ubuuntu TLS 20.04 (Focal). +// This version aligns with the current Ubuuntu TLS 22.04 (Jammy). // Version is encoded in MMmmVV, e.g. 181401 denotes Node 18.14.01. -// Minimum supported value is 101900, which was released 2020-02-05 (see +// Minimum supported value is 122209, which was released 2022-01-11 (see // feature_matrix.py). var MIN_NODE_VERSION = 160000; diff --git a/test/common.py b/test/common.py index 3ddec71c7200a..cb605167c6e15 100644 --- a/test/common.py +++ b/test/common.py @@ -39,7 +39,7 @@ from tools.shared import get_canonical_temp_dir, path_from_root from tools.utils import MACOS, WINDOWS, read_file, read_binary, write_binary, exit_with_error from tools.settings import COMPILE_TIME_SETTINGS -from tools import shared, feature_matrix, building, config, utils +from tools import shared, building, config, utils logger = logging.getLogger('common') @@ -1204,16 +1204,15 @@ def setUp(self): nodejs = self.get_nodejs() if nodejs: node_version = shared.get_node_version(nodejs) - if node_version < (11, 0, 0): + if node_version < (15, 0, 0): + # The default behaviour changes in v15: + # https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode self.node_args.append('--unhandled-rejections=strict') + if node_version < (11, 0, 0): self.node_args.append('--experimental-wasm-se') else: # Include backtrace for all uncuaght exceptions (not just Error). self.node_args.append('--trace-uncaught') - if node_version < (15, 0, 0): - # Opt in to node v15 default behaviour: - # https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode - self.node_args.append('--unhandled-rejections=throw') self.node_args += shared.node_bigint_flags(nodejs) # If the version we are running tests in is lower than the version that @@ -1228,11 +1227,6 @@ def setUp(self): self.cflags += building.get_emcc_node_flags(node_version) self.cflags.append('-Wno-transpile') - # This allows much of the test suite to be run on older versions of node that don't - # support wasm bigint integration - if node_version[0] < feature_matrix.min_browser_versions[feature_matrix.Feature.JS_BIGINT_INTEGRATION]['node'] / 10000: - self.cflags.append('-sWASM_BIGINT=0') - self.v8_args = ['--wasm-staging'] self.env = {} self.temp_files_before_run = [] diff --git a/tools/feature_matrix.py b/tools/feature_matrix.py index dfd3dbb295c11..d7f94506a977b 100644 --- a/tools/feature_matrix.py +++ b/tools/feature_matrix.py @@ -21,9 +21,9 @@ OLDEST_SUPPORTED_CHROME = 55 # December 1, 2016 OLDEST_SUPPORTED_FIREFOX = 50 # November 15, 2016 OLDEST_SUPPORTED_SAFARI = 101000 # September 20, 2016 -# 10.19.0 is the oldest version of node that we do any testing with. +# 12.22.9 is the oldest version of node that we do any testing with. # Keep this in sync with the test-node-compat in .circleci/config.yml. -OLDEST_SUPPORTED_NODE = 101900 +OLDEST_SUPPORTED_NODE = 122209 # Janurary 11, 2022 class Feature(IntEnum): diff --git a/tools/shared.py b/tools/shared.py index 631ac84d2e077..d4f48757437f9 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -346,9 +346,8 @@ def check_node_version(): def node_bigint_flags(nodejs): node_version = get_node_version(nodejs) - # The --experimental-wasm-bigint flag was added in v12, and then removed (enabled by default) - # in v16. - if node_version and node_version < (16, 0, 0) and node_version >= (12, 0, 0): + # The --experimental-wasm-bigint was removed (enabled by default) in v16. + if node_version and node_version < (16, 0, 0): return ['--experimental-wasm-bigint'] else: return []