-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore(js-ts): Convert app/util/streams to TypeScript #11398
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
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
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 would expect a unit test written for this refactor so that we can have one passing before, in JS, then have to modify it after TS migration and be able to check that it only requires typing changes and no functional changes. Here we can't automatically check that this is not breaking something aside by running all the unit tests.
TS migration is a good opportunity to increase coverage to me, and I guess AI knows how to write tests pretty well.
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.
C: It's a shame that it did not make it as a rename so that we could see both JS and TS side by side instead of delete and new.
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.
Unfortunately, we're at the will of how Github diff analyzes the changes
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.
It does it fine in https://github.com/MetaMask/metamask-mobile/pull/11335/files so not sure why here it doesn't see the renaming
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.
PR has lint issues
Triggering CI rerun |
Quality Gate passedIssues Measures |
This PR has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions. |
This PR was closed because there has been no follow up activity in 7 days. Thank you for your contributions. |
PR Title
chore(js-ts): Convert app/util/streams to TypeScript
Description
This PR converts the
streams.js
file in theapp/util
directory to TypeScript, resulting in the newstreams.ts
file. The conversion process involved adding type annotations, ensuring compatibility with TypeScript, and removing the old.js
file.Motivation
The conversion to TypeScript enhances type safety, improves code maintainability, and aligns with the project's goal of migrating to TypeScript.
Changes
streams.js
tostreams.ts
with appropriate type annotations.streams.js
file.@types/pump
and@types/through2
as dev dependencies to thepackage.json
file.Context
The conversion process followed the detailed procedure provided, ensuring all TypeScript and linting checks pass without errors. The
through2
package is used for creating transform streams, and thepump
package is used for stream piping.Labels
Additional Notes
This PR was requested by Moritz. Please review the changes and let me know if there are any questions or further adjustments needed.
Devin Run
This Devin run was requested by Moritz.
If you have any feedback, you can leave comments in the PR and I'll address them in the app!