aboutsummaryrefslogtreecommitdiff
path: root/src/js/thirdparty/isomorphic-fetch.ts
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-08-29 19:45:16 -0700
committerGravatar GitHub <noreply@github.com> 2023-08-29 19:45:16 -0700
commita846852818278641cf33413ce784adf2fc0e2e52 (patch)
tree09a92d272b78226d9d4b1b94682100428da6af3f /src/js/thirdparty/isomorphic-fetch.ts
parent3f4bc625ff2313713cf38c3c3ba036781ac1c9a9 (diff)
downloadbun-a846852818278641cf33413ce784adf2fc0e2e52.tar.gz
bun-a846852818278641cf33413ce784adf2fc0e2e52.tar.zst
bun-a846852818278641cf33413ce784adf2fc0e2e52.zip
fix(node-fetch): use stream.Readable instead of web streams (#4394)
* fix blobFrom * fix(node-fetch): use stream.Readable instead of web streams * uncomment * comment why
Diffstat (limited to 'src/js/thirdparty/isomorphic-fetch.ts')
-rw-r--r--src/js/thirdparty/isomorphic-fetch.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js/thirdparty/isomorphic-fetch.ts b/src/js/thirdparty/isomorphic-fetch.ts
new file mode 100644
index 000000000..51fa2975f
--- /dev/null
+++ b/src/js/thirdparty/isomorphic-fetch.ts
@@ -0,0 +1,5 @@
+const bunFetch = Bun.fetch;
+const fetch = (...args: Parameters<typeof bunFetch>) => bunFetch(...args);
+fetch.default = fetch;
+fetch.fetch = fetch;
+export default fetch;