Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@
"rimraf": "^3.0.2",
"rollup": "^2.59.0",
"semver": "^7.3.5",
"simple-git-hooks": "^2.7.0",
"sirv": "^2.0.0",
"ts-jest": "^27.1.2",
"ts-node": "^10.4.0",
"typescript": "~4.5.4",
"vite": "workspace:*",
"vitepress": "^0.20.10",
"yorkie": "^2.0.0"
"vitepress": "^0.20.10"
},
"gitHooks": {
"pre-commit": "lint-staged --concurrent false",
"commit-msg": "ts-node scripts/verifyCommit.ts"
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --concurrent false",
"commit-msg": "pnpm exec ts-node scripts/verifyCommit.ts $1"
},
"lint-staged": {
"*": [
Expand Down
116 changes: 9 additions & 107 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions scripts/verifyCommit.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Invoked on the commit-msg git hook by yorkie.
// Invoked on the commit-msg git hook by simple-git-hooks.

import colors from 'picocolors'
import { readFileSync } from 'fs'

const msgPath = process.env.GIT_PARAMS!
// get $1 from commit-msg script
const msgPath = process.argv[2]
const msg = readFileSync(msgPath, 'utf-8').trim()

const releaseRE = /^v\d/
Expand Down