diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index f2dbb718415cd..6400bfdd07cac 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -19,7 +19,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Danger run: npm run danger ci diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index e966903c5fc3d..7077b5c18139d 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -19,7 +19,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Build run: npm run build-docs diff --git a/.github/workflows/test-bug-run-badge.yml b/.github/workflows/test-bug-run-badge.yml index fe07e95f55a3d..cb1e60dce8b38 100644 --- a/.github/workflows/test-bug-run-badge.yml +++ b/.github/workflows/test-bug-run-badge.yml @@ -38,7 +38,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 cypress: false - name: Output debug info diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index dcc6b9506fc4b..746333abd3d4d 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -26,7 +26,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 cypress: true - name: Run tests diff --git a/.github/workflows/test-integration-18.yml b/.github/workflows/test-integration-20.yml similarity index 94% rename from .github/workflows/test-integration-18.yml rename to .github/workflows/test-integration-20.yml index c1e7a5a774bd2..a0c5aaefbee68 100644 --- a/.github/workflows/test-integration-18.yml +++ b/.github/workflows/test-integration-20.yml @@ -1,4 +1,4 @@ -name: Integration@node 18 +name: Integration@node 20 on: pull_request: types: [opened, reopened, synchronize] @@ -8,7 +8,7 @@ on: - 'dependabot/**' jobs: - test-integration-18: + test-integration-20: runs-on: ubuntu-latest env: PAT_EXISTS: ${{ secrets.GH_PAT != '' }} @@ -35,7 +35,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 18 + node-version: 20 env: NPM_CONFIG_ENGINE_STRICT: 'false' diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index b86b9a43462fa..5c533ba225030 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -35,7 +35,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Integration Tests (with PAT) if: ${{ env.PAT_EXISTS == 'true' }} diff --git a/.github/workflows/test-lint.yml b/.github/workflows/test-lint.yml index ef5e177d38a8d..a5a5f6b1f379e 100644 --- a/.github/workflows/test-lint.yml +++ b/.github/workflows/test-lint.yml @@ -17,7 +17,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: ESLint if: always() diff --git a/.github/workflows/test-main-18.yml b/.github/workflows/test-main-20.yml similarity index 87% rename from .github/workflows/test-main-18.yml rename to .github/workflows/test-main-20.yml index 247cbb68ebc42..bba911cb3bc83 100644 --- a/.github/workflows/test-main-18.yml +++ b/.github/workflows/test-main-20.yml @@ -1,4 +1,4 @@ -name: Main@node 18 +name: Main@node 20 on: pull_request: types: [opened, reopened, synchronize] @@ -8,7 +8,7 @@ on: - 'dependabot/**' jobs: - test-main-18: + test-main-20: runs-on: ubuntu-latest steps: - name: Checkout @@ -17,7 +17,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 18 + node-version: 20 env: NPM_CONFIG_ENGINE_STRICT: 'false' diff --git a/.github/workflows/test-main.yml b/.github/workflows/test-main.yml index 6eff088bd90c4..b91cd7cb6af99 100644 --- a/.github/workflows/test-main.yml +++ b/.github/workflows/test-main.yml @@ -22,7 +22,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Core tests uses: ./.github/actions/core-tests diff --git a/.github/workflows/test-package-lib.yml b/.github/workflows/test-package-lib.yml index 30267bb8a43dc..b806990056ccc 100644 --- a/.github/workflows/test-package-lib.yml +++ b/.github/workflows/test-package-lib.yml @@ -14,9 +14,9 @@ jobs: matrix: include: - node: '16' - engine-strict: 'true' - - node: '18' engine-strict: 'false' + - node: '18' + engine-strict: 'true' - node: '20' engine-strict: 'false' steps: diff --git a/.github/workflows/test-services-18.yml b/.github/workflows/test-services-20.yml similarity index 95% rename from .github/workflows/test-services-18.yml rename to .github/workflows/test-services-20.yml index a690a2860acf2..2974969372871 100644 --- a/.github/workflows/test-services-18.yml +++ b/.github/workflows/test-services-20.yml @@ -1,4 +1,4 @@ -name: Services@node 18 +name: Services@node 20 on: pull_request: types: [opened, edited, reopened, synchronize] @@ -7,7 +7,7 @@ on: - 'gh-readonly-queue/**' jobs: - test-services-18: + test-services-20: runs-on: ubuntu-latest steps: @@ -17,7 +17,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 18 + node-version: 20 env: NPM_CONFIG_ENGINE_STRICT: 'false' diff --git a/.github/workflows/test-services.yml b/.github/workflows/test-services.yml index 9d269b41c1e37..0e4a614d48d1b 100644 --- a/.github/workflows/test-services.yml +++ b/.github/workflows/test-services.yml @@ -17,7 +17,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Service tests (triggered from local branch) if: github.event.pull_request.head.repo.full_name == github.repository diff --git a/.github/workflows/update-github-api.yml b/.github/workflows/update-github-api.yml index 191aaa98b4ba3..027613cb44d61 100644 --- a/.github/workflows/update-github-api.yml +++ b/.github/workflows/update-github-api.yml @@ -19,7 +19,7 @@ jobs: - name: Setup uses: ./.github/actions/setup with: - node-version: 16 + node-version: 18 - name: Check for new GitHub API version run: node scripts/update-github-api.js diff --git a/Dockerfile b/Dockerfile index 88d898a16d3d5..123d013e4f8fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16-alpine AS Builder +FROM node:18-alpine AS Builder RUN mkdir -p /usr/src/app RUN mkdir /usr/src/app/private @@ -19,7 +19,7 @@ RUN npm prune --production RUN npm cache clean --force # Use multi-stage build to reduce size -FROM node:16-alpine +FROM node:18-alpine ARG version=dev ENV DOCKER_SHIELDS_VERSION=$version diff --git a/README.md b/README.md index 7e9d549096f00..41a158b7433bf 100644 --- a/README.md +++ b/README.md @@ -98,8 +98,8 @@ You can read a [tutorial on how to add a badge][tutorial]. ## Development -1. Install Node 16 or later. You can use the [package manager][] of your choice. - Tests need to pass in Node 16 and 17. +1. Install Node 18 or later. You can use the [package manager][] of your choice. + Tests need to pass in Node 18 and 20. 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. diff --git a/doc/TUTORIAL.md b/doc/TUTORIAL.md index 82856fa68d0e2..2ab20a3d44f7f 100644 --- a/doc/TUTORIAL.md +++ b/doc/TUTORIAL.md @@ -25,7 +25,7 @@ and learn about the [GitHub workflow](http://try.github.io/). #### Node, NPM -Node >=16 and NPM 9.x is required. If you don't already have them, +Node >=18 and NPM 9.x is required. If you don't already have them, install node and npm: https://nodejs.org/en/download/ ### Setup a dev install diff --git a/doc/self-hosting.md b/doc/self-hosting.md index 63d5acf1d31df..5d83f42e94d5a 100644 --- a/doc/self-hosting.md +++ b/doc/self-hosting.md @@ -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 16 or later, which you can install using a +You will need Node 18 or later, which you can install using a [package manager][]. On Ubuntu / Debian: ```sh -curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -; sudo apt-get install -y nodejs +curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -; sudo apt-get install -y nodejs ``` ```sh diff --git a/package-lock.json b/package-lock.json index 0a47c030c8d1c..02bb904091fd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -125,7 +125,7 @@ "url": "^0.11.1" }, "engines": { - "node": "^16.13.0", + "node": "^18.16.0", "npm": "^9.0.0" } }, diff --git a/package.json b/package.json index 65221c53490ee..3cc5e9ac61adc 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,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 \">= 16.0\"", + "depcheck": "check-node-version --node \">= 18.0\"", "prebuild": "run-s --silent depcheck", "defs": "node scripts/export-openapi-cli.js", "build": "rimraf public && run-s defs docusaurus:build", @@ -212,7 +212,7 @@ "url": "^0.11.1" }, "engines": { - "node": "^16.13.0", + "node": "^18.16.0", "npm": "^9.0.0" }, "type": "module",