Skip to content
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

Clean all always enabled parser plugins #16572

Merged
merged 6 commits into from
Aug 12, 2024

Conversation

liuxingbaoyu
Copy link
Member

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

@babel-bot
Copy link
Collaborator

babel-bot commented Jun 12, 2024

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

@liuxingbaoyu liuxingbaoyu marked this pull request as draft June 12, 2024 13:37
@liuxingbaoyu liuxingbaoyu marked this pull request as draft June 12, 2024 13:37
@liuxingbaoyu liuxingbaoyu marked this pull request as ready for review June 12, 2024 20:07
@liuxingbaoyu
Copy link
Member Author

The CI error is good, the associated PR has been opened.
prettier/prettier#16392

@fisker
Copy link
Contributor

fisker commented Jun 13, 2024

Merged, please rerun.

Gulpfile.mjs Outdated
)
);
if (bool(process.env.BABEL_8_BREAKING)) {
tasks.push(
Copy link
Member

Choose a reason for hiding this comment

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

Why only for Babel 8? We already publish this file for Babel 7 too, as far as I know.

Copy link
Member Author

Choose a reason for hiding this comment

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

In this PR we removed some plugins, which seems to be a breaking change for TS users.

Copy link
Member

Choose a reason for hiding this comment

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

Removing the .d.ts file completely is also a breaking change, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it just can't be generated automatically anymore. :)
The ones we edited manually are still there.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it will become manually maintained after this PR.
Given that we are planning to release Babel 8, this seems acceptable.

@liuxingbaoyu liuxingbaoyu force-pushed the remove-parser-plugins branch 2 times, most recently from fd2a67f to 492c4b3 Compare July 19, 2024 04:39
@nicolo-ribaudo nicolo-ribaudo force-pushed the remove-parser-plugins branch 2 times, most recently from f3f0035 to 2476a82 Compare August 12, 2024 09:46
@nicolo-ribaudo
Copy link
Member

@liuxingbaoyu I pushed a few commits to keep the auto-generation also for Babel 7, toggling between Babel 7 and Babel 8. What do you think about it?

The CI failure is unrelated and also happens on main, I'm investigating

@nicolo-ribaudo nicolo-ribaudo added PR: Internal (next major) 🏠 A type of pull request used for our changelog categories for next major release pkg: parser labels Aug 12, 2024
@liuxingbaoyu
Copy link
Member Author

@nicolo-ribaudo This looks great, thanks!

transform: code =>
code.replace(
/type BABEL_8_BREAKING\s*=\s*boolean/g,
`type BABEL_8_BREAKING = ${bool(process.env.BABEL_8_BREAKING) ?? false}`
Copy link
Member Author

Choose a reason for hiding this comment

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

The ?? false here seems to never be run?

Copy link
Member

Choose a reason for hiding this comment

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

bool can return undefined. While it's ok usually, in this case undefined was included in the generated code.

@nicolo-ribaudo nicolo-ribaudo merged commit 5174ad1 into babel:main Aug 12, 2024
53 checks passed
@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 Nov 12, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 12, 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 pkg: parser PR: Internal (next major) 🏠 A type of pull request used for our changelog categories for next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants