aicommits 1.0.2 → 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 +5 -1
- package/bin/aicommits.js +2 -2
- package/package.json +5 -5
- package/tsconfig.json +0 -11
package/README.md
CHANGED
|
@@ -36,11 +36,15 @@ Video coming soon where I rebuild it from scratch to show you how to easily buil
|
|
|
36
36
|
- Only supports git diffs of up to 200 lines of code for now
|
|
37
37
|
- Does not support conventional commits
|
|
38
38
|
|
|
39
|
-
The next version of the CLI, version 2, will address both of these limitations!
|
|
39
|
+
The next version of the CLI, version 2, will address both of these limitations as well as the tasks below!
|
|
40
40
|
|
|
41
41
|
## Future tasks
|
|
42
42
|
|
|
43
|
+
- Add a debugging flag to troubleshoot OpenAI responses
|
|
43
44
|
- Add support for conventional commits as a flag that users can enable
|
|
44
45
|
- Add support for diffs greater than 200 lines by grabbing the diff per file
|
|
45
46
|
- Add support for a flag that can auto-accept
|
|
47
|
+
- Add ability to specify a commit message from inside aicommit
|
|
48
|
+
- Add opt-in emoji flag
|
|
49
|
+
- Add opt-in languages flag
|
|
46
50
|
- Build landing page for the 2.0 launch
|
package/bin/aicommits.js
CHANGED
|
@@ -37,7 +37,7 @@ function main() {
|
|
|
37
37
|
console.error(chalk_1.default.white("▲ ") + "This is not a git repository");
|
|
38
38
|
process.exit(1);
|
|
39
39
|
}
|
|
40
|
-
const diff = (0, child_process_1.execSync)(
|
|
40
|
+
const diff = (0, child_process_1.execSync)(`git diff --cached . ":(exclude)package-lock.json" ":(exclude)yarn.lock" ":(exclude)pnpm-lock.yaml"`, {
|
|
41
41
|
encoding: "utf8",
|
|
42
42
|
});
|
|
43
43
|
if (!diff) {
|
|
@@ -50,7 +50,7 @@ function main() {
|
|
|
50
50
|
console.log(chalk_1.default.white("▲ ") + "The diff is too large to write a commit message.");
|
|
51
51
|
process.exit(1);
|
|
52
52
|
}
|
|
53
|
-
let prompt = `I want you to act like a git commit message writer. I will input a git diff and your job is to convert it into a useful commit message. Do not preface the commit with anything, return a complete sentence, and do not repeat yourself: ${diff}`;
|
|
53
|
+
let prompt = `I want you to act like a git commit message writer. I will input a git diff and your job is to convert it into a useful commit message. Do not preface the commit with anything, use the present tense, return a complete sentence, and do not repeat yourself: ${diff}`;
|
|
54
54
|
console.log(chalk_1.default.white("▲ ") + chalk_1.default.gray("Generating your AI commit message...\n"));
|
|
55
55
|
const aiCommitMessage = yield generateCommitMessage(prompt);
|
|
56
56
|
console.log(chalk_1.default.white("▲ ") + chalk_1.default.bold("Commit message: ") + aiCommitMessage + "\n");
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aicommits",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Writes your git commit messages for you with AI",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
"files": [
|
|
6
|
+
"bin"
|
|
7
|
+
],
|
|
8
|
+
"bin": "bin/index.js",
|
|
9
9
|
"repository": "https://github.com/Nutlope/aicommits",
|
|
10
10
|
"author": "Hassan El Mghari (@nutlope)",
|
|
11
11
|
"license": "MIT",
|
package/tsconfig.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2016",
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"outDir": "./bin",
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"forceConsistentCasingInFileNames": true,
|
|
8
|
-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
9
|
-
},
|
|
10
|
-
"exclude": ["node_modules"]
|
|
11
|
-
}
|