commitizen 4.3.2 → 5.0.1

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,356 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _path = _interopRequireDefault(require("path"));
7
+ var _nodePath = _interopRequireDefault(require("node:path"));
8
8
  var _configLoader = require("../configLoader");
9
9
  var _util = require("../common/util.js");
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- function cov_aqt8wzdi9() {
12
- var path = "/home/runner/work/cz-cli/cz-cli/src/configLoader/loader.js";
13
- var hash = "4c4dccab67b6ecaa244de00bc5a7718df1c2c5ea";
14
- var global = new Function("return this")();
15
- var gcv = "__coverage__";
16
- var coverageData = {
17
- path: "/home/runner/work/cz-cli/cz-cli/src/configLoader/loader.js",
18
- statementMap: {
19
- "0": {
20
- start: {
21
- line: 22,
22
- column: 20
23
- },
24
- end: {
25
- line: 22,
26
- column: 40
27
- }
28
- },
29
- "1": {
30
- start: {
31
- line: 25,
32
- column: 4
33
- },
34
- end: {
35
- line: 27,
36
- column: 5
37
- }
38
- },
39
- "2": {
40
- start: {
41
- line: 26,
42
- column: 8
43
- },
44
- end: {
45
- line: 26,
46
- column: 45
47
- }
48
- },
49
- "3": {
50
- start: {
51
- line: 29,
52
- column: 4
53
- },
54
- end: {
55
- line: 37,
56
- column: 6
57
- }
58
- },
59
- "4": {
60
- start: {
61
- line: 31,
62
- column: 12
63
- },
64
- end: {
65
- line: 33,
66
- column: 13
67
- }
68
- },
69
- "5": {
70
- start: {
71
- line: 35,
72
- column: 12
73
- },
74
- end: {
75
- line: 35,
76
- column: 24
77
- }
78
- },
79
- "6": {
80
- start: {
81
- line: 39,
82
- column: 4
83
- },
84
- end: {
85
- line: 41,
86
- column: 5
87
- }
88
- },
89
- "7": {
90
- start: {
91
- line: 40,
92
- column: 8
93
- },
94
- end: {
95
- line: 40,
96
- column: 23
97
- }
98
- },
99
- "8": {
100
- start: {
101
- line: 43,
102
- column: 4
103
- },
104
- end: {
105
- line: 59,
106
- column: 5
107
- }
108
- }
109
- },
110
- fnMap: {
111
- "0": {
112
- name: "loader",
113
- decl: {
114
- start: {
115
- line: 20,
116
- column: 9
117
- },
118
- end: {
119
- line: 20,
120
- column: 15
121
- }
122
- },
123
- loc: {
124
- start: {
125
- line: 20,
126
- column: 39
127
- },
128
- end: {
129
- line: 60,
130
- column: 1
131
- }
132
- },
133
- line: 20
134
- },
135
- "1": {
136
- name: "(anonymous_1)",
137
- decl: {
138
- start: {
139
- line: 30,
140
- column: 58
141
- },
142
- end: {
143
- line: 30,
144
- column: 59
145
- }
146
- },
147
- loc: {
148
- start: {
149
- line: 30,
150
- column: 80
151
- },
152
- end: {
153
- line: 36,
154
- column: 9
155
- }
156
- },
157
- line: 30
158
- }
159
- },
160
- branchMap: {
161
- "0": {
162
- loc: {
163
- start: {
164
- line: 22,
165
- column: 20
166
- },
167
- end: {
168
- line: 22,
169
- column: 40
170
- }
171
- },
172
- type: "binary-expr",
173
- locations: [{
174
- start: {
175
- line: 22,
176
- column: 20
177
- },
178
- end: {
179
- line: 22,
180
- column: 23
181
- }
182
- }, {
183
- start: {
184
- line: 22,
185
- column: 27
186
- },
187
- end: {
188
- line: 22,
189
- column: 40
190
- }
191
- }],
192
- line: 22
193
- },
194
- "1": {
195
- loc: {
196
- start: {
197
- line: 25,
198
- column: 4
199
- },
200
- end: {
201
- line: 27,
202
- column: 5
203
- }
204
- },
205
- type: "if",
206
- locations: [{
207
- start: {
208
- line: 25,
209
- column: 4
210
- },
211
- end: {
212
- line: 27,
213
- column: 5
214
- }
215
- }, {
216
- start: {
217
- line: undefined,
218
- column: undefined
219
- },
220
- end: {
221
- line: undefined,
222
- column: undefined
223
- }
224
- }],
225
- line: 25
226
- },
227
- "2": {
228
- loc: {
229
- start: {
230
- line: 31,
231
- column: 12
232
- },
233
- end: {
234
- line: 33,
235
- column: 13
236
- }
237
- },
238
- type: "if",
239
- locations: [{
240
- start: {
241
- line: 31,
242
- column: 12
243
- },
244
- end: {
245
- line: 33,
246
- column: 13
247
- }
248
- }, {
249
- start: {
250
- line: undefined,
251
- column: undefined
252
- },
253
- end: {
254
- line: undefined,
255
- column: undefined
256
- }
257
- }],
258
- line: 31
259
- },
260
- "3": {
261
- loc: {
262
- start: {
263
- line: 39,
264
- column: 4
265
- },
266
- end: {
267
- line: 41,
268
- column: 5
269
- }
270
- },
271
- type: "if",
272
- locations: [{
273
- start: {
274
- line: 39,
275
- column: 4
276
- },
277
- end: {
278
- line: 41,
279
- column: 5
280
- }
281
- }, {
282
- start: {
283
- line: undefined,
284
- column: undefined
285
- },
286
- end: {
287
- line: undefined,
288
- column: undefined
289
- }
290
- }],
291
- line: 39
292
- },
293
- "4": {
294
- loc: {
295
- start: {
296
- line: 43,
297
- column: 4
298
- },
299
- end: {
300
- line: 59,
301
- column: 5
302
- }
303
- },
304
- type: "if",
305
- locations: [{
306
- start: {
307
- line: undefined,
308
- column: undefined
309
- },
310
- end: {
311
- line: undefined,
312
- column: undefined
313
- }
314
- }],
315
- line: 43
316
- }
317
- },
318
- s: {
319
- "0": 0,
320
- "1": 0,
321
- "2": 0,
322
- "3": 0,
323
- "4": 0,
324
- "5": 0,
325
- "6": 0,
326
- "7": 0,
327
- "8": 0
328
- },
329
- f: {
330
- "0": 0,
331
- "1": 0
332
- },
333
- b: {
334
- "0": [0, 0],
335
- "1": [0, 0],
336
- "2": [0, 0],
337
- "3": [0, 0],
338
- "4": [0]
339
- },
340
- _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
341
- hash: "4c4dccab67b6ecaa244de00bc5a7718df1c2c5ea"
342
- };
343
- var coverage = global[gcv] || (global[gcv] = {});
344
- if (!coverage[path] || coverage[path].hash !== hash) {
345
- coverage[path] = coverageData;
346
- }
347
- var actualCoverage = coverage[path];
348
- {
349
- // @ts-ignore
350
- cov_aqt8wzdi9 = function () {
351
- return actualCoverage;
352
- };
353
- }
354
- return actualCoverage;
355
- }
356
- cov_aqt8wzdi9();
357
11
  var _default = exports.default = loader;
