release-it 15.1.0-next.0 → 15.1.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.
@@ -168,7 +168,8 @@ class Git extends GitBase {
168
168
 
169
169
  commit({ message = this.options.commitMessage, args = this.options.commitArgs } = {}) {
170
170
  const msg = format(message, this.config.getContext());
171
- return this.exec(['git', 'commit', '--message', msg, ...fixArgs(args)]).then(
171
+ const commitMessageArgs = msg ? ['--message', msg] : [];
172
+ return this.exec(['git', 'commit', ...commitMessageArgs, ...fixArgs(args)]).then(
172
173
  () => this.setContext({ isCommitted: true }),
173
174
  err => {
174
175
  this.debug(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-it",
3
- "version": "15.1.0-next.0",
3
+ "version": "15.1.0",
4
4
  "description": "Generic CLI tool to automate versioning and package publishing related tasks.",
5
5
  "keywords": [
6
6
  "build",
@@ -66,9 +66,9 @@
66
66
  "execa": "6.1.0",
67
67
  "form-data": "4.0.0",
68
68
  "git-url-parse": "11.6.0",
69
- "globby": "13.1.1",
70
- "got": "12.0.4",
71
- "inquirer": "8.2.4",
69
+ "globby": "13.1.2",
70
+ "got": "12.1.0",
71
+ "inquirer": "9.0.0",
72
72
  "is-ci": "3.0.1",
73
73
  "lodash": "4.17.21",
74
74
  "mime-types": "2.1.35",
@@ -87,18 +87,18 @@
87
87
  },
88
88
  "devDependencies": {
89
89
  "@octokit/request-error": "2.1.0",
90
- "ava": "4.2.0",
91
- "eslint": "8.14.0",
90
+ "ava": "4.3.0",
91
+ "eslint": "8.18.0",
92
92
  "eslint-config-prettier": "8.5.0",
93
93
  "eslint-plugin-ava": "13.2.0",
94
94
  "eslint-plugin-import": "2.26.0",
95
95
  "eslint-plugin-prettier": "4.0.0",
96
96
  "mock-fs": "5.1.2",
97
97
  "mock-stdio": "1.0.3",
98
- "nock": "13.2.4",
98
+ "nock": "13.2.7",
99
99
  "nyc": "15.1.0",
100
- "prettier": "2.6.2",
101
- "sinon": "13.0.2",
100
+ "prettier": "2.7.1",
101
+ "sinon": "14.0.0",
102
102
  "strip-ansi": "7.0.1"
103
103
  },
104
104
  "engines": {
package/test/git.js CHANGED
@@ -140,6 +140,20 @@ test.serial('should commit, tag and push with extra args', async t => {
140
140
  stub.restore();
141
141
  });
142
142
 
143
+ test.serial('should amend commit without message if not provided', async t => {
144
+ const bare = mkTmpDir();
145
+ sh.exec(`git init --bare ${bare}`);
146
+ sh.exec(`git clone ${bare} .`);
147
+ gitAdd('line', 'file', 'Add file');
148
+ const options = { git: { commitArgs: ['--amend', '--no-edit', '--no-verify'] } };
149
+ const gitClient = factory(Git, { options });
150
+ const stub = sinon.stub(gitClient.shell, 'exec').resolves();
151
+ await gitClient.stage('package.json');
152
+ await gitClient.commit();
153
+ t.deepEqual(stub.secondCall.args[0], ['git', 'commit', '--amend', '--no-edit', '--no-verify']);
154
+ stub.restore();
155
+ });
156
+
143
157
  test.serial('should commit and tag with quoted characters', async t => {
144
158
  const bare = mkTmpDir();
145
159
  sh.exec(`git init --bare ${bare}`);
package/test/github.js CHANGED
@@ -198,7 +198,8 @@ test('should create new release for unreleased tag', async t => {
198
198
  });
199
199
 
200
200
  test('should release to enterprise host', async t => {
201
- const github = factory(GitHub, { options: { git, github: { tokenRef } } });
201
+ const options = { git, github: { tokenRef, pushRepo: 'git://github.example.org:user/repo' } };
202
+ const github = factory(GitHub, { options });
202
203
  const exec = sinon.stub(github.shell, 'exec').callThrough();
203
204
  exec.withArgs('git remote get-url origin').resolves(`https://github.example.org/user/repo`);
204
205
  exec.withArgs('git config --get remote.origin.url').resolves(`https://github.example.org/user/repo`);