@commitlint/prompt-cli 19.8.0 → 20.0.0
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/cli.js +6 -6
- package/package.json +6 -6
package/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {prompter} from
|
|
3
|
-
import inquirer from
|
|
4
|
-
import {x} from
|
|
2
|
+
import { prompter } from "@commitlint/prompt";
|
|
3
|
+
import inquirer from "inquirer";
|
|
4
|
+
import { x } from "tinyexec";
|
|
5
5
|
|
|
6
6
|
main().catch((err) => {
|
|
7
7
|
setTimeout(() => {
|
|
@@ -14,7 +14,7 @@ function main() {
|
|
|
14
14
|
.then((empty) => {
|
|
15
15
|
if (empty) {
|
|
16
16
|
console.log(
|
|
17
|
-
`Nothing to commit. Stage your changes via "git add" execute "commit" again
|
|
17
|
+
`Nothing to commit. Stage your changes via "git add" execute "commit" again`,
|
|
18
18
|
);
|
|
19
19
|
process.exit(1);
|
|
20
20
|
}
|
|
@@ -23,11 +23,11 @@ function main() {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
function isStageEmpty() {
|
|
26
|
-
return x(
|
|
26
|
+
return x("git", ["diff", "--cached"]).then((r) => r.stdout === "");
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function commit(message) {
|
|
30
|
-
const result = x(
|
|
30
|
+
const result = x("git", ["commit", "-m", message]);
|
|
31
31
|
result.process.stdout.pipe(process.stdout);
|
|
32
32
|
result.process.stderr.pipe(process.stderr);
|
|
33
33
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commitlint/prompt-cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "20.0.0",
|
|
5
5
|
"description": "commit prompt using commitlint.config.js",
|
|
6
6
|
"main": "cli.js",
|
|
7
7
|
"files": [
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"node": ">=v18"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@commitlint/test": "^
|
|
38
|
-
"@commitlint/utils": "^
|
|
37
|
+
"@commitlint/test": "^20.0.0",
|
|
38
|
+
"@commitlint/utils": "^20.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@commitlint/prompt": "^
|
|
41
|
+
"@commitlint/prompt": "^20.0.0",
|
|
42
42
|
"inquirer": "^9.2.15",
|
|
43
|
-
"tinyexec": "^0.
|
|
43
|
+
"tinyexec": "^1.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "407be6c96b1a108ee012ed5330b0d80a165952d5"
|
|
46
46
|
}
|