You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: npm-shrinkwrap.readme.md
+24-17Lines changed: 24 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,29 +14,34 @@ See https://github.com/npm/npm/issues/3581 for related npm issue. A common sympt
14
14
15
15
To add a new dependency do the following:
16
16
17
-
1. add a new dependency via `npm install -D <packagename>`
18
-
2. update npm-shrinkwrap.json with `npm shrinkwrap --dev`
19
-
3. run `./tools/npm/clean-shrinkwrap.js`
20
-
4. these steps should change 3 files: `package.json`, `npm-shrinkwrap.json` and `npm-shrinkwrap.clean.json`
21
-
5. commit changes to these three files and you are done
17
+
1. if you are on linux or windows, then use MacOS or ask someone with MacOS to perform the installation. This is due to an optional `fsevents` dependency that is really required on MacOS to get good performance from file watching.
18
+
2. make sure you are in sync with `upstream/master`
19
+
3. ensure that your `node_modules` directory is not stale or poisoned by doing a clean install with `rm -rf node_modules && npm install`
20
+
4. add a new dependency via `npm install -D <packagename>`
21
+
5. update npm-shrinkwrap.json with `npm shrinkwrap --dev` (see note below about the `minichain` issue)
22
+
6. run `./tools/npm/clean-shrinkwrap.js`
23
+
7. these steps should change 3 files: `package.json`, `npm-shrinkwrap.json` and `npm-shrinkwrap.clean.json`
24
+
8. commit changes to these three files and you are done
22
25
23
26
24
27
To update existing dependency do the following:
25
28
26
-
1. run `npm install -D <packagename>@<version|latest>` or `npm update <packagename>` to update to the latest version that matches version constraint in `package.json`
27
-
2. relock the dependencies with `npm shrinkwrap --dev`
28
-
3. clean up the shrinkwrap file for review with `./tools/npm/clean-shrinkwrap.js`
29
-
4. these steps should change 2 files: `npm-shrinkwrap.json` and `npm-shrinkwrap.clean.json`. Optionally if you used `npm install ...` in the first step, `package.json` might be modified as well
30
-
5. commit changes to these three files and you are done
29
+
1. if you are on linux or windows, then use MacOS or ask someone with MacOS to perform the installation. This is due to an optional `fsevents` dependency that is really required on MacOS to get good performance from file watching.
30
+
2. make sure you are in sync with `upstream/master`: `git fetch upstream && git rebase upstream/master`
31
+
3. ensure that your `node_modules` directory is not stale or poisoned by doing a clean install with `rm -rf node_modules && npm install`
32
+
4. run `npm install -D <packagename>@<version|latest>` or `npm update <packagename>` to update to the latest version that matches version constraint in `package.json`
33
+
5. relock the dependencies with `npm shrinkwrap --dev` (see note below about the `minichain` issue)
34
+
6. clean up the shrinkwrap file for review with `./tools/npm/clean-shrinkwrap.js`
35
+
7. these steps should change 2 files: `npm-shrinkwrap.json` and `npm-shrinkwrap.clean.json`. Optionally if you used `npm install ...` in the first step, `package.json` might be modified as well
36
+
8. commit changes to these three files and you are done
31
37
32
38
33
-
If updating the `tsd` project a special steps need to be taken due to
34
-
https://github.com/Bartvds/minitable/issues/2:
35
39
36
-
Update `tsd` by following the steps above but before you run `npm shrinkwrap --dev`, you'll have to
37
-
manually patch `node_modules/ts2dart/node_modules/tsd/node_modules/minitable/package.json` and
38
-
`node_modules/tsd/node_modules/minitable/package.json` and remove the `minichain` from
39
-
the `peerDependencies` section.
40
+
=== Note about `minichain` dependency ===
41
+
42
+
Due to https://github.com/Bartvds/minitable/issues/2, we need to do extra dance to `tsd` and its transitive dependency `minitable` whenever we update our shrinkwrap file.
43
+
44
+
1. Manually patch `node_modules/tsd/node_modules/minitable/package.json` and remove the `minichain` from the `peerDependencies` section.
40
45
41
46
before:
42
47
@@ -56,4 +61,6 @@ after:
56
61
},
57
62
```
58
63
59
-
Then resume the shrinkwrap update and cleaning steps.
64
+
2. Then delete the `minichain` directory: `rm -rf tsd/node_modules/minichain`.
65
+
66
+
Afterwards resume the shrinkwrap update and cleaning steps.
0 commit comments