Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check npm-shrinkwrap.json before
npm version
- Loading branch information
Showing
3 changed files
with
21 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
# | ||
# Asserts that the module is ready for release with the expected quality | ||
|
||
# Rollback modified package.json file so it has the previous version | ||
rollbackPackage() { | ||
git checkout package.json | ||
} | ||
|
||
# Checking that the npm-shrinkwrap.json file is up-to-date wrt to the | ||
# package.json file. | ||
if [ package.json -nt npm-shrinkwrap.json ] | ||
then | ||
echo "File package.json is newer than file npm-shrinkwrap.json" | ||
printf "To fix this, run:\nnpm run safefreeze\n\n" | ||
|
||
rollbackPackage | ||
exit 1 | ||
fi |
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