@pubinfo/commitlint 2.0.0-rc.2 → 2.0.0-rc.3
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/index.js +1 -1
- package/dist/{run-DOVoS-Vy.js → run-kpuZDnr9.js} +23 -8
- package/dist/run.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { commitPreset, createCommitTemplate, createCzConfigFile, ensureGitTemplate, ensurePackageGitHooks, initCommitEnvironment, lintAndReturn, lintMessage, loadCommitConfig, runMain, runPrompt } from "./run-
|
|
1
|
+
import { commitPreset, createCommitTemplate, createCzConfigFile, ensureGitTemplate, ensurePackageGitHooks, initCommitEnvironment, lintAndReturn, lintMessage, loadCommitConfig, runMain, runPrompt } from "./run-kpuZDnr9.js";
|
|
2
2
|
|
|
3
3
|
export { commitPreset, createCommitTemplate, createCzConfigFile, ensureGitTemplate, ensurePackageGitHooks, initCommitEnvironment, lintAndReturn, lintMessage, loadCommitConfig, runMain, runPrompt };
|
|
@@ -8,16 +8,31 @@ import { defineCommand, runMain } from "citty";
|
|
|
8
8
|
//#region src/config.ts
|
|
9
9
|
function isMainBranch() {
|
|
10
10
|
try {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
try {
|
|
12
|
+
const currentBranch = execSync("git branch --show-current", { encoding: "utf8" }).trim();
|
|
13
|
+
if (currentBranch) return [
|
|
14
|
+
"main",
|
|
15
|
+
"master",
|
|
16
|
+
"dev",
|
|
17
|
+
"test"
|
|
18
|
+
].includes(currentBranch);
|
|
19
|
+
} catch {
|
|
20
|
+
try {
|
|
21
|
+
const currentBranch = execSync("git symbolic-ref --short HEAD", { encoding: "utf8" }).trim();
|
|
22
|
+
return [
|
|
23
|
+
"main",
|
|
24
|
+
"master",
|
|
25
|
+
"dev",
|
|
26
|
+
"test"
|
|
27
|
+
].includes(currentBranch);
|
|
28
|
+
} catch {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
18
32
|
} catch {
|
|
19
33
|
return false;
|
|
20
34
|
}
|
|
35
|
+
return false;
|
|
21
36
|
}
|
|
22
37
|
function generateCommitTypes() {
|
|
23
38
|
const allTypes = [
|
|
@@ -250,7 +265,7 @@ async function runPrompt(cfg, opts) {
|
|
|
250
265
|
//#region package.json
|
|
251
266
|
var name = "@pubinfo/commitlint";
|
|
252
267
|
var type = "module";
|
|
253
|
-
var version = "2.0.0-rc.
|
|
268
|
+
var version = "2.0.0-rc.3";
|
|
254
269
|
var description = "commitlint config for Pubinfo projects";
|
|
255
270
|
var exports = { ".": "./dist/index.js" };
|
|
256
271
|
var main$1 = "./dist/index.js";
|
package/dist/run.js
CHANGED