Skip to content

Conversation

dex4er
Copy link
Collaborator

@dex4er dex4er commented Jun 26, 2025

Freelens mixes renderer and main context and node-fetch is used from browser context. It is fine for Kubernetes API but it fails for standard usage like querying registry.npmjs.com.

This PR tries to split functions used for different purposes.

Tests might be problematic as they run in Node even for tests for renderer context.

Description of changes:

  • Separate NodeFetch that explicitly uses node-fetch instead of the default fetch.
  • NodeFetch is used if proxy is needed.
  • Fetch is used if no proxy or custom agent is needed.

@dex4er dex4er merged commit 06f3448 into freelensapp:main Jun 26, 2025
9 checks passed
@dex4er dex4er deleted the fix/use-mdn-fetch-to-check-extensions branch June 26, 2025 17:11
@dex4er dex4er added this to the v1.4.0 milestone Jun 28, 2025
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.

1 participant