supertokens / supertokens-node

Node SDK for SuperTokens core
https://supertokens.com
Other
278 stars 72 forks source link

fix: use cross-fetch for polyfill #780

Closed anku255 closed 6 months ago

anku255 commented 6 months ago

Summary of change

This PR removes node-fetch v3 and uses cross-fetch for the polyfill which underneath the hood uses node-fetch v2. We do need to polyfill Response.json because it is used by Next.js but not present in node-fetch v2.

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

Documentation changes

(If relevant, please create a PR in our docs repo, or create a checklist here highlighting the necessary changes)

Checklist for important updates