Skip to content

Docs: Update CONTRIBUTING.md to Include node and npm version requirement detail#540

Merged
dkotter merged 3 commits into
WordPress:developfrom
hbhalodia:feature/issue-539
May 14, 2026
Merged

Docs: Update CONTRIBUTING.md to Include node and npm version requirement detail#540
dkotter merged 3 commits into
WordPress:developfrom
hbhalodia:feature/issue-539

Conversation

@hbhalodia
Copy link
Copy Markdown
Contributor

@hbhalodia hbhalodia commented May 13, 2026

What?

Closes #539

Why?

  • PR updates the CONTRIBUTING.md file to include the nvm use, so developers/contributors can use the specified version of node from the repo.

How?

  • Add nvm use command to Install and build assets step.

Use of AI Tools

  • None

Testing Instructions

  • When installing the plugin first time, it should use the node version that is added in the repository.

Screenshots or screencast

Before After

Changelog Entry

Added - New feature.
Changed - Existing functionality.
Deprecated - Soon-to-be removed feature.
Removed - Feature.
Fixed - Bug fix.
Security - Vulnerability.
Developer - Development related updates.

Updated CONTRIBUTING.md to include nvm use command.

Open WordPress Playground Preview

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@hbhalodia hbhalodia changed the title Feature: Update CONTRIBUTING.md to Include nvm use Docs: Update CONTRIBUTING.md to Include nvm use May 13, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.20%. Comparing base (27ac41f) to head (c94a4a0).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #540      +/-   ##
=============================================
+ Coverage      70.72%   71.20%   +0.47%     
- Complexity      1144     1150       +6     
=============================================
  Files             67       67              
  Lines           5510     5563      +53     
=============================================
+ Hits            3897     3961      +64     
+ Misses          1613     1602      -11     
Flag Coverage Δ
unit 71.20% <ø> (+0.47%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread CONTRIBUTING.md Outdated

```bash
composer install && npm i && npm run build
composer install && nvm use && npm i && npm run build
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thing but I'll note there are other options to set the node and npm version outside of nvm. While I use nvm myself I realize not everyone does so not sure if we want to make that a requirement here.

I'd maybe suggest instead of adding nvm use to the step here, we just add a call out that those looking to contribute need to ensure they have the right node and npm version and maybe suggest nvm as a solution for that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dkotter for the review,

I'll note there are other options to set the node and npm version outside of nvm

Yes Agree on this, while I mostly use nvm use as well.

I'd maybe suggest instead of adding nvm use to the step here, we just add a call out that those looking to contribute need to ensure they have the right node and npm version and maybe suggest nvm as a solution for that.

I could update the PR as per suggestion, to include that which refer .nvmrc for correct node version, and if using nvm to switch node versions, use nvm use before npm install step.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth noting it's not just node version, it's npm version as well. These are documented in our package.json file so probably a good idea to update instructions to say something along the lines of verify your node and npm version match the minimum requirements in package.json

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dkotter, Have updated the messaging. Can you please review if anything needs to be updated/changed in the wordings, I would be happy to update that.

Thanks,

Comment thread .nvmrc Outdated
@@ -1 +1 @@
22
22.21.1
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkotter, Have updated this to exact node version used in package.json. Reason being, when I initially cloned the repo, I was having node version 22.14.0, So nvm use pointed to that version. On build got error, because min required version is 22.21.1. Hence it should be good to have nvmrc file as the exact version.

Thanks,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess my concern here is ideally people are using the latest compatible version of node. Right now the latest on the v22 branch is 22.22.3 but this will now force people to always use an older version. I think ideal is keeping this as 22 and if someone has an older version of v22 on their machine they'll need to update that for things to work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, have not though of that. Will revert the change.

@hbhalodia hbhalodia changed the title Docs: Update CONTRIBUTING.md to Include nvm use Docs: Update CONTRIBUTING.md to Include node and npm version requirement detail May 14, 2026
@hbhalodia hbhalodia requested a review from dkotter May 14, 2026 04:32
@dkotter dkotter merged commit de6371e into WordPress:develop May 14, 2026
18 checks passed
@jeffpaul jeffpaul added this to the 1.0.0 milestone May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update CONTRIBUTING.md to Include nvm use

3 participants