From 6d921a48b609b8a61826c4d9beebb94e54554f01 Mon Sep 17 00:00:00 2001 From: Matt Fiddaman Date: Mon, 12 May 2025 13:49:09 -0400 Subject: [PATCH] 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 --- .github/actions/setup/action.yml | 8 ++++++-- .github/workflows/check.yml | 2 +- .github/workflows/issues-feature-implemented.yml | 2 +- .github/workflows/publish-npm-packages.yml | 2 +- .nvmrc | 2 +- package.json | 2 +- packages/api/package.json | 2 +- upcoming-release-notes/4978.md | 6 ++++++ 8 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 upcoming-release-notes/4978.md diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index eb0cd07a65..829ae23285 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -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 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index d2cee1445a..ee9c60da13 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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 diff --git a/.github/workflows/issues-feature-implemented.yml b/.github/workflows/issues-feature-implemented.yml index a7ab00ade4..15301dec6f 100644 --- a/.github/workflows/issues-feature-implemented.yml +++ b/.github/workflows/issues-feature-implemented.yml @@ -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: diff --git a/.github/workflows/publish-npm-packages.yml b/.github/workflows/publish-npm-packages.yml index b5dfb491a0..71cd7454da 100644 --- a/.github/workflows/publish-npm-packages.yml +++ b/.github/workflows/publish-npm-packages.yml @@ -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 diff --git a/.nvmrc b/.nvmrc index 8ddbc0c64a..fed2115258 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.16.0 +v20/* diff --git a/package.json b/package.json index 143a2b257a..5e5fb2b800 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "rollup": "4.40.1" }, "engines": { - "node": ">=18.0.0" + "node": ">=20" }, "lint-staged": { "*.{js,jsx,ts,tsx,md,json,yml}": [ diff --git a/packages/api/package.json b/packages/api/package.json index e8c8c01539..5e70666888 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -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", diff --git a/upcoming-release-notes/4978.md b/upcoming-release-notes/4978.md new file mode 100644 index 0000000000..f144206645 --- /dev/null +++ b/upcoming-release-notes/4978.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [matt-fidd] +--- + +Change minimum version of Node.js to version 20