git-coco 0.8.3 → 0.8.5
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.esm.mjs +9 -10
- package/dist/index.js +9 -10
- package/package.json +3 -3
package/dist/index.esm.mjs
CHANGED
|
@@ -1819,7 +1819,7 @@ const builder$2 = (yargs) => {
|
|
|
1819
1819
|
|
|
1820
1820
|
var commit = {
|
|
1821
1821
|
command: 'commit',
|
|
1822
|
-
desc: '
|
|
1822
|
+
desc: 'Write a commit message summarizing the staged changes.',
|
|
1823
1823
|
builder: builder$2,
|
|
1824
1824
|
handler: commandExecutor(handler$2),
|
|
1825
1825
|
options: options$2,
|
|
@@ -1938,8 +1938,8 @@ const handler$1 = async (argv, logger) => {
|
|
|
1938
1938
|
logger.log(LOGO);
|
|
1939
1939
|
}
|
|
1940
1940
|
async function factory() {
|
|
1941
|
-
if (options.range) {
|
|
1942
|
-
const [from, to] = options.range
|
|
1941
|
+
if (options.range && options.range.includes(':')) {
|
|
1942
|
+
const [from, to] = options.range.split(':');
|
|
1943
1943
|
if (!from || !to) {
|
|
1944
1944
|
logger.log(`Invalid range provided. Expected format is <from>:<to>`, { color: 'red' });
|
|
1945
1945
|
process.exit(1);
|
|
@@ -2271,10 +2271,9 @@ const handler = async (argv, logger) => {
|
|
|
2271
2271
|
message: 'file extensions to be excluded when generating commit messages (comma-separated):',
|
|
2272
2272
|
default: '.map, .lock',
|
|
2273
2273
|
});
|
|
2274
|
-
config.ignoredFiles =
|
|
2275
|
-
(ignoredFiles && ignoredFiles.split(',').map((file) => file.trim())) || [];
|
|
2274
|
+
config.ignoredFiles = ignoredFiles?.split(',')?.map((file) => file.trim()) || [];
|
|
2276
2275
|
config.ignoredExtensions =
|
|
2277
|
-
|
|
2276
|
+
ignoredExtensions?.split(',')?.map((ext) => ext.trim()) || [];
|
|
2278
2277
|
}
|
|
2279
2278
|
const promptForCommitPrompt = await confirm({
|
|
2280
2279
|
message: 'would you like to configure the commit message prompt?',
|
|
@@ -2325,7 +2324,7 @@ const handler = async (argv, logger) => {
|
|
|
2325
2324
|
await appendToEnvFile(configFilePath, config);
|
|
2326
2325
|
}
|
|
2327
2326
|
else if (configFilePath.endsWith('.coco.config.json')) {
|
|
2328
|
-
|
|
2327
|
+
appendToProjectJsonConfig(configFilePath, config);
|
|
2329
2328
|
}
|
|
2330
2329
|
// After config is written, check for package installation
|
|
2331
2330
|
await checkAndHandlePackageInstallation({ global: level === 'global', logger });
|
|
@@ -2369,17 +2368,17 @@ y.command([commit.command, '$0'], commit.desc,
|
|
|
2369
2368
|
// TODO: fix type on builder
|
|
2370
2369
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2371
2370
|
// @ts-ignore
|
|
2372
|
-
commit.builder, commit.handler);
|
|
2371
|
+
commit.builder, commit.handler).options(commit.options);
|
|
2373
2372
|
y.command(changelog.command, changelog.desc,
|
|
2374
2373
|
// TODO: fix type on builder
|
|
2375
2374
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2376
2375
|
// @ts-ignore
|
|
2377
|
-
changelog.builder, changelog.handler);
|
|
2376
|
+
changelog.builder, changelog.handler).options(changelog.options);
|
|
2378
2377
|
y.command(init.command, init.desc,
|
|
2379
2378
|
// TODO: fix type on builder
|
|
2380
2379
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2381
2380
|
// @ts-ignore
|
|
2382
|
-
init.builder, init.handler);
|
|
2381
|
+
init.builder, init.handler).options(init.options);
|
|
2383
2382
|
y.parse(process.argv.slice(2));
|
|
2384
2383
|
|
|
2385
2384
|
export { changelog, commit, init, types };
|
package/dist/index.js
CHANGED
|
@@ -1840,7 +1840,7 @@ const builder$2 = (yargs) => {
|
|
|
1840
1840
|
|
|
1841
1841
|
var commit = {
|
|
1842
1842
|
command: 'commit',
|
|
1843
|
-
desc: '
|
|
1843
|
+
desc: 'Write a commit message summarizing the staged changes.',
|
|
1844
1844
|
builder: builder$2,
|
|
1845
1845
|
handler: commandExecutor(handler$2),
|
|
1846
1846
|
options: options$2,
|
|
@@ -1959,8 +1959,8 @@ const handler$1 = async (argv, logger) => {
|
|
|
1959
1959
|
logger.log(LOGO);
|
|
1960
1960
|
}
|
|
1961
1961
|
async function factory() {
|
|
1962
|
-
if (options.range) {
|
|
1963
|
-
const [from, to] = options.range
|
|
1962
|
+
if (options.range && options.range.includes(':')) {
|
|
1963
|
+
const [from, to] = options.range.split(':');
|
|
1964
1964
|
if (!from || !to) {
|
|
1965
1965
|
logger.log(`Invalid range provided. Expected format is <from>:<to>`, { color: 'red' });
|
|
1966
1966
|
process.exit(1);
|
|
@@ -2292,10 +2292,9 @@ const handler = async (argv, logger) => {
|
|
|
2292
2292
|
message: 'file extensions to be excluded when generating commit messages (comma-separated):',
|
|
2293
2293
|
default: '.map, .lock',
|
|
2294
2294
|
});
|
|
2295
|
-
config.ignoredFiles =
|
|
2296
|
-
(ignoredFiles && ignoredFiles.split(',').map((file) => file.trim())) || [];
|
|
2295
|
+
config.ignoredFiles = ignoredFiles?.split(',')?.map((file) => file.trim()) || [];
|
|
2297
2296
|
config.ignoredExtensions =
|
|
2298
|
-
|
|
2297
|
+
ignoredExtensions?.split(',')?.map((ext) => ext.trim()) || [];
|
|
2299
2298
|
}
|
|
2300
2299
|
const promptForCommitPrompt = await prompts$1.confirm({
|
|
2301
2300
|
message: 'would you like to configure the commit message prompt?',
|
|
@@ -2346,7 +2345,7 @@ const handler = async (argv, logger) => {
|
|
|
2346
2345
|
await appendToEnvFile(configFilePath, config);
|
|
2347
2346
|
}
|
|
2348
2347
|
else if (configFilePath.endsWith('.coco.config.json')) {
|
|
2349
|
-
|
|
2348
|
+
appendToProjectJsonConfig(configFilePath, config);
|
|
2350
2349
|
}
|
|
2351
2350
|
// After config is written, check for package installation
|
|
2352
2351
|
await checkAndHandlePackageInstallation({ global: level === 'global', logger });
|
|
@@ -2390,17 +2389,17 @@ y.command([commit.command, '$0'], commit.desc,
|
|
|
2390
2389
|
// TODO: fix type on builder
|
|
2391
2390
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2392
2391
|
// @ts-ignore
|
|
2393
|
-
commit.builder, commit.handler);
|
|
2392
|
+
commit.builder, commit.handler).options(commit.options);
|
|
2394
2393
|
y.command(changelog.command, changelog.desc,
|
|
2395
2394
|
// TODO: fix type on builder
|
|
2396
2395
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2397
2396
|
// @ts-ignore
|
|
2398
|
-
changelog.builder, changelog.handler);
|
|
2397
|
+
changelog.builder, changelog.handler).options(changelog.options);
|
|
2399
2398
|
y.command(init.command, init.desc,
|
|
2400
2399
|
// TODO: fix type on builder
|
|
2401
2400
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2402
2401
|
// @ts-ignore
|
|
2403
|
-
init.builder, init.handler);
|
|
2402
|
+
init.builder, init.handler).options(init.options);
|
|
2404
2403
|
y.parse(process.argv.slice(2));
|
|
2405
2404
|
|
|
2406
2405
|
exports.changelog = changelog;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-coco",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "zero-effort git commits with coco.",
|
|
5
5
|
"author": "gfargo <ghfargo@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"coco:esm": "node dist/index.esm.mjs"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@rollup/plugin-commonjs": "^
|
|
46
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
47
47
|
"@rollup/plugin-eslint": "^9.0.5",
|
|
48
48
|
"@rollup/plugin-json": "^6.0.0",
|
|
49
49
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"p-queue": "5.0.0",
|
|
94
94
|
"performance-now": "2.1.0",
|
|
95
95
|
"pretty-ms": "7.0.1",
|
|
96
|
-
"simple-git": "3.
|
|
96
|
+
"simple-git": "3.25.0",
|
|
97
97
|
"tiktoken": "^1.0.15",
|
|
98
98
|
"yargs": "17.7.2"
|
|
99
99
|
}
|