parent
							
								
									5ed091e260
								
							
						
					
					
						commit
						ac510b67cc
					
				| @ -14,29 +14,34 @@ See https://github.com/npm/npm/issues/3581 for related npm issue. A common sympt | |||||||
| 
 | 
 | ||||||
| To add a new dependency do the following: | To add a new dependency do the following: | ||||||
| 
 | 
 | ||||||
| 1. add a new dependency via `npm install -D <packagename>` | 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. | ||||||
| 2. update npm-shrinkwrap.json with `npm shrinkwrap --dev` | 2. make sure you are in sync with `upstream/master` | ||||||
| 3. run `./tools/npm/clean-shrinkwrap.js` | 3. ensure that your `node_modules` directory is not stale or poisoned by doing a clean install with `rm -rf node_modules && npm install` | ||||||
| 4. these steps should change 3 files: `package.json`, `npm-shrinkwrap.json` and `npm-shrinkwrap.clean.json` | 4. add a new dependency via `npm install -D <packagename>` | ||||||
| 5. commit changes to these three files and you are done | 5. update npm-shrinkwrap.json with `npm shrinkwrap --dev` (see note below about the `minichain` issue) | ||||||
|  | 6. run `./tools/npm/clean-shrinkwrap.js` | ||||||
|  | 7. these steps should change 3 files: `package.json`, `npm-shrinkwrap.json` and `npm-shrinkwrap.clean.json` | ||||||
|  | 8. commit changes to these three files and you are done | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| To update existing dependency do the following: | To update existing dependency do the following: | ||||||
| 
 | 
 | ||||||
| 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` | 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. | ||||||
| 2. relock the dependencies with `npm shrinkwrap --dev` | 2. make sure you are in sync with `upstream/master`: `git fetch upstream && git rebase upstream/master` | ||||||
| 3. clean up the shrinkwrap file for review with `./tools/npm/clean-shrinkwrap.js` | 3. ensure that your `node_modules` directory is not stale or poisoned by doing a clean install with `rm -rf node_modules && npm install` | ||||||
| 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 | 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` | ||||||
| 5. commit changes to these three files and you are done | 5. relock the dependencies with `npm shrinkwrap --dev` (see note below about the `minichain` issue) | ||||||
|  | 6. clean up the shrinkwrap file for review with `./tools/npm/clean-shrinkwrap.js` | ||||||
|  | 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 | ||||||
|  | 8. commit changes to these three files and you are done | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| If updating the `tsd` project a special steps need to be taken due to |  | ||||||
| https://github.com/Bartvds/minitable/issues/2: |  | ||||||
| 
 | 
 | ||||||
| Update `tsd` by following the steps above but before you run `npm shrinkwrap --dev`, you'll have to | === Note about `minichain` dependency === | ||||||
| manually patch `node_modules/ts2dart/node_modules/tsd/node_modules/minitable/package.json` and | 
 | ||||||
| `node_modules/tsd/node_modules/minitable/package.json` and remove the `minichain` from | 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. | ||||||
| the `peerDependencies` section. | 
 | ||||||
|  | 1. Manually patch `node_modules/tsd/node_modules/minitable/package.json` and remove the `minichain` from the `peerDependencies` section. | ||||||
| 
 | 
 | ||||||
| before: | before: | ||||||
| 
 | 
 | ||||||
| @ -56,4 +61,6 @@ after: | |||||||
|   }, |   }, | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Then resume the shrinkwrap update and cleaning steps. | 2. Then delete the `minichain` directory: `rm -rf tsd/node_modules/minichain`. | ||||||
|  | 
 | ||||||
|  | Afterwards resume the shrinkwrap update and cleaning steps. | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user