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
fix single-arg async arrows when retainLines=true #8868
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/9247/ |
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.
Can you also test this?
async (x)
=> {}
Btw, I really hope we can remove the retainLines
option and just use sourcemaps in the future.
@nicolo-ribaudo Sure thing. What should it output with async (x) =>
{}; Chrome throws async (x)
=> {} Also, yes I recognize everyone wants to get rid of |
Ok, I give you a bad example 😅 |
Added it anyway. Is this safe to merge? |
Should I abandon this? |
Nope 🙂 |
My first commit to Babel!!! 🎉 |
* master: (222 commits) Set correct methods name Use toPropertyKey in the "decorate" helper Allow function types in type params within arrow return types (babel#8954) Fix message when plugin of a wrong type is passed (babel#8950) rename colliding let bindings with for loop init (babel#8937) edge incomplete support for arrow destructuring (babel babel#8349) (babel#8926) fix single-arg async arrows when retainLines=true (babel#8868) [flow] Explicit inexact objects with `...` (babel#8884) Update preset-env data (babel#8898) Treat break inside block inside loop (babel#8914) fixed "source map" formatting in comment (babel#8878) [skip ci] fix typo in contributing guidelines (babel#8901) [skip ci] fix: Expression x === 'y' && '' should not evaluate to undefined. (babel#8880) fixed an extra word Fixes babel#8865 (babel#8866) v7.1.4 v7.1.3 Bump Babel deps (babel#8770) flow-bin@0.82.0 (babel#8832) Insertafter jsx fix (babel#8833) ... # Conflicts: # packages/babel-parser/src/tokenizer/index.js # packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-literal/options.json # packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json
I came across #7275 trying to work around facebook/create-react-app#5319 @roblourens pointed me here.
re: @loganfsmyth
So that's what I did but there's only one new test. This could probably use a few more test cases but I don't know what they would be, I just want the upstream issues (facebook/create-react-app#5319, jestjs/jest#5326, microsoft/vscode#60468, microsoft/vscode#60187) to be resolved so I can go on my merry way and this seemed to be the root blocker. If someone could point me to a few more cases that this should handle I will gladly add them.