Skip to content

Commit

Permalink
fix: 修复 commitlint 版本更新导致的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Apr 4, 2024
1 parent 4ec5c8b commit 36d07dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@ interface Schedule {
}
interface Ignore {
'dependency-name': string
versions?: string[]
}
interface Update {
'package-ecosystem': string
Expand Down Expand Up @@ -645,6 +646,10 @@ async function initDependabot(projectPath: string, answers: InitAnswers) {
{
'dependency-name': 'semantic-release',
},
{
'dependency-name': '@commitlint/config-conventional',
versions: ['>= 19.0.0'],
},
]
fs.writeFile(dependabotPath, yaml.stringify(dependabot))
}
Expand Down Expand Up @@ -1093,10 +1098,10 @@ async function initHusky(projectPath: string) {
}
const keyname = `*.{${extnames.join(',')}}`
const devDependencies = {
// '@commitlint/cli': '^15.0.0',
'@commitlint/config-conventional': '^15.0.0',
husky: '^8.0.1',
'lint-staged': '^12.1.2',
// commitlint: '18.6.1',
'@commitlint/config-conventional': '18.6.3',
husky: '^9.0.11',
'lint-staged': '^15.2.2',
}
const pkgData: IPackage = {
scripts: {
Expand Down
2 changes: 1 addition & 1 deletion templates/.husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
npx --no-install commitlint@18.6.1 --edit "$1"

0 comments on commit 36d07dd

Please sign in to comment.