commitizen 4.2.6 → 4.3.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.
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isClean = isClean;
7
-
8
7
  var _child_process = require("child_process");
9
-
10
8
  function cov_jkd4cxdc9() {
11
9
  var path = "/home/runner/work/cz-cli/cz-cli/src/commitizen/staging.js";
12
10
  var hash = "30be7fb393c788ad4e85c71340438cb0aaa50d35";
@@ -237,11 +235,9 @@ function cov_jkd4cxdc9() {
237
235
  hash: "30be7fb393c788ad4e85c71340438cb0aaa50d35"
238
236
  };
239
237
  var coverage = global[gcv] || (global[gcv] = {});
240
-
241
238
  if (!coverage[path] || coverage[path].hash !== hash) {
242
239
  coverage[path] = coverageData;
243
240
  }
244
-
245
241
  var actualCoverage = coverage[path];
246
242
  {
247
243
  // @ts-ignore
@@ -251,9 +247,7 @@ function cov_jkd4cxdc9() {
251
247
  }
252
248
  return actualCoverage;
253
249
  }
254
-
255
250
  cov_jkd4cxdc9();
256
-
257
251
  /**
258
252
  * Asynchrounously determines if the staging area is clean
259
253
  */
@@ -266,7 +260,6 @@ function isClean(repoPath, done, stageAllFiles) {
266
260
  }, function (error, stdout) {
267
261
  cov_jkd4cxdc9().f[1]++;
268
262
  cov_jkd4cxdc9().s[1]++;
269
-
270
263
  if (error) {
271
264
  cov_jkd4cxdc9().b[1][0]++;
272
265
  cov_jkd4cxdc9().s[2]++;
@@ -274,7 +267,6 @@ function isClean(repoPath, done, stageAllFiles) {
274
267
  } else {
275
268
  cov_jkd4cxdc9().b[1][1]++;
276
269
  }
277
-
278
270
  let output = (cov_jkd4cxdc9().s[3]++, (cov_jkd4cxdc9().b[2][0]++, stdout) || (cov_jkd4cxdc9().b[2][1]++, ''));
279
271
  cov_jkd4cxdc9().s[4]++;
280
272
  done(null, output.trim().length === 0);
@@ -18,29 +18,16 @@ Object.defineProperty(exports, "init", {
18
18
  }
19
19
  });
20
20
  exports.staging = void 0;
21
-
22
21
  var adapter = _interopRequireWildcard(require("./commitizen/adapter"));
23
-
24
22
  exports.adapter = adapter;
25
-
26
23
  var cache = _interopRequireWildcard(require("./commitizen/cache"));
27
-
28
24
  exports.cache = cache;
29
-
30
25
  var _commit = _interopRequireDefault(require("./commitizen/commit"));
31
-
32
26
  var configLoader = _interopRequireWildcard(require("./commitizen/configLoader"));
33
-
34
27
  exports.configLoader = configLoader;
35
-
36
28
  var _init = _interopRequireDefault(require("./commitizen/init"));
37
-
38
29
  var staging = _interopRequireWildcard(require("./commitizen/staging"));
39
-
40
30
  exports.staging = staging;
41
-
42
31
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
43
-
44
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
45
-
46
33
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -7,13 +7,9 @@ exports.getParsedJsonFromFile = getParsedJsonFromFile;
7
7
  exports.getParsedPackageJsonFromPath = getParsedPackageJsonFromPath;
8
8
  exports.isFunction = isFunction;
9
9
  exports.isInTest = isInTest;
10
-
11
10
  var _fs = _interopRequireDefault(require("fs"));
12
-
13
11
  var _path = _interopRequireDefault(require("path"));
14
-
15
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
-
17
13
  function cov_pg9gkzupg() {
18
14
  var path = "/home/runner/work/cz-cli/cz-cli/src/common/util.js";
19
15
  var hash = "443667b7bd63169d3e6fa6f728fc86237eaa590b";
@@ -416,11 +412,9 @@ function cov_pg9gkzupg() {
416
412
  hash: "443667b7bd63169d3e6fa6f728fc86237eaa590b"
417
413
  };
418
414
  var coverage = global[gcv] || (global[gcv] = {});
419
-
420
415
  if (!coverage[path] || coverage[path].hash !== hash) {
421
416
  coverage[path] = coverageData;
422
417
  }
423
-
424
418
  var actualCoverage = coverage[path];
425
419
  {
426
420
  // @ts-ignore
@@ -430,16 +424,13 @@ function cov_pg9gkzupg() {
430
424
  }
431
425
  return actualCoverage;
432
426
  }
433
-
434
427
  cov_pg9gkzupg();
435
-
436
428
  /**
437
429
  * Gets the parsed contents of a json file
438
430
  */
439
431
  function getParsedJsonFromFile(filePath, fileName, encoding = (cov_pg9gkzupg().b[0][0]++, 'utf8')) {
440
432
  cov_pg9gkzupg().f[0]++;
441
433
  cov_pg9gkzupg().s[0]++;
442
-
443
434
  try {
444
435
  var packageJsonContents = (cov_pg9gkzupg().s[1]++, _fs.default.readFileSync(_path.default.join(filePath, fileName), encoding));
445
436
  cov_pg9gkzupg().s[2]++;
@@ -449,25 +440,22 @@ function getParsedJsonFromFile(filePath, fileName, encoding = (cov_pg9gkzupg().b
449
440
  console.error(e);
450
441
  }
451
442
  }
443
+
452
444
  /**
453
445
  * A helper method for getting the contents of package.json at a given path
454
446
  */
455
-
456
-
457
447
  function getParsedPackageJsonFromPath(path) {
458
448
  cov_pg9gkzupg().f[1]++;
459
449
  cov_pg9gkzupg().s[4]++;
460
450
  return getParsedJsonFromFile(path, 'package.json');
461
451
  }
452
+
462
453
  /**
463
454
  * Test if the passed argument is a function
464
455
  */
465
-
466
-
467
456
  function isFunction(functionToCheck) {
468
457
  cov_pg9gkzupg().f[2]++;
469
458
  cov_pg9gkzupg().s[5]++;
470
-
471
459
  if (typeof functionToCheck === "undefined") {
472
460
  cov_pg9gkzupg().b[1][0]++;
473
461
  cov_pg9gkzupg().s[6]++;
@@ -475,7 +463,6 @@ function isFunction(functionToCheck) {
475
463
  } else {
476
464
  cov_pg9gkzupg().b[1][1]++;
477
465
  cov_pg9gkzupg().s[7]++;
478
-
479
466
  if (functionToCheck === null) {
480
467
  cov_pg9gkzupg().b[2][0]++;
481
468
  cov_pg9gkzupg().s[8]++;
@@ -489,7 +476,6 @@ function isFunction(functionToCheck) {
489
476
  }
490
477
  }
491
478
  }
492
-
493
479
  function isInTest() {
494
480
  cov_pg9gkzupg().f[3]++;
495
481
  cov_pg9gkzupg().s[12]++;
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _path = _interopRequireDefault(require("path"));
9
-
10
8
  var _glob = _interopRequireDefault(require("glob"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function cov_wjwib8bhg() {
15
11
  var path = "/home/runner/work/cz-cli/cz-cli/src/configLoader/findup.js";
16
12
  var hash = "6f6cc99ed279f909c532154d9f66555fb82a2d2a";
@@ -284,11 +280,9 @@ function cov_wjwib8bhg() {
284
280
  hash: "6f6cc99ed279f909c532154d9f66555fb82a2d2a"
285
281
  };
286
282
  var coverage = global[gcv] || (global[gcv] = {});
287
-
288
283
  if (!coverage[path] || coverage[path].hash !== hash) {
289
284
  coverage[path] = coverageData;
290
285
  }
291
-
292
286
  var actualCoverage = coverage[path];
293
287
  {
294
288
  // @ts-ignore
@@ -298,17 +292,14 @@ function cov_wjwib8bhg() {
298
292
  }
299
293
  return actualCoverage;
300
294
  }
301
-
302
295
  cov_wjwib8bhg();
303
296
  var _default = findup; // Before, "findup-sync" package was used,
304
297
  // but it does not provide filter callback
305
-
306
298
  exports.default = _default;
307
-
308
299
  function findup(patterns, options, fn) {
309
300
  cov_wjwib8bhg().f[0]++;
310
-
311
301
  /* jshint -W083 */
302
+
312
303
  var lastpath;
313
304
  var file;
314
305
  cov_wjwib8bhg().s[0]++;
@@ -318,14 +309,12 @@ function findup(patterns, options, fn) {
318
309
  cov_wjwib8bhg().s[2]++;
319
310
  options.cwd = _path.default.resolve(options.cwd);
320
311
  cov_wjwib8bhg().s[3]++;
321
-
322
312
  do {
323
313
  cov_wjwib8bhg().s[4]++;
324
314
  file = patterns.filter(function (pattern) {
325
315
  cov_wjwib8bhg().f[1]++;
326
316
  var configPath = (cov_wjwib8bhg().s[5]++, _glob.default.sync(pattern, options)[0]);
327
317
  cov_wjwib8bhg().s[6]++;
328
-
329
318
  if (configPath) {
330
319
  cov_wjwib8bhg().b[0][0]++;
331
320
  cov_wjwib8bhg().s[7]++;
@@ -335,7 +324,6 @@ function findup(patterns, options, fn) {
335
324
  }
336
325
  })[0];
337
326
  cov_wjwib8bhg().s[8]++;
338
-
339
327
  if (file) {
340
328
  cov_wjwib8bhg().b[1][0]++;
341
329
  cov_wjwib8bhg().s[9]++;
@@ -343,7 +331,6 @@ function findup(patterns, options, fn) {
343
331
  } else {
344
332
  cov_wjwib8bhg().b[1][1]++;
345
333
  }
346
-
347
334
  cov_wjwib8bhg().s[10]++;
348
335
  lastpath = options.cwd;
349
336
  cov_wjwib8bhg().s[11]++;
@@ -4,21 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _fs = _interopRequireDefault(require("fs"));
9
-
10
8
  var _path = _interopRequireDefault(require("path"));
11
-
12
9
  var _stripJsonComments = _interopRequireDefault(require("strip-json-comments"));
13
-
14
10
  var _isUtf = _interopRequireDefault(require("is-utf8"));
15
-
16
11
  var _stripBom = _interopRequireDefault(require("strip-bom"));
17
-
18
12
  var _configLoader = require("../configLoader");
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
14
  function cov_1jep83s2x2() {
23
15
  var path = "/home/runner/work/cz-cli/cz-cli/src/configLoader/getContent.js";
24
16
  var hash = "403573c0a0b7b4db0113fca9d9beb1098d95eac2";
@@ -601,11 +593,9 @@ function cov_1jep83s2x2() {
601
593
  hash: "403573c0a0b7b4db0113fca9d9beb1098d95eac2"
602
594
  };
603
595
  var coverage = global[gcv] || (global[gcv] = {});
604
-
605
596
  if (!coverage[path] || coverage[path].hash !== hash) {
606
597
  coverage[path] = coverageData;
607
598
  }
608
-
609
599
  var actualCoverage = coverage[path];
610
600
  {
611
601
  // @ts-ignore
@@ -615,7 +605,6 @@ function cov_1jep83s2x2() {
615
605
  }
616
606
  return actualCoverage;
617
607
  }
618
-
619
608
  cov_1jep83s2x2();
620
609
  var _default = getConfigContent;
621
610
  /**
@@ -625,9 +614,7 @@ var _default = getConfigContent;
625
614
  * @param {String} configPath - full path to configuration file
626
615
  * @return {Object}
627
616
  */
628
-
629
617
  exports.default = _default;
630
-
631
618
  function readConfigContent(configPath) {
632
619
  cov_1jep83s2x2().f[0]++;
633
620
  const parsedPath = (cov_1jep83s2x2().s[0]++, _path.default.parse(configPath));
@@ -643,7 +630,6 @@ function readConfigContent(configPath) {
643
630
  return JSON.parse(contents);
644
631
  }));
645
632
  cov_1jep83s2x2().s[6]++;
646
-
647
633
  try {
648
634
  const parsed = (cov_1jep83s2x2().s[7]++, parse(jsonString));
649
635
  cov_1jep83s2x2().s[8]++;
@@ -659,18 +645,16 @@ function readConfigContent(configPath) {
659
645
  throw error;
660
646
  }
661
647
  }
648
+
662
649
  /**
663
650
  * Get content of the configuration file
664
651
  * @param {String} configPath - partial path to configuration file
665
652
  * @param {String} directory - directory path which will be joined with config argument
666
653
  * @return {Object}
667
654
  */
668
-
669
-
670
655
  function getConfigContent(configPath, baseDirectory) {
671
656
  cov_1jep83s2x2().f[3]++;
672
657
  cov_1jep83s2x2().s[12]++;
673
-
674
658
  if (!configPath) {
675
659
  cov_1jep83s2x2().b[2][0]++;
676
660
  cov_1jep83s2x2().s[13]++;
@@ -678,11 +662,9 @@ function getConfigContent(configPath, baseDirectory) {
678
662
  } else {
679
663
  cov_1jep83s2x2().b[2][1]++;
680
664
  }
681
-
682
665
  const resolvedPath = (cov_1jep83s2x2().s[14]++, _path.default.resolve(baseDirectory, configPath));
683
666
  const configBasename = (cov_1jep83s2x2().s[15]++, _path.default.basename(resolvedPath));
684
667
  cov_1jep83s2x2().s[16]++;
685
-
686
668
  if (!_fs.default.existsSync(resolvedPath)) {
687
669
  cov_1jep83s2x2().b[3][0]++;
688
670
  cov_1jep83s2x2().s[17]++;
@@ -690,25 +672,22 @@ function getConfigContent(configPath, baseDirectory) {
690
672
  } else {
691
673
  cov_1jep83s2x2().b[3][1]++;
692
674
  }
693
-
694
675
  const content = (cov_1jep83s2x2().s[18]++, readConfigContent(resolvedPath));
695
676
  cov_1jep83s2x2().s[19]++;
696
677
  return (0, _configLoader.getNormalizedConfig)(configBasename, content);
697
678
  }
698
-
699
679
  ;
680
+
700
681
  /**
701
682
  * Read proper content from config file.
702
683
  * If the chartset of the config file is not utf-8, one error will be thrown.
703
684
  * @param {String} configPath
704
685
  * @return {String}
705
686
  */
706
-
707
687
  function readConfigFileContent(configPath) {
708
688
  cov_1jep83s2x2().f[4]++;
709
689
  let rawBufContent = (cov_1jep83s2x2().s[20]++, _fs.default.readFileSync(configPath));
710
690
  cov_1jep83s2x2().s[21]++;
711
-
712
691
  if (!(0, _isUtf.default)(rawBufContent)) {
713
692
  cov_1jep83s2x2().b[4][0]++;
714
693
  cov_1jep83s2x2().s[22]++;
@@ -716,7 +695,6 @@ function readConfigFileContent(configPath) {
716
695
  } else {
717
696
  cov_1jep83s2x2().b[4][1]++;
718
697
  }
719
-
720
698
  cov_1jep83s2x2().s[23]++;
721
699
  return (0, _stripBom.default)(rawBufContent.toString("utf8"));
722
700
  }
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  function cov_27tktivjps() {
9
8
  var path = "/home/runner/work/cz-cli/cz-cli/src/configLoader/getNormalizedConfig.js";
10
9
  var hash = "4f6f52b87cc201f346900b4ddb8d92d48fe58a78";
@@ -345,11 +344,9 @@ function cov_27tktivjps() {
345
344
  hash: "4f6f52b87cc201f346900b4ddb8d92d48fe58a78"
346
345
  };
347
346
  var coverage = global[gcv] || (global[gcv] = {});
348
-
349
347
  if (!coverage[path] || coverage[path].hash !== hash) {
350
348
  coverage[path] = coverageData;
351
349
  }
352
-
353
350
  var actualCoverage = coverage[path];
354
351
  {
355
352
  // @ts-ignore
@@ -359,22 +356,18 @@ function cov_27tktivjps() {
359
356
  }
360
357
  return actualCoverage;
361
358
  }
362
-
363
359
  cov_27tktivjps();
364
360
  var _default = getNormalizedConfig; // Given a config and content, plucks the actual
365
361
  // settings that we're interested in
366
-
367
362
  exports.default = _default;
368
-
369
363
  function getNormalizedConfig(config, content) {
370
364
  cov_27tktivjps().f[0]++;
371
365
  cov_27tktivjps().s[0]++;
372
-
373
366
  if ((cov_27tktivjps().b[1][0]++, content) && (cov_27tktivjps().b[1][1]++, config === 'package.json')) {
374
367
  cov_27tktivjps().b[0][0]++;
375
368
  cov_27tktivjps().s[1]++;
376
-
377
369
  // PACKAGE.JSON
370
+
378
371
  // Use the npm config key, be good citizens
379
372
  if ((cov_27tktivjps().b[3][0]++, content.config) && (cov_27tktivjps().b[3][1]++, content.config.commitizen)) {
380
373
  cov_27tktivjps().b[2][0]++;
@@ -383,12 +376,11 @@ function getNormalizedConfig(config, content) {
383
376
  } else {
384
377
  cov_27tktivjps().b[2][1]++;
385
378
  cov_27tktivjps().s[3]++;
386
-
387
379
  if (content.czConfig) {
388
380
  cov_27tktivjps().b[4][0]++;
389
381
  cov_27tktivjps().s[4]++;
390
-
391
382
  // Old method, will be deprecated in 3.0.0
383
+
392
384
  // Suppress during test
393
385
  if (typeof global.it !== 'function') {
394
386
  cov_27tktivjps().b[5][0]++;
@@ -397,7 +389,6 @@ function getNormalizedConfig(config, content) {
397
389
  } else {
398
390
  cov_27tktivjps().b[5][1]++;
399
391
  }
400
-
401
392
  cov_27tktivjps().s[6]++;
402
393
  return content.czConfig;
403
394
  } else {
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _path = _interopRequireDefault(require("path"));
9
-
10
8
  var _configLoader = require("../configLoader");
11
-
12
9
  var _util = require("../common/util.js");
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  function cov_aqt8wzdi9() {
17
12
  var path = "/home/runner/work/cz-cli/cz-cli/src/configLoader/loader.js";
18
13
  var hash = "4c4dccab67b6ecaa244de00bc5a7718df1c2c5ea";
@@ -346,11 +341,9 @@ function cov_aqt8wzdi9() {
346
341
  hash: "4c4dccab67b6ecaa244de00bc5a7718df1c2c5ea"
347
342
  };
348
343
  var coverage = global[gcv] || (global[gcv] = {});
349
-
350
344
  if (!coverage[path] || coverage[path].hash !== hash) {
351
345
  coverage[path] = coverageData;
352
346
  }
353
-
354
347
  var actualCoverage = coverage[path];
355
348
  {
356
349
  // @ts-ignore
@@ -360,7 +353,6 @@ function cov_aqt8wzdi9() {
360
353
  }
361
354
  return actualCoverage;
362
355
  }
363
-
364
356
  cov_aqt8wzdi9();
365
357
  var _default = loader;
366
358
  /**
@@ -368,23 +360,20 @@ var _default = loader;
368
360
  * Shamelessly ripped from with slight modifications:
369
361
  * https://github.com/jscs-dev/node-jscs/blob/master/lib/cli-config.js
370
362
  */
371
-
372
363
  /**
373
364
  * Get content of the configuration file
374
365
  * @param {String} config - partial path to configuration file
375
366
  * @param {String} [cwd = process.cwd()] - directory path which will be joined with config argument
376
367
  * @return {Object|undefined}
377
368
  */
378
-
379
369
  exports.default = _default;
380
-
381
370
  function loader(configs, config, cwd) {
382
371
  cov_aqt8wzdi9().f[0]++;
383
372
  var content;
384
- var directory = (cov_aqt8wzdi9().s[0]++, (cov_aqt8wzdi9().b[0][0]++, cwd) || (cov_aqt8wzdi9().b[0][1]++, process.cwd())); // If config option is given, attempt to load it
373
+ var directory = (cov_aqt8wzdi9().s[0]++, (cov_aqt8wzdi9().b[0][0]++, cwd) || (cov_aqt8wzdi9().b[0][1]++, process.cwd()));
385
374
 
375
+ // If config option is given, attempt to load it
386
376
  cov_aqt8wzdi9().s[1]++;
387
-
388
377
  if (config) {
389
378
  cov_aqt8wzdi9().b[1][0]++;
390
379
  cov_aqt8wzdi9().s[2]++;
@@ -392,7 +381,6 @@ function loader(configs, config, cwd) {
392
381
  } else {
393
382
  cov_aqt8wzdi9().b[1][1]++;
394
383
  }
395
-
396
384
  cov_aqt8wzdi9().s[3]++;
397
385
  content = (0, _configLoader.getContent)((0, _configLoader.findup)(configs, {
398
386
  nocase: true,
@@ -400,19 +388,16 @@ function loader(configs, config, cwd) {
400
388
  }, function (configPath) {
401
389
  cov_aqt8wzdi9().f[1]++;
402
390
  cov_aqt8wzdi9().s[4]++;
403
-
404
- if (_path.default.basename(configPath) === 'package.json') {// return !!this.getContent(configPath);
405
-
391
+ if (_path.default.basename(configPath) === 'package.json') {
406
392
  cov_aqt8wzdi9().b[2][0]++;
407
- } else {
393
+ } // return !!this.getContent(configPath);
394
+ else {
408
395
  cov_aqt8wzdi9().b[2][1]++;
409
396
  }
410
-
411
397
  cov_aqt8wzdi9().s[5]++;
412
398
  return true;
413
399
  }));
414
400
  cov_aqt8wzdi9().s[6]++;
415
-
416
401
  if (content) {
417
402
  cov_aqt8wzdi9().b[3][0]++;
418
403
  cov_aqt8wzdi9().s[7]++;
@@ -421,22 +406,16 @@ function loader(configs, config, cwd) {
421
406
  cov_aqt8wzdi9().b[3][1]++;
422
407
  }
423
408
  /* istanbul ignore if */
424
-
425
-
426
409
  cov_aqt8wzdi9().s[8]++;
427
-
428
410
  if (!(0, _util.isInTest)()) {
429
411
  // Try to load standard configs from home dir
430
412
  var directoryArr = [process.env.USERPROFILE, process.env.HOMEPATH, process.env.HOME];
431
-
432
413
  for (var i = 0, dirLen = directoryArr.length; i < dirLen; i++) {
433
414
  if (!directoryArr[i]) {
434
415
  continue;
435
416
  }
436
-
437
417
  for (var j = 0, len = configs.length; j < len; j++) {
438
418
  content = (0, _configLoader.getContent)(configs[j], directoryArr[i]);
439
-
440
419
  if (content) {
441
420
  return content;
442
421
  }
@@ -27,13 +27,8 @@ Object.defineProperty(exports, "loader", {
27
27
  return _loader.default;
28
28
  }
29
29
  });
30
-
31
30
  var _findup = _interopRequireDefault(require("./configLoader/findup"));
32
-
33
31
  var _getContent = _interopRequireDefault(require("./configLoader/getContent"));
34
-
35
32
  var _getNormalizedConfig = _interopRequireDefault(require("./configLoader/getNormalizedConfig"));
36
-
37
33
  var _loader = _interopRequireDefault(require("./configLoader/loader"));
38
-
39
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
package/dist/git/add.js CHANGED
@@ -5,11 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.addFile = addFile;
7
7
  exports.addPath = addPath;
8
-
9
8
  var _child_process = _interopRequireDefault(require("child_process"));
10
-
11
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
10
  function cov_226e3t1eat() {
14
11
  var path = "/home/runner/work/cz-cli/cz-cli/src/git/add.js";
15
12
  var hash = "6b2e029493ef375337d44a1ebfb8489948920288";
@@ -103,11 +100,9 @@ function cov_226e3t1eat() {
103
100
  hash: "6b2e029493ef375337d44a1ebfb8489948920288"
104
101
  };
105
102
  var coverage = global[gcv] || (global[gcv] = {});
106
-
107
103
  if (!coverage[path] || coverage[path].hash !== hash) {
108
104
  coverage[path] = coverageData;
109
105
  }
110
-
111
106
  var actualCoverage = coverage[path];
112
107
  {
113
108
  // @ts-ignore
@@ -117,29 +112,24 @@ function cov_226e3t1eat() {
117
112
  }
118
113
  return actualCoverage;
119
114
  }
120
-
121
115
  cov_226e3t1eat();
122
-
123
116
  /**
124
117
  * Synchronously adds a path to git staging
125
118
  */
126
119
  function addPath(repoPath) {
127
120
  cov_226e3t1eat().f[0]++;
128
121
  cov_226e3t1eat().s[0]++;
129
-
130
122
  _child_process.default.spawnSync('git', ['add', '.'], {
131
123
  cwd: repoPath
132
124
  });
133
125
  }
126
+
134
127
  /**
135
128
  * Synchronously adds a file to git staging
136
129
  */
137
-
138
-
139
130
  function addFile(repoPath, filename) {
140
131
  cov_226e3t1eat().f[1]++;
141
132
  cov_226e3t1eat().s[1]++;
142
-
143
133
  _child_process.default.spawnSync('git', ['add', filename], {
144
134
  cwd: repoPath
145
135
  });