Skip to content

chore(frontend): add engines field to package.json#13038

Open
jsonmp-k8 wants to merge 2 commits intokubeflow:masterfrom
jsonmp-k8:chore/frontend-engines-field
Open

chore(frontend): add engines field to package.json#13038
jsonmp-k8 wants to merge 2 commits intokubeflow:masterfrom
jsonmp-k8:chore/frontend-engines-field

Conversation

@jsonmp-k8
Copy link
Contributor

@jsonmp-k8 jsonmp-k8 commented Mar 14, 2026

Summary

  • Adds "engines": { "node": ">=24.0.0 <25.0.0" } to frontend/package.json to constrain to the Node 24 LTS line
  • Adds frontend/.npmrc with engine-strict=true so npm ci/npm install fails (not just warns) on version mismatch
  • Un-ignores .npmrc in frontend/.gitignore so the project config is tracked (personal overrides belong in ~/.npmrc)
  • Surfaces Node.js version mismatches early during npm install rather than at runtime

Depends on #13037 (Node 24 upgrade) being merged first.

Test plan

  • npm ci succeeds with Node 24
  • npm ci fails with Node 22 (engines check enforced via .npmrc)
  • npm ci fails with Node 25+ (upper bound constraint)
  • CI frontend tests pass

Copilot AI review requested due to automatic review settings March 14, 2026 03:39
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jeffspahr for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jsonmp-k8
Copy link
Contributor Author

/ok-to-test

Copy link
Contributor

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

Adds a Node.js version constraint to the frontend’s package.json to help align local/CI environments with the intended Node version (per the Node 24 upgrade work in #13037).

Changes:

  • Add "engines": { "node": ">=24.0.0" } to frontend/package.json.

Enforce a minimum Node.js version of 24.0.0 in package.json to
prevent version drift and surface mismatches early during
npm install rather than at runtime.

Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
- Tighten engines range to >=24.0.0 <25.0.0 to prevent unintended
  major version upgrades
- Add .npmrc with engine-strict=true so npm ci/install fails on
  version mismatch instead of just warning
- Un-ignore .npmrc in .gitignore so the project config is tracked

Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
@jsonmp-k8 jsonmp-k8 force-pushed the chore/frontend-engines-field branch from 39fc9e2 to 53182e2 Compare March 14, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants