Skip to content

Raise minimum Node version to 20 and install Node 24 in setup scripts#7957

Merged
achamayou merged 9 commits into
mainfrom
copilot/update-node-version-to-20
Jun 22, 2026
Merged

Raise minimum Node version to 20 and install Node 24 in setup scripts#7957
achamayou merged 9 commits into
mainfrom
copilot/update-node-version-to-20

Conversation

Copilot AI commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Bumps the declared minimum Node engine for the test packages and switches the dependency setup scripts to install Node.js 24 instead of relying on the distro npm package (Node 20 on Azure Linux 3.0).

Packages

  • tests/npm-app and tests/js-interpreter-reuse: engines.node >=14>=20.

Setup scripts

  • scripts/setup-ci.sh and scripts/setup-dev.sh: new install_node() downloads node-v24.17.0-linux-x64.tar.gz from nodejs.org, verifies its SHA256, extracts to /opt/node, and symlinks node/npm/npx into /usr/local/bin.
  • Dropped the npm tdnf package from both scripts so the pinned Node 24 is the only one on PATH.
NODE_VERSION="v24.17.0"
NODE_SHA256="e0472427aa791ad80bdc426ff7cc73cdd28ed0f616d1ff9689a23a7f47f1265f"

install_node() {
    local archive="node-${NODE_VERSION}-linux-x64.tar.gz"
    curl -L --output "$archive" "https://nodejs.org/dist/${NODE_VERSION}/${archive}" || return 1
    echo "${NODE_SHA256}  ${archive}" | sha256sum --check --status || return 1
    rm -rf /opt/node && mkdir -p /opt/node &&
    tar -xzf "$archive" -C /opt/node --strip-components=1 &&
    ln -sf /opt/node/bin/{node,npm,npx} /usr/local/bin/
}

Notes

  • js/ccf-app has no engines constraint and is left unchanged; the published @microsoft/ccf-app package is unaffected.
  • Node version and checksum are pinned together; bumping the version requires updating NODE_SHA256 from the matching SHASUMS256.txt.

Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copilot AI requested a review from achamayou June 19, 2026 11:19
@achamayou achamayou marked this pull request as ready for review June 19, 2026 16:11
@achamayou achamayou requested a review from a team as a code owner June 19, 2026 16:11
Copilot AI review requested due to automatic review settings June 19, 2026 16:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the JavaScript test packages to require a newer Node.js baseline and makes the CI/dev setup scripts install a pinned Node.js release directly (rather than relying on the distro npm package), aligning the runtime used in CI/dev with the new minimum.

Changes:

  • Raise engines.node in tests/npm-app and tests/js-interpreter-reuse from >=14 to >=20.
  • Add Node.js install logic to scripts/setup-ci.sh and scripts/setup-dev.sh which downloads a pinned Node v24 tarball, verifies SHA256, installs to /opt/node, and symlinks into /usr/local/bin.
  • Remove npm from the dependency install lists in both setup scripts.

Custom instructions used:

  • .github/copilot-instructions.md
  • .github/instructions/reviewing.instructions.md

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
tests/npm-app/package.json Bumps Node engine requirement for the npm-app test bundle.
tests/js-interpreter-reuse/package.json Bumps Node engine requirement for the interpreter reuse test package.
scripts/setup-dev.sh Installs a pinned Node.js version (v24) from nodejs.org and removes reliance on distro npm.
scripts/setup-ci.sh Installs a pinned Node.js version (v24) during CI dependency setup and removes distro npm.

Comment thread scripts/setup-dev.sh
Comment thread scripts/setup-dev.sh Outdated
Comment thread scripts/setup-ci.sh Outdated
achamayou and others added 2 commits June 19, 2026 17:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Comment thread tests/js-interpreter-reuse/package.json
Comment thread tests/npm-app/package.json
@achamayou achamayou enabled auto-merge (squash) June 22, 2026 13:12
@achamayou achamayou merged commit 6e12cc4 into main Jun 22, 2026
19 checks passed
@achamayou achamayou deleted the copilot/update-node-version-to-20 branch June 22, 2026 14:17
Comment thread scripts/setup-dev.sh
tdnf -y install \
clang-tools-extra \
python-pip \
curl \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is curl for? Don't see it used in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants