change minimum version of Node.js to version 20 (#4978)

* update workflows

* update supported engines in package.json

* .nvmrc

* base yarn cache on node version being used rather than .nvmrc

* note
This commit is contained in:
Matt Fiddaman
2025-05-12 13:49:09 -04:00
committed by GitHub
parent 2d0716233f
commit 6d921a48b6
8 changed files with 18 additions and 8 deletions

View File

@@ -16,17 +16,21 @@ runs:
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18.16.0
node-version: 20
- name: Install yarn
run: npm install -g yarn
shell: bash
if: ${{ env.ACT }}
- name: Get Node version
id: get-node
run: echo "version=$(node -v)" >> "$GITHUB_OUTPUT"
shell: bash
- name: Cache
uses: actions/cache@v4
id: cache
with:
path: ${{ format('{0}/**/node_modules', inputs.working-directory) }}
key: yarn-v1-${{ runner.os }}-${{ hashFiles(format('{0}/.nvmrc', inputs.working-directory)) }}-${{ hashFiles(format('{0}/**/yarn.lock', inputs.working-directory)) }}
key: yarn-v1-${{ runner.os }}-${{ steps.get-node.outputs.version }}-${{ hashFiles(format('{0}/**/yarn.lock', inputs.working-directory)) }}
- name: Install
working-directory: ${{ inputs.working-directory }}
run: yarn --immutable

View File

@@ -43,6 +43,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '19'
node-version: 20
- name: Check migrations
run: node ./.github/actions/check-migrations.js

View File

@@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '19'
node-version: 20
- name: Handle feature requests
run: node .github/actions/handle-feature-requests.js
env:

View File

@@ -56,7 +56,7 @@ jobs:
- name: Setup node and npm registry
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Publish Web

2
.nvmrc
View File

@@ -1 +1 @@
v18.16.0
v20/*

View File

@@ -83,7 +83,7 @@
"rollup": "4.40.1"
},
"engines": {
"node": ">=18.0.0"
"node": ">=20"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,md,json,yml}": [

View File

@@ -4,7 +4,7 @@
"license": "MIT",
"description": "An API for Actual",
"engines": {
"node": ">=18.12.0"
"node": ">=20"
},
"main": "dist/index.js",
"types": "@types/index.d.ts",

View File

@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [matt-fidd]
---
Change minimum version of Node.js to version 20