-
Notifications
You must be signed in to change notification settings - Fork 30.5k
Add class types to emscripten, fix readable-stream #69218
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
Conversation
|
@dr-vortex Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through. This is a live comment which I will keep updated. 2 packages in this PRCode ReviewsThis PR can be merged once it's reviewed. 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": 69218,
"author": "dr-vortex",
"headCommitOid": "b1a6b5a0abb2e60c4a89d4511aa1b17f9c922e71",
"mergeBaseOid": "a099beff2d2c92582b126108a898e56ce17b34de",
"lastPushDate": "2024-03-31T00:45:58.000Z",
"lastActivityDate": "2024-05-13T22:47:46.000Z",
"maintainerBlessed": "Waiting for Code Reviews",
"mergeOfferDate": "2024-05-13T22:06:11.000Z",
"mergeRequestDate": "2024-05-13T22:47:46.000Z",
"mergeRequestUser": "dr-vortex",
"hasMergeConflict": false,
"isFirstContribution": true,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "emscripten",
"kind": "edit",
"files": [
{
"path": "types/emscripten/index.d.ts",
"kind": "definition"
}
],
"owners": [
"zakki",
"periklis",
"kbumsik",
"lourd"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
},
{
"name": "readable-stream",
"kind": "edit",
"files": [
{
"path": "types/readable-stream/index.d.ts",
"kind": "definition"
}
],
"owners": [
"TeamworkGuy2",
"markdreyer"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "andrewbranch",
"date": "2024-05-13T22:05:31.000Z",
"isMaintainer": true
},
{
"type": "approved",
"reviewer": "lourd",
"date": "2024-05-13T19:31:47.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 2028513258,
"ciResult": "pass"
} |
|
Hey @dr-vortex, 😒 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! |
|
🔔 @zakki @periklis @kbumsik @lourd @TeamworkGuy2 @markdreyer — please review this PR in the next few days. Be sure to explicitly select |
ErrnoError, FSNode, FSStream)|
This PR also fixes some types with readable-stream so that they work correctly with Node's import { Readable } from 'readable-stream';
import type { ReadStream } from 'node:fs';
class MyReadStream extends Readable implements ReadStream {
// ...
} |
|
Re-ping @zakki, @periklis, @kbumsik, @lourd, @TeamworkGuy2, @markdreyer: This PR has been out for over a week, yet I haven't seen any reviews. Could someone please give it some attention? Thanks! |
|
It has been more than two weeks and this PR still has no reviews. I'll bump it to the DT maintainer queue. Thank you for your patience, @dr-vortex. (Ping @zakki, @periklis, @kbumsik, @lourd, @TeamworkGuy2, @markdreyer.) |
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.
I don’t know much about either of these packages, but a lot of caution is warranted when updating such popular stuff. I’d like to know how much of these changes to emscripten you actually needed for your own code. Are other users likely to benefit from the same changes? Are library consumers actually supposed to be able to construct instances of these classes themselves? What you’ve done looks pretty accurate to me, but since you found it via source code and not API documentation, it’s hard to tell what’s supposed to be public API and what’s an implementation detail. It might be worth considering trying to make a more minimal update that still provides the utility you needed for your use case.
|
Thank you for the review! This PR needed to fix types so I can work on @zen-fs/emscripten. I have some prototype code, however, the missing types on @types/emscripten prevent it from working. BrowserFS (what ZenFS is a fork of) implements these types on its own. |
|
@andrewbranch 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? |
|
Pinging @kripken here, one of the Emscripten authors. Alon, could you help us find someone who could review this and generally double-check the existing types? I believe those of us who are considered owners on this were pretty casual contributors. I know I just added a few types for stuff I noticed missing, and that I don't have the context to be reviewing more additions effectively. It would be ideal if someone from the core Emscripten team could help maintain these types. With TypeScript being a de facto industry standard now, people look at these types as official. |
|
cc @brendandahl @sbc100 as maybe this can be connected to current TypeScript work in Emscripten? |
|
Some of these could be auto generated with the new |
|
Didn't know about |
|
@dr-vortex Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day! |
|
@lourd @kripken @brendandahl Any updates on this? |
|
@lourd @kripken @brendandahl @andrewbranch Can we look at merging this soon? |
|
@dr-vortex: Everything looks good here. I am ready to merge this PR (at b1a6b5a) 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! ❤️ |
|
Ready to merge |
Should be fixed in upcoming 4.0.15 DefinitelyTyped/DefinitelyTyped#69218
This PR updates some file system types for
@types/emscriptenby filling in some empty interfaces. This was done by observing various fs-related files inemscripten-core/emscripten/src.