Skip to content

Commit 78b2a83

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
fix(compat): remove ReadableStream polyfill redundant since node v16 (#954)
Note that this breaks streaming in Node v14, which has been unsupported since v4.0.0 of this library.
1 parent 9202c91 commit 78b2a83

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

Diff for: package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
"agentkeepalive": "^4.2.1",
3131
"form-data-encoder": "1.7.2",
3232
"formdata-node": "^4.3.2",
33-
"node-fetch": "^2.6.7",
34-
"web-streams-polyfill": "^3.2.1"
33+
"node-fetch": "^2.6.7"
3534
},
3635
"devDependencies": {
3736
"@swc/core": "^1.3.102",

Diff for: src/_shims/node-runtime.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ import { Readable } from 'node:stream';
1313
import { type RequestOptions } from '../core';
1414
import { MultipartBody } from './MultipartBody';
1515
import { type Shims } from './registry';
16-
17-
// @ts-ignore (this package does not have proper export maps for this export)
18-
import { ReadableStream } from 'web-streams-polyfill/dist/ponyfill.es2018.js';
16+
import { ReadableStream } from 'node:stream/web';
1917

2018
type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;
2119

Diff for: yarn.lock

-5
Original file line numberDiff line numberDiff line change
@@ -3412,11 +3412,6 @@ [email protected]:
34123412
resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.1.tgz#3b19b9817374b7cee06d374ba7eeb3aeb80e8c95"
34133413
integrity sha512-3ux37gEX670UUphBF9AMCq8XM6iQ8Ac6A+DSRRjDoRBm1ufCkaCDdNVbaqq60PsEkdNlLKrGtv/YBP4EJXqNtQ==
34143414

3415-
web-streams-polyfill@^3.2.1:
3416-
version "3.2.1"
3417-
resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6"
3418-
integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==
3419-
34203415
webidl-conversions@^3.0.0:
34213416
version "3.0.1"
34223417
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"

0 commit comments

Comments
 (0)