Skip to content

Conversation

ChALkeR
Copy link
Contributor

@ChALkeR ChALkeR commented Sep 6, 2024

Since 1.7.0, @exodus/fetch already just prefers to use global fetch and WebSocket
Which covers all platforms we need

Instead of doing gradual changes and optimizing out code, let's just remove everything we don't use/need and call this a v2

fetchival is replaced with experimental/fetchival and is renamed to fetcher to avoid confusion, as the API differs

Compared to fetchival, new API is hardened to prevent unescaped injection of url components (previously was available as experimental/fetchival)

Compared to experimental/fetchival, the non-standard timeout option default value is removed (reverted to fetchival behavior)

Also switched to ESM and @exodus/test

Also 0-dep now

This is a somewhat work in progress, I might improve this further

@ChALkeR ChALkeR requested a review from 633kh4ck September 6, 2024 21:30
@mvayngrib
Copy link

@ChALkeR there are some conflicts here

@ChALkeR
Copy link
Contributor Author

ChALkeR commented Apr 9, 2025

@mvayngrib Let's call this not a v2 but a separate lib perhaps.

return res.json()
}

const err = new Error(res.statusText)
Copy link

Choose a reason for hiding this comment

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

Suggested change
const err = new Error(res.statusText)
const err = new Error(`${res.status} ${res.statusText || ''}`.trim())

Fix the statusText is undefined case

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