358
12
  /**
359
13
  * Command line config helpers
@@ -367,45 +21,26 @@ var _default = exports.default = loader;
367
21
  * @return {Object|undefined}
368
22
  */
369
23
  function loader(configs, config, cwd) {
370
- cov_aqt8wzdi9().f[0]++;
371
24
  var content;
372
- var directory = (cov_aqt8wzdi9().s[0]++, (cov_aqt8wzdi9().b[0][0]++, cwd) || (cov_aqt8wzdi9().b[0][1]++, process.cwd()));
25
+ var directory = cwd || process.cwd();
373
26
 
374
27
  // If config option is given, attempt to load it
375
- cov_aqt8wzdi9().s[1]++;
376
28
  if (config) {
377
- cov_aqt8wzdi9().b[1][0]++;
378
- cov_aqt8wzdi9().s[2]++;
379
29
  return (0, _configLoader.getContent)(config, directory);
380
- } else {
381
- cov_aqt8wzdi9().b[1][1]++;
382
30
  }
383
- cov_aqt8wzdi9().s[3]++;
384
31
  content = (0, _configLoader.getContent)((0, _configLoader.findup)(configs, {
385
32
  nocase: true,
386
33
  cwd: directory
387
34
  }, function (configPath) {
388
- cov_aqt8wzdi9().f[1]++;
389
- cov_aqt8wzdi9().s[4]++;
390
- if (_path.default.basename(configPath) === 'package.json') {
391
- cov_aqt8wzdi9().b[2][0]++;
392
- } // return !!this.getContent(configPath);
393
- else {
394
- cov_aqt8wzdi9().b[2][1]++;
35
+ if (_nodePath.default.basename(configPath) === 'package.json') {
36
+ // return !!this.getContent(configPath);
395
37
  }
396
- cov_aqt8wzdi9().s[5]++;
397
38
  return true;
398
39
  }));
399
- cov_aqt8wzdi9().s[6]++;
400
40
  if (content) {
401
- cov_aqt8wzdi9().b[3][0]++;
402
- cov_aqt8wzdi9().s[7]++;
403
41
  return content;
404
- } else {
405
- cov_aqt8wzdi9().b[3][1]++;
406
42
  }
407
43
  /* istanbul ignore if */
408
- cov_aqt8wzdi9().s[8]++;
409
44
  if (!(0, _util.isInTest)()) {
410
45
  // Try to load standard configs from home dir
411
46
  var directoryArr = [process.env.USERPROFILE, process.env.HOMEPATH, process.env.HOME];
@@ -420,7 +55,5 @@ function loader(configs, config, cwd) {
420
55
  }
421
56
  }
422
57
  }
423
- } else {
424
- cov_aqt8wzdi9().b[4][0]++;
425
58
  }
