Skip to content

docs: add disclaimer about Node.js 18+ native fetch#1864

Open
fuleinist wants to merge 1 commit intonode-fetch:mainfrom
fuleinist:add-node18-native-fetch-disclaimer
Open

docs: add disclaimer about Node.js 18+ native fetch#1864
fuleinist wants to merge 1 commit intonode-fetch:mainfrom
fuleinist:add-node18-native-fetch-disclaimer

Conversation

@fuleinist
Copy link
Copy Markdown

Description

Adds a documentation disclaimer informing users that Node.js 18+ already has native fetch built-in, making node-fetch unnecessary for those versions.

Motivation

Many users are not aware that Node.js 18+ includes native fetch. This leads to unnecessary installation of node-fetch, increasing bundle size (especially important for serverless deployments).

Changes

  • Added a note in the Installation section explaining that Node.js 18+ has native fetch
  • Listed benefits of using native fetch: no extra dependency, smaller bundle size, no maintenance burden, better performance
  • Included code example showing how to use native fetch directly
  • Added link to Node.js documentation for more details

This addresses issue #1857.

Add a documentation note informing users that Node.js 18+ already has
native fetch built-in, making node-fetch unnecessary for those versions.
This helps users avoid unnecessary bundle size increases.
@laurengarcia
Copy link
Copy Markdown

Should probably mention that Node's native fetch doesn't support SSRF filtering, and if the user needs that then node-fetch is a reasonable solution when used with https://www.npmjs.com/package/request-filtering-agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants