install-node: Upgrade Node.js from 20.18.0 to 22.11.0.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-11-05 12:20:11 -08:00 committed by Tim Abbott
parent 75c143a05e
commit 0bd9f4f674
3 changed files with 10 additions and 7 deletions

View File

@ -1,18 +1,18 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
version=20.18.0 version=22.11.0
arch="$(uname -m)" arch="$(uname -m)"
case $arch in case $arch in
x86_64) x86_64)
tarball="node-v$version-linux-x64.tar.xz" tarball="node-v$version-linux-x64.tar.xz"
sha256=4543670b589593f8fa5f106111fd5139081da42bb165a9239f05195e405f240a sha256=83bf07dd343002a26211cf1fcd46a9d9534219aad42ee02847816940bf610a72
;; ;;
aarch64) aarch64)
tarball="node-v$version-linux-arm64.tar.xz" tarball="node-v$version-linux-arm64.tar.xz"
sha256=a9ce85675ba33f00527f6234d90000946c0936fb4fca605f1891bb5f4fe6fb0a sha256=6031d04b98f59ff0f7cb98566f65b115ecd893d3b7870821171708cdbaf7ae6e
;; ;;
esac esac

View File

@ -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 # historical commits sharing the same major version, in which case a
# minor version bump suffices. # 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

View File

@ -25,9 +25,12 @@ global.DOMParser = dom.window.DOMParser;
global.HTMLAnchorElement = dom.window.HTMLAnchorElement; global.HTMLAnchorElement = dom.window.HTMLAnchorElement;
global.HTMLElement = dom.window.HTMLElement; global.HTMLElement = dom.window.HTMLElement;
global.Window = dom.window.Window; global.Window = dom.window.Window;
global.navigator = { Object.defineProperty(global, "navigator", {
value: {
userAgent: "node.js", userAgent: "node.js",
}; },
writable: true,
});
require("@babel/register")({ require("@babel/register")({
extensions: [".es6", ".es", ".jsx", ".js", ".mjs", ".ts"], extensions: [".es6", ".es", ".jsx", ".js", ".mjs", ".ts"],