Make WordPress Core

Opened 2 months ago

Closed 2 months ago

Last modified 2 weeks ago

#66041 closed enhancement (fixed)

Add an `.nvmrc` file to bundle themes

Reported by: desrosj Owned by: desrosj
Priority: normal Milestone: 7.2
Component: Build/Test Tools Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

An .nvmrc file is used to specify the version of Node.js that is best to use when working with a given code base for various tools that help juggle between different Node.js releases.

Currently there is an .nvmrc in the root of this repository. Several bundled themes have their own package.json file and best efforts are made for those themes to always use the same version as wordpress-develop.

However, there are occasionally situations where a theme may not be compatible with the version of Node.js that is specified in the main .nvmrc file. And a bundled theme with specified dependencies should also be able to function on it's own outside of wordpress-develop.

Because of this, an .nvmrc file should be added to these themes:

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

Change History (4)

This ticket was mentioned in ​PR #13387 on ​WordPress/wordpress-develop by ​@desrosj.


2 months ago
#1

  • Keywords has-patch added

This adds an .nvmrc file to the 5 themes that rely on Node.js:

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

There are occasionally situations where a theme may not be compatible with the version of Node.js that is specified in the .nvmrc file in the repository root. A bundled theme with specified dependencies should also be able to function on it's own outside of wordpress-develop.

Trac ticket: Core-66041.

## Use of AI Tools

None

This ticket was mentioned in ​Slack in #core-editor by desrosj. ​View the logs.


2 months ago

#3 @desrosj
2 months ago

  • Owner set to desrosj
  • Resolution → fixed
  • Status new → closed

In 63450:

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.

#4 @jorbin
2 weeks ago

In 64973:

iBuild/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.

Reviewed by jeremyfelt.
Merges [63450] to 7.1 branch without the change to the workflow that no longer exists.

Fixes #66041.

Note: See TracTickets for help on using tickets.