diff --git a/.github/workflows/callable-test-core-build-process.yml b/.github/workflows/callable-test-core-build-process.yml index c1acb04acf..a9523ec343 100644 --- a/.github/workflows/callable-test-core-build-process.yml +++ b/.github/workflows/callable-test-core-build-process.yml @@ -49,6 +49,7 @@ jobs: uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: node-version-file: '.nvmrc' + check-latest: true cache: npm - name: Log debug information diff --git a/.github/workflows/callable-test-gutenberg-build-process.yml b/.github/workflows/callable-test-gutenberg-build-process.yml index 1c2ab24f98..ef41cff56e 100644 --- a/.github/workflows/callable-test-gutenberg-build-process.yml +++ b/.github/workflows/callable-test-gutenberg-build-process.yml @@ -57,6 +57,7 @@ jobs: uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: node-version-file: '.nvmrc' + check-latest: true cache: npm cache-dependency-path: | package-lock.json diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index c3e629367f..356d5f7724 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -71,12 +71,14 @@ jobs: # - Run performance tests (current commit). # - Print performance tests results. # - Check out target commit (target branch or previous commit). + # - Switch Node.js versions if necessary. # - Install npm dependencies. # - Build WordPress. # - Run any database upgrades. # - Run performance tests (previous/target commit). # - Print target performance tests results. # - Reset to original commit. + # - Switch Node.js versions if necessary. # - Install npm dependencies. # - Set the environment to the baseline version. # - Run any database upgrades. @@ -190,6 +192,12 @@ jobs: fi git reset --hard $TARGET_SHA + - name: Set up Node.js + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 + with: + node-version-file: '.nvmrc' + cache: npm + - name: Install npm dependencies run: npm ci @@ -212,6 +220,12 @@ jobs: - name: Reset to original commit run: git reset --hard $GITHUB_SHA + - name: Set up Node.js + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 + with: + node-version-file: '.nvmrc' + cache: npm + - name: Install npm dependencies run: npm ci diff --git a/.nvmrc b/.nvmrc index b6a7d89c68..209e3ef4b6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +20 diff --git a/README.md b/README.md index 8e7411241f..9af956b28e 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ You will need Node and npm installed on your computer. Node is a JavaScript runt If you are not using a package manager, see the [Node.js download page](https://nodejs.org/en/download/) for installers and binaries. -**Note:** WordPress currently only officially supports Node.js `16.x` and npm `8.x`. +**Note:** WordPress currently only officially supports Node.js `20.x` and npm `10.x`. You will also need [Docker](https://www.docker.com/products/docker-desktop) installed and running on your computer. Docker is the virtualization software that powers the local development environment. Docker can be installed just like any other regular application. diff --git a/package-lock.json b/package-lock.json index 573ea49ed2..0c83ac3d13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -158,8 +158,8 @@ "webpack-livereload-plugin": "3.0.2" }, "engines": { - "node": ">=16.19.1", - "npm": ">=8.19.3 <9" + "node": ">=20.10.0", + "npm": ">=10.2.3" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 7177b30865..3dc447fcb3 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "url": "https://develop.svn.wordpress.org/trunk" }, "engines": { - "node": ">=16.19.1", - "npm": ">=8.19.3 <9" + "node": ">=20.10.0", + "npm": ">=10.2.3" }, "author": "The WordPress Contributors", "license": "GPL-2.0-or-later",