Skip to content

Commit

Permalink
Raise baseline Node version to 20
Browse files Browse the repository at this point in the history
Ports DependencyTrack/frontend#927 from Dependency-Track v4.12.0-SNAPSHOT.

Signed-off-by: nscuro <nscuro@protonmail.com>
  • Loading branch information
nscuro committed Jul 6, 2024
1 parent 549c555 commit d21ec81
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 32 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/_meta-build.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
on:
workflow_call:
inputs:
node-versions:
type: string
required: false
default: '["18"]'
description: 'Stringified JSON Array of node versions to build against'
node-version-package:
type: string
required: false
default: '18'
description: 'Set which version of node the container packaged dist should be based on. (MUST be part of the node-versions)'
app-version:
type: string
required: false
Expand All @@ -35,19 +25,14 @@ jobs:
build-node:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
node-version: ${{ fromJson(inputs.node-versions) }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.7

- name: Set up NodeJs
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ matrix.node-version }}
node-version: '20'
cache: 'npm'

- name: Run Npm Build
Expand All @@ -60,7 +45,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: assembled-frontend-node${{ matrix.node-version }}
name: assembled-frontend
path: |-
dist/
bom.*
Expand All @@ -80,7 +65,7 @@ jobs:
- name: Download Artifacts
uses: actions/download-artifact@v4.1.8
with:
name: assembled-frontend-node${{ inputs.node-version-package }}
name: assembled-frontend

- name: Set up QEMU
uses: docker/setup-qemu-action@v3.1.0
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
call-build:
uses: ./.github/workflows/_meta-build.yaml
with:
node-versions: '["18", "20"]'
node-version-package: '18'
app-version: 'snapshot'
publish-container: ${{ github.ref_name == 'main' || startsWith(github.ref_name, 'feature-') }}
ref-name: ${{ github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Download Artifacts
uses: actions/download-artifact@v4.1.8
with:
name: assembled-frontend-node18
name: assembled-frontend

- name: Create Checksums
run: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up NodeJs
uses: actions/setup-node@v4.0.2
with:
node-version: '18'
node-version: '20'
cache: 'npm'

- name: Bump version and tag via NodeJS
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/i18n.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
permissions:
contents: read

env:
NODE_VERSION: 18

jobs:
check:
runs-on: ubuntu-latest
Expand All @@ -26,7 +23,7 @@ jobs:
- name: Set up NodeJs
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
node-version: '20'
cache: 'npm'

- name: Install Dependencies
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
permissions:
contents: read

env:
NODE_VERSION: 18

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -26,7 +23,7 @@ jobs:
- name: Set up NodeJs
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
node-version: '20'
cache: 'npm'

- name: Install Dependencies
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"not ie <= 10"
],
"engines": {
"node": ">= 18",
"node": ">= 20",
"npm": ">= 9"
}
}

0 comments on commit d21ec81

Please sign in to comment.