From 4355d9e4c3a0f7bb6b694aad4cf318145905da2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9l=C3=A8ne=20Martin?= Date: Mon, 9 Dec 2024 16:48:32 -0800 Subject: [PATCH] Use node 22, now in maintenance LTS (#1337) --- .circleci/config.yml | 2 +- .github/workflows/oidc-e2e.yml | 4 ++-- .github/workflows/oidc-integration.yml | 4 ++-- .github/workflows/s3-e2e.yml | 4 ++-- .github/workflows/soak-test.yml | 4 ++-- .github/workflows/standard-e2e.yml | 4 ++-- .github/workflows/standard-suite.yml | 4 ++-- Makefile | 10 +++++----- package-lock.json | 2 +- package.json | 4 ++-- test/e2e/oidc/run-tests.sh | 2 +- test/e2e/s3/run-tests.sh | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e0569516..315011290 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 jobs: build: docker: - - image: cimg/node:20.17.0 + - image: cimg/node:22.12.0 - image: cimg/postgres:14.10 environment: POSTGRES_PASSWORD: odktest diff --git a/.github/workflows/oidc-e2e.yml b/.github/workflows/oidc-e2e.yml index e4093862b..b152a6e7e 100644 --- a/.github/workflows/oidc-e2e.yml +++ b/.github/workflows/oidc-e2e.yml @@ -27,10 +27,10 @@ jobs: --health-retries 5 steps: - uses: actions/checkout@v4 - - name: Use Node.js 20 + - name: Set node version uses: actions/setup-node@v4 with: - node-version: 20.17.0 + node-version: 22.12.0 cache: 'npm' - run: make test-oidc-e2e - name: Archive playwright screenshots diff --git a/.github/workflows/oidc-integration.yml b/.github/workflows/oidc-integration.yml index 3c9248b8d..c7d77de91 100644 --- a/.github/workflows/oidc-integration.yml +++ b/.github/workflows/oidc-integration.yml @@ -23,10 +23,10 @@ jobs: --health-retries 5 steps: - uses: actions/checkout@v4 - - name: Use Node.js 20 + - name: Set node version uses: actions/setup-node@v4 with: - node-version: 20.17.0 + node-version: 22.12.0 cache: 'npm' - run: npm ci - run: FAKE_OIDC_ROOT_URL=http://localhost:9898 make fake-oidc-server-ci > fake-oidc-server.log & diff --git a/.github/workflows/s3-e2e.yml b/.github/workflows/s3-e2e.yml index 278b6209f..87e01960a 100644 --- a/.github/workflows/s3-e2e.yml +++ b/.github/workflows/s3-e2e.yml @@ -41,10 +41,10 @@ jobs: --health-retries 5 steps: - uses: actions/checkout@v4 - - name: Use Node.js 20 + - name: Set node version uses: actions/setup-node@v4 with: - node-version: 20.17.0 + node-version: 22.12.0 cache: 'npm' - run: npm ci - run: node lib/bin/create-docker-databases.js diff --git a/.github/workflows/soak-test.yml b/.github/workflows/soak-test.yml index 240b892f5..58f3c217b 100644 --- a/.github/workflows/soak-test.yml +++ b/.github/workflows/soak-test.yml @@ -25,10 +25,10 @@ jobs: --health-retries 5 steps: - uses: actions/checkout@v4 - - name: Use Node.js 20 + - name: Set node version uses: actions/setup-node@v4 with: - node-version: 20.17.0 + node-version: 22.12.0 cache: 'npm' - run: npm ci - run: node lib/bin/create-docker-databases.js diff --git a/.github/workflows/standard-e2e.yml b/.github/workflows/standard-e2e.yml index a88832a57..aa7ea06b2 100644 --- a/.github/workflows/standard-e2e.yml +++ b/.github/workflows/standard-e2e.yml @@ -26,10 +26,10 @@ jobs: --health-retries 5 steps: - uses: actions/checkout@v4 - - name: Use Node.js 20 + - name: Set node version uses: actions/setup-node@v4 with: - node-version: 20.10.0 + node-version: 22.12.0 cache: 'npm' - run: npm ci - run: node lib/bin/create-docker-databases.js diff --git a/.github/workflows/standard-suite.yml b/.github/workflows/standard-suite.yml index 005164fda..d820f801b 100644 --- a/.github/workflows/standard-suite.yml +++ b/.github/workflows/standard-suite.yml @@ -23,10 +23,10 @@ jobs: --health-retries 5 steps: - uses: actions/checkout@v4 - - name: Use Node.js 20 + - name: Set node version uses: actions/setup-node@v4 with: - node-version: 20.17.0 + node-version: 22.12.0 cache: 'npm' - run: npm ci - run: node lib/bin/create-docker-databases.js diff --git a/Makefile b/Makefile index e604ccc7a..5265fad4b 100644 --- a/Makefile +++ b/Makefile @@ -101,19 +101,19 @@ debug: base .PHONY: test test: lint - BCRYPT=insecure npx mocha --recursive + BCRYPT=insecure npx --node-options="--no-deprecation" mocha --recursive .PHONY: test-ci test-ci: lint - BCRYPT=insecure npx mocha --recursive --reporter test/ci-mocha-reporter.js + BCRYPT=insecure npx --node-options="--no-deprecation" mocha --recursive --reporter test/ci-mocha-reporter.js .PHONY: test-fast test-fast: node_version - BCRYPT=insecure npx mocha --recursive --fgrep @slow --invert + BCRYPT=insecure npx --node-options="--no-deprecation" mocha --recursive --fgrep @slow --invert .PHONY: test-integration test-integration: node_version - BCRYPT=insecure npx mocha --recursive test/integration + BCRYPT=insecure npx --node-options="--no-deprecation" mocha --recursive test/integration .PHONY: test-unit test-unit: node_version @@ -121,7 +121,7 @@ test-unit: node_version .PHONY: test-coverage test-coverage: node_version - npx nyc -x "**/migrations/**" --reporter=lcov node_modules/.bin/_mocha --recursive test + npx --node-options="--no-deprecation" nyc -x "**/migrations/**" --reporter=lcov node_modules/.bin/_mocha --recursive test .PHONY: lint lint: node_version diff --git a/package-lock.json b/package-lock.json index 8c12761b8..c333000f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,7 +70,7 @@ "tmp": "~0.2" }, "engines": { - "node": "20" + "node": "22" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index e51188ad3..d6d96bda3 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,10 @@ "version": "0.1.0", "private": true, "engines": { - "node": "20" + "node": "22" }, "volta": { - "node": "20.17.0" + "node": "22.12.0" }, "dependencies": { "@sentry/node": "~7", diff --git a/test/e2e/oidc/run-tests.sh b/test/e2e/oidc/run-tests.sh index 085217cd0..2bb57d4b8 100755 --- a/test/e2e/oidc/run-tests.sh +++ b/test/e2e/oidc/run-tests.sh @@ -49,6 +49,6 @@ if [[ ${INSTALL_PLAYWRIGHT_DEPS-} = true ]]; then npx playwright install --with-deps fi log "Running playwright tests..." -npx playwright test +npx --node-options="--no-deprecation" playwright test log "Tests completed OK!" diff --git a/test/e2e/s3/run-tests.sh b/test/e2e/s3/run-tests.sh index 54e5a1778..102cd5a3e 100755 --- a/test/e2e/s3/run-tests.sh +++ b/test/e2e/s3/run-tests.sh @@ -61,7 +61,7 @@ timeout 30 bash -c "while ! curl -s -o /dev/null $serverUrl; do sleep 1; done" log 'Backend started!' cd test/e2e/s3 -npx mocha test.js +npx --node-options="--no-deprecation" mocha test.js if ! curl -s -o /dev/null "$serverUrl"; then log '!!! Backend died.'