-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Disable flow on transformClass, fix preset-env errors #7605
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/7344/ |
Array.from(validIncludesAndExcludes).filter( | ||
item => regexp instanceof RegExp && regexp.test(item), | ||
); | ||
|
||
const flatten = array => [].concat(...array); | ||
|
||
const expandIncludesAndExcludes = ( | ||
plugins: Array<string | RegExp> = [], | ||
plugins: Array<string> = [], |
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.
@existentialism Is this right? I thought we supported regexes now?
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.
@@ -35,7 +35,7 @@ const expandIncludesAndExcludes = ( | |||
plugins: Array<string | RegExp> = [], | |||
type: string, | |||
): Array<string> => { | |||
if (plugins.length === 0) return plugins; | |||
if (plugins.length === 0) return []; |
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.
Couldn't return plugins
here because the output is different type than the input. I assumed that we're safe to return just an empty array here, because technically we don't accept any other types.
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.
Tests are green (the failing circle ci is unrelated), so LGTM
* master: (140 commits) Update to beta.42 (babel#7609) Disable flow on transformClass, fix preset-env errors (babel#7605) Logical Assignment: ensure computed key isn't recomputed (babel#7604) Remove obsolete max-len eslint rule and reformat some stuff to fit (babel#7602) Centralize Babel's own compilation config to make it easier to follow. (babel#7599) Run prettier to format all JSON. Tweak es2015-related plugin order in preset-env (babel#7586) Refactored quirky inheritance in babel-plugin-transform-classes (babel#7444) Add RegExp support to include/exclude preset-env options (babel#7242) v7.0.0-beta.42 Use strict namespace behavior for mjs files. (babel#7545) Remove outdated spec deviation note [skip ci] (babel#7571) Ensure that the backward-compat logic for plugin-utils copies over the version API properly. (babel#7580) Rename actual/expected test files to input/output (babel#7578) Use helper-module-import inside entry plugin too Use helper-module-imports instead of custom import (babel#7457) Fix "Module build failed: Error: Cannot find module '@babel/types'" (babel#7575) Wrap wrapNativeSuper helpers in redefining functions for better tree-shakeability (babel#7188) Favour extends helper over objectWithoutProperties when whole object gets copied anyway (babel#7390) Fix incorrect value of _cache in _wrapNativeSuper (babel#7570) ...
Disabled Flow from
transformClass.js
(see #7444) which caused a cascade of errors, as per @loganfsmyth request. Also fixed small Flow issues I found in other files so nowyarn flow
pass.