release-it 17.2.0 → 17.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/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
- log ? log.error(err.message || err) : console.error(err); // eslint-disable-line no-console
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.0",
3
+ "version": "17.3.0",
4
4
  "description": "Generic CLI tool to automate versioning and package publishing-related tasks.",
5
5
  "keywords": [
6
6
  "build",
@@ -72,7 +72,7 @@
72
72
  "license": "MIT",
73
73
  "dependencies": {
74
74
  "@iarna/toml": "2.2.5",
75
- "@octokit/rest": "20.1.0",
75
+ "@octokit/rest": "20.1.1",
76
76
  "async-retry": "1.3.3",
77
77
  "chalk": "5.3.0",
78
78
  "cosmiconfig": "9.0.0",
@@ -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.17",
83
+ "inquirer": "9.2.22",
84
84
  "is-ci": "3.0.1",
85
85
  "issue-parser": "7.0.0",
86
86
  "lodash": "4.17.21",
@@ -92,7 +92,7 @@
92
92
  "os-name": "5.1.0",
93
93
  "promise.allsettled": "1.0.7",
94
94
  "proxy-agent": "6.4.0",
95
- "semver": "7.6.0",
95
+ "semver": "7.6.2",
96
96
  "shelljs": "0.8.5",
97
97
  "update-notifier": "7.0.0",
98
98
  "url-join": "5.0.0",
@@ -101,26 +101,26 @@
101
101
  },
102
102
  "devDependencies": {
103
103
  "@octokit/request-error": "5.1.0",
104
- "ava": "6.1.2",
104
+ "ava": "6.1.3",
105
105
  "eslint": "8.57.0",
106
106
  "eslint-config-prettier": "9.1.0",
107
107
  "eslint-plugin-ava": "14.0.0",
108
108
  "eslint-plugin-import": "2.29.1",
109
109
  "eslint-plugin-prettier": "5.1.3",
110
- "fs-monkey": "1.0.5",
110
+ "fs-monkey": "1.0.6",
111
111
  "installed-check": "9.3.0",
112
- "knip": "5.9.4",
113
- "memfs": "4.8.1",
112
+ "knip": "5.16.0",
113
+ "memfs": "4.9.2",
114
114
  "mock-stdio": "1.0.3",
115
115
  "nock": "13.5.4",
116
116
  "prettier": "3.2.5",
117
- "remark-cli": "12.0.0",
117
+ "remark-cli": "12.0.1",
118
118
  "remark-preset-webpro": "1.1.0",
119
- "sinon": "17.0.1",
119
+ "sinon": "18.0.0",
120
120
  "strip-ansi": "7.1.0"
121
121
  },
122
122
  "engines": {
123
- "node": "^18.18.0 || ^20.8.0 || ^21.0.0"
123
+ "node": "^18.18.0 || ^20.8.0 || ^22.0.0"
124
124
  },
125
125
  "remarkConfig": {
126
126
  "plugins": [
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 => {
package/test/git.js CHANGED
@@ -344,7 +344,8 @@ test.serial('should not touch existing history when rolling back', async t => {
344
344
  t.is(exec.args[3][0], 'git reset --hard HEAD');
345
345
  });
346
346
 
347
- test.serial('should not roll back with risky config', async t => {
347
+ // eslint-disable-next-line ava/no-skip-test
348
+ test.serial.skip('should not roll back with risky config', async t => {
348
349
  sh.exec('git init');
349
350
  const options = { git: { requireCleanWorkingDir: false, commit: true, tag: true } };
350
351
  const gitClient = factory(Git, { options });