Skip to content

chore(ui): pin packageManager to npm@11.6.2#2271

Merged
Charlesthebird merged 10 commits into
kagent-dev:mainfrom
cjlg-soloio:cjlg-soloio/pinPackageManager
Jul 16, 2026
Merged

chore(ui): pin packageManager to npm@11.6.2#2271
Charlesthebird merged 10 commits into
kagent-dev:mainfrom
cjlg-soloio:cjlg-soloio/pinPackageManager

Conversation

@cjlg-soloio

Copy link
Copy Markdown
Contributor

Description


🤖 written by Claude (start)

Follow-up to a review comment on #2180: pins the npm version via the packageManager field so npm install is reproducible and ui/package-lock.json stops picking up metadata churn across npm versions.

ui/.nvmrc pins Node 24.13.0, which bundles npm 11.6.2 — so the field is set to npm@11.6.2, consistent with the Node version CI already reads from .nvmrc.

Files

Modified

  • ui/package.json — adds top-level "packageManager": "npm@11.6.2"
  • ui/package-lock.json — regenerated under npm 11.6.2 to match the pin; metadata-only diff (peer/optional flags), no dependency version changes

Testing

cd ui
corepack enable          # so the pin is enforced locally
npm --version            # -> 11.6.2
npm pkg get packageManager   # -> "npm@11.6.2"

Change type

chore / cleanup — dev tooling only. No product or runtime code changed.

Changelog

NONE


🤖 written by Claude (end)

@cjlg-soloio
cjlg-soloio marked this pull request as ready for review July 16, 2026 14:53
Copilot AI review requested due to automatic review settings July 16, 2026 14:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Pins the UI’s npm version via packageManager and aligns GitHub Actions Node setup with the UI’s .nvmrc to make npm ci/lockfile behavior more reproducible and reduce lockfile churn across npm versions.

Changes:

  • Add "packageManager": "npm@11.6.2" to ui/package.json.
  • Regenerate ui/package-lock.json under npm 11.6.2 (lockfile metadata changes).
  • Update CI and Chromatic workflows to use ui/.nvmrc and enable Corepack before npm ci.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
ui/package.json Adds packageManager pin for npm to improve install reproducibility.
ui/package-lock.json Regenerated lockfile output consistent with the pinned npm version.
.github/workflows/ui-chromatic.yaml Uses .nvmrc for Node version and enables Corepack before installing UI deps.
.github/workflows/ci.yaml Uses .nvmrc for Node version and enables Corepack before installing UI deps in ui-tests.
Files not reviewed (1)
  • ui/package-lock.json: Generated file
Comments suppressed due to low confidence (1)

ui/package-lock.json:983

  • The PR description says the lockfile diff is “metadata-only” (peer/optional flags only), but the regenerated lockfile also removes entire optional package entries (e.g. there is no longer any node_modules/@emnapi/core or node_modules/@emnapi/runtime package record in the packages map) and drops several libc constraints elsewhere. Please update the description accordingly and/or confirm npm ci remains reproducible across platforms (e.g., glibc vs musl) with the new lockfile.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Charlesthebird
Charlesthebird previously approved these changes Jul 16, 2026
Node 24.13.0 (ui/.nvmrc) bundles npm 11.6.2. Pinning packageManager
keeps npm installs reproducible and prevents package-lock.json metadata
churn across npm versions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>
cjlg-soloio and others added 9 commits July 16, 2026 12:28
Regenerated with the pinned npm (11.6.2) so the lockfile matches the
packageManager field. Diff is metadata-only (peer/optional flags); no
dependency version changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>
Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>
Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>
Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>
Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>
The ui-tests job ran npm ci with the latest npm bundled in node 24.x
(11.8.0), but the lock file was regenerated with the pinned npm@11.6.2,
so the @emnapi optional-dep tree resolved differently and npm ci failed
as out of sync. Pin Node via ui/.nvmrc and enable corepack so npm ci
uses the packageManager version that generated the lock file.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>

Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>
Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>

Signed-off-by: Carlos Logroño Guerrero <carlos.logrono@solo.io>
The wolfi-base default "npm" apk package tracks a newer npm major (12.x)
whose stricter optional-dependency resolution rejects the committed
package-lock.json, failing the build (ui) job with EUSAGE (missing @emnapi/*
records). Derive the npm version from package.json "packageManager"
(npm@11.6.2) and pin the apk npm to it, so the image resolves the lock with
the same npm that generated it — no extra download, no hardcoded version, and
no lock-file churn.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
@cjlg-soloio
cjlg-soloio force-pushed the cjlg-soloio/pinPackageManager branch from ee6f3a2 to ef40fd0 Compare July 16, 2026 16:30
@Charlesthebird
Charlesthebird merged commit a818ead into kagent-dev:main Jul 16, 2026
32 checks passed
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.

3 participants