wKovacs64 / hibp

An unofficial TypeScript SDK for the 'Have I been pwned?' service.
https://wkovacs64.github.io/hibp
MIT License
112 stars 6 forks source link

support web workers using native fetch #457

Closed ArcadeRenegade closed 4 months ago

ArcadeRenegade commented 4 months ago

Supports using native fetch in web workers or extension background threads where window is undefined.

Should still fall back to using fetchWrapper when native fetch is not available for older versions of NodeJS.

I ran vitest but it does not look like unit tests are passing. Perhaps I am missing some setup.

I ran the playwright tests and they did pass though.

456

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: a30a29cf4874339ece09a5a02c76b9440e6ed1e0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---- | ----- | | hibp | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

wKovacs64 commented 4 months ago

Hmm, yeah we need vitest to pass. I just made all the necessary checks run on PRs, so if you rebase off main, it should run them now.

wKovacs64 commented 4 months ago

FYI, I'm considering replace @remix-run/web-fetch with undici as the Remix team is deprecating their polyfill. I think it'll solve your issue at the same time.

ArcadeRenegade commented 4 months ago

@wKovacs64 ok makes sense!