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

Fix handling scoped packages in preset-env include/exclude options #9219

Merged
merged 2 commits into from Dec 27, 2018

Conversation

existentialism
Copy link
Member

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

@existentialism existentialism added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: preset-env labels Dec 20, 2018
@babel-bot
Copy link
Collaborator

babel-bot commented Dec 20, 2018

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

@nicolo-ribaudo
Copy link
Member

We also need to support the @babel/transform-classes format

@existentialism
Copy link
Member Author

@nicolo-ribaudo updated!

@@ -76,7 +76,7 @@ const validBrowserslistTargets = [
];

export const normalizePluginName = (plugin: string): string =>
plugin.replace(/^babel-plugin-/, "");
plugin.replace(/^@?babel[-/](plugin-)?/, "");
Copy link
Member

Choose a reason for hiding this comment

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

This also matches things like @babel-plugin-foo, is it intended to keep the RegExp simple?

Copy link
Member Author

Choose a reason for hiding this comment

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

Tweaked it to prevent @babel-plugin-foo

@existentialism existentialism merged commit ea1c436 into master Dec 27, 2018
@existentialism existentialism deleted the issue9182 branch December 27, 2018 15:54
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
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: preset-env PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@babel/preset-env exclude option doesn't support full package names
4 participants