docs: add instructions to upgrade npm#2579
Open
MikeMcC399 wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Link check issue addressed in #2577 |
Contributor
Author
MikeMcC399
marked this pull request as ready for review
July 26, 2026 13:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add instructions to docs/BestPractices on how to upgrade the version of npm from the one packaged with Node.js.
Motivation and Context
npm is bundled with Node.js as described in the Node.js Distribution Policy document.
Although new
semver-minornpm releases flow into their related new Node.js releases as a matter of course, factors such as release cadence and stability policies, mean that npm releases regularly experience a delay before they appear packaged in Node.js. This can pose a problem for users urgently needing npm fixes.The Node.js backporting policy specifies a minimum of 2 weeks' availability in the current release line before a commit is backported to the Active LTS release line. Current releases have a cadence of 2 weeks, Active LTS is based on a 4 week cadence (see release plans in https://github.com/nodejs/Release/issues). This adds up to 8 weeks settling-in time.
Whether npm
semver-majorupdates are backported to existing Node.js release lines, is subject to decision making.The latest major version of npm is 12.x and this the subject of an open request under nodejs/Release#1161. Node.js currently bundles npm as shown below.
npm 12.x blocks unapproved lifecycle scripts by default - see npm install-scripts. Users may want to have access to this functionality before it is deployed packaged with Node.js
Adding instructions to the documentation assists
nodeDocker users to take advantage of newer npm releases that may include bug fixes, vulnerability remediations or new features. If a bundled version of npm causes compatibility issues for a user, they can also use the same method to downgrade npm to a lower compatible version.Testing Details
Testing logs
Types of changes
Checklist