-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename npm-shrinkwrap.json to package-lock.json (#37493)
* Rename npm-shrinkwrap.json to package-lock.json * Update node_modules modification time after update-deps * Update npm-shrinkwrap in Dockerfile
- Loading branch information
Showing
8 changed files
with
3,225 additions
and
4,316 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
package-lock.json merge=npm-merge-driver | ||
npm-shrinkwrap.json merge=npm-merge-driver | ||
*.js linguist-language=JSX |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
NPM Lockfile | ||
============ | ||
|
||
We use [`package-lock.json`](https://github.com/Automattic/wp-calypso/blob/master/package-lock.json) | ||
to lock down our dependency versions. This allows us to freeze all dependencies at the | ||
exact version we have installed in our node_modules. | ||
|
||
## Generating The Lockfile | ||
|
||
If you don't edit `package.json` directly, you shouldn't need to do anything. For example, if you run `npm install --save left-pad`, | ||
the `package-lock.json` file will be updated automatically. | ||
|
||
If you edit `package.json` manually, or you want to bump all our transitive dependencies to their most recent version, | ||
you'll need to run `npm run update-deps` (that will take a while). Internally, the script does the following: | ||
- Deletes local `node_modules` folders in all packages | ||
- Deletes your local copy of `package-lock.json` | ||
- Runs `npm install` | ||
- Makes sure that all URLs in `resolved` fields are HTTPS. For some reason, NPM sometimes resolves packages from HTTP URLs | ||
|
||
## Testing | ||
|
||
To verify that the new `package-lock.json` works: | ||
|
||
- Run `npm run distclean` to delete local `node_modules` | ||
- Run `npm ci` | ||
- Verify that Calypso works as expected and that tests pass |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.