-
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
[@types/bl] update bl types to v5 #52236
[@types/bl] update bl types to v5 #52236
Conversation
@achingbrain Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. 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": 52236,
"author": "achingbrain",
"headCommitOid": "da6f9c144f8baa730c5565e92f113de38cbeff86",
"lastPushDate": "2021-04-09T13:01:52.000Z",
"lastActivityDate": "2021-04-09T17:08:51.000Z",
"maintainerBlessed": false,
"mergeOfferDate": "2021-04-09T15:46:24.000Z",
"mergeRequestDate": "2021-04-09T17:08:51.000Z",
"mergeRequestUser": "achingbrain",
"hasMergeConflict": false,
"isFirstContribution": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "bl",
"kind": "edit",
"files": [
{
"path": "types/bl/BufferList.d.ts",
"kind": "definition"
},
{
"path": "types/bl/bl-tests.ts",
"kind": "test"
},
{
"path": "types/bl/index.d.ts",
"kind": "definition"
}
],
"owners": [
"Bartvds",
"reconbot",
"benallfree"
],
"addedOwners": [
"achingbrain"
],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "benallfree",
"date": "2021-04-09T15:45:50.000Z",
"isMaintainer": false
},
{
"type": "stale",
"reviewer": "amcasey",
"date": "2021-04-08T22:09:21.000Z",
"abbrOid": "ed63713"
}
],
"ciResult": "pass"
} |
🔔 @Bartvds @reconbot @benallfree — please review this PR in the next few days. Be sure to explicitly select |
cc @rvagg maybe these could live the in bl module when the dust settles? |
@achingbrain The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
The bl module has a file called `BufferList.js` that is the buffer list without node streams, the idea being you can use it in the browser without having to pull in a readable streams implementation, which has become more necessary since webpack 5 stopped bundling shims for node internals. The main `bl.js` exports a class that extends both the buffer list and the node Duplex stream. It also has named exports for `BufferListStream` (the same as the default export) and `BufferList` (the same as the class from `BufferList.js`). I've attempted to represent them here. TS doesn't have multiple inheritance so I'm not sure how to represent the `BufferListStream` class without duplicating the methods of `BufferList`.
f2e27e2
to
77c02f5
Compare
@achingbrain The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
@achingbrain The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
@achingbrain The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
@achingbrain One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you! |
@benallfree, @amcasey Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
I'm just trying the changes out on a few projects. I'd made a similar change initially but it didn't work out, though that may have just been user error.. |
Updated numbers for you here from ea060e8. These typings are for a version of bl that doesn’t yet exist on master, so I’ve compared them with v4.1. Comparison details 📊
Looks like there were a couple significant differences—take a look at worst-case duration for getting completions at a position to make sure everything looks ok. |
@benallfree I've applied your changes, they look good - thanks for the suggestions! |
Updated numbers for you here from 7b403d2. Nice job, these numbers look better. These typings are for a version of bl that doesn’t yet exist on master, so I’ve compared them with v4.1. Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
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.
@achingbrain Thank you for all this awesome work! Looks good for sure now.
@amcasey Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
Ready to merge |
Ah @amcasey I may have jumped the gun a little - given #52236 (comment) are you happy with the lack of a v4 folder? |
@achingbrain It's fine - it can be added on-demand later. |
I just published |
The bl module has a file called
BufferList.js
that exports a classBufferList
that is just the buffer list without node streams, the idea being you can use it in the browser without having to pull in a readable streams implementation, which has become more necessary since webpack 5 stopped bundling shims for node internals.The main
bl.js
file exportsBufferListStream
that extends both theBufferList
and the node Duplex stream.I've attempted to represent the
BufferList.js
class here.TS doesn't have multiple inheritance so I'm not sure how to represent the
BufferListStream
class without duplicating the methods ofBufferList
.npm test <package to test>
.If changing an existing definition: