Skip to content

Comments

Migrate to whatwg-fetch polyfill#58

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/add-fetch-functionality
Draft

Migrate to whatwg-fetch polyfill#58
Copilot wants to merge 2 commits intomasterfrom
copilot/add-fetch-functionality

Conversation

Copy link

Copilot AI commented Feb 11, 2026

Replaces node-fetch with whatwg-fetch (github/fetch) for standards-compliant fetch polyfill in Node.js environments.

Changes

  • fetchPolyfill.js: Simplified from async dynamic import to direct require('whatwg-fetch')
  • cdp/utils.ts: Removed node-fetch Response import (now globally available)
  • jest.config.js: Added whatwg-fetch to transformIgnorePatterns
  • package.json: Added whatwg-fetch@^3.6.20 dependency

Before/After

// Before: fetchPolyfill.js
function fetch(...args) {
  return import('node-fetch').then(({ default: _fetch }) => _fetch(...args));
}
if (!globalThis.fetch) {
  globalThis.fetch = fetch;
  // ... manual polyfilling
}

// After: fetchPolyfill.js
require('whatwg-fetch');

Note: node-fetch remains in jest transformIgnorePatterns for transitive dependencies (graphql-request → cross-fetch).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node /home/REDACTED/work/web/web/apps/web/node_modules/next/dist/bin/next build s est.�� (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Copilot AI changed the title [WIP] Add fetch functionality to the repository Migrate to whatwg-fetch polyfill Feb 11, 2026
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