Skip to content

Commit

Permalink
Explicitly use node-fetch (nock doesn't intercept native fetch in Nod…
Browse files Browse the repository at this point in the history
…e 18)
  • Loading branch information
webpro committed Jul 16, 2022
1 parent 8a8149e commit b6d5813
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/plugin/github/GitHub.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import fs from 'node:fs';
import path from 'node:path';
import open from 'open';
import { Octokit } from '@octokit/rest';
import fetch from 'node-fetch';
import { globby } from 'globby';
import mime from 'mime-types';
import _ from 'lodash';
Expand Down Expand Up @@ -164,7 +165,8 @@ class GitHub extends Release {
userAgent: `release-it/${pkg.version}`,
log: this.config.isDebug ? console : null,
request: {
timeout
timeout,
fetch
}
};

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"lodash": "4.17.21",
"mime-types": "2.1.35",
"new-github-release-url": "2.0.0",
"node-fetch": "3.2.8",
"open": "8.4.0",
"ora": "6.1.2",
"os-name": "5.0.1",
Expand Down

0 comments on commit b6d5813

Please sign in to comment.