diff --git a/.github/workflows/frontend-build-prepare.yaml b/.github/workflows/frontend-build-prepare.yaml index 37dbd2ad..1fe0b411 100644 --- a/.github/workflows/frontend-build-prepare.yaml +++ b/.github/workflows/frontend-build-prepare.yaml @@ -10,6 +10,9 @@ on: jobs: setup-and-build: runs-on: ubuntu-latest + strategy: + matrix: + node: [20, 22] steps: # Setup: @@ -21,7 +24,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '18' + node-version: ${{ matrix.node }} cache: 'yarn' cache-dependency-path: frontend/yarn.lock diff --git a/.github/workflows/ui-tests-playwright.yml b/.github/workflows/ui-tests-playwright.yml index 16e7c0e9..42d85d36 100644 --- a/.github/workflows/ui-tests-playwright.yml +++ b/.github/workflows/ui-tests-playwright.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' cache: 'yarn' cache-dependency-path: frontend/yarn.lock diff --git a/.github/workflows/weblate-reformat.yaml b/.github/workflows/weblate-reformat.yaml index 2b60025b..c5c59928 100644 --- a/.github/workflows/weblate-reformat.yaml +++ b/.github/workflows/weblate-reformat.yaml @@ -27,7 +27,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '22' cache: 'yarn' cache-dependency-path: frontend/yarn.lock - name: Install dependencies diff --git a/frontend/.yarnrc b/frontend/.yarnrc index 123ac74a..e69de29b 100644 --- a/frontend/.yarnrc +++ b/frontend/.yarnrc @@ -1 +0,0 @@ -ignore-engines true diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 7a012a92..1a229014 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.4 -FROM --platform=$BUILDPLATFORM docker.io/library/node:18 as build_deps +FROM --platform=$BUILDPLATFORM docker.io/library/node:22 as build_deps WORKDIR /app COPY .yarnrc yarn.lock package.json ./ diff --git a/frontend/docs/docs/develop/frontend-dev.md b/frontend/docs/docs/develop/frontend-dev.md index cd475311..25034e8b 100644 --- a/frontend/docs/docs/develop/frontend-dev.md +++ b/frontend/docs/docs/develop/frontend-dev.md @@ -10,7 +10,7 @@ Instead of rebuilding the entire frontend image to view your UI changes, you can The frontend development server requires an existing backend that has been deployed locally or is in production. See [Deploying Browsertrix](../deploy/index.md). -### 2. Node.js ≥18 +### 2. Node.js ≥20 To check if you already have Node.js installed, run the following command in your command line terminal: @@ -18,7 +18,7 @@ To check if you already have Node.js installed, run the following command in you node --version ``` -You should see a version number like `v18.12.1`. If you see a command line error instead of a version number, [install Node.js](https://nodejs.org/en/download/package-manager) before continuing. +You should see a version number like `v20.17.0`. If you see a command line error instead of a version number, [install Node.js](https://nodejs.org/en/download/package-manager) before continuing. ??? question "What if my other project requires a different version of Node.js?" diff --git a/frontend/package.json b/frontend/package.json index cb562cef..59e1c22a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -138,7 +138,7 @@ } }, "engines": { - "node": ">=18" + "node": ">=20 <23" }, "resolutions": { "**/playwright": "1.49.0", diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 6db45d9b..1b6df795 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -1,10 +1,10 @@ -const theme = require("@webrecorder/hickory/tokens/tailwind"); -const { tailwindTransform } = require("postcss-lit"); +import theme from "@webrecorder/hickory/tokens/tailwind"; +import { tailwindTransform } from "postcss-lit"; -const attributes = require("./config/tailwind/plugins/attributes"); -const containPlugin = require("./config/tailwind/plugins/contain"); -const contentVisibilityPlugin = require("./config/tailwind/plugins/content-visibility"); -const cssPartsPlugin = require("./config/tailwind/plugins/parts"); +import attributes from "./config/tailwind/plugins/attributes"; +import containPlugin from "./config/tailwind/plugins/contain"; +import contentVisibilityPlugin from "./config/tailwind/plugins/content-visibility"; +import cssPartsPlugin from "./config/tailwind/plugins/parts"; /** * Merge Shoelace and hickory themes