Make WordPress Core

Changeset 63450


Ignore:
Timestamp:
09/03/2026 07:36:47 PM (2 months ago)
Author:
desrosj
Message:

Build/Test Tools: Add .nvmrc files to default themes.

Today there are 5 default themes that have package.json files:

  • Twenty Nineteen
  • Twenty Twenty
  • Twenty Twenty-One
  • Twenty Twenty-Two
  • Twenty Twenty-Five

The .nvmrc file at the root of the repository will be used when modifying these themes in the context of a wordpress-develop checkout. But these themes exist outside of wordpress-develop more often than not. And there are times where the version of Node.js used by Core is not the same as one or more of the themes (this is currently the case with Twenty Nineteen).

This adds an .nvmrc file to each of the 5 themes that rely on Node.js. The theme testing GitHub Actions workflow is also updated to use each theme’s individual .nvmrc files to determine which version of Node.js to use instead of always defaulting to the version used for Core itself.

Fixes #66041.

Location:
trunk
Files:
5 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/test-and-zip-default-themes.yml

    r63396 r63450  
    161161        uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
    162162        with:
    163           node-version-file: '.nvmrc'
     163          node-version-file: 'src/wp-content/themes/${{ matrix.theme }}/.nvmrc'
    164164          cache: npm
    165165          cache-dependency-path: src/wp-content/themes/${{ matrix.theme }}/package-lock.json
    … …  
    246246        uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
    247247        with:
    248           node-version-file: '.nvmrc'
     248          node-version-file: 'src/wp-content/themes/${{ matrix.theme }}/.nvmrc'
    249249          cache: npm
    250250          cache-dependency-path: src/wp-content/themes/${{ matrix.theme }}/package-lock.json
Note: See TracChangeset for help on using the changeset viewer.