deploy on node 22 (#11070)

* require node 22/npm 10 or 11

* run package tests on node 24

* delete future builds

* run everything on node 22 instead of 20

* update docs
This commit is contained in:
chris48s authored and GitHub committed 2025-06-10 18:59:30 +01:00
1 parent 89730c76a6
commit ee039fa9c5
24 files changed
+28 -149

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
"name": "Node.js",
// "Officially" maintained node devcontainer image from Microsoft
// https://github.com/devcontainers/templates/tree/main/src/javascript-node
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm",
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
+1 -1
View File
@@ -1,4 +1,4 @@
FROM node:20-bullseye
FROM node:22-bullseye
RUN apt-get update
RUN apt-get install -y jq
@@ -31,8 +31,6 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
# Even though we're currently deploying on Node 20, we run coverage test on Node 22
# to work around https://github.com/bcoe/v8-coverage/pull/2.
node-version: 22
env:
NPM_CONFIG_ENGINE_STRICT: 'false'
+1 -1
View File
@@ -31,7 +31,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
node-version: 22
- name: Core tests
if: always()
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
node-version: 22
- name: Danger
run: npm run danger ci
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
node-version: 22
- name: Build
run: npm run build-docs
+1 -1
View File
@@ -40,7 +40,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
node-version: 22
cypress: false
- name: Output debug info
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
node-version: 22
cypress: true
- name: Run tests
-52
View File
@@ -1,52 +0,0 @@
name: Integration@node 22
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'
jobs:
test-integration-22:
runs-on: ubuntu-latest
env:
PAT_EXISTS: ${{ secrets.GH_PAT != '' }}
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ci_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 22
env:
NPM_CONFIG_ENGINE_STRICT: 'false'
- name: Integration Tests (with PAT)
if: ${{ env.PAT_EXISTS == 'true' }}
uses: ./.github/actions/integration-tests
with:
github-token: '${{ secrets.GH_PAT }}'
- name: Integration Tests (with workflow token)
if: ${{ env.PAT_EXISTS == 'false' }}
uses: ./.github/actions/integration-tests
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
node-version: 22
- name: Integration Tests (with PAT)
if: ${{ env.PAT_EXISTS == 'true' }}
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
node-version: 22
- name: ESLint
if: always()
-25
View File
@@ -1,25 +0,0 @@
name: Main@node 22
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'
jobs:
test-main-22:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 22
env:
NPM_CONFIG_ENGINE_STRICT: 'false'
- name: Core tests
uses: ./.github/actions/core-tests
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
node-version: 22
- name: Core tests
uses: ./.github/actions/core-tests
+1
View File
@@ -18,6 +18,7 @@ jobs:
include:
- node: '20'
- node: '22'
- node: '24'
steps:
- name: Checkout
uses: actions/checkout@v4
+4 -1
View File
@@ -15,8 +15,11 @@ jobs:
include:
- node: '20'
npm: '^10'
engine-strict: 'true'
engine-strict: 'false'
- node: '22'
npm: '^11'
engine-strict: 'true'
- node: '24'
npm: '^11'
engine-strict: 'false'
steps:
-45
View File
@@ -1,45 +0,0 @@
name: Services@node 22
on:
pull_request:
types: [opened, edited, reopened, synchronize]
push:
branches:
- 'gh-readonly-queue/**'
jobs:
test-services-22:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 22
env:
NPM_CONFIG_ENGINE_STRICT: 'false'
- name: Service tests (triggered from local branch)
if: github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/actions/service-tests
with:
github-token: '${{ secrets.GH_PAT }}'
librariesio-tokens: '${{ secrets.SERVICETESTS_LIBRARIESIO_TOKENS }}'
obs-user: '${{ secrets.SERVICETESTS_OBS_USER }}'
obs-pass: '${{ secrets.SERVICETESTS_OBS_PASS }}'
pepy-key: '${{ secrets.SERVICETESTS_PEPY_KEY }}'
reddit-client-id: '${{ secrets.SERVICETESTS_REDDIT_CLIENT_ID }}'
reddit-client-secret: '${{ secrets.SERVICETESTS_REDDIT_CLIENT_SECRET }}'
sl-insight-user-uuid: '${{ secrets.SERVICETESTS_SL_INSIGHT_USER_UUID }}'
sl-insight-api-token: '${{ secrets.SERVICETESTS_SL_INSIGHT_API_TOKEN }}'
twitch-client-id: '${{ secrets.SERVICETESTS_TWITCH_CLIENT_ID }}'
twitch-client-secret: '${{ secrets.SERVICETESTS_TWITCH_CLIENT_SECRET }}'
youtube-api-key: '${{ secrets.SERVICETESTS_YOUTUBE_API_KEY }}'
- name: Service tests (triggered from fork)
if: github.event.pull_request.head.repo.full_name != github.repository
uses: ./.github/actions/service-tests
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
node-version: 22
- name: Service tests (triggered from local branch)
if: github.event.pull_request.head.repo.full_name == github.repository
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
node-version: 22
- name: Check for new GitHub API version
run: node scripts/update-github-api.js
+2 -2
View File
@@ -1,4 +1,4 @@
FROM node:20-alpine AS builder
FROM node:22-alpine AS builder
RUN npm install -g "npm@^10"
@@ -22,7 +22,7 @@ RUN npm run build \
# Use multi-stage build to reduce size
FROM node:20-alpine
FROM node:22-alpine
ARG version=dev
ENV DOCKER_SHIELDS_VERSION=$version
+1 -2
View File
@@ -98,8 +98,7 @@ If you intend on reporting or contributing a fix related to security vulnerabili
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/badges/shields?quickstart=1)
1. Install Node 20 or later. You can use the [package manager][] of your choice.
Tests need to pass in Node 20 and 22.
1. Install Node 22. You can use the [package manager][] of your choice.
2. Clone this repository.
3. Run `npm ci` to install the dependencies.
4. Run `npm start` to start the badge server and the frontend dev server.
+1 -1
View File
@@ -25,7 +25,7 @@ and learn about the [GitHub workflow](http://try.github.io/).
#### Node, NPM
Node >=20 and NPM 9.x or 10.x is required. If you don't already have them,
Node 22 and NPM 10.x or 11.x is required. If you don't already have them,
install node and npm: https://nodejs.org/en/download/
### Setup a dev install
+2 -2
View File
@@ -4,13 +4,13 @@ This document describes how to host your own shields server either from source o
## Installing from Source
You will need Node 20 or later, which you can install using a
You will need Node 22, which you can install using a
[package manager][].
On Ubuntu / Debian:
```sh
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -; sudo apt-get install -y nodejs
curl -sL https://deb.nodesource.com/setup_22.x | sudo -E bash -; sudo apt-get install -y nodejs
```
```sh
+2 -2
View File
@@ -126,8 +126,8 @@
"url": "^0.11.4"
},
"engines": {
"node": "^20 || ^22",
"npm": "^9 || ^10 || ^11"
"node": "^22",
"npm": "^10 || ^11"
}
},
"badge-maker": {
+3 -3
View File
@@ -100,7 +100,7 @@
"pretest": "cross-env BASE_URL=http://localhost:8080 run-s --silent defs",
"test": "run-s --silent --continue-on-error lint test:package test:core test:entrypoint check-types:package prettier:check",
"check-types:package": "tsd badge-maker",
"depcheck": "check-node-version --node \">= 20.0\"",
"depcheck": "check-node-version --node \"^22\"",
"prebuild": "run-s --silent depcheck",
"defs": "node scripts/export-openapi-cli.js",
"build": "rimraf public && run-s defs docusaurus:build",
@@ -214,8 +214,8 @@
"url": "^0.11.4"
},
"engines": {
"node": "^20 || ^22",
"npm": "^9 || ^10 || ^11"
"node": "^22",
"npm": "^10 || ^11"
},
"type": "module",
"collective": {