Skip to content

[helpers TS conversion] async functions/generators#16510

Merged
nicolo-ribaudo merged 18 commits intobabel:mainfrom
SukkaW:migrate-async-helper
Jun 5, 2024
Merged

[helpers TS conversion] async functions/generators#16510
nicolo-ribaudo merged 18 commits intobabel:mainfrom
SukkaW:migrate-async-helper

Conversation

@SukkaW
Copy link
Copy Markdown
Contributor

@SukkaW SukkaW commented May 17, 2024

Q                       A
Fixed Issues? Part of #16500
Patch: Bug Fix? No
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes? No
License MIT

Migrate all async functions/generators related Babel helpers to TypeScript with reasonable types (and a huge amount of TypeScript exercise~).

The PR also introduces a small change to the helper building script.

@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented May 17, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57119

@SukkaW SukkaW marked this pull request as draft May 17, 2024 19:38
@SukkaW SukkaW force-pushed the migrate-async-helper branch 2 times, most recently from 9271b6b to da76b15 Compare May 17, 2024 19:42
@liuxingbaoyu
Copy link
Copy Markdown
Member

Thank you very much for the extremely high quality PR!
Unfortunately we generally assume that helpers need to support running before execution (i.e. before the global var is initialized), which is used when circular references are used, so we may need to keep the original form here.
❤️

@nicolo-ribaudo
Copy link
Copy Markdown
Member

Merged, you can rebase

@SukkaW
Copy link
Copy Markdown
Contributor Author

SukkaW commented May 23, 2024

@nicolo-ribaudo Sorry for the late response. I am a bit busy recently. I am going to continue working on the PR ASAP.

@SukkaW SukkaW force-pushed the migrate-async-helper branch from da76b15 to ac8b020 Compare May 23, 2024 14:30
@SukkaW SukkaW requested a review from nicolo-ribaudo May 23, 2024 14:31
@SukkaW SukkaW marked this pull request as ready for review May 23, 2024 14:31
@SukkaW SukkaW force-pushed the migrate-async-helper branch from 0a2f066 to 257f23a Compare May 24, 2024 13:22
@SukkaW SukkaW force-pushed the migrate-async-helper branch from c145ec8 to d19a377 Compare May 24, 2024 13:35
@ehoogeveen-medweb
Copy link
Copy Markdown

By the way, Ron Buckton has been doing a bunch of work recently to improve the types of iterators in TypeScript itself recently: microsoft/TypeScript#58243 (and related PRs)

I don't know to what extent the babel helper types should equal the standard library types or if there are any lessons that can be learned from that work that would be applicable here, but I wanted to mention it given the timing :)

@SukkaW
Copy link
Copy Markdown
Contributor Author

SukkaW commented Jun 2, 2024

@nicolo-ribaudo It appears the new helper generation script is not included in the babel-old-version, causing the CI to fail.

Is it a blocking factor?

@nicolo-ribaudo
Copy link
Copy Markdown
Member

We should get that CI job green, but I can take a look at it tomorrow

@nicolo-ribaudo nicolo-ribaudo force-pushed the migrate-async-helper branch 7 times, most recently from 961d6dc to f63cd60 Compare June 4, 2024 15:21
@nicolo-ribaudo nicolo-ribaudo force-pushed the migrate-async-helper branch from f63cd60 to ec2247c Compare June 4, 2024 15:22
Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and sorry it took so long!

Copy link
Copy Markdown
Member

@liuxingbaoyu liuxingbaoyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nicolo-ribaudo nicolo-ribaudo merged commit 14a0b08 into babel:main Jun 5, 2024
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants