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] Add type side of global Blob, along with tests #62654
[node] Add type side of global Blob, along with tests #62654
Conversation
@thw0rted 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": 62654,
"author": "thw0rted",
"headCommitOid": "81101a592ff1c2ac77eab5f73f8eb9bb6ecd440f",
"mergeBaseOid": "f36edcdf706a824610a44c2c542449869d143a64",
"lastPushDate": "2022-10-11T09:22:02.000Z",
"lastActivityDate": "2022-10-12T19:00:10.000Z",
"mergeOfferDate": "2022-10-12T18:46:04.000Z",
"mergeRequestDate": "2022-10-12T19:00:10.000Z",
"mergeRequestUser": "thw0rted",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "node",
"kind": "edit",
"files": [
{
"path": "types/node/buffer.d.ts",
"kind": "definition"
},
{
"path": "types/node/stream.d.ts",
"kind": "definition"
},
{
"path": "types/node/test/buffer.ts",
"kind": "test"
},
{
"path": "types/node/ts4.8/buffer.d.ts",
"kind": "definition"
},
{
"path": "types/node/ts4.8/stream.d.ts",
"kind": "definition"
},
{
"path": "types/node/ts4.8/test/buffer.ts",
"kind": "test"
}
],
"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": "peterblazejewicz",
"date": "2022-10-12T18:45:19.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 1274392145,
"ciResult": "pass"
} |
🔔 @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 |
cc @peterblazejewicz , who reviewed the linked PR and 4.8 backport. |
Hello @thw0rted I'm having an issue with the
Adding The change was fine for v18 I guess, but a breaking change for v16 and anything under I guess. |
@thw0rted Possibly I'm missing something obvious... why would this fix problems with |
Thanks @meyfa, I didn't notice that. Sorry, I don't actually have a super firm grasp of how the simultaneous-versioning thing works here on DT. I'll update the linked PR to address that as well, then. ETA: or maybe not? See my next comment, not sure if/how this one is my fault. |
@doteric, did your code work with an older 16.x version of |
@thw0rted The same error reported by @doteric also happened for me in an automated upgrade from 16.11.63 to 16.11.65: meyfa/eslint-config#41. 16.11.63 was previously working. The bot that made the PR provides a link to see the diff of the NPM package: https://app.renovatebot.com/package-diff?name=@types%2fnode&from=16.11.63&to=16.11.65. The removal of the During development and CI, the now missing |
Should we maybe perform all the same changes from #59905 to the v14 and v16 directories as well, so that |
Thanks for refreshing my memory, it's been months since I initially did this work and I had forgotten about the incorrect comment, which actually sparked this whole process in the first place. Backporting the changes to v16 (at least) makes sense, I think. Maybe v14 as well, though it has no I don't have a lot of spare cycles right now, and probably won't at least through the end of the year or so. If you have time to do the port, awesome, and if you don't I'll try to fit it in eventually but can't make any predictions about a timeline. |
I'll see what I can do! |
@thw0rted yes, it worked perfectly fine previously. Yesterday I also set a temporary resolution to the version |
Quick update, I noticed |
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.
I opened #62672 which should be the minimum change needed to fix v16. After that is merged we can try getting rid of DOM entirely for v16. |
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.
LGTM!
@thw0rted thanks!
@thw0rted: Everything looks good here. I am ready to merge this PR (at 81101a5) 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 |
…able in v16 by @meyfa 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.
npm test <package to test>
.Fixes one missing piece from #59905