Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ iOS >= 11
ie 11

[node]
node 22
node 24
34 changes: 19 additions & 15 deletions .github/workflows/check-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ concurrency:

jobs:
build:
name: Build
name: Build (Node ${{ matrix.node-version }})
runs-on: ubuntu-24.04

strategy:
fail-fast: false
matrix:
node-version: ['22', '23', '24']

steps:
- name: Check out code
Expand All @@ -31,22 +33,22 @@ jobs:
id: npm-install-cache
with:
enableCrossOsArchive: true
key: npm-install-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
key: npm-install-${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
path: node_modules

- name: Cache build
uses: actions/cache@v4
with:
enableCrossOsArchive: true
key: npm-build-${{ runner.os }}-${{ github.sha }}
key: npm-build-${{ runner.os }}-node${{ matrix.node-version }}-${{ github.sha }}
path: |
.public
.server

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
node-version: ${{ matrix.node-version }}

- name: Install dependencies
if: steps.npm-install-cache.outputs.cache-hit != 'true'
Expand All @@ -56,7 +58,7 @@ jobs:
run: npm run build

lint:
name: ${{ matrix.task.description }}
name: ${{ matrix.task.description }} (Node ${{ matrix.node-version }})
runs-on: ubuntu-24.04
needs: [build]

Expand All @@ -69,6 +71,7 @@ jobs:
fail-fast: false

matrix:
node-version: ['22', '23', '24']
task:
- description: Prettier
name: lint-prettier
Expand Down Expand Up @@ -103,34 +106,35 @@ jobs:
with:
enableCrossOsArchive: true
fail-on-cache-miss: false
key: npm-install-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
key: npm-install-${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
path: node_modules

- name: Cache task
if: ${{ matrix.task.cache }}
uses: actions/cache@v4
with:
enableCrossOsArchive: true
key: ${{ matrix.task.name }}-${{ runner.os }}
key: ${{ matrix.task.name }}-${{ runner.os }}-node${{ matrix.node-version }}
path: ${{ matrix.task.cache }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
node-version: ${{ matrix.node-version }}

- name: Run lint task
run: ${{ matrix.task.run }}

tasks:
name: ${{ matrix.task.description }}
name: ${{ matrix.task.description }} (Node ${{ matrix.node-version }})
runs-on: ubuntu-24.04
needs: [build]

strategy:
fail-fast: false

matrix:
node-version: ['22', '23', '24']
task:
- description: Unit tests
name: test-unit
Expand All @@ -146,30 +150,30 @@ jobs:
with:
enableCrossOsArchive: true
fail-on-cache-miss: false
key: npm-install-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
key: npm-install-${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
path: node_modules

- name: Restore build
uses: actions/cache/restore@v4
with:
enableCrossOsArchive: true
fail-on-cache-miss: false
key: npm-build-${{ runner.os }}-${{ github.sha }}
key: npm-build-${{ runner.os }}-node${{ matrix.node-version }}-${{ github.sha }}
path: |
.public
.server

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
node-version: ${{ matrix.node-version }}

- name: Cache task
if: ${{ matrix.task.cache }}
uses: actions/cache@v4
with:
enableCrossOsArchive: true
key: ${{ matrix.task.name }}-${{ runner.os }}-${{ github.sha }}
key: ${{ matrix.task.name }}-${{ runner.os }}-node${{ matrix.node-version }}-${{ github.sha }}
path: ${{ matrix.task.cache }}

- name: Run task
Expand All @@ -179,7 +183,7 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.task.description }} coverage
name: ${{ matrix.task.description }} coverage (Node ${{ matrix.node-version }})
path: coverage
if-no-files-found: ignore

Expand All @@ -204,7 +208,7 @@ jobs:
with:
enableCrossOsArchive: true
fail-on-cache-miss: false
key: test-unit-${{ runner.os }}-${{ github.sha }}
key: test-unit-${{ runner.os }}-node24-${{ github.sha }}
path: coverage

- name: SonarCloud Scan
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/jod
lts/krypton
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PARENT_VERSION=latest-22
ARG PARENT_VERSION=latest-24
ARG PORT=3000
ARG PORT_DEBUG=9229

Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If your bug is with the plugin, ensure you are running the plugin in a supported
- A short and clear description of the issue. Explain the current behaviour along with the expected behaviour.
- A step-by-step guide that details how we can reproduce your issue
- A text copy (not a screenshot) of any error messages and stack traces
- The version of your runtime (e.g. Node 22.11.0)
- The version of your runtime (e.g. Node 24.0.0 or Node 22.11.0)
- If the issue is with a form, a copy of the form definition (JSON) file

**What we will provide:**
Expand Down
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 @@ -65,7 +65,7 @@
"url": "git+https://github.com/DEFRA/forms-engine-plugin.git"
},
"engines": {
"node": "^22.11.0",
"node": ">=22.11.0 <25.0.0",
"npm": "^10.9.0"
},
"license": "SEE LICENSE IN LICENSE",
Expand Down
2 changes: 0 additions & 2 deletions src/server/plugins/nunjucks/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@
*/

/**
* @import { config } from '~/src/config/index.js'
* @import { FormContext } from '~/src/server/plugins/engine/types.js'
* @import { PluginOptions } from '~/src/server/plugins/engine/plugin.js'
*/
Loading