Skip to content

Commit 9991f21

Browse files
committed
WIP temporarily use node-fetch as nock cannot intercept native fetch requests yet
1 parent c2135f1 commit 9991f21

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/get-client.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import urljoin from "url-join";
22
import { HttpProxyAgent } from "http-proxy-agent";
33
import { HttpsProxyAgent } from "https-proxy-agent";
4+
import nodeFetch from "node-fetch";
45

56
import SemanticReleaseOctokit from "./semantic-release-octokit.js";
67

@@ -15,6 +16,10 @@ export default function getClient({
1516
auth: `token ${githubToken}`,
1617
baseUrl,
1718
request: {
19+
// TODO: we temporary use use `node-fetch` because `nock` does not support
20+
// mocking Node's native fetch yet. The plan is to replace nock with `fetch-mock`
21+
// before merging this PR.
22+
fetch: nodeFetch,
1823
agent: proxy
1924
? baseUrl && new URL(baseUrl).protocol.replace(":", "") === "http"
2025
? // Some `proxy.headers` need to be passed as second arguments since version 6 or 7

0 commit comments

Comments
 (0)