Always use the native (or polyfilled) Promise in transform-async-to-generator#5536
Always use the native (or polyfilled) Promise in transform-async-to-generator#5536
Conversation
|
@Kovensky, thanks for your PR! By analyzing the history of the files in this pull request, we identified @loganfsmyth, @zenparsing and @existentialism to be potential reviewers. |
| // binding used by the inline helper | ||
| const programScope = path.scope.getProgramParent(); | ||
| if (programScope.hasBinding("Promise", true)) { | ||
| programScope.rename("Promise"); |
There was a problem hiding this comment.
This was a bit of a brute force approach, but was required to make the shadowed-promise-nested test case pass.
| @@ -0,0 +1,6 @@ | |||
| { | |||
| "babelrc": false, | |||
There was a problem hiding this comment.
Actually, now that I realize this isn't a .babelrc this might not be needed 😆
Is there a risk of these options getting merged with the ones one folder above?
Codecov Report
@@ Coverage Diff @@
## 7.0 #5536 +/- ##
==========================================
- Coverage 85.49% 85.48% -0.01%
==========================================
Files 200 200
Lines 9506 9509 +3
Branches 2701 2702 +1
==========================================
+ Hits 8127 8129 +2
- Misses 883 884 +1
Partials 496 496
Continue to review full report at Codecov.
|
Only the helper needs to see the native Promise.
Fixes #5531