From 0bd9f4f67419ed33f60b974b6e3e7e8b84e510ac Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 5 Nov 2024 12:20:11 -0800 Subject: [PATCH] install-node: Upgrade Node.js from 20.18.0 to 22.11.0. Signed-off-by: Anders Kaseorg --- scripts/lib/install-node | 6 +++--- version.py | 2 +- web/tests/lib/index.js | 9 ++++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/lib/install-node b/scripts/lib/install-node index 8c8b824013..ac746e7882 100755 --- a/scripts/lib/install-node +++ b/scripts/lib/install-node @@ -1,18 +1,18 @@ #!/usr/bin/env bash set -euo pipefail -version=20.18.0 +version=22.11.0 arch="$(uname -m)" case $arch in x86_64) tarball="node-v$version-linux-x64.tar.xz" - sha256=4543670b589593f8fa5f106111fd5139081da42bb165a9239f05195e405f240a + sha256=83bf07dd343002a26211cf1fcd46a9d9534219aad42ee02847816940bf610a72 ;; aarch64) tarball="node-v$version-linux-arm64.tar.xz" - sha256=a9ce85675ba33f00527f6234d90000946c0936fb4fca605f1891bb5f4fe6fb0a + sha256=6031d04b98f59ff0f7cb98566f65b115ecd893d3b7870821171708cdbaf7ae6e ;; esac diff --git a/version.py b/version.py index 185898b379..297c369b02 100644 --- a/version.py +++ b/version.py @@ -49,4 +49,4 @@ API_FEATURE_LEVEL = 319 # Last bumped for message-link class # historical commits sharing the same major version, in which case a # minor version bump suffices. -PROVISION_VERSION = (296, 0) # bumped 2024-10-31 to upgrade Python requirements +PROVISION_VERSION = (297, 0) # bumped 2024-11-05 to upgrade Node.js diff --git a/web/tests/lib/index.js b/web/tests/lib/index.js index 94896a22f3..5a85014eac 100644 --- a/web/tests/lib/index.js +++ b/web/tests/lib/index.js @@ -25,9 +25,12 @@ global.DOMParser = dom.window.DOMParser; global.HTMLAnchorElement = dom.window.HTMLAnchorElement; global.HTMLElement = dom.window.HTMLElement; global.Window = dom.window.Window; -global.navigator = { - userAgent: "node.js", -}; +Object.defineProperty(global, "navigator", { + value: { + userAgent: "node.js", + }, + writable: true, +}); require("@babel/register")({ extensions: [".es6", ".es", ".jsx", ".js", ".mjs", ".ts"],