docs(node): add section on pinning npm version#8925
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request adds a new section to the Node.js documentation explaining how to pin npm versions alongside Node.js in mise.toml. A review comment suggests combining the separate pinning commands for Node and npm into a single command to improve efficiency.
| mise use --pin node@lts | ||
| mise use --pin npm@latest |
Greptile SummaryThis documentation-only PR adds a "Pinning npm version" section to Key changes:
Confidence Score: 5/5Safe to merge immediately — pure documentation with no runtime or behavioral changes. No issues found. The No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Need consistent npm version across team] --> B{Choose approach}
B --> C["Manual: edit mise.toml directly"]
B --> D["CLI: mise use --pin node@lts npm@latest"]
C --> E["[tools]\nnode = \"24\"\nnpm = \"11\""]
D --> F["Aliases resolved to exact versions\nnode = \"24.14.1\"\nnpm = \"11.12.1\""]
E --> G[mise installs both tools]
F --> G
G --> H["npm --version returns pinned version\n(overrides Node's bundled npm)"]
H --> I[Consistent npm across all team machines]
Reviews (3): Last reviewed commit: "docs: update npm pinning example to node..." | Re-trigger Greptile |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Node 24 is current LTS. The unpinned example showed node 22 while the pinned output showed 24.14.1, which could confuse readers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.4 x -- echo |
18.4 ± 0.5 | 17.3 | 23.4 | 1.00 |
mise x -- echo |
19.4 ± 0.6 | 18.2 | 24.8 | 1.05 ± 0.05 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.4 env |
18.2 ± 0.7 | 17.2 | 24.0 | 1.00 |
mise env |
18.8 ± 0.4 | 17.7 | 20.1 | 1.04 ± 0.04 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.4 hook-env |
18.6 ± 1.2 | 17.7 | 36.6 | 1.00 |
mise hook-env |
19.4 ± 2.2 | 18.3 | 66.4 | 1.04 ± 0.13 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.4 ls |
17.2 ± 1.0 | 16.0 | 33.5 | 1.00 |
mise ls |
17.9 ± 0.7 | 17.0 | 27.4 | 1.04 ± 0.07 |
xtasks/test/perf
| Command | mise-2026.4.4 | mise | Variance |
|---|---|---|---|
| install (cached) | 117ms | 117ms | +0% |
| ls (cached) | 67ms | 68ms | -1% |
| bin-paths (cached) | 69ms | 70ms | -1% |
| task-ls (cached) | 716ms | 706ms | +1% |
### 🚀 Features - **(config)** report env files in config ls and doctor output by @SamSoldatenko in [#8853](#8853) - add support for token sources in GitLab and Forgejo by @roele in [#8868](#8868) ### 🐛 Bug Fixes - **(aqua)** prevent double .exe extension when Windows override URL already ends in .exe by @yusei-wy in [#8863](#8863) - **(bash)** avoid duplicate trust warning after cd by @timothysparg in [#8920](#8920) - **(env)** prevent config root injection into PATH via _.source by @jdx in [#8936](#8936) - **(install)** suppress spurious dependency warning when tool is configured by @jdx in [#8923](#8923) ### 📚 Documentation - **(node)** add section on pinning npm version by @jdx in [#8925](#8925) - add Windows default paths and mise.toml examples alongside CLI commands by @jdx in [#8926](#8926) - clarify common sources of confusion from GitHub discussions by @jdx in [#8927](#8927) - clarify Python venv mechanisms, JAVA_HOME behavior, and activation performance by @jdx in [#8928](#8928) - add FAQ and troubleshooting entries based on common Discord questions by @jdx in [#8930](#8930) ### New Contributors - @SamSoldatenko made their first contribution in [#8853](#8853) - @yusei-wy made their first contribution in [#8863](#8863)
Summary
mise.tomlapproach and themise use --pinCLI approachTest plan
npm:npmpinning works in Docker container (Ubuntu 24.04)mise use --pin node@ltsresolves to exact versionmise use --pin npm@latestresolves to exact versionmise.toml(node before npm and npm before node both work)🤖 Generated with Claude Code
Note
Low Risk
Documentation-only change describing how to pin
npmversions; no runtime or behavioral code changes.Overview
Adds a new “Pinning npm version” section to the Node docs explaining how to manage
npmas a separate tool alongsidenodeinmise.Includes examples for setting versions in
mise.tomland usingmise use --pinto resolve aliases likelts/latestto exact versions, clarifying that pinnednpmoverrides the bundled Nodenpm.Reviewed by Cursor Bugbot for commit 3a04c77. Bugbot is set up for automated code reviews on this repo. Configure here.