deploy on node 20 (#9799)
* deploy on node 20 * use appropriate npm versions for each node version
This commit is contained in:
2
.github/actions/draft-release/Dockerfile
vendored
2
.github/actions/draft-release/Dockerfile
vendored
@@ -1,4 +1,4 @@
|
|||||||
FROM node:18-bullseye
|
FROM node:20-bullseye
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y jq
|
RUN apt-get install -y jq
|
||||||
|
|||||||
10
.github/actions/setup/action.yml
vendored
10
.github/actions/setup/action.yml
vendored
@@ -2,8 +2,12 @@ name: 'Set up project'
|
|||||||
description: 'Set up project'
|
description: 'Set up project'
|
||||||
inputs:
|
inputs:
|
||||||
node-version:
|
node-version:
|
||||||
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
|
description: 'Version Spec of the node version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
|
||||||
required: true
|
required: true
|
||||||
|
npm-version:
|
||||||
|
description: 'Version Spec of the npm version to use. Examples: 9.x, 10.2.3, >=10.1.0.'
|
||||||
|
required: false
|
||||||
|
default: '^10'
|
||||||
cypress:
|
cypress:
|
||||||
description: 'Install Cypress binary (boolean)'
|
description: 'Install Cypress binary (boolean)'
|
||||||
type: boolean
|
type: boolean
|
||||||
@@ -19,8 +23,8 @@ runs:
|
|||||||
with:
|
with:
|
||||||
node-version: ${{ inputs.node-version }}
|
node-version: ${{ inputs.node-version }}
|
||||||
|
|
||||||
- name: Install NPM 9
|
- name: Install NPM ${{ inputs.npm-version }}
|
||||||
run: npm install -g npm@^9.0.0
|
run: npm install -g npm@${{ inputs.npm-version }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
cypress: true
|
cypress: true
|
||||||
|
|
||||||
- run: .github/scripts/check-docusaurus-versions.sh
|
- run: .github/scripts/check-docusaurus-versions.sh
|
||||||
|
|||||||
2
.github/workflows/danger.yml
vendored
2
.github/workflows/danger.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
|
|
||||||
- name: Danger
|
- name: Danger
|
||||||
run: npm run danger ci
|
run: npm run danger ci
|
||||||
|
|||||||
2
.github/workflows/deploy-docs.yml
vendored
2
.github/workflows/deploy-docs.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build-docs
|
run: npm run build-docs
|
||||||
|
|||||||
2
.github/workflows/test-bug-run-badge.yml
vendored
2
.github/workflows/test-bug-run-badge.yml
vendored
@@ -40,7 +40,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
cypress: false
|
cypress: false
|
||||||
|
|
||||||
- name: Output debug info
|
- name: Output debug info
|
||||||
|
|||||||
2
.github/workflows/test-e2e.yml
vendored
2
.github/workflows/test-e2e.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
cypress: true
|
cypress: true
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Integration@node 20
|
name: Integration@node 21
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, reopened, synchronize]
|
types: [opened, reopened, synchronize]
|
||||||
@@ -8,7 +8,7 @@ on:
|
|||||||
- 'dependabot/**'
|
- 'dependabot/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-integration-20:
|
test-integration-21:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
PAT_EXISTS: ${{ secrets.GH_PAT != '' }}
|
PAT_EXISTS: ${{ secrets.GH_PAT != '' }}
|
||||||
@@ -35,7 +35,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 21
|
||||||
env:
|
env:
|
||||||
NPM_CONFIG_ENGINE_STRICT: 'false'
|
NPM_CONFIG_ENGINE_STRICT: 'false'
|
||||||
|
|
||||||
2
.github/workflows/test-integration.yml
vendored
2
.github/workflows/test-integration.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
|
|
||||||
- name: Integration Tests (with PAT)
|
- name: Integration Tests (with PAT)
|
||||||
if: ${{ env.PAT_EXISTS == 'true' }}
|
if: ${{ env.PAT_EXISTS == 'true' }}
|
||||||
|
|||||||
2
.github/workflows/test-lint.yml
vendored
2
.github/workflows/test-lint.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
|
|
||||||
- name: ESLint
|
- name: ESLint
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Main@node 20
|
name: Main@node 21
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, reopened, synchronize]
|
types: [opened, reopened, synchronize]
|
||||||
@@ -8,7 +8,7 @@ on:
|
|||||||
- 'dependabot/**'
|
- 'dependabot/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-main-20:
|
test-main-21:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 21
|
||||||
env:
|
env:
|
||||||
NPM_CONFIG_ENGINE_STRICT: 'false'
|
NPM_CONFIG_ENGINE_STRICT: 'false'
|
||||||
|
|
||||||
2
.github/workflows/test-main.yml
vendored
2
.github/workflows/test-main.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
|
|
||||||
- name: Core tests
|
- name: Core tests
|
||||||
uses: ./.github/actions/core-tests
|
uses: ./.github/actions/core-tests
|
||||||
|
|||||||
8
.github/workflows/test-package-lib.yml
vendored
8
.github/workflows/test-package-lib.yml
vendored
@@ -14,11 +14,14 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- node: '16'
|
- node: '16'
|
||||||
|
npm: '^9'
|
||||||
engine-strict: 'false'
|
engine-strict: 'false'
|
||||||
- node: '18'
|
- node: '18'
|
||||||
engine-strict: 'true'
|
npm: '^9'
|
||||||
- node: '20'
|
|
||||||
engine-strict: 'false'
|
engine-strict: 'false'
|
||||||
|
- node: '20'
|
||||||
|
npm: '^10'
|
||||||
|
engine-strict: 'true'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -27,6 +30,7 @@ jobs:
|
|||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
|
npm-version: ${{ matrix.npm }}
|
||||||
env:
|
env:
|
||||||
NPM_CONFIG_ENGINE_STRICT: ${{ matrix.engine-strict }}
|
NPM_CONFIG_ENGINE_STRICT: ${{ matrix.engine-strict }}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Services@node 20
|
name: Services@node 21
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, edited, reopened, synchronize]
|
types: [opened, edited, reopened, synchronize]
|
||||||
@@ -7,7 +7,7 @@ on:
|
|||||||
- 'gh-readonly-queue/**'
|
- 'gh-readonly-queue/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-services-20:
|
test-services-21:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 21
|
||||||
env:
|
env:
|
||||||
NPM_CONFIG_ENGINE_STRICT: 'false'
|
NPM_CONFIG_ENGINE_STRICT: 'false'
|
||||||
|
|
||||||
2
.github/workflows/test-services.yml
vendored
2
.github/workflows/test-services.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
|
|
||||||
- name: Service tests (triggered from local branch)
|
- name: Service tests (triggered from local branch)
|
||||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||||
|
|||||||
2
.github/workflows/update-github-api.yml
vendored
2
.github/workflows/update-github-api.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup
|
uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 20
|
||||||
|
|
||||||
- name: Check for new GitHub API version
|
- name: Check for new GitHub API version
|
||||||
run: node scripts/update-github-api.js
|
run: node scripts/update-github-api.js
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM node:18-alpine AS Builder
|
FROM node:20-alpine AS Builder
|
||||||
|
|
||||||
RUN mkdir -p /usr/src/app
|
RUN mkdir -p /usr/src/app
|
||||||
RUN mkdir /usr/src/app/private
|
RUN mkdir /usr/src/app/private
|
||||||
@@ -19,7 +19,7 @@ RUN npm prune --omit=dev
|
|||||||
RUN npm cache clean --force
|
RUN npm cache clean --force
|
||||||
|
|
||||||
# Use multi-stage build to reduce size
|
# Use multi-stage build to reduce size
|
||||||
FROM node:18-alpine
|
FROM node:20-alpine
|
||||||
|
|
||||||
ARG version=dev
|
ARG version=dev
|
||||||
ENV DOCKER_SHIELDS_VERSION=$version
|
ENV DOCKER_SHIELDS_VERSION=$version
|
||||||
|
|||||||
@@ -98,8 +98,8 @@ If you intend on reporting or contributing a fix related to security vulnerabili
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
1. Install Node 18 or later. You can use the [package manager][] of your choice.
|
1. Install Node 20 or later. You can use the [package manager][] of your choice.
|
||||||
Tests need to pass in Node 18 and 20.
|
Tests need to pass in Node 20 and 21.
|
||||||
2. Clone this repository.
|
2. Clone this repository.
|
||||||
3. Run `npm ci` to install the dependencies.
|
3. Run `npm ci` to install the dependencies.
|
||||||
4. Run `npm start` to start the badge server and the frontend dev server.
|
4. Run `npm start` to start the badge server and the frontend dev server.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ and learn about the [GitHub workflow](http://try.github.io/).
|
|||||||
|
|
||||||
#### Node, NPM
|
#### Node, NPM
|
||||||
|
|
||||||
Node >=18 and NPM 9.x is required. If you don't already have them,
|
Node >=20 and NPM 9.x or 10.x is required. If you don't already have them,
|
||||||
install node and npm: https://nodejs.org/en/download/
|
install node and npm: https://nodejs.org/en/download/
|
||||||
|
|
||||||
### Setup a dev install
|
### Setup a dev install
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ This document describes how to host your own shields server either from source o
|
|||||||
|
|
||||||
## Installing from Source
|
## Installing from Source
|
||||||
|
|
||||||
You will need Node 18 or later, which you can install using a
|
You will need Node 20 or later, which you can install using a
|
||||||
[package manager][].
|
[package manager][].
|
||||||
|
|
||||||
On Ubuntu / Debian:
|
On Ubuntu / Debian:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -; sudo apt-get install -y nodejs
|
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -; sudo apt-get install -y nodejs
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -126,8 +126,8 @@
|
|||||||
"url": "^0.11.3"
|
"url": "^0.11.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.16.0",
|
"node": "^20.10.0",
|
||||||
"npm": "^9.0.0"
|
"npm": "^9.0.0 || ^10.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"badge-maker": {
|
"badge-maker": {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
"pretest": "cross-env BASE_URL=http://localhost:8080 run-s --silent defs",
|
"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",
|
"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",
|
"check-types:package": "tsd badge-maker",
|
||||||
"depcheck": "check-node-version --node \">= 18.0\"",
|
"depcheck": "check-node-version --node \">= 20.0\"",
|
||||||
"prebuild": "run-s --silent depcheck",
|
"prebuild": "run-s --silent depcheck",
|
||||||
"defs": "node scripts/export-openapi-cli.js",
|
"defs": "node scripts/export-openapi-cli.js",
|
||||||
"build": "rimraf public && run-s defs docusaurus:build",
|
"build": "rimraf public && run-s defs docusaurus:build",
|
||||||
@@ -213,8 +213,8 @@
|
|||||||
"url": "^0.11.3"
|
"url": "^0.11.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.16.0",
|
"node": "^20.10.0",
|
||||||
"npm": "^9.0.0"
|
"npm": "^9.0.0 || ^10.0.0"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"collective": {
|
"collective": {
|
||||||
|
|||||||
Reference in New Issue
Block a user