git-coco 0.8.4 → 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.
@@ -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?.split(':');
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
- (ignoredExtensions && ignoredExtensions.split(',').map((ext) => ext.trim())) || [];
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
- await appendToProjectJsonConfig(configFilePath, config);
2327
+ appendToProjectJsonConfig(configFilePath, config);
2329
2328
  }
2330
2329
  // After config is written, check for package installation
2331
2330
  await checkAndHandlePackageInstallation({ global: level === 'global', logger });
package/dist/index.js CHANGED
@@ -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?.split(':');
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
- (ignoredExtensions && ignoredExtensions.split(',').map((ext) => ext.trim())) || [];
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
- await appendToProjectJsonConfig(configFilePath, config);
2348
+ appendToProjectJsonConfig(configFilePath, config);
2350
2349
  }
2351
2350
  // After config is written, check for package installation
2352
2351
  await checkAndHandlePackageInstallation({ global: level === 'global', logger });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-coco",
3
- "version": "0.8.4",
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",