Skip to content

Commit

Permalink
fix: upgrade to NodeJS 20
Browse files Browse the repository at this point in the history
Upgrades to the latest NodeJS LTS
  • Loading branch information
mattwebbio committed Mar 25, 2024
1 parent a58b13e commit 607f4b4
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "18-bullseye"
"VARIANT": "20-bullseye"
}
},

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- uses: reviewdog/action-setup@v1
Expand All @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn prettier
Expand All @@ -49,7 +49,7 @@ jobs:
languages: typescript
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- name: Perform CodeQL Analysis
Expand All @@ -60,7 +60,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn test:unit
Expand All @@ -75,7 +75,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn test:e2e
Expand All @@ -85,7 +85,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn test:integration
Expand All @@ -101,7 +101,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn ci:generate-config-docs
Expand All @@ -116,7 +116,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
ref: ${{ steps.extract_branch.outputs.branch }}
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn ci:generate-config-docs
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/perform-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn build
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BASE_IMAGE=node:18-alpine
BASE_IMAGE=node:20-alpine
push: true
tags: ${{ steps.alpine_docker_tags.outputs.tags }}
labels: ${{ steps.alpine_docker_tags.outputs.labels }}
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BASE_IMAGE=gcr.io/distroless/nodejs18:latest
BASE_IMAGE=gcr.io/distroless/nodejs20:latest
push: true
tags: ${{ steps.distroless_docker_tags.outputs.tags }}
labels: ${{ steps.distroless_docker_tags.outputs.labels }}
Expand All @@ -111,7 +111,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn tsc
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn build
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BASE_IMAGE=node:18-alpine
BASE_IMAGE=node:20-alpine
push: true
tags: ${{ steps.alpine_docker_tags.outputs.tags }}
labels: ${{ steps.alpine_docker_tags.outputs.labels }}
Expand All @@ -81,7 +81,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BASE_IMAGE=gcr.io/distroless/nodejs18:latest
BASE_IMAGE=gcr.io/distroless/nodejs20:latest
push: true
tags: ${{ steps.distroless_docker_tags.outputs.tags }}
labels: ${{ steps.distroless_docker_tags.outputs.labels }}
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 18.15.0
nodejs 20.11.1
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG BASE_IMAGE


FROM node:18-alpine as install
FROM node:20-alpine as install
ENV NODE_ENV=production

WORKDIR /usr/src/app
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
"bin": "./dist/index.js",
"devDependencies": {
"@commitlint/config-conventional": "^19.1.0",
"@tsconfig/node18": "^18.2.3",
"@tsconfig/node20": "^20.1.2",
"@types/jest": "^29.5.12",
"@types/luxon": "^3.4.2",
"@types/mustache": "^4.2.5",
"@types/node": "^18.8.0",
"@types/node": "^20.11.30",
"@types/nodemailer": "^6.4.14",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.62.0",
Expand Down
4 changes: 2 additions & 2 deletions test/containers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export function createOrbitalSyncContainer(
}

export enum OrbitalBaseImage {
Alpine = 'node:18-alpine',
Distroless = 'gcr.io/distroless/nodejs18:latest'
Alpine = 'node:20-alpine',
Distroless = 'gcr.io/distroless/nodejs20:latest'
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@tsconfig/node18/tsconfig.json",
"extends": "@tsconfig/node20/tsconfig.json",
"include": ["src"],
"exclude": ["node_modules", "test"],
"compilerOptions": {
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1335,10 +1335,10 @@ __metadata:
languageName: node
linkType: hard

"@tsconfig/node18@npm:^18.2.3":
version: 18.2.3
resolution: "@tsconfig/node18@npm:18.2.3"
checksum: 10c0/e067bd91625e00fec1bedb8faed44cdd1889e91839b86acbef2db2b942fdf9253001b511a41774bb2207c3ed3321bcfae07e563cecddf489dcaf769da9f27c14
"@tsconfig/node20@npm:^20.1.2":
version: 20.1.3
resolution: "@tsconfig/node20@npm:20.1.3"
checksum: 10c0/619b35b5100fd7e7000aa0ba530c1ac95d1ce89f5cc94590c04a4fc7fcebb72e52cbc2ebd1300b6ba23ac33d74fe5fb559c5f191af45adc2dfbff09c8f0da7ee
languageName: node
linkType: hard

Expand Down Expand Up @@ -1549,12 +1549,12 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^18.8.0":
version: 18.19.26
resolution: "@types/node@npm:18.19.26"
"@types/node@npm:^20.11.30":
version: 20.11.30
resolution: "@types/node@npm:20.11.30"
dependencies:
undici-types: "npm:~5.26.4"
checksum: 10c0/34b9ceb3366fc616f35a3f3a1467478182cc265ff142c02000503161a679d3036d8bbc410d343ae4012a868e879941d64d656bd509674b055c8735aba24d98e2
checksum: 10c0/867cfaf969c6d8850d8d7304e7ab739898a50ecb1395b61ff2335644f5f48d7a46fbc4a14cee967aed65ec134b61a746edae70d1f32f11321ccf29165e3bc4e6
languageName: node
linkType: hard

Expand Down Expand Up @@ -5248,11 +5248,11 @@ __metadata:
"@commitlint/config-conventional": "npm:^19.1.0"
"@honeybadger-io/js": "npm:^6.8.3"
"@sentry/node": "npm:^7.108.0"
"@tsconfig/node18": "npm:^18.2.3"
"@tsconfig/node20": "npm:^20.1.2"
"@types/jest": "npm:^29.5.12"
"@types/luxon": "npm:^3.4.2"
"@types/mustache": "npm:^4.2.5"
"@types/node": "npm:^18.8.0"
"@types/node": "npm:^20.11.30"
"@types/nodemailer": "npm:^6.4.14"
"@typescript-eslint/eslint-plugin": "npm:^5.55.0"
"@typescript-eslint/parser": "npm:^5.62.0"
Expand Down

0 comments on commit 607f4b4

Please sign in to comment.