-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Lift requires #3780
Lift requires #3780
Conversation
We want to inline them using a babel plugin
This fails locally for some reason.
|
@@ -21,6 +21,7 @@ function getJest(packageRoot: Path) { | |||
/* $FlowFixMe */ | |||
return require(binPath); | |||
} else { | |||
// TODO: Because of a dependency cycle, this can only be inlined once the babel plugin for inlining is merged |
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.
This should almost be considered a bug, IMO
packages/jest-resolve/src/index.js
Outdated
@@ -91,8 +91,8 @@ class Resolver { | |||
|
|||
static findNodeModule(path: Path, options: FindNodeModuleConfig): ?Path { | |||
const resolver = options.resolver | |||
/* $FlowFixMe */ | |||
? require(options.resolver) | |||
? /* $FlowFixMe */ |
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 a fan of this one, /cc @vjeux
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.
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.
I'm curious, is this a regression from before?
It indeed looked better before.
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.
No, it was in a single line before, it was multilined when I made it into a ternary
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.
Could you open an issue against prettier? We may be able to print it the way you want, we're already doing that for flow unions.
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.
Will do!
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.
Codecov Report
@@ Coverage Diff @@
## master #3780 +/- ##
==========================================
- Coverage 58.09% 58.02% -0.08%
==========================================
Files 191 191
Lines 6708 6711 +3
Branches 6 6
==========================================
- Hits 3897 3894 -3
- Misses 2808 2814 +6
Partials 3 3
Continue to review full report at Codecov.
|
* Lift all inline requires to the top-level We want to inline them using a babel plugin * Remove one inlining that messes us up * Inline two more requires causing the repl test to fail * remove one unnecessary inline * Fix prettier lint * really prettier?
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Move a lot of the changes in #3493 to isolate the changes causing errors.
Test plan
Tests should pass