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: package.json
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -80,8 +80,9 @@
80
80
"test": "vitest run",
81
81
"coverage": "vitest run --coverage",
82
82
"check:state": "git diff --quiet && git diff --cached --quiet || { echo 'Git working directory is not clean. Please commit or stash changes before publishing.'; exit 1; }",
83
-
"check:branch": "if [[ $(git symbolic-ref --short HEAD) != 'master' && ! $(git symbolic-ref --short HEAD) =~ ^release/ ]]; then echo 'You must be on the master branch or a release branch (release/...).'; exit 1; fi",
84
-
"prepublishOnly": "npm run check:state && npm run check:branch && npm run build"
83
+
"check:branch": "if [ $(git symbolic-ref --short HEAD) != 'master' ]; then echo 'You must be on the master branch to publish.'; exit 1; fi",
84
+
"check:changelog": "VERSION=$(node -p \"require('./package.json').version\") && if [ ! -f \"changelogs/v${VERSION}-changelog.md\" ]; then echo \"No changelog file found for version ${VERSION}.\"; exit 1; fi",
85
+
"prepublishOnly": "npm run check:state && npm run check:branch && npm run check:changelog && npm run build"
0 commit comments