1# Maintaining npm in Node.js 2 3New pull requests should be opened when a "next" version of npm has 4been released. Once the "next" version has been promoted to "latest" 5the PR should be updated as necessary. 6 7The specific Node.js release streams the new version will be able to land into 8are at the discretion of the release and LTS teams. 9 10This process only covers full updates to new versions of npm. Cherry-picked 11changes can be reviewed and landed via the normal consensus seeking process. 12 13## Step 1: Run the update script 14 15In the following examples, `x.y.z` should match the npm version to update to. 16 17```console 18$ ./tools/update-npm.sh x.y.z 19``` 20 21## Step 2: Commit new npm 22 23```console 24$ git add -A deps/npm 25$ git commit -m "deps: upgrade npm to x.y.z" 26``` 27 28## Step 3: Update licenses 29 30```console 31$ ./configure 32$ make -j4 33$ ./tools/license-builder.sh 34# The following commands are only necessary if there are changes 35$ git add . 36$ git commit -m "doc: update npm LICENSE using license-builder.sh" 37``` 38 39Note: please ensure you are only making the updates that are changed by npm. 40 41## Step 4: Apply whitespace fix 42 43```console 44$ git rebase --whitespace=fix master 45``` 46 47## Step 5: Test the build 48 49```console 50$ make test-npm 51``` 52