Skip to content

Commit dee8b44

Browse files
authored
fix(cli): upgrade commitlint version to resolve config extension issue (#187)
* chore: use pnpm catalog management of dependencies link #180
1 parent 241577b commit dee8b44

13 files changed

Lines changed: 269 additions & 425 deletions

File tree

‎.commitlintrc.cjs‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const { execSync } = require('node:child_process')
2-
32
const fg = require('fast-glob')
43

54
// git branch name = feature/cli_33 => auto get defaultIssues = #33
@@ -8,18 +7,9 @@ const issue = execSync('git rev-parse --abbrev-ref HEAD')
87
.trim()
98
.split('_')[1]
109

11-
// monorepo dynamic get name
10+
// dynamic get monorepo packages name
1211
const packages = fg.sync('*', { cwd: 'packages/@cz-git', onlyDirectories: true })
1312

14-
/** Add Co-authored-by Last Line */
15-
// const coAuthoredBy
16-
// = '\n\n'
17-
// + `Co-authored-by: ${
18-
// execSync('git config user.name').toString().replace(/(\r\n\t|\n|\r\t)/g, '')
19-
// } <${
20-
// execSync('git config user.email').toString().replace(/(\r\n\t|\n|\r\t)/g, '')
21-
// }>`
22-
2313
/** @type {import('cz-git').UserConfig} */
2414
module.exports = {
2515
extends: ['@commitlint/config-conventional'],
@@ -29,7 +19,6 @@ module.exports = {
2919
'subject-empty': [2, 'never'],
3020
},
3121
prompt: {
32-
// @see: https://github.com/Zhengqbbb/cz-git#options
3322
alias: {
3423
'b': 'chore: bump dependencies',
3524
'c': 'chore: update config files',
@@ -47,6 +36,5 @@ module.exports = {
4736
aiDiffIgnore: ['pnpm-lock.yaml', 'docs/public'],
4837
customIssuePrefixAlign: !issue ? 'top' : 'bottom',
4938
defaultIssues: !issue ? '' : `#${issue}`,
50-
// formatMessageCB: ({ defaultMessage }) => defaultMessage + coAuthoredBy,
5139
},
5240
}

‎.vscode/settings.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
".env": "*.env, .env.*, .envrc, env.d.ts",
1414
"readme*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md",
1515
"vite.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, cssnano.config.*, cypress.json, env.d.ts, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
16-
"package.json": ".browserslist*, .circleci*, .codecov, .cz-config.js, .czrc, .editorconfig, .eslint*, eslint*, .firebase*, .flowconfig, .github*, .gitlab*, .gitpod*, .huskyrc*, .jslint*, .lighthouserc.*, .lintstagedrc*, .markdownlint*, .mocha*, .node-version, .nodemon*, .npm*, .nvmrc, .pm2*, .pnp.*, .pnpm*, .prettier*, .releaserc*, .sentry*, .stackblitz*, .styleci*, .stylelint*, .tazerc*, .textlint*, .tool-versions, .travis*, .versionrc*, .vscode*, .watchman*, .xo-config*, .yamllint*, .yarnrc*, Procfile, api-extractor.json, apollo.config.*, appveyor*, ava.config.*, azure-pipelines*, bower.json, build.config.*, commitlint*, crowdin*, cypress.json, dangerfile*, dprint.json, firebase.json, grunt*, gulp*, jasmine.*, jenkins*, jest.config.*, jsconfig.*, karma*, lerna*, lighthouserc.*, lint-staged*, nest-cli.*, netlify*, nodemon*, nx.*, package-lock.json, phpcs.xml, playwright.config.*, pm2.*, pnpm*, prettier*, pullapprove*, puppeteer.config.*, pyrightconfig.json, renovate*, rollup.config.*, stylelint*, tsdoc.*, tslint*, tsup.config.*, turbo*, typedoc*, vercel*, vetur.config.*, vitest.config.*, webpack.config.*, workspace.json, xo.config.*, yarn*",
17-
"tsconfig.json": "tsconfig.*",
16+
"package.json": ".browserslist*, .circleci*, .codecov, .cz-config.js, .czrc, .editorconfig, .eslint*, eslint*, .firebase*, .flowconfig, .github*, .gitlab*, .gitpod*, .huskyrc*, .jslint*, .lighthouserc.*, .lintstagedrc*, .markdownlint*, .mocha*, .node-version, .nodemon*, .npm*, .nvmrc, .pm2*, .pnp.*, .pnpm*, .prettier*, .releaserc*, .sentry*, .stackblitz*, .styleci*, .stylelint*, .tazerc*, .textlint*, .tool-versions, .travis*, .versionrc*, .vscode*, .watchman*, .xo-config*, .yamllint*, .yarnrc*, Procfile, api-extractor.json, apollo.config.*, appveyor*, ava.config.*, azure-pipelines*, bower.json, build.config.*, commitlint*, crowdin*, cypress.json, dangerfile*, dprint.json, firebase.json, grunt*, gulp*, jasmine.*, jenkins*, jest.config.*, jsconfig.*, karma*, lerna*, lighthouserc.*, lint-staged*, nest-cli.*, netlify*, nodemon*, nx.*, package-lock.json, phpcs.xml, playwright.config.*, pm2.*, pnpm-lock*, prettier*, pullapprove*, puppeteer.config.*, pyrightconfig.json, renovate*, rollup.config.*, stylelint*, tsdoc.*, tslint*, tsup.config.*, turbo*, typedoc*, vercel*, vetur.config.*, vitest.config.*, webpack.config.*, workspace.json, xo.config.*, yarn*",
17+
"tsconfig.json": "tsconfig.*"
1818
},
1919
"files.associations": {
2020
"**/.x-cmd/*": "shellscript",

‎.x-cmd/bump‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
-x inquirer \
99
-x @types/inquirer \
1010
-x https-proxy-agent \
11+
-x node-fetch-cjs \
1112
-x rimraf \
1213
-x lint-staged \
1314
-x pkg-dir \

‎docs/.vitepress/config/en.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
2828
indexName: 'cz-git',
2929
searchParameters: {
3030
facetFilters: ['lang:en-US'],
31+
attributesToHighlight: ['hierarchy.lvl0'],
3132
},
3233
},
3334
footer: {

‎docs/.vitepress/config/zh.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
3434
},
3535
searchParameters: {
3636
facetFilters: ['lang:zh-CN'],
37+
attributesToHighlight: ['hierarchy.lvl0'],
3738
},
3839
},
3940
footer: {

‎docs/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docs",
3-
"version": "1.10.0-beta.1",
3+
"version": "1.9.4",
44
"private": true,
55
"scripts": {
66
"docs:build": "vitepress build",

‎package.json‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cz-git",
33
"version": "1.9.4",
44
"private": true,
5-
"packageManager": "pnpm@9.9.0",
5+
"packageManager": "pnpm@9.11.0",
66
"description": "A better customizable and git support commitizen adapter",
77
"author": "Zhengqbbb <zhengqbbb@gmail.com> (https://github.com/Zhengqbbb)",
88
"license": "MIT",
@@ -53,12 +53,12 @@
5353
},
5454
"devDependencies": {
5555
"@antfu/eslint-config": "^3.0.0",
56-
"@commitlint/cli": "^19.4.1",
57-
"@commitlint/config-conventional": "^19.4.1",
56+
"@commitlint/cli": "catalog:commitlint",
57+
"@commitlint/config-conventional": "catalog:commitlint",
5858
"@cz-git/inquirer": "workspace:*",
59-
"@types/inquirer": "8.2.3",
59+
"@types/inquirer": "catalog:inquirer",
6060
"@types/node": "^22.5.2",
61-
"@types/rimraf": "3.0.2",
61+
"@types/rimraf": "catalog:rimraf",
6262
"bumpp": "^9.5.2",
6363
"conventional-changelog-cli": "^5.0.0",
6464
"cz-git": "workspace:*",
@@ -70,19 +70,18 @@
7070
"npm-run-all2": "^6.2.3",
7171
"ora": "^8.1.0",
7272
"pathe": "^1.1.2",
73-
"pnpm": "^9.9.0",
74-
"rimraf": "3.0.2",
73+
"pnpm": "^9.11.0",
74+
"rimraf": "catalog:rimraf",
7575
"simple-git-hooks": "^2.11.1",
7676
"ts-json-schema-generator": "^2.3.0",
77-
"ts-node": "^10.9.2",
78-
"tsup": "7.2.0",
77+
"tsup": "^8.3.0",
7978
"tsx": "^4.19.0",
8079
"typescript": "^5.5.4",
8180
"vitest": "^2.0.5"
8281
},
8382
"pnpm": {
8483
"overrides": {
85-
"@commitlint/config-validator": "npm:@qbbsh/config-validator@19.0.3",
84+
"@commitlint/config-validator": "catalog:commitlint",
8685
"chalk": "4.1.2",
8786
"color-convert": "2.0.1",
8887
"import-meta-resolve": "4.1.0",

‎packages/@cz-git/plugin-inquirer/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@cz-git/inquirer",
33
"version": "1.9.4",
44
"description": "provide cz-git inquirer plugins, include search-list, search-checkbox, complete-input",
5-
"author": "Zhengqbbb <1074059947@qq.com>",
5+
"author": "Zhengqbbb <zhengqbbb@gmail.com> (https://github.com/Zhengqbbb)",
66
"license": "MIT",
77
"homepage": "https://github.com/Zhengqbbb/cz-git/tree/main/packages/%40cz-git/plugin-inquirer",
88
"repository": {
@@ -43,7 +43,7 @@
4343
"clean": "rimraf lib"
4444
},
4545
"devDependencies": {
46-
"inquirer": "8.2.4"
46+
"inquirer": "catalog:inquirer"
4747
},
4848
"publishConfig": {
4949
"access": "public"

‎packages/@cz-git/plugin-loader/package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@cz-git/loader",
33
"version": "1.9.4",
44
"description": "commitizen and commitlint configure loader for cz-git",
5-
"author": "Zhengqbbb <1074059947@qq.com>",
5+
"author": "Zhengqbbb <zhengqbbb@gmail.com> (https://github.com/Zhengqbbb)",
66
"license": "MIT",
77
"homepage": "https://github.com/Zhengqbbb/cz-git/tree/main/packages/%40cz-git/plugin-loader",
88
"repository": {
@@ -41,10 +41,10 @@
4141
"clean": "rimraf lib"
4242
},
4343
"devDependencies": {
44-
"@commitlint/resolve-extends": "^19.1.0",
45-
"@commitlint/types": "^19.0.3",
44+
"@commitlint/resolve-extends": "catalog:commitlint",
45+
"@commitlint/types": "catalog:commitlint",
4646
"@types/tmp": "^0.2.3",
47-
"cosmiconfig": "8.2.0",
47+
"cosmiconfig": "catalog:",
4848
"pkg-dir": "5.0.0",
4949
"tmp": "^0.2.3"
5050
},

‎packages/cli/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"cachedir": "^2.4.0",
5252
"cz-git": "workspace:*",
5353
"dedent": "^1.5.3",
54-
"inquirer": "8.2.4",
54+
"inquirer": "catalog:inquirer",
5555
"minimist": "^1.2.8",
5656
"mkdirp": "^3.0.1"
5757
}

0 commit comments

Comments
 (0)