| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3807c68 commit 2a4f4f8
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,68 @@ | |||
| 1 | + # Maintaining npm in Node.js | ||
| 2 | + | ||
| 3 | + ## Step 1: Clone npm | ||
| 4 | + | ||
| 5 | + ```console | ||
| 6 | + $ git clone https://github.com/npm/npm.git | ||
| 7 | + $ cd npm | ||
| 8 | + ``` | ||
| 9 | + | ||
| 10 | + or if you already have npm cloned make sure the repo is up to date | ||
| 11 | + | ||
| 12 | + ```console | ||
| 13 | + $ git remote update -p | ||
| 14 | + $ git reset --hard origin latest | ||
| 15 | + ``` | ||
| 16 | + | ||
| 17 | + ## Step 2: Build release | ||
| 18 | + | ||
| 19 | + ```console | ||
| 20 | + $ git checkout vX.Y.Z | ||
| 21 | + $ make release | ||
| 22 | + ``` | ||
| 23 | + | ||
| 24 | + Note: please run `npm dist-tag ls npm` and make sure this is the `latest` **dist-tag**. `latest` on git is usually released as `next` when it's time to downstream | ||
| 25 | + | ||
| 26 | + ## Step 3: Remove old npm | ||
| 27 | + | ||
| 28 | + ```console | ||
| 29 | + $ cd /path/to/node | ||
| 30 | + $ git remote update -p | ||
| 31 | + $ git checkout -b npm-x.y.z origin/master | ||
| 32 | + $ cd deps | ||
| 33 | + $ rm -rf npm | ||
| 34 | + ``` | ||
| 35 | + | ||
| 36 | + ## Step 4: Extract and commit new npm | ||
| 37 | + | ||
| 38 | + ```console | ||
| 39 | + $ tar zxf /path/to/npm/release/npm-x.y.z.tgz | ||
| 40 | + $ git add -A npm | ||
| 41 | + $ git commit -m "deps: upgrade npm to x.y.z" | ||
| 42 | + $ cd .. | ||
| 43 | + ``` | ||
| 44 | + | ||
| 45 | + ## Step 5: Update licenses | ||
| 46 | + | ||
| 47 | + ```console | ||
| 48 | + $ ./configure | ||
| 49 | + $ make -j4 | ||
| 50 | + $ ./tools/license-builder.sh | ||
| 51 | + # The following commands are only necessary if there are changes | ||
| 52 | + $ git add . | ||
| 53 | + $ git commit -m "doc: update npm LICENSE using license-builder.sh" | ||
| 54 | + ``` | ||
| 55 | + | ||
| 56 | + Note: please ensure you are only making the updates that are changed by npm. | ||
| 57 | + | ||
| 58 | + ## Step 6: Apply Whitespace fix | ||
| 59 | + | ||
| 60 | + ```console | ||
| 61 | + $ git rebase --whitespace=fix master | ||
| 62 | + ``` | ||
| 63 | + | ||
| 64 | + ## Step 7: Test the build | ||
| 65 | + | ||
| 66 | + ```console | ||
| 67 | + $ make test-npm | ||
| 68 | + ``` | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments