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.
- package/README.md +5 -4
- package/dist/cli/commitizen.js +4 -8
- package/dist/cli/git-cz.js +2 -6
- package/dist/cli/parsers/commitizen.js +0 -3
- package/dist/cli/parsers/git-cz.js +1 -12
- package/dist/cli/parsers.js +0 -6
- package/dist/cli/strategies/git-cz.js +9 -19
- package/dist/cli/strategies/git.js +0 -7
- package/dist/cli/strategies.js +0 -3
- package/dist/commitizen/adapter.js +541 -441
- package/dist/commitizen/cache.js +2 -17
- package/dist/commitizen/commit.js +11 -31
- package/dist/commitizen/configLoader.js +0 -6
- package/dist/commitizen/init.js +210 -221
- package/dist/commitizen/staging.js +0 -8
- package/dist/commitizen.js +0 -13
- package/dist/common/util.js +2 -16
- package/dist/configLoader/findup.js +1 -14
- package/dist/configLoader/getContent.js +2 -24
- package/dist/configLoader/getNormalizedConfig.js +2 -11
- package/dist/configLoader/loader.js +5 -26
- package/dist/configLoader.js +0 -5
- package/dist/git/add.js +1 -11
- package/dist/git/commit.js +3 -24
- package/dist/git/init.js +0 -8
- package/dist/git/log.js +0 -8
- package/dist/git/whatChanged.js +0 -8
- package/dist/git.js +0 -5
- package/dist/index.js +0 -3
- package/dist/npm.js +0 -3
- package/package.json +12 -12
package/dist/git/commit.js
CHANGED
|
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.commit = commit;
|
|
7
|
-
|
|
8
7
|
var _child_process = require("child_process");
|
|
9
|
-
|
|
10
8
|
var _path = _interopRequireDefault(require("path"));
|
|
11
|
-
|
|
12
9
|
var _fs = require("fs");
|
|
13
|
-
|
|
14
10
|
var _dedent = _interopRequireDefault(require("dedent"));
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
function cov_lpc78prp4() {
|
|
19
13
|
var path = "/home/runner/work/cz-cli/cz-cli/src/git/commit.js";
|
|
20
14
|
var hash = "dffb8a6807d61696bc8019d6e9da18a39917eafb";
|
|
@@ -736,11 +730,9 @@ function cov_lpc78prp4() {
|
|
|
736
730
|
hash: "dffb8a6807d61696bc8019d6e9da18a39917eafb"
|
|
737
731
|
};
|
|
738
732
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
739
|
-
|
|
740
733
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
741
734
|
coverage[path] = coverageData;
|
|
742
735
|
}
|
|
743
|
-
|
|
744
736
|
var actualCoverage = coverage[path];
|
|
745
737
|
{
|
|
746
738
|
// @ts-ignore
|
|
@@ -750,20 +742,18 @@ function cov_lpc78prp4() {
|
|
|
750
742
|
}
|
|
751
743
|
return actualCoverage;
|
|
752
744
|
}
|
|
753
|
-
|
|
754
745
|
cov_lpc78prp4();
|
|
755
|
-
|
|
756
746
|
/**
|
|
757
747
|
* Asynchronously git commit at a given path with a message
|
|
758
748
|
*/
|
|
759
749
|
function commit(repoPath, message, options, done) {
|
|
760
750
|
cov_lpc78prp4().f[0]++;
|
|
761
|
-
let called = (cov_lpc78prp4().s[0]++, false);
|
|
751
|
+
let called = (cov_lpc78prp4().s[0]++, false);
|
|
752
|
+
|
|
753
|
+
// commit the file by spawning a git process, unless the --hook
|
|
762
754
|
// option was provided. in that case, write the commit message into
|
|
763
755
|
// the .git/COMMIT_EDITMSG file
|
|
764
|
-
|
|
765
756
|
cov_lpc78prp4().s[1]++;
|
|
766
|
-
|
|
767
757
|
if (!options.hookMode) {
|
|
768
758
|
cov_lpc78prp4().b[0][0]++;
|
|
769
759
|
let args = (cov_lpc78prp4().s[2]++, ['commit', '-m', (0, _dedent.default)(message), ...((cov_lpc78prp4().b[1][0]++, options.args) || (cov_lpc78prp4().b[1][1]++, []))]);
|
|
@@ -775,7 +765,6 @@ function commit(repoPath, message, options, done) {
|
|
|
775
765
|
child.on('error', function (err) {
|
|
776
766
|
cov_lpc78prp4().f[1]++;
|
|
777
767
|
cov_lpc78prp4().s[5]++;
|
|
778
|
-
|
|
779
768
|
if (called) {
|
|
780
769
|
cov_lpc78prp4().b[3][0]++;
|
|
781
770
|
cov_lpc78prp4().s[6]++;
|
|
@@ -783,7 +772,6 @@ function commit(repoPath, message, options, done) {
|
|
|
783
772
|
} else {
|
|
784
773
|
cov_lpc78prp4().b[3][1]++;
|
|
785
774
|
}
|
|
786
|
-
|
|
787
775
|
cov_lpc78prp4().s[7]++;
|
|
788
776
|
called = true;
|
|
789
777
|
cov_lpc78prp4().s[8]++;
|
|
@@ -793,7 +781,6 @@ function commit(repoPath, message, options, done) {
|
|
|
793
781
|
child.on('exit', function (code, signal) {
|
|
794
782
|
cov_lpc78prp4().f[2]++;
|
|
795
783
|
cov_lpc78prp4().s[10]++;
|
|
796
|
-
|
|
797
784
|
if (called) {
|
|
798
785
|
cov_lpc78prp4().b[4][0]++;
|
|
799
786
|
cov_lpc78prp4().s[11]++;
|
|
@@ -801,15 +788,12 @@ function commit(repoPath, message, options, done) {
|
|
|
801
788
|
} else {
|
|
802
789
|
cov_lpc78prp4().b[4][1]++;
|
|
803
790
|
}
|
|
804
|
-
|
|
805
791
|
cov_lpc78prp4().s[12]++;
|
|
806
792
|
called = true;
|
|
807
793
|
cov_lpc78prp4().s[13]++;
|
|
808
|
-
|
|
809
794
|
if (code) {
|
|
810
795
|
cov_lpc78prp4().b[5][0]++;
|
|
811
796
|
cov_lpc78prp4().s[14]++;
|
|
812
|
-
|
|
813
797
|
if (code === 128) {
|
|
814
798
|
cov_lpc78prp4().b[6][0]++;
|
|
815
799
|
cov_lpc78prp4().s[15]++;
|
|
@@ -822,7 +806,6 @@ function commit(repoPath, message, options, done) {
|
|
|
822
806
|
} else {
|
|
823
807
|
cov_lpc78prp4().b[6][1]++;
|
|
824
808
|
}
|
|
825
|
-
|
|
826
809
|
cov_lpc78prp4().s[16]++;
|
|
827
810
|
done(Object.assign(new Error(`git exited with error code ${code}`), {
|
|
828
811
|
code,
|
|
@@ -842,11 +825,9 @@ function commit(repoPath, message, options, done) {
|
|
|
842
825
|
}).trim());
|
|
843
826
|
const commitFilePath = (cov_lpc78prp4().s[19]++, _path.default.join(gitDirPath, 'COMMIT_EDITMSG'));
|
|
844
827
|
cov_lpc78prp4().s[20]++;
|
|
845
|
-
|
|
846
828
|
try {
|
|
847
829
|
const fd = (cov_lpc78prp4().s[21]++, (0, _fs.openSync)(commitFilePath, 'w'));
|
|
848
830
|
cov_lpc78prp4().s[22]++;
|
|
849
|
-
|
|
850
831
|
try {
|
|
851
832
|
cov_lpc78prp4().s[23]++;
|
|
852
833
|
(0, _fs.writeFileSync)(fd, (0, _dedent.default)(message));
|
|
@@ -861,13 +842,11 @@ function commit(repoPath, message, options, done) {
|
|
|
861
842
|
}
|
|
862
843
|
} catch (e) {
|
|
863
844
|
cov_lpc78prp4().s[27]++;
|
|
864
|
-
|
|
865
845
|
// windows doesn't allow opening existing hidden files
|
|
866
846
|
// in 'w' mode... but it does let you do 'r+'!
|
|
867
847
|
try {
|
|
868
848
|
const fd = (cov_lpc78prp4().s[28]++, (0, _fs.openSync)(commitFilePath, 'r+'));
|
|
869
849
|
cov_lpc78prp4().s[29]++;
|
|
870
|
-
|
|
871
850
|
try {
|
|
872
851
|
cov_lpc78prp4().s[30]++;
|
|
873
852
|
(0, _fs.writeFileSync)(fd, (0, _dedent.default)(message));
|
package/dist/git/init.js
CHANGED
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.init = init;
|
|
7
|
-
|
|
8
7
|
var _child_process = _interopRequireDefault(require("child_process"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
function cov_2lfeo71xnk() {
|
|
13
10
|
var path = "/home/runner/work/cz-cli/cz-cli/src/git/init.js";
|
|
14
11
|
var hash = "2e1de1e82ca18c86df306fd611871f92429b8fa5";
|
|
@@ -66,11 +63,9 @@ function cov_2lfeo71xnk() {
|
|
|
66
63
|
hash: "2e1de1e82ca18c86df306fd611871f92429b8fa5"
|
|
67
64
|
};
|
|
68
65
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
69
|
-
|
|
70
66
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
71
67
|
coverage[path] = coverageData;
|
|
72
68
|
}
|
|
73
|
-
|
|
74
69
|
var actualCoverage = coverage[path];
|
|
75
70
|
{
|
|
76
71
|
// @ts-ignore
|
|
@@ -80,16 +75,13 @@ function cov_2lfeo71xnk() {
|
|
|
80
75
|
}
|
|
81
76
|
return actualCoverage;
|
|
82
77
|
}
|
|
83
|
-
|
|
84
78
|
cov_2lfeo71xnk();
|
|
85
|
-
|
|
86
79
|
/**
|
|
87
80
|
* Synchronously creates a new git repo at a path
|
|
88
81
|
*/
|
|
89
82
|
function init(repoPath) {
|
|
90
83
|
cov_2lfeo71xnk().f[0]++;
|
|
91
84
|
cov_2lfeo71xnk().s[0]++;
|
|
92
|
-
|
|
93
85
|
_child_process.default.spawnSync('git', ['init'], {
|
|
94
86
|
cwd: repoPath
|
|
95
87
|
});
|
package/dist/git/log.js
CHANGED
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.log = log;
|
|
7
|
-
|
|
8
7
|
var _child_process = require("child_process");
|
|
9
|
-
|
|
10
8
|
function cov_uo383o3rs() {
|
|
11
9
|
var path = "/home/runner/work/cz-cli/cz-cli/src/git/log.js";
|
|
12
10
|
var hash = "af9ef92940eb1c905d0a9cd466704f086cbe48fa";
|
|
@@ -158,11 +156,9 @@ function cov_uo383o3rs() {
|
|
|
158
156
|
hash: "af9ef92940eb1c905d0a9cd466704f086cbe48fa"
|
|
159
157
|
};
|
|
160
158
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
161
|
-
|
|
162
159
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
163
160
|
coverage[path] = coverageData;
|
|
164
161
|
}
|
|
165
|
-
|
|
166
162
|
var actualCoverage = coverage[path];
|
|
167
163
|
{
|
|
168
164
|
// @ts-ignore
|
|
@@ -172,9 +168,7 @@ function cov_uo383o3rs() {
|
|
|
172
168
|
}
|
|
173
169
|
return actualCoverage;
|
|
174
170
|
}
|
|
175
|
-
|
|
176
171
|
cov_uo383o3rs();
|
|
177
|
-
|
|
178
172
|
/**
|
|
179
173
|
* Asynchronously gets the git log output
|
|
180
174
|
*/
|
|
@@ -187,7 +181,6 @@ function log(repoPath, done) {
|
|
|
187
181
|
}, function (error, stdout, stderr) {
|
|
188
182
|
cov_uo383o3rs().f[1]++;
|
|
189
183
|
cov_uo383o3rs().s[1]++;
|
|
190
|
-
|
|
191
184
|
if (error) {
|
|
192
185
|
cov_uo383o3rs().b[0][0]++;
|
|
193
186
|
cov_uo383o3rs().s[2]++;
|
|
@@ -195,7 +188,6 @@ function log(repoPath, done) {
|
|
|
195
188
|
} else {
|
|
196
189
|
cov_uo383o3rs().b[0][1]++;
|
|
197
190
|
}
|
|
198
|
-
|
|
199
191
|
cov_uo383o3rs().s[3]++;
|
|
200
192
|
done(stdout);
|
|
201
193
|
});
|
package/dist/git/whatChanged.js
CHANGED
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.whatChanged = whatChanged;
|
|
7
|
-
|
|
8
7
|
var _child_process = require("child_process");
|
|
9
|
-
|
|
10
8
|
function cov_2ixm6leycz() {
|
|
11
9
|
var path = "/home/runner/work/cz-cli/cz-cli/src/git/whatChanged.js";
|
|
12
10
|
var hash = "1b3ffa6b1e244146ab047f40630d5a3cda14c5b3";
|
|
@@ -158,11 +156,9 @@ function cov_2ixm6leycz() {
|
|
|
158
156
|
hash: "1b3ffa6b1e244146ab047f40630d5a3cda14c5b3"
|
|
159
157
|
};
|
|
160
158
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
161
|
-
|
|
162
159
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
163
160
|
coverage[path] = coverageData;
|
|
164
161
|
}
|
|
165
|
-
|
|
166
162
|
var actualCoverage = coverage[path];
|
|
167
163
|
{
|
|
168
164
|
// @ts-ignore
|
|
@@ -172,9 +168,7 @@ function cov_2ixm6leycz() {
|
|
|
172
168
|
}
|
|
173
169
|
return actualCoverage;
|
|
174
170
|
}
|
|
175
|
-
|
|
176
171
|
cov_2ixm6leycz();
|
|
177
|
-
|
|
178
172
|
/**
|
|
179
173
|
* Asynchronously gets the git whatchanged output
|
|
180
174
|
*/
|
|
@@ -187,7 +181,6 @@ function whatChanged(repoPath, done) {
|
|
|
187
181
|
}, function (error, stdout, stderr) {
|
|
188
182
|
cov_2ixm6leycz().f[1]++;
|
|
189
183
|
cov_2ixm6leycz().s[1]++;
|
|
190
|
-
|
|
191
184
|
if (error) {
|
|
192
185
|
cov_2ixm6leycz().b[0][0]++;
|
|
193
186
|
cov_2ixm6leycz().s[2]++;
|
|
@@ -195,7 +188,6 @@ function whatChanged(repoPath, done) {
|
|
|
195
188
|
} else {
|
|
196
189
|
cov_2ixm6leycz().b[0][1]++;
|
|
197
190
|
}
|
|
198
|
-
|
|
199
191
|
cov_2ixm6leycz().s[3]++;
|
|
200
192
|
done(stdout);
|
|
201
193
|
});
|
package/dist/git.js
CHANGED
|
@@ -39,13 +39,8 @@ Object.defineProperty(exports, "whatChanged", {
|
|
|
39
39
|
return _whatChanged.whatChanged;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
|
|
43
42
|
var _add = require("./git/add");
|
|
44
|
-
|
|
45
43
|
var _commit = require("./git/commit");
|
|
46
|
-
|
|
47
44
|
var _init = require("./git/init");
|
|
48
|
-
|
|
49
45
|
var _log = require("./git/log");
|
|
50
|
-
|
|
51
46
|
var _whatChanged = require("./git/whatChanged");
|
package/dist/index.js
CHANGED
|
@@ -41,11 +41,9 @@ function cov_toszyysar() {
|
|
|
41
41
|
hash: "2dc4d0be9f441adce3ca215aa053ea537077b4a1"
|
|
42
42
|
};
|
|
43
43
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
44
|
-
|
|
45
44
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
46
45
|
coverage[path] = coverageData;
|
|
47
46
|
}
|
|
48
|
-
|
|
49
47
|
var actualCoverage = coverage[path];
|
|
50
48
|
{
|
|
51
49
|
// @ts-ignore
|
|
@@ -55,7 +53,6 @@ function cov_toszyysar() {
|
|
|
55
53
|
}
|
|
56
54
|
return actualCoverage;
|
|
57
55
|
}
|
|
58
|
-
|
|
59
56
|
cov_toszyysar();
|
|
60
57
|
var commitizen = (cov_toszyysar().s[0]++, require('./commitizen'));
|
|
61
58
|
cov_toszyysar().s[1]++;
|
package/dist/npm.js
CHANGED
|
@@ -18,11 +18,9 @@ function cov_1gc3c8mxtr() {
|
|
|
18
18
|
hash: "05b9d3440fe2b0b7f84bf1dcc5d4f9bf2770e33e"
|
|
19
19
|
};
|
|
20
20
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
21
|
-
|
|
22
21
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
23
22
|
coverage[path] = coverageData;
|
|
24
23
|
}
|
|
25
|
-
|
|
26
24
|
var actualCoverage = coverage[path];
|
|
27
25
|
{
|
|
28
26
|
// @ts-ignore
|
|
@@ -32,5 +30,4 @@ function cov_1gc3c8mxtr() {
|
|
|
32
30
|
}
|
|
33
31
|
return actualCoverage;
|
|
34
32
|
}
|
|
35
|
-
|
|
36
33
|
cov_1gc3c8mxtr();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commitizen",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Git commit, but play nice with conventions.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"author": "Jim Cummins <jimthedev@gmail.com> (https://github.com/jimthedev)",
|
|
49
49
|
"license": "MIT",
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@babel/cli": "7.
|
|
52
|
-
"@babel/core": "7.
|
|
53
|
-
"@babel/plugin-proposal-object-rest-spread": "7.
|
|
54
|
-
"@babel/preset-env": "7.
|
|
55
|
-
"@babel/register": "7.
|
|
51
|
+
"@babel/cli": "7.19.3",
|
|
52
|
+
"@babel/core": "7.20.5",
|
|
53
|
+
"@babel/plugin-proposal-object-rest-spread": "7.20.2",
|
|
54
|
+
"@babel/preset-env": "7.20.2",
|
|
55
|
+
"@babel/register": "7.18.9",
|
|
56
56
|
"@istanbuljs/nyc-config-babel": "3.0.0",
|
|
57
57
|
"babel-plugin-istanbul": "6.1.1",
|
|
58
|
-
"chai": "4.3.
|
|
58
|
+
"chai": "4.3.7",
|
|
59
59
|
"codecov": "3.8.3",
|
|
60
60
|
"conventional-changelog-conventionalcommits": "4.6.3",
|
|
61
61
|
"cz-conventional-changelog-default-export": "0.0.0-semantically-released.1",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"mocha": "9.2.2",
|
|
65
65
|
"mocha-junit-reporter": "1.23.3",
|
|
66
66
|
"mocha-multi-reporters": "1.5.1",
|
|
67
|
-
"nodemon": "2.0.
|
|
67
|
+
"nodemon": "2.0.20",
|
|
68
68
|
"nyc": "15.1.0",
|
|
69
69
|
"proxyquire": "2.1.3",
|
|
70
|
-
"semantic-release": "19.0.
|
|
71
|
-
"semver": "7.3.
|
|
70
|
+
"semantic-release": "19.0.5",
|
|
71
|
+
"semver": "7.3.8",
|
|
72
72
|
"sinon": "12.0.1",
|
|
73
73
|
"uuid": "8.3.2"
|
|
74
74
|
},
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"find-root": "1.1.0",
|
|
82
82
|
"fs-extra": "9.1.0",
|
|
83
83
|
"glob": "7.2.3",
|
|
84
|
-
"inquirer": "8.2.
|
|
84
|
+
"inquirer": "8.2.5",
|
|
85
85
|
"is-utf8": "^0.2.1",
|
|
86
86
|
"lodash": "4.17.21",
|
|
87
|
-
"minimist": "1.2.
|
|
87
|
+
"minimist": "1.2.7",
|
|
88
88
|
"strip-bom": "4.0.0",
|
|
89
89
|
"strip-json-comments": "3.1.1"
|
|
90
90
|
},
|