-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[node] fix: stream depends on global Blob not available in v16 #62672
Conversation
Blob is only available on the global object starting in Node 18. Still, the `stream` definitions used the global Blob. This means that `@types/node` 16.x is currently broken. This patch adds the correct import to resolve this problem. For more info please refer to DefinitelyTyped#62654. Long-term, IMHO we should remove `"lib": ["dom"]` from the v16 TSConfig like it was already done for v18, but I'd much rather get this fix out quickly and worry about that later.
@meyfa Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 62672,
"author": "meyfa",
"headCommitOid": "d9ac31cbf15251eb4dbb40524caf5b7c598a83bf",
"mergeBaseOid": "ae199c4d1ac55cbc848449934d3cc59bc3ea9918",
"lastPushDate": "2022-10-12T12:07:01.000Z",
"lastActivityDate": "2022-10-15T21:04:45.000Z",
"mergeOfferDate": "2022-10-15T21:03:13.000Z",
"mergeRequestDate": "2022-10-15T21:04:45.000Z",
"mergeRequestUser": "meyfa",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "node",
"kind": "edit",
"files": [
{
"path": "types/node/v16/stream.d.ts",
"kind": "definition"
},
{
"path": "types/node/v16/ts4.8/stream.d.ts",
"kind": "definition"
}
],
"owners": [
"Microsoft",
"DefinitelyTyped",
"jkomyno",
"alvis",
"r3nya",
"btoueg",
"smac89",
"touffy",
"DeividasBakanas",
"eyqs",
"Hannes-Magnusson-CK",
"hoo29",
"kjin",
"ajafff",
"islishude",
"mwiktorczyk",
"mohsen1",
"n-e",
"galkin",
"parambirs",
"eps1lon",
"SimonSchick",
"ThomasdenH",
"WilcoBakker",
"wwwy3y3",
"samuela",
"kuehlein",
"bhongy",
"chyzwar",
"trivikr",
"yoursunny",
"qwelias",
"ExE-Boss",
"peterblazejewicz",
"addaleax",
"victorperin",
"ZYSzys",
"NodeJS",
"LinusU",
"wafuwafu13",
"mcollina"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "r3nya",
"date": "2022-10-15T21:04:16.000Z",
"isMaintainer": false
},
{
"type": "approved",
"reviewer": "peterblazejewicz",
"date": "2022-10-15T21:02:25.000Z",
"isMaintainer": true
},
{
"type": "approved",
"reviewer": "G-Rath",
"date": "2022-10-14T23:06:32.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 1276061011,
"ciResult": "pass"
} |
Hey @meyfa, 😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you! |
🔔 @microsoft @DefinitelyTyped @jkomyno @alvis @r3nya @btoueg @smac89 @Touffy @DeividasBakanas @eyqs @Hannes-Magnusson-CK @hoo29 @kjin @ajafff @islishude @mwiktorczyk @mohsen1 @n-e @galkin @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @samuela @kuehlein @bhongy @chyzwar @trivikr @yoursunny @qwelias @ExE-Boss @peterblazejewicz @addaleax @victorperin @ZYSzys @nodejs @LinusU @wafuwafu13 @mcollina — please review this PR in the next few days. Be sure to explicitly select |
Oh dear, yes please. This just broke our CI (but it's a good way to find out our CI ignores lockfiles). |
CC @peterblazejewicz Sorry to bother you, but could you perhaps take a look at this? Node v16 types are broken without this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meyfa thanks!
@meyfa: Everything looks good here. I am ready to merge this PR (at d9ac31c) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@microsoft, @DefinitelyTyped, @jkomyno, @alvis, @r3nya, @btoueg, @smac89, @Touffy, @DeividasBakanas, @eyqs, @Hannes-Magnusson-CK, @hoo29, @kjin, @ajafff, @islishude, @mwiktorczyk, @mohsen1, @n-e, @galkin, @parambirs, @eps1lon, @SimonSchick, @ThomasdenH, @WilcoBakker, @wwwy3y3, @samuela, @kuehlein, @bhongy, @chyzwar, @trivikr, @yoursunny, @qwelias, @ExE-Boss, @peterblazejewicz, @addaleax, @victorperin, @ZYSzys, @nodejs, @LinusU, @wafuwafu13, @mcollina: you can do this too.) |
Ready to merge |
Blob is only available on the global object starting in Node 18. Still, the
stream
definitions used the global Blob. This means that@types/node
16.x is currently broken. This patch adds the correct import to resolve this problem. For more info please refer to #62654.Long-term, IMHO we should remove
"lib": ["dom"]
from the v16 TSConfig like it was already done for v18, but I'd much rather get this fix out quickly and worry about that later.Please fill in this template.
node_modules/@types/node/ts4.8/stream.d.ts
the problem went away."lib": ["dom"]
from the v16 TSConfig, since TypeScript would then complain if using globalBlob
anywhere.npm test <package to test>
.Select one of these and delete the others:
If changing an existing definition:
Blob
in Node.js 18: https://nodejs.org/docs/latest-v18.x/api/globals.html#class-blobBlob
in Node.js 16: https://nodejs.org/docs/latest-v16.x/api/globals.html#class-blob