Skip to content

Upgrade and standardize Node.js setup #834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

desrosj
Copy link
Member

@desrosj desrosj commented Jul 29, 2025

Proposed changes

Note: This branch was created off of #833. That should be discussed and merged before this PR.

This upgrades Node.js to version 22.x, the active LTS version. Version 22.11.0 is used as the minimum required version since it represents the release that transitioned the version from current to LTS status. The version of npm used (10.9.0) is the version bundled with 22.11.0

The GitHub Action workflows have been updated to ensure the desired version is used for testing and releasing.

Other changes

  • The v has been removed from the version in the .nvmrc file, which is best practice.
  • Minimum required versions for node and npm are now defined in the engines field of the package.json file.

This addresses PRESS0-2908, PRESS0-2909, PRESS0-291-, PRESS0-2911.

Type of Change

Production

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update
  • Refactoring / housekeeping (changes to files not directly related to functionality)

Development

  • Tests
  • Dependency update
  • Environment update / refactoring
  • Documentation Update

Visual

Checklist

  • I have read the CONTRIBUTING doc
  • I have viewed my change in a web-browser
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

desrosj added 2 commits July 29, 2025 16:04
This resolves a peer dependency conflict for `@wordpress/element`.
This standardizes the Node.js setup by:
- Upgrading Node.js version to 22.x.
- Removing the `v` from the version in `.nvmrc`
- Added `engines` to the `package.json` file.
- Ensures the same version is used consistently in GitHub Actions workflows.
@desrosj desrosj self-assigned this Jul 29, 2025
@Copilot Copilot AI review requested due to automatic review settings July 29, 2025 20:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the Node.js environment from version 16 to version 22.x (LTS) and standardizes the Node.js setup across the project. The upgrade aligns with the active LTS version and includes proper version constraints to ensure consistency across development and CI environments.

  • Updates Node.js to version 22.11.0 and npm to 10.9.0
  • Standardizes version management through .nvmrc and package.json engines field
  • Updates GitHub Actions workflow to use the .nvmrc file for consistent Node.js versioning

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
package.json Adds engines field with Node.js and npm version constraints, updates UI component library dependency
.nvmrc Updates Node.js version from v16 to 22 and removes version prefix
.github/workflows/lint-check-spa.yml Updates workflow to use .nvmrc file instead of hardcoded Node.js version

@@ -37,7 +41,7 @@
"dependencies": {
"@heroicons/react": "^2.2.0",
"@newfold/js-utility-ui-analytics": "^1.4.0",
"@newfold/ui-component-library": "^1.3.0",
"@newfold/ui-component-library": "^2.0.0",
Copy link
Preview

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

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

The UI component library is being upgraded from ^1.3.0 to ^2.0.0, which represents a major version change that could introduce breaking changes. This should be documented in the PR description or tested thoroughly to ensure compatibility.

Copilot uses AI. Check for mistakes.

Copy link
Contributor

@wpscholar wpscholar requested review from zlateska and wpalani August 12, 2025 14:01
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.

2 participants