Skip to content

Commit

Permalink
fix: FORMS-1588 update Node.js to v20 (#1551)
Browse files Browse the repository at this point in the history
* fix: FORMS-1588 update node to v20

Node v20 is now in LTS, and we will switch to it to remain current.

* fix: update the Node version in the Actions

* test: fix node 20 complaint about setting global
  • Loading branch information
WalterMoar authored Dec 23, 2024
1 parent 6fb6b64 commit a37ddda
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VARIANT="18.20.4-bookworm"
ARG VARIANT="20.18.1-bookworm"
FROM node:${VARIANT}

# not much in here, could acheive this another way for sure...
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dockerfile": "Dockerfile",
"context": "..",
"args": {
"VARIANT": "18.20.4-bookworm"
"VARIANT": "20.18.1-bookworm"
}
},

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: true
matrix:
version: [18]
version: [20]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -49,14 +49,14 @@ jobs:
env:
CI: true
- name: Save Coverage Results
if: matrix.version == 18
if: matrix.version == 20
uses: actions/upload-artifact@v4
with:
name: coverage-app
path: ${{ github.workspace }}/app/coverage
retention-days: 1
- name: Monitor Coverage
if: "matrix.version == 18 && ! github.event.pull_request.head.repo.fork"
if: "matrix.version == 20 && ! github.event.pull_request.head.repo.fork"
uses: slavcodev/coverage-monitor-action@v1
with:
comment_mode: update
Expand All @@ -78,7 +78,7 @@ jobs:
strategy:
fail-fast: true
matrix:
version: [18]
version: [20]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -106,14 +106,14 @@ jobs:
env:
CI: true
- name: Save Coverage Results
if: matrix.version == 18
if: matrix.version == 20
uses: actions/upload-artifact@v4
with:
name: coverage-frontend
path: ${{ github.workspace }}/app/frontend/coverage
retention-days: 1
- name: Monitor Coverage
if: "matrix.version == 18 && ! github.event.pull_request.head.repo.fork"
if: "matrix.version == 20 && ! github.event.pull_request.head.repo.fork"
uses: slavcodev/coverage-monitor-action@v1
with:
comment_mode: update
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/node:18.20.4-alpine3.20
FROM docker.io/node:20.18.1-alpine3.21

ENV NO_UPDATE_NOTIFIER=true
WORKDIR /opt/app-root/src/app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import { useFormStore } from '~/store/form';
import FormEventStreamSettings from '~/components/designer/settings/FormEventStreamSettings.vue';

describe('FormEventStreamSettings.vue', () => {
const crypto = require('crypto').webcrypto;
// Shims the crypto property onto global
global.crypto = crypto;

const pinia = createTestingPinia();
setActivePinia(pinia);

Expand Down
2 changes: 0 additions & 2 deletions app/frontend/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ export default defineConfig(({ command, mode }) => {
'~formiojs': resolve(__dirname, './node_modules/formiojs'),
'~font-awesome': resolve(__dirname, './node_modules/font-awesome'),
'~vuetify': resolve(__dirname, './node_modules/vuetify'),
// no clue why crypto is required, but unit tests will not run without it
crypto: 'crypto-js',
},
},
test: {
Expand Down

0 comments on commit a37ddda

Please sign in to comment.