Skip to content

Always use the native (or polyfilled) Promise in transform-async-to-generator#5536

Merged
hzoo merged 3 commits into7.0from
async-to-generator-shadowed-promise
Apr 6, 2017
Merged

Always use the native (or polyfilled) Promise in transform-async-to-generator#5536
hzoo merged 3 commits into7.0from
async-to-generator-shadowed-promise

Conversation

@Jessidhia
Copy link
Copy Markdown
Member

Fixes #5531

@mention-bot
Copy link
Copy Markdown

@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");
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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,
Copy link
Copy Markdown
Member Author

@Jessidhia Jessidhia Mar 24, 2017

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown

codecov bot commented Mar 24, 2017

Codecov Report

Merging #5536 into 7.0 will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
...l-plugin-transform-async-to-generator/src/index.js 100% <100%> (ø) ⬆️
packages/babel-traverse/src/path/context.js 85.34% <0%> (-0.87%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0b6db1...e973341. Read the comment docs.

Diogo Franco (Kovensky) added 2 commits March 24, 2017 15:36
@existentialism existentialism added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Mar 27, 2017
@hzoo hzoo merged commit 452f8f1 into 7.0 Apr 6, 2017
@Jessidhia Jessidhia deleted the async-to-generator-shadowed-promise branch May 13, 2017 00:58
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 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 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.

4 participants