From 8543624bcc833f580c3f43fab73996dbb39b48fc Mon Sep 17 00:00:00 2001 From: Bheesham Persaud Date: Mon, 21 Oct 2024 17:05:32 -0400 Subject: [PATCH] ci Keep js deps up-to-date (npm ci) tox will re-install deps if our `deps` change, but not if `package.json` changes (or, say, the version of Node/npm). --- ci/node-install.sh | 5 +++-- tox.ini | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ci/node-install.sh b/ci/node-install.sh index dd1a6a92..8f5c0530 100755 --- a/ci/node-install.sh +++ b/ci/node-install.sh @@ -3,9 +3,10 @@ set -eu if [ -f "$TOX_ENV_DIR/bin/node" ]; then echo Node and friends already installed. + npm ci exit 0 fi -nodeenv --prebuilt -p --node 18.20.4 "$TOX_ENV_DIR" -npm install -g npm@latest +nodeenv --prebuilt -p --node "$NODE_VERSION" "$TOX_ENV_DIR" +npm install -g "npm@$NPM_VERSION" npm ci diff --git a/tox.ini b/tox.ini index 6d19c72a..27304486 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,9 @@ skip_missing_interpreters = false description = base environment package = wheel wheel_build_env = .pkg +set_env = + NODE_VERSION=18.20.4 + NPM_VERSION=10.9.0 deps = pytest: -r requirements.txt eslint,stylelint: nodeenv