426
59
  }
package/dist/git/add.js CHANGED
@@ -5,121 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.addFile = addFile;
7
7
  exports.addPath = addPath;
8
- var _child_process = _interopRequireDefault(require("child_process"));
8
+ var _nodeChild_process = _interopRequireDefault(require("node:child_process"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- function cov_226e3t1eat() {
11
- var path = "/home/runner/work/cz-cli/cz-cli/src/git/add.js";
12
- var hash = "6b2e029493ef375337d44a1ebfb8489948920288";
13
- var global = new Function("return this")();
14
- var gcv = "__coverage__";
15
- var coverageData = {
16
- path: "/home/runner/work/cz-cli/cz-cli/src/git/add.js",
17
- statementMap: {
18
- "0": {
19
- start: {
20
- line: 12,
21
- column: 2
22
- },
23
- end: {
24
- line: 12,
25
- column: 65
26
- }
27
- },
28
- "1": {
29
- start: {
30
- line: 19,
31
- column: 2
32
- },
33
- end: {
34
- line: 19,
35
- column: 70
36
- }
37
- }
38
- },
39
- fnMap: {
40
- "0": {
41
- name: "addPath",
42
- decl: {
43
- start: {
44
- line: 11,
45
- column: 9
46
- },
47
- end: {
48
- line: 11,
49
- column: 16
50
- }
51
- },
52
- loc: {
53
- start: {
54
- line: 11,
55
- column: 28
56
- },
57
- end: {
58
- line: 13,
59
- column: 1
60
- }
61
- },
62
- line: 11
63
- },
64
- "1": {
65
- name: "addFile",
66
- decl: {
67
- start: {
68
- line: 18,
69
- column: 9
70
- },
71
- end: {
72
- line: 18,
73
- column: 16
74
- }
75
- },
76
- loc: {
77
- start: {
78
- line: 18,
79
- column: 38
80
- },
81
- end: {
82
- line: 20,
83
- column: 1
84
- }
85
- },
86
- line: 18
87
- }
88
- },
89
- branchMap: {},
90
- s: {
91
- "0": 0,
92
- "1": 0
93
- },
94
- f: {
95
- "0": 0,
96
- "1": 0
97
- },
98
- b: {},
99
- _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
100
- hash: "6b2e029493ef375337d44a1ebfb8489948920288"
101
- };
102
- var coverage = global[gcv] || (global[gcv] = {});
103
- if (!coverage[path] || coverage[path].hash !== hash) {
104
- coverage[path] = coverageData;
105
- }
106
- var actualCoverage = coverage[path];
107
- {
108
- // @ts-ignore
109
- cov_226e3t1eat = function () {
110
- return actualCoverage;
111
- };
112
- }
113
- return actualCoverage;
114
- }
115
- cov_226e3t1eat();
116
10
  /**
117
11
  * Synchronously adds a path to git staging
118
12
  */
119
13
  function addPath(repoPath) {
120
- cov_226e3t1eat().f[0]++;
121
- cov_226e3t1eat().s[0]++;
122
- _child_process.default.spawnSync('git', ['add', '.'], {
14
+ _nodeChild_process.default.spawnSync('git', ['add', '.'], {
123
15
  cwd: repoPath
124
16
  });
125
17
  }
@@ -128,9 +20,7 @@ function addPath(repoPath) {
128
20
  * Synchronously adds a file to git staging
129
21
  */
130
22
  function addFile(repoPath, filename) {
131
- cov_226e3t1eat().f[1]++;
132
- cov_226e3t1eat().s[1]++;
133
- _child_process.default.spawnSync('git', ['add', filename], {
23
+ _nodeChild_process.default.spawnSync('git', ['add', filename], {
134
24
  cwd: repoPath
135
25
  });
136
26
  }