FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: add disclaimer about Node.js 18+ native fetch by fuleinist · Pull Request #1864 · node-fetch/node-fetch · GitHub

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

Closed
fuleinist wants to merge 1 commit into
node-fetch:mainfrom
fuleinist:add-node18-native-fetch-disclaimer
Closed

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

Conversation

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.

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

rsbasic left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Review: APPROVE (docs only, LOW risk)

This adds a clear, well-structured disclaimer that Node.js 18+ has built-in fetch. The content is accurate:

  • Correctly notes that native fetch eliminates the dependency
  • Lists practical benefits (smaller bundles, no maintenance burden)
  • Includes a working code example
  • Preserves node-fetch as a valid choice for older Node versions (12, 14, 16)
  • Links to the official Node.js fetch documentation

The only minor note: the link points to the v18 docs specifically (latest-v18.x). Since this is about 18+ generally, a link to the current LTS docs might age better. But this is cosmetic — the content is correct and helpful.

Verdict: Safe to merge. This is the kind of information users need right now given the maintenance gap.

Copy link
Copy Markdown
Author

Stale PR (no activity for 4+ weeks). Feel free to reopen if still relevant.

fuleinist closed this Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL