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
Add support for preset organization shortcuts #4542
Conversation
presets: ["@babel/es2015"] | ||
}); | ||
}, | ||
/Couldn\'t find preset \"\@babel\/babel\-preset\-es2015\" relative to directory/ |
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.
Not the best test but the error is correct
@@ -261,6 +261,18 @@ export default class OptionManager { | |||
try { | |||
if (typeof val === "string") { | |||
presetLoc = resolve(`babel-preset-${val}`, dirname) || resolve(val, dirname); |
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.
babel-preset-${val}
will never be a valid name if val contains an @, but I think doing a check if it contains an @ and then doing different things makes it even more complex and it works right now anyway.
Current coverage is 88.35% (diff: 100%)@@ master #4542 diff @@
==========================================
Files 194 194
Lines 13621 13628 +7
Methods 1427 1427
Messages 0 0
Branches 3150 3152 +2
==========================================
+ Hits 12033 12041 +8
+ Misses 1588 1587 -1
Partials 0 0
|
* add support for @org shortcats, fixes babel#4362 * add shortcut test * fixes
Ref #4482, by @nkt
It doesn't let me fix merge conflicts from the website or push the branch up from my terminal so made this.