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

[Babel 8] fix ignoreExtensions behaviour #15562

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Apr 12, 2023

Q                       A
Fixed Issues? The ignoreExtensions option in Babel 8 does not work in preset-typescript.
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

As a follow-up to #14955, this PR fixes a bug that ignoreExtensions is not respected in @babel/preset-typescript. Gladly this bug has not yet been released so it hasn't affected anyone.

Added .vue as an accepted test case extension, also improved the findFile performance.

"sourceType": "module",
"presets": [
["@babel/preset-react"],
["@babel/preset-typescript", { "allExtensions": true, "isTSX": true }]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@babel-bot
Copy link
Collaborator

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

Copy link
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 for catching this! This is marked as [babel 8], but it also affects Babel 7, right? Because the disableExtensionsDetect check is not gated behind the BABEL_8_BREAKING flag.

@JLHwung
Copy link
Contributor Author

JLHwung commented Apr 13, 2023

The Babel 7 part works fine previously, allExtensions works as expected, but since we effectively renamed allExtensions to ignoreExtension in #14955, the disableExtensionsDetect now fuses Babel 7 and Babel 8 option into one.

@JLHwung JLHwung changed the title [Babel 8] fix ignoreExtension behaviour [Babel 8] fix ignoreExtensions behaviour Apr 13, 2023
@JLHwung JLHwung merged commit 7e60a93 into babel:main Apr 14, 2023
52 checks passed
@JLHwung JLHwung deleted the fix-preset-typescript-ignore-extensions branch April 14, 2023 13:21
@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 Jul 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2023
@JLHwung JLHwung added PR: Bug Fix (next major) 🐛 A type of pull request used for our changelog categories for next major release and removed babel 8 labels Aug 9, 2023
@JLHwung JLHwung added this to the v8.0.0 milestone Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix (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.

None yet

4 participants