Closed ThisIsMissEm closed 1 year ago
This will need a build done on this branch, since you're committing the build artifacts to the repo too.
Is there any update on the above PR @ThisIsMissEm @jpwilliams ?
Is there any update on the above PR @ThisIsMissEm @jpwilliams ?
We're ditching cross-fetch for our own package that works for our use case better, it'll be released soon.
Any updates here? This is blocking a lot of AI Provider's SDKs from working on Vercel and Cloudflare Workers.
Any updates here? This is blocking a lot of AI Provider's SDKs from working on Vercel and Cloudflare Workers.
My former employer, Inrupt, has released a replacement called @inrupt/universal-fetch
which is designed to use native fetch if it exists (doesn't polyfill for older browsers), but will use native node.js 18+ fetch, or uses undici in node.js 16 (same as the new native fetch) or finally node-fetch in node 14.
edit: I'm not sure if it's fetch detection will work 100% out of the box on Cloudflare Workers or Vercel Functions, but I think it should, and they'd probably appreciate patches if it doesn't work on those platforms.
Might be worth a look.
hi @ThisIsMissEm. thanks for taking the time to work on this PR. I'm closing this in favor of #163 .
I'm not sure why the code was written the way it is, but it appears to be forcing the polyfill to be used even in environments where the Fetch API exists natively, which isn't intentional and causes the bugs described in #91, #78, and #69.
The original commit and PR don't describe why the behaviour was changed: https://github.com/lquixada/cross-fetch/commit/123b1a2ef13f279f444118398959fb3424abfca4