@soybeanjs/cli 1.0.3 → 1.0.4
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/README.md +1 -1
- package/dist/index.cjs +5 -10
- package/dist/index.js +6 -11
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ pnpm soy -h
|
|
|
23
23
|
| 命令 | 作用 |
|
|
24
24
|
| --------------------- | ------------------------------------------------------------------ |
|
|
25
25
|
| help(-h) | 查看全部命令用法 |
|
|
26
|
-
| git-commit | 生成符合 Angular 规范的 git 提交信息 |
|
|
26
|
+
| git-commit | 生成符合 Angular 规范的 git 提交信息 (在提交信息添加前缀`!`可以表示破坏性更新的提交) |
|
|
27
27
|
| git-commit-verify | 校验 git 的提交信息是否符合 Angular 规范 |
|
|
28
28
|
| cleanup | 清空依赖和构建产物 |
|
|
29
29
|
| ncu | 命令 npm-check-updates, 升级依赖 |
|
package/dist/index.cjs
CHANGED
|
@@ -37,7 +37,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
37
37
|
var import_cac = __toESM(require("cac"), 1);
|
|
38
38
|
|
|
39
39
|
// package.json
|
|
40
|
-
var version = "1.0.
|
|
40
|
+
var version = "1.0.4";
|
|
41
41
|
|
|
42
42
|
// src/command/git-commit.ts
|
|
43
43
|
var import_node_path = __toESM(require("path"), 1);
|
|
@@ -79,20 +79,15 @@ async function gitCommit(gitCommitTypes, gitCommitScopes) {
|
|
|
79
79
|
message: "Please select a scope",
|
|
80
80
|
choices: scopesChoices
|
|
81
81
|
},
|
|
82
|
-
{
|
|
83
|
-
name: "breaking",
|
|
84
|
-
type: "confirm",
|
|
85
|
-
message: "Are there any breaking changes?",
|
|
86
|
-
initial: false
|
|
87
|
-
},
|
|
88
82
|
{
|
|
89
83
|
name: "description",
|
|
90
84
|
type: "text",
|
|
91
|
-
message:
|
|
85
|
+
message: `Please enter a description (add prefix ${(0, import_kolorist.yellow)("!")} to indicate breaking change)`
|
|
92
86
|
}
|
|
93
87
|
]);
|
|
94
|
-
const breaking = result.
|
|
95
|
-
const
|
|
88
|
+
const breaking = result.description.startsWith("!") ? "!" : "";
|
|
89
|
+
const description = result.description.replace(/^!/, "").trim();
|
|
90
|
+
const commitMsg = `${result.types}(${result.scopes})${breaking}: ${description}`;
|
|
96
91
|
await execCommand("git", ["commit", "-m", commitMsg], { stdio: "inherit" });
|
|
97
92
|
}
|
|
98
93
|
async function gitCommitVerify() {
|
package/dist/index.js
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
import cac from "cac";
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
|
-
var version = "1.0.
|
|
7
|
+
var version = "1.0.4";
|
|
8
8
|
|
|
9
9
|
// src/command/git-commit.ts
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { readFileSync } from "node:fs";
|
|
12
12
|
import prompts from "prompts";
|
|
13
|
-
import { bgRed, green, red } from "kolorist";
|
|
13
|
+
import { bgRed, green, red, yellow } from "kolorist";
|
|
14
14
|
|
|
15
15
|
// src/shared/index.ts
|
|
16
16
|
async function execCommand(cmd, args, options) {
|
|
@@ -46,20 +46,15 @@ async function gitCommit(gitCommitTypes, gitCommitScopes) {
|
|
|
46
46
|
message: "Please select a scope",
|
|
47
47
|
choices: scopesChoices
|
|
48
48
|
},
|
|
49
|
-
{
|
|
50
|
-
name: "breaking",
|
|
51
|
-
type: "confirm",
|
|
52
|
-
message: "Are there any breaking changes?",
|
|
53
|
-
initial: false
|
|
54
|
-
},
|
|
55
49
|
{
|
|
56
50
|
name: "description",
|
|
57
51
|
type: "text",
|
|
58
|
-
message:
|
|
52
|
+
message: `Please enter a description (add prefix ${yellow("!")} to indicate breaking change)`
|
|
59
53
|
}
|
|
60
54
|
]);
|
|
61
|
-
const breaking = result.
|
|
62
|
-
const
|
|
55
|
+
const breaking = result.description.startsWith("!") ? "!" : "";
|
|
56
|
+
const description = result.description.replace(/^!/, "").trim();
|
|
57
|
+
const commitMsg = `${result.types}(${result.scopes})${breaking}: ${description}`;
|
|
63
58
|
await execCommand("git", ["commit", "-m", commitMsg], { stdio: "inherit" });
|
|
64
59
|
}
|
|
65
60
|
async function gitCommitVerify() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soybeanjs/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"packageManager": "pnpm@8.13.1",
|
|
6
6
|
"description": "SoybeanJS's command line tools",
|
|
7
7
|
"author": {
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"consola": "3.2.3",
|
|
46
46
|
"execa": "8.0.1",
|
|
47
47
|
"kolorist": "1.8.0",
|
|
48
|
-
"minimist": "1.2.8",
|
|
49
48
|
"npm-check-updates": "16.14.12",
|
|
50
49
|
"prompts": "2.4.2",
|
|
51
50
|
"rimraf": "5.0.5"
|