deps: Upgrade to Node 22 (#2274)

- Upgrades build to use Node 22
- Adds version matrix to GH workflow to test compatibility with 20
This commit is contained in:
sua yoo 2025-01-07 11:58:23 -08:00 committed by GitHub
parent 71a83bb2e4
commit 3b6f63f030
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 16 additions and 14 deletions

View File

@ -10,6 +10,9 @@ on:
jobs: jobs:
setup-and-build: setup-and-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
node: [20, 22]
steps: steps:
# Setup: # Setup:
@ -21,7 +24,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '18' node-version: ${{ matrix.node }}
cache: 'yarn' cache: 'yarn'
cache-dependency-path: frontend/yarn.lock cache-dependency-path: frontend/yarn.lock

View File

@ -25,7 +25,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '20' node-version: '22'
cache: 'yarn' cache: 'yarn'
cache-dependency-path: frontend/yarn.lock cache-dependency-path: frontend/yarn.lock

View File

@ -27,7 +27,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '18' node-version: '22'
cache: 'yarn' cache: 'yarn'
cache-dependency-path: frontend/yarn.lock cache-dependency-path: frontend/yarn.lock
- name: Install dependencies - name: Install dependencies

View File

@ -1 +0,0 @@
ignore-engines true

View File

@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.4 # 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 WORKDIR /app
COPY .yarnrc yarn.lock package.json ./ COPY .yarnrc yarn.lock package.json ./

View File

@ -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). 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: 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 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?" ??? question "What if my other project requires a different version of Node.js?"

View File

@ -138,7 +138,7 @@
} }
}, },
"engines": { "engines": {
"node": ">=18" "node": ">=20 <23"
}, },
"resolutions": { "resolutions": {
"**/playwright": "1.49.0", "**/playwright": "1.49.0",

View File

@ -1,10 +1,10 @@
const theme = require("@webrecorder/hickory/tokens/tailwind"); import theme from "@webrecorder/hickory/tokens/tailwind";
const { tailwindTransform } = require("postcss-lit"); import { tailwindTransform } from "postcss-lit";
const attributes = require("./config/tailwind/plugins/attributes"); import attributes from "./config/tailwind/plugins/attributes";
const containPlugin = require("./config/tailwind/plugins/contain"); import containPlugin from "./config/tailwind/plugins/contain";
const contentVisibilityPlugin = require("./config/tailwind/plugins/content-visibility"); import contentVisibilityPlugin from "./config/tailwind/plugins/content-visibility";
const cssPartsPlugin = require("./config/tailwind/plugins/parts"); import cssPartsPlugin from "./config/tailwind/plugins/parts";
/** /**
* Merge Shoelace and hickory themes * Merge Shoelace and hickory themes