release-it 15.1.1 → 15.1.4
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 +2 -2
- package/lib/plugin/github/GitHub.js +6 -4
- package/lib/plugin/gitlab/GitLab.js +3 -3
- package/package.json +11 -10
- package/test/github.js +4 -4
package/README.md
CHANGED
|
@@ -302,8 +302,8 @@ Since v11, release-it can be extended in many, many ways. Here are some plugins:
|
|
|
302
302
|
| [@release-it/bumper](https://github.com/release-it/bumper) | Read & write the version from/to any file |
|
|
303
303
|
| [@release-it/conventional-changelog](https://github.com/release-it/conventional-changelog) | Provides recommended bump, conventional-changelog, and updates `CHANGELOG.md` |
|
|
304
304
|
| [@release-it/keep-a-changelog](https://github.com/release-it/keep-a-changelog) | Maintain CHANGELOG.md using the Keep a Changelog standards |
|
|
305
|
-
| [release-it-lerna-changelog](https://github.com
|
|
306
|
-
| [release-it-
|
|
305
|
+
| [@release-it-plugins/lerna-changelog](https://github.com/@release-it-plugins/lerna-changelog)| Integrates lerna-changelog into the release-it pipeline |
|
|
306
|
+
| [@release-it-plugins/workspaces](https://github.com/@release-it-plugins/workspaces) | Releases each of your projects configured workspaces |
|
|
307
307
|
| [release-it-calver-plugin](https://github.com/casmith/release-it-calver-plugin) | Enables Calendar Versioning (calver) with release-it |
|
|
308
308
|
| [@grupoboticario/news-fragments](https://github.com/grupoboticario/news-fragments) | An easy way to generate your changelog file |
|
|
309
309
|
| [@j-ulrich/release-it-regex-bumper](https://github.com/j-ulrich/release-it-regex-bumper) | Regular expression based version read/write plugin for release-it |
|
|
@@ -2,6 +2,7 @@ import fs from 'node:fs';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import open from 'open';
|
|
4
4
|
import { Octokit } from '@octokit/rest';
|
|
5
|
+
import fetch from 'node-fetch';
|
|
5
6
|
import { globby } from 'globby';
|
|
6
7
|
import mime from 'mime-types';
|
|
7
8
|
import _ from 'lodash';
|
|
@@ -164,7 +165,8 @@ class GitHub extends Release {
|
|
|
164
165
|
userAgent: `release-it/${pkg.version}`,
|
|
165
166
|
log: this.config.isDebug ? console : null,
|
|
166
167
|
request: {
|
|
167
|
-
timeout
|
|
168
|
+
timeout,
|
|
169
|
+
fetch
|
|
168
170
|
}
|
|
169
171
|
};
|
|
170
172
|
|
|
@@ -280,14 +282,14 @@ class GitHub extends Release {
|
|
|
280
282
|
const context = this.config.getContext();
|
|
281
283
|
const { isDryRun } = this.config;
|
|
282
284
|
|
|
283
|
-
|
|
285
|
+
const patterns = _.castArray(assets).map(pattern => format(pattern, context));
|
|
286
|
+
|
|
287
|
+
this.log.exec('octokit repos.uploadReleaseAssets', patterns, { isDryRun });
|
|
284
288
|
|
|
285
289
|
if (!assets || !isReleased || isDryRun) {
|
|
286
290
|
return true;
|
|
287
291
|
}
|
|
288
292
|
|
|
289
|
-
const patterns = _.castArray(assets).map(pattern => format(pattern, context));
|
|
290
|
-
|
|
291
293
|
return globby(patterns).then(files => {
|
|
292
294
|
if (!files.length) {
|
|
293
295
|
this.log.warn(`octokit repos.uploadReleaseAssets: did not find "${assets}" relative to ${process.cwd()}`);
|
|
@@ -253,14 +253,14 @@ class GitLab extends Release {
|
|
|
253
253
|
const { isDryRun } = this.config;
|
|
254
254
|
const context = this.config.getContext();
|
|
255
255
|
|
|
256
|
-
|
|
256
|
+
const patterns = _.castArray(assets).map(pattern => format(pattern, context));
|
|
257
|
+
|
|
258
|
+
this.log.exec('gitlab releases#uploadAssets', patterns, { isDryRun });
|
|
257
259
|
|
|
258
260
|
if (!assets || isDryRun) {
|
|
259
261
|
return noop;
|
|
260
262
|
}
|
|
261
263
|
|
|
262
|
-
const patterns = _.castArray(assets).map(pattern => format(pattern, context));
|
|
263
|
-
|
|
264
264
|
return globby(patterns).then(files => {
|
|
265
265
|
if (!files.length) {
|
|
266
266
|
this.log.warn(`gitlab releases#uploadAssets: could not find "${assets}" relative to ${process.cwd()}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-it",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.4",
|
|
4
4
|
"description": "Generic CLI tool to automate versioning and package publishing related tasks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"type": "module",
|
|
39
39
|
"exports": {
|
|
40
40
|
".": "./lib/index.js",
|
|
41
|
-
"./test/util": "./test/util/index.js"
|
|
41
|
+
"./test/util/index.js": "./test/util/index.js"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"bin",
|
|
@@ -59,20 +59,21 @@
|
|
|
59
59
|
"license": "MIT",
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@iarna/toml": "2.2.5",
|
|
62
|
-
"@octokit/rest": "
|
|
62
|
+
"@octokit/rest": "19.0.3",
|
|
63
63
|
"async-retry": "1.3.3",
|
|
64
64
|
"chalk": "5.0.1",
|
|
65
65
|
"cosmiconfig": "7.0.1",
|
|
66
66
|
"execa": "6.1.0",
|
|
67
67
|
"form-data": "4.0.0",
|
|
68
|
-
"git-url-parse": "
|
|
68
|
+
"git-url-parse": "12.0.0",
|
|
69
69
|
"globby": "13.1.2",
|
|
70
70
|
"got": "12.1.0",
|
|
71
|
-
"inquirer": "9.0.
|
|
71
|
+
"inquirer": "9.0.2",
|
|
72
72
|
"is-ci": "3.0.1",
|
|
73
73
|
"lodash": "4.17.21",
|
|
74
74
|
"mime-types": "2.1.35",
|
|
75
75
|
"new-github-release-url": "2.0.0",
|
|
76
|
+
"node-fetch": "3.2.9",
|
|
76
77
|
"open": "8.4.0",
|
|
77
78
|
"ora": "6.1.2",
|
|
78
79
|
"os-name": "5.0.1",
|
|
@@ -86,16 +87,16 @@
|
|
|
86
87
|
"yargs-parser": "21.0.1"
|
|
87
88
|
},
|
|
88
89
|
"devDependencies": {
|
|
89
|
-
"@octokit/request-error": "
|
|
90
|
-
"ava": "4.3.
|
|
91
|
-
"eslint": "8.
|
|
90
|
+
"@octokit/request-error": "3.0.0",
|
|
91
|
+
"ava": "4.3.1",
|
|
92
|
+
"eslint": "8.20.0",
|
|
92
93
|
"eslint-config-prettier": "8.5.0",
|
|
93
94
|
"eslint-plugin-ava": "13.2.0",
|
|
94
95
|
"eslint-plugin-import": "2.26.0",
|
|
95
|
-
"eslint-plugin-prettier": "4.1
|
|
96
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
96
97
|
"mock-fs": "5.1.2",
|
|
97
98
|
"mock-stdio": "1.0.3",
|
|
98
|
-
"nock": "13.2.
|
|
99
|
+
"nock": "13.2.9",
|
|
99
100
|
"nyc": "15.1.0",
|
|
100
101
|
"prettier": "2.7.1",
|
|
101
102
|
"sinon": "14.0.0",
|
package/test/github.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from './stub/github.js';
|
|
14
14
|
|
|
15
15
|
const tokenRef = 'GITHUB_TOKEN';
|
|
16
|
-
const pushRepo = 'git://github.com
|
|
16
|
+
const pushRepo = 'git://github.com/user/repo';
|
|
17
17
|
const host = 'github.com';
|
|
18
18
|
const git = { changelog: '' };
|
|
19
19
|
const requestErrorOptions = { request: { url: '', headers: {} }, response: { headers: {} } };
|
|
@@ -198,7 +198,7 @@ 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 options = { git, github: { tokenRef, pushRepo: 'git://github.example.org
|
|
201
|
+
const options = { git, github: { tokenRef, pushRepo: 'git://github.example.org/user/repo' } };
|
|
202
202
|
const github = factory(GitHub, { options });
|
|
203
203
|
const exec = sinon.stub(github.shell, 'exec').callThrough();
|
|
204
204
|
exec.withArgs('git remote get-url origin').resolves(`https://github.example.org/user/repo`);
|
|
@@ -227,7 +227,7 @@ test('should release to alternative host and proxy', async t => {
|
|
|
227
227
|
git,
|
|
228
228
|
github: {
|
|
229
229
|
tokenRef,
|
|
230
|
-
pushRepo: `git://custom.example.org
|
|
230
|
+
pushRepo: `git://custom.example.org/user/repo`,
|
|
231
231
|
host: 'custom.example.org',
|
|
232
232
|
proxy: 'http://proxy:8080'
|
|
233
233
|
}
|
|
@@ -402,7 +402,7 @@ test('should generate GitHub web release url for enterprise host', async t => {
|
|
|
402
402
|
const options = {
|
|
403
403
|
git,
|
|
404
404
|
github: {
|
|
405
|
-
pushRepo: 'git
|
|
405
|
+
pushRepo: 'git@custom.example.org:user/repo',
|
|
406
406
|
release: true,
|
|
407
407
|
web: true,
|
|
408
408
|
host: 'custom.example.org',
|