@pubinfo/commitlint 2.1.4 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/run.js +3 -7
- package/package.json +1 -1
package/dist/run.js
CHANGED
|
@@ -6,7 +6,7 @@ import { defineCommand, runMain as runMain$1 } from "citty";
|
|
|
6
6
|
|
|
7
7
|
//#region package.json
|
|
8
8
|
var name = "@pubinfo/commitlint";
|
|
9
|
-
var version = "2.1.
|
|
9
|
+
var version = "2.1.6";
|
|
10
10
|
var description = "commitlint config for Pubinfo projects";
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
@@ -44,14 +44,10 @@ const main = defineCommand({
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
run: async ({ args }) => {
|
|
47
|
-
if (
|
|
48
|
-
else {
|
|
47
|
+
if (isGitRepository()) {
|
|
49
48
|
const { edit, init } = args;
|
|
50
49
|
const enabled = await isCommitlintEnabled();
|
|
51
|
-
if (!isInsideGitRepo())
|
|
52
|
-
console.error("[pubinfo-commit] 未检测到 Git 仓库。请在已初始化的 Git 项目中运行,或执行 `git init` 后重试。");
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
50
|
+
if (!isInsideGitRepo()) return;
|
|
55
51
|
if (init) {
|
|
56
52
|
const cwd = process.cwd();
|
|
57
53
|
if (!enabled) {
|