Skip to content

Commit

Permalink
fix(plugin-loader)!: to support commitlint v19 esm plugin extends c…
Browse files Browse the repository at this point in the history
…onfig

commitlint update to pure ESM.
Include common plugin like `@commitlint/config-conventional`
It cause cz-git loader config error

link #160
  • Loading branch information
Zhengqbbb committed Feb 29, 2024
1 parent b091c64 commit 3f435e5
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 353 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"unocss.root": "docs",
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"picgo.picBed.github.path": "cz/",
"editor.formatOnSave": false,
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
},
"devDependencies": {
"@antfu/eslint-config": "0.38.6",
"@commitlint/cli": "^17.4.4",
"@commitlint/config-conventional": "^17.4.4",
"@commitlint/cli": "^19.0.3",
"@commitlint/config-conventional": "^19.0.3",
"@cz-git/inquirer": "workspace:*",
"@types/fs-extra": "^11.0.2",
"@types/inquirer": "8.2.3",
Expand Down Expand Up @@ -80,7 +80,8 @@
"chalk": "4.1.2",
"color-convert": "2.0.1",
"resolve-from": "5.0.0",
"supports-color": "8.1.1"
"supports-color": "8.1.1",
"@commitlint/config-validator": "npm:@qbbsh/[email protected]"
},
"peerDependencyRules": {
"ignoreMissing": [
Expand Down
4 changes: 2 additions & 2 deletions packages/@cz-git/plugin-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"clean": "rimraf lib"
},
"devDependencies": {
"@commitlint/resolve-extends": "^17.4.4",
"@commitlint/types": "^17.4.4",
"@commitlint/resolve-extends": "^19.0.3",
"@commitlint/types": "^19.0.3",
"@types/tmp": "^0.2.3",
"cosmiconfig": "8.2.0",
"pkg-dir": "5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@cz-git/plugin-loader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export async function clLoader(cwd?: string): Promise<CommitlintOptions> {

// resolve extends
const base = (data && data.filepath) ? path.dirname(data.filepath) : process.cwd()
const extended = resolveExtends(data.config, {
const extended = await resolveExtends(data.config, {
prefix: 'commitlint-config',
cwd: base,
})
Expand Down
Loading

0 comments on commit 3f435e5

Please sign in to comment.