release-it 15.1.0 → 15.1.3

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.
@@ -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
- this.log.exec('octokit repos.uploadReleaseAssets', assets, { isDryRun });
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
- this.log.exec('gitlab releases#uploadAssets', assets, { isDryRun });
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.0",
3
+ "version": "15.1.3",
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,7 +59,7 @@
59
59
  "license": "MIT",
60
60
  "dependencies": {
61
61
  "@iarna/toml": "2.2.5",
62
- "@octokit/rest": "18.12.0",
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",
@@ -68,34 +68,35 @@
68
68
  "git-url-parse": "11.6.0",
69
69
  "globby": "13.1.2",
70
70
  "got": "12.1.0",
71
- "inquirer": "9.0.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
- "ora": "6.1.0",
78
+ "ora": "6.1.2",
78
79
  "os-name": "5.0.1",
79
80
  "promise.allsettled": "1.0.5",
80
81
  "proxy-agent": "5.0.0",
81
82
  "semver": "7.3.7",
82
83
  "shelljs": "0.8.5",
83
- "update-notifier": "5.1.0",
84
+ "update-notifier": "6.0.2",
84
85
  "url-join": "5.0.0",
85
86
  "wildcard-match": "5.1.2",
86
87
  "yargs-parser": "21.0.1"
87
88
  },
88
89
  "devDependencies": {
89
- "@octokit/request-error": "2.1.0",
90
- "ava": "4.3.0",
91
- "eslint": "8.18.0",
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.0.0",
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.7",
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
@@ -308,7 +308,7 @@ test.serial('should skip authentication and collaborator checks when running on
308
308
 
309
309
  t.is(authStub.callCount, 0);
310
310
  t.is(collaboratorStub.callCount, 0);
311
- t.is(github.getContext('username'), 'webpro');
311
+ t.is(github.getContext('username'), process.env.GITHUB_ACTOR);
312
312
 
313
313
  authStub.restore();
314
314
  collaboratorStub.restore();