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.
- package/.github/workflows/release.yml +8 -5
- package/.husky/pre-commit +1 -0
- package/CONTRIBUTING.md +72 -21
- package/README.md +6 -6
- package/babel.config.js +21 -10
- package/bin/git-cz.js +1 -1
- package/dist/cli/parsers/commitizen.js +7 -1
- package/dist/cli/parsers.js +2 -1
- package/dist/cli/strategies/git-cz.js +3 -3
- package/dist/cli/strategies/git.js +2 -2
- package/dist/commitizen/adapter.js +52 -1411
- package/dist/commitizen/cache.js +6 -237
- package/dist/commitizen/commit.js +14 -562
- package/dist/commitizen/configLoader.js +1 -84
- package/dist/commitizen/init.js +30 -976
- package/dist/commitizen/staging.js +3 -255
- package/dist/commitizen.js +2 -1
- package/dist/common/util.js +49 -444
- package/dist/configLoader/findup.js +7 -312
- package/dist/configLoader/getContent.js +17 -644
- package/dist/configLoader/getNormalizedConfig.js +9 -382
- package/dist/configLoader/loader.js +4 -371
- package/dist/git/add.js +3 -113
- package/dist/git/commit.js +19 -801
- package/dist/git/init.js +2 -74
- package/dist/git/log.js +2 -175
- package/dist/git/whatChanged.js +2 -175
- package/dist/index.js +1 -56
- package/dist/npm.js +1 -32
- package/jobs/build.yml +17 -16
- package/package.json +63 -46
- package/pnpm-workspace.yaml +7 -0
|
@@ -4,335 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
8
|
-
var _glob =
|
|
7
|
+
var _nodePath = _interopRequireDefault(require("node:path"));
|
|
8
|
+
var _glob = require("glob");
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
function cov_wjwib8bhg() {
|
|
11
|
-
var path = "/home/runner/work/cz-cli/cz-cli/src/configLoader/findup.js";
|
|
12
|
-
var hash = "6f6cc99ed279f909c532154d9f66555fb82a2d2a";
|
|
13
|
-
var global = new Function("return this")();
|
|
14
|
-
var gcv = "__coverage__";
|
|
15
|
-
var coverageData = {
|
|
16
|
-
path: "/home/runner/work/cz-cli/cz-cli/src/configLoader/findup.js",
|
|
17
|
-
statementMap: {
|
|
18
|
-
"0": {
|
|
19
|
-
start: {
|
|
20
|
-
line: 14,
|
|
21
|
-
column: 4
|
|
22
|
-
},
|
|
23
|
-
end: {
|
|
24
|
-
line: 14,
|
|
25
|
-
column: 37
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"1": {
|
|
29
|
-
start: {
|
|
30
|
-
line: 15,
|
|
31
|
-
column: 4
|
|
32
|
-
},
|
|
33
|
-
end: {
|
|
34
|
-
line: 15,
|
|
35
|
-
column: 25
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"2": {
|
|
39
|
-
start: {
|
|
40
|
-
line: 16,
|
|
41
|
-
column: 4
|
|
42
|
-
},
|
|
43
|
-
end: {
|
|
44
|
-
line: 16,
|
|
45
|
-
column: 44
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"3": {
|
|
49
|
-
start: {
|
|
50
|
-
line: 18,
|
|
51
|
-
column: 4
|
|
52
|
-
},
|
|
53
|
-
end: {
|
|
54
|
-
line: 33,
|
|
55
|
-
column: 39
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"4": {
|
|
59
|
-
start: {
|
|
60
|
-
line: 19,
|
|
61
|
-
column: 8
|
|
62
|
-
},
|
|
63
|
-
end: {
|
|
64
|
-
line: 25,
|
|
65
|
-
column: 14
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"5": {
|
|
69
|
-
start: {
|
|
70
|
-
line: 20,
|
|
71
|
-
column: 29
|
|
72
|
-
},
|
|
73
|
-
end: {
|
|
74
|
-
line: 20,
|
|
75
|
-
column: 59
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"6": {
|
|
79
|
-
start: {
|
|
80
|
-
line: 22,
|
|
81
|
-
column: 12
|
|
82
|
-
},
|
|
83
|
-
end: {
|
|
84
|
-
line: 24,
|
|
85
|
-
column: 13
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
"7": {
|
|
89
|
-
start: {
|
|
90
|
-
line: 23,
|
|
91
|
-
column: 16
|
|
92
|
-
},
|
|
93
|
-
end: {
|
|
94
|
-
line: 23,
|
|
95
|
-
column: 62
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"8": {
|
|
99
|
-
start: {
|
|
100
|
-
line: 27,
|
|
101
|
-
column: 8
|
|
102
|
-
},
|
|
103
|
-
end: {
|
|
104
|
-
line: 29,
|
|
105
|
-
column: 9
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"9": {
|
|
109
|
-
start: {
|
|
110
|
-
line: 28,
|
|
111
|
-
column: 12
|
|
112
|
-
},
|
|
113
|
-
end: {
|
|
114
|
-
line: 28,
|
|
115
|
-
column: 48
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"10": {
|
|
119
|
-
start: {
|
|
120
|
-
line: 31,
|
|
121
|
-
column: 8
|
|
122
|
-
},
|
|
123
|
-
end: {
|
|
124
|
-
line: 31,
|
|
125
|
-
column: 31
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
"11": {
|
|
129
|
-
start: {
|
|
130
|
-
line: 32,
|
|
131
|
-
column: 8
|
|
132
|
-
},
|
|
133
|
-
end: {
|
|
134
|
-
line: 32,
|
|
135
|
-
column: 54
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
fnMap: {
|
|
140
|
-
"0": {
|
|
141
|
-
name: "findup",
|
|
142
|
-
decl: {
|
|
143
|
-
start: {
|
|
144
|
-
line: 8,
|
|
145
|
-
column: 9
|
|
146
|
-
},
|
|
147
|
-
end: {
|
|
148
|
-
line: 8,
|
|
149
|
-
column: 15
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
loc: {
|
|
153
|
-
start: {
|
|
154
|
-
line: 8,
|
|
155
|
-
column: 40
|
|
156
|
-
},
|
|
157
|
-
end: {
|
|
158
|
-
line: 34,
|
|
159
|
-
column: 1
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
line: 8
|
|
163
|
-
},
|
|
164
|
-
"1": {
|
|
165
|
-
name: "(anonymous_1)",
|
|
166
|
-
decl: {
|
|
167
|
-
start: {
|
|
168
|
-
line: 19,
|
|
169
|
-
column: 31
|
|
170
|
-
},
|
|
171
|
-
end: {
|
|
172
|
-
line: 19,
|
|
173
|
-
column: 32
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
loc: {
|
|
177
|
-
start: {
|
|
178
|
-
line: 19,
|
|
179
|
-
column: 50
|
|
180
|
-
},
|
|
181
|
-
end: {
|
|
182
|
-
line: 25,
|
|
183
|
-
column: 9
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
line: 19
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
branchMap: {
|
|
190
|
-
"0": {
|
|
191
|
-
loc: {
|
|
192
|
-
start: {
|
|
193
|
-
line: 22,
|
|
194
|
-
column: 12
|
|
195
|
-
},
|
|
196
|
-
end: {
|
|
197
|
-
line: 24,
|
|
198
|
-
column: 13
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
type: "if",
|
|
202
|
-
locations: [{
|
|
203
|
-
start: {
|
|
204
|
-
line: 22,
|
|
205
|
-
column: 12
|
|
206
|
-
},
|
|
207
|
-
end: {
|
|
208
|
-
line: 24,
|
|
209
|
-
column: 13
|
|
210
|
-
}
|
|
211
|
-
}, {
|
|
212
|
-
start: {
|
|
213
|
-
line: undefined,
|
|
214
|
-
column: undefined
|
|
215
|
-
},
|
|
216
|
-
end: {
|
|
217
|
-
line: undefined,
|
|
218
|
-
column: undefined
|
|
219
|
-
}
|
|
220
|
-
}],
|
|
221
|
-
line: 22
|
|
222
|
-
},
|
|
223
|
-
"1": {
|
|
224
|
-
loc: {
|
|
225
|
-
start: {
|
|
226
|
-
line: 27,
|
|
227
|
-
column: 8
|
|
228
|
-
},
|
|
229
|
-
end: {
|
|
230
|
-
line: 29,
|
|
231
|
-
column: 9
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
type: "if",
|
|
235
|
-
locations: [{
|
|
236
|
-
start: {
|
|
237
|
-
line: 27,
|
|
238
|
-
column: 8
|
|
239
|
-
},
|
|
240
|
-
end: {
|
|
241
|
-
line: 29,
|
|
242
|
-
column: 9
|
|
243
|
-
}
|
|
244
|
-
}, {
|
|
245
|
-
start: {
|
|
246
|
-
line: undefined,
|
|
247
|
-
column: undefined
|
|
248
|
-
},
|
|
249
|
-
end: {
|
|
250
|
-
line: undefined,
|
|
251
|
-
column: undefined
|
|
252
|
-
}
|
|
253
|
-
}],
|
|
254
|
-
line: 27
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
s: {
|
|
258
|
-
"0": 0,
|
|
259
|
-
"1": 0,
|
|
260
|
-
"2": 0,
|
|
261
|
-
"3": 0,
|
|
262
|
-
"4": 0,
|
|
263
|
-
"5": 0,
|
|
264
|
-
"6": 0,
|
|
265
|
-
"7": 0,
|
|
266
|
-
"8": 0,
|
|
267
|
-
"9": 0,
|
|
268
|
-
"10": 0,
|
|
269
|
-
"11": 0
|
|
270
|
-
},
|
|
271
|
-
f: {
|
|
272
|
-
"0": 0,
|
|
273
|
-
"1": 0
|
|
274
|
-
},
|
|
275
|
-
b: {
|
|
276
|
-
"0": [0, 0],
|
|
277
|
-
"1": [0, 0]
|
|
278
|
-
},
|
|
279
|
-
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
|
280
|
-
hash: "6f6cc99ed279f909c532154d9f66555fb82a2d2a"
|
|
281
|
-
};
|
|
282
|
-
var coverage = global[gcv] || (global[gcv] = {});
|
|
283
|
-
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
284
|
-
coverage[path] = coverageData;
|
|
285
|
-
}
|
|
286
|
-
var actualCoverage = coverage[path];
|
|
287
|
-
{
|
|
288
|
-
// @ts-ignore
|
|
289
|
-
cov_wjwib8bhg = function () {
|
|
290
|
-
return actualCoverage;
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
return actualCoverage;
|
|
294
|
-
}
|
|
295
|
-
cov_wjwib8bhg();
|
|
296
10
|
var _default = exports.default = findup; // Before, "findup-sync" package was used,
|
|
297
11
|
// but it does not provide filter callback
|
|
298
12
|
function findup(patterns, options, fn) {
|
|
299
|
-
cov_wjwib8bhg().f[0]++;
|
|
300
13
|
/* jshint -W083 */
|
|
301
14
|
|
|
302
15
|
var lastpath;
|
|
303
16
|
var file;
|
|
304
|
-
cov_wjwib8bhg().s[0]++;
|
|
305
17
|
options = Object.create(options);
|
|
306
|
-
cov_wjwib8bhg().s[1]++;
|
|
307
18
|
options.maxDepth = 1;
|
|
308
|
-
|
|
309
|
-
options.cwd = _path.default.resolve(options.cwd);
|
|
310
|
-
cov_wjwib8bhg().s[3]++;
|
|
19
|
+
options.cwd = _nodePath.default.resolve(options.cwd);
|
|
311
20
|
do {
|
|
312
|
-
cov_wjwib8bhg().s[4]++;
|
|
313
21
|
file = patterns.filter(function (pattern) {
|
|
314
|
-
|
|
315
|
-
var configPath = (cov_wjwib8bhg().s[5]++, _glob.default.sync(pattern, options)[0]);
|
|
316
|
-
cov_wjwib8bhg().s[6]++;
|
|
22
|
+
var configPath = (0, _glob.globSync)(pattern, options)[0];
|
|
317
23
|
if (configPath) {
|
|
318
|
-
|
|
319
|
-
cov_wjwib8bhg().s[7]++;
|
|
320
|
-
return fn(_path.default.join(options.cwd, configPath));
|
|
321
|
-
} else {
|
|
322
|
-
cov_wjwib8bhg().b[0][1]++;
|
|
24
|
+
return fn(_nodePath.default.join(options.cwd, configPath));
|
|
323
25
|
}
|
|
324
26
|
})[0];
|
|
325
|
-
cov_wjwib8bhg().s[8]++;
|
|
326
27
|
if (file) {
|
|
327
|
-
|
|
328
|
-
cov_wjwib8bhg().s[9]++;
|
|
329
|
-
return _path.default.join(options.cwd, file);
|
|
330
|
-
} else {
|
|
331
|
-
cov_wjwib8bhg().b[1][1]++;
|
|
28
|
+
return _nodePath.default.join(options.cwd, file);
|
|
332
29
|
}
|
|
333
|
-
cov_wjwib8bhg().s[10]++;
|
|
334
30
|
lastpath = options.cwd;
|
|
335
|
-
|
|
336
|
-
options.cwd = _path.default.resolve(options.cwd, '..');
|
|
31
|
+
options.cwd = _nodePath.default.resolve(options.cwd, '..');
|
|
337
32
|
} while (options.cwd !== lastpath);
|
|
338
33
|
}
|