Skip to content

Commit a683296

Browse files
authored
feat: remove node-fetch in favor of global (#580)
BREAKING CHANGE: remove `node-fetch` in favor of global
1 parent 12b02b6 commit a683296

File tree

6 files changed

+55
-5150
lines changed

6 files changed

+55
-5150
lines changed

README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ to interact with [GitHub’s REST API](https://developer.github.com/v3/) and
1010
[GitHub’s GraphQL API](https://developer.github.com/v4/guides/forming-calls/#the-graphql-endpoint).
1111

1212
It uses [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) to parse
13-
the passed options and sends the request using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
14-
([node-fetch](https://github.com/bitinn/node-fetch) when the runtime has no native `fetch` API).
13+
the passed options and sends the request using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). You can pass a custom `fetch` function using the `options.request.fetch` option, see below.
1514

1615
<!-- update table of contents by running `npx markdown-toc README.md -i` -->
1716

@@ -319,7 +318,7 @@ const { data: app } = await requestWithAuth(
319318
Function
320319
</td>
321320
<td>
322-
Custom replacement for <a href="https://github.com/bitinn/node-fetch">built-in fetch method</a>. Useful for testing or request hooks.
321+
Custom replacement for <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">fetch</a>. Useful for testing or request hooks.
323322
</td>
324323
</tr>
325324
<tr>
@@ -354,17 +353,6 @@ const { data: app } = await requestWithAuth(
354353
Used for internal logging. Defaults to <a href="https://developer.mozilla.org/en-US/docs/Web/API/console"><code>console</code></a>.
355354
</td>
356355
</tr>
357-
<tr>
358-
<th align=left>
359-
<code>options.request.timeout</code>
360-
</th>
361-
<td>
362-
Number
363-
</td>
364-
<td>
365-
Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). <a href="#options-request-signal">options.request.signal</a> is recommended instead.
366-
</td>
367-
</tr>
368356
</table>
369357

370358
All other options except `options.request.*` will be passed depending on the `method` and `url` options.

0 commit comments

Comments
 (0)