diff --git a/.github/workflows/create-block.yml b/.github/workflows/create-block.yml index 1795cec4dcf2ef..2a703fd124126a 100644 --- a/.github/workflows/create-block.yml +++ b/.github/workflows/create-block.yml @@ -27,14 +27,12 @@ jobs: fail-fast: false matrix: event: ['${{ github.event_name }}'] - node: ['20', '22', '24'] + node: ['24', '26'] os: ['macos-15', 'ubuntu-24.04', 'windows-2025'] exclude: - # On PRs: Only test Node 20 on Ubuntu + # Only test Node 24 on Ubuntu for pull requests. - event: 'pull_request' - node: '22' - - event: 'pull_request' - node: '24' + node: '26' - event: 'pull_request' os: 'macos-15' - event: 'pull_request' diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index 9bba5f37a94ce7..c826a29632e0ea 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -21,7 +21,7 @@ permissions: {} jobs: check: - name: All${{ (matrix.node != '20' || matrix.os != 'ubuntu-24.04') && format(' (Node.js {0} on {1})', matrix.node, contains(matrix.os, 'macos-') && 'MacOS' || contains(matrix.os, 'windows-') && 'Windows' || 'Linux') || '' }} + name: All${{ (matrix.node != '24' || matrix.os != 'ubuntu-24.04') && format(' (Node.js {0} on {1})', matrix.node, contains(matrix.os, 'macos-') && 'MacOS' || contains(matrix.os, 'windows-') && 'Windows' || 'Linux') || '' }} runs-on: ${{ matrix.os }} env: NODE_OPTIONS: --max-old-space-size=4096 @@ -31,7 +31,7 @@ jobs: strategy: matrix: event: ['${{ github.event_name }}'] - node: ['20', '22', '24'] + node: ['24', '26'] os: ['macos-15', 'ubuntu-24.04', 'windows-2025'] include: @@ -40,9 +40,9 @@ jobs: os: 'ubuntu-24.04' annotations: true exclude: - # On PRs: Only test Node 20 on Ubuntu and Windows + # Only test Node 24 on Ubuntu and Windows for pull requests. - event: 'pull_request' - node: '22' + node: '26' - event: 'pull_request' os: 'macos-15' @@ -59,7 +59,7 @@ jobs: cache: npm - name: Pin npm version for consistency - run: npm install -g npm@10 + run: npm install -g npm@11 - name: npm install # A "full" install is executed, since `npm ci` does not always exit diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index fb022bd5759eb0..9ffe9e345dfb9a 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -35,14 +35,12 @@ jobs: fail-fast: false matrix: event: ['${{ github.event_name }}'] - node: ['20', '22', '24'] + node: ['24', '26'] shard: ['1/4', '2/4', '3/4', '4/4'] exclude: - # On PRs: Only test Node 20 + # Only test Node 24 for pull requests. - event: 'pull_request' - node: '22' - - event: 'pull_request' - node: '24' + node: '26' steps: - name: Checkout repository @@ -87,13 +85,11 @@ jobs: fail-fast: false matrix: event: ['${{ github.event_name }}'] - node: ['20', '22', '24'] + node: ['24', '26'] exclude: - # On PRs: Only test Node 20 - - event: 'pull_request' - node: '22' + # On PRs: Only test Node 24 - event: 'pull_request' - node: '24' + node: '26' steps: - name: Checkout repository diff --git a/.nvmrc b/.nvmrc index 209e3ef4b6247c..82d5d714347ef9 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 +24.18 diff --git a/docs/contributors/code/getting-started-with-code-contribution.md b/docs/contributors/code/getting-started-with-code-contribution.md index d4032d3d670d1e..f281cf19c5d06f 100644 --- a/docs/contributors/code/getting-started-with-code-contribution.md +++ b/docs/contributors/code/getting-started-with-code-contribution.md @@ -5,7 +5,7 @@ The following guide is for setting up your local environment to contribute to th ## Prerequisites - Node.js - Gutenberg is a JavaScript project that requires [Node.js](https://nodejs.org/). The project is currently built using Node.js v20 and npm v10. Though best efforts are made to always use the Active LTS version of Node.js, this will not always be the case. For more details, please refer to the [Node.js release schedule](https://github.com/nodejs/Release#release-schedule). + Gutenberg is a JavaScript project that requires [Node.js](https://nodejs.org/). The project is currently built using Node.js v24 and npm v11. Though best efforts are made to always use the Active LTS version of Node.js, this will not always be the case. For more details, please refer to the [Node.js release schedule](https://github.com/nodejs/Release#release-schedule). We recommend using the [Node Version Manager](https://github.com/nvm-sh/nvm) (nvm) since it is the easiest way to install and manage node for macOS, Linux, and Windows 10 using WSL2. See [our Development Tools guide](/docs/getting-started/devenv/README.md#development-tools) or the Nodejs site for additional installation instructions. diff --git a/package-lock.json b/package-lock.json index 3d23012c9ee76f..b12368d6c61edf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,8 +38,8 @@ "wait-on": "^8.0.1" }, "engines": { - "node": ">=20.19.0", - "npm": ">=10.2.3" + "node": ">=24.18.0", + "npm": ">=11.16.0" } }, "node_modules/@actions/core": { diff --git a/package.json b/package.json index 991700d5140fbf..039601e1fc21f5 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "url": "https://github.com/WordPress/gutenberg/issues" }, "engines": { - "node": ">=20.19.0", - "npm": ">=10.2.3" + "node": ">=24.18.0", + "npm": ">=11.16.0" }, "wpPlugin": { "name": "gutenberg",