Skip to content

Commit

Permalink
check-lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanmino committed Feb 29, 2024
1 parent 445cad5 commit 4ffd324
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"build": "tsc",
"test": "vitest",
"lint": "eslint --cache --max-warnings 0",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"check-lockfile": "./scripts/check-lockfile.sh"
},
"module": "dist/index.js",
"devDependencies": {
Expand Down
5 changes: 5 additions & 0 deletions scripts/check-lockfile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
git diff yarn.lock
if ! git diff --exit-code yarn.lock; then
echo "Changes were detected in yarn.lock file after running 'yarn', which is not expected. Please run 'yarn' locally and commit the changes.";
exit 1;
fi

0 comments on commit 4ffd324

Please sign in to comment.