release-it 17.2.0 → 17.2.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/lib/index.js +6 -1
- package/lib/util.js +1 -0
- package/package.json +4 -4
- package/test/git.init.js +1 -1
package/lib/index.js
CHANGED
|
@@ -138,7 +138,12 @@ const runTasks = async (opts, di) => {
|
|
|
138
138
|
};
|
|
139
139
|
} catch (err) {
|
|
140
140
|
const { log } = container;
|
|
141
|
-
|
|
141
|
+
|
|
142
|
+
const errorMessage = err.message || err;
|
|
143
|
+
const logger = log || console;
|
|
144
|
+
|
|
145
|
+
err.cause === 'INFO' ? logger.info(errorMessage) : logger.error(errorMessage);
|
|
146
|
+
|
|
142
147
|
throw err;
|
|
143
148
|
}
|
|
144
149
|
};
|
package/lib/util.js
CHANGED
|
@@ -92,6 +92,7 @@ const parseVersion = raw => {
|
|
|
92
92
|
const e = (message, docs, fail = true) => {
|
|
93
93
|
const error = new Error(docs ? `${message}${EOL}Documentation: ${docs}${EOL}` : message);
|
|
94
94
|
error.code = fail ? 1 : 0;
|
|
95
|
+
error.cause = fail ? 'ERROR' : 'INFO';
|
|
95
96
|
return error;
|
|
96
97
|
};
|
|
97
98
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-it",
|
|
3
|
-
"version": "17.2.
|
|
3
|
+
"version": "17.2.1",
|
|
4
4
|
"description": "Generic CLI tool to automate versioning and package publishing-related tasks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"git-url-parse": "14.0.0",
|
|
81
81
|
"globby": "14.0.1",
|
|
82
82
|
"got": "13.0.0",
|
|
83
|
-
"inquirer": "9.2.
|
|
83
|
+
"inquirer": "9.2.19",
|
|
84
84
|
"is-ci": "3.0.1",
|
|
85
85
|
"issue-parser": "7.0.0",
|
|
86
86
|
"lodash": "4.17.21",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
"eslint-plugin-prettier": "5.1.3",
|
|
110
110
|
"fs-monkey": "1.0.5",
|
|
111
111
|
"installed-check": "9.3.0",
|
|
112
|
-
"knip": "5.
|
|
113
|
-
"memfs": "4.8.
|
|
112
|
+
"knip": "5.10.1",
|
|
113
|
+
"memfs": "4.8.2",
|
|
114
114
|
"mock-stdio": "1.0.3",
|
|
115
115
|
"nock": "13.5.4",
|
|
116
116
|
"prettier": "3.2.5",
|
package/test/git.init.js
CHANGED
|
@@ -76,7 +76,7 @@ test.serial('should not throw if there are commits', async t => {
|
|
|
76
76
|
const gitClient = factory(Git, { options });
|
|
77
77
|
sh.exec('git tag 1.0.0');
|
|
78
78
|
gitAdd('line', 'file', 'Add file');
|
|
79
|
-
await t.notThrowsAsync(gitClient.init());
|
|
79
|
+
await t.notThrowsAsync(gitClient.init(), 'There are no commits since the latest tag');
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
test.serial('should fail (exit code 1) if there are no commits', async t => {
|