You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CLI package uses node-fetch which is unnecessary for Node.js 18+ as it has native fetch API support. This change would reduce dependencies and eliminate deprecation warnings.
Problem Statement/Justification
The current dependency chain introduces unnecessary packages since Node.js 18+ already provides native implementations for these features:
Redundant packages that duplicate native Node.js functionality
Additional maintenance overhead
Proposed Solution or API
Replace node-fetch usage with native fetch API:
file : packages/cli/src/utils/fetch.ts
Before: import fetch from 'node-fetch';
After:
No import needed — fetch is globally available
The rest of the code can remain unchanged since node-fetch implements the same interface as native fetch, but type for const agent should be fixed
This change:
Reduces dependencies
Utilizes modern Node.js features
Removes deprecation warnings
Maintains the same API interface
Only affects development dependencies
Required Node.js version: 18+ (which is already common for modern development)
needs triageIssues and pull requests that need triage attention
1 participant
Converted from issue
This discussion was converted from issue #10038 on May 21, 2025 12:30.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
The CLI package uses node-fetch which is unnecessary for Node.js 18+ as it has native fetch API support. This change would reduce dependencies and eliminate deprecation warnings.
Problem Statement/Justification
The current dependency chain introduces unnecessary packages since Node.js 18+ already provides native implementations for these features:
This creates several issues:
Proposed Solution or API
Replace
node-fetch
usage with nativefetch
API:file :
packages/cli/src/utils/fetch.ts
Before:
import fetch from 'node-fetch';
After:
No import needed — fetch is globally available
The rest of the code can remain unchanged since node-fetch implements the same interface as native fetch, but type for
const agent
should be fixedThis change:
Required Node.js version: 18+ (which is already common for modern development)
Alternatives
No response
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions