Skip to content
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

Transform for F# Pipeline #9984

Conversation

@thiagoarrais
Copy link
Contributor

commented May 15, 2019

Q                       A
Fixed Issues? Fixes #6889
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature? Yes
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

This adds the transform for the fsharp pipeline proposal.

It is a port to the main babel repo of the work that happened in mAAdhaTTah#1

cc @nicolo-ribaudo @mAAdhaTTah

Transform for F#-style await
Inludes support for optimizing single-parameter arrow functions
@thiagoarrais thiagoarrais referenced this pull request May 15, 2019
3 of 4 tasks complete
@babel-bot

This comment has been minimized.

Copy link
Collaborator

commented May 15, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10799/

@nicolo-ribaudo nicolo-ribaudo added this to the v7.5.0 milestone May 15, 2019

@@ -1,3 +1,5 @@
var _ref, _a;

This comment has been minimized.

Copy link
@nicolo-ribaudo

nicolo-ribaudo May 15, 2019

Member

It seems that these aren't needed 🤔

This comment has been minimized.

Copy link
@thiagoarrais

thiagoarrais May 16, 2019

Author Contributor

Nope... I'm almost sure that they're an artifact of declaring the placeholder in the visitor and then throwing it away during optimization.

This comment has been minimized.

Copy link
@thiagoarrais

thiagoarrais May 16, 2019

Author Contributor

Found a quick solution in 29fa385. Let me know what you think.

// (a = b, ((c) => d + e)(a))
// to
// (a = b, a + e)
const buildOptimizedSequenceExpression = ({ assign, call, path }) => {

This comment has been minimized.

@mAAdhaTTah

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

🎉

@danez
danez approved these changes May 25, 2019

@nicolo-ribaudo nicolo-ribaudo merged commit 32296af into babel:feature-7.5.0/fsharp-pipeline May 25, 2019

5 checks passed

babel/repl REPL preview is available
Details
buildsize Significant change of babel.min.js up by 1.06 KB (0.01%)
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 87.46% (target 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Pipeline Operator automation moved this from In progress to Done May 25, 2019

nicolo-ribaudo added a commit that referenced this pull request May 25, 2019
Transform for F# Pipeline (#9984)
* Transform for F#-style await

Inludes support for optimizing single-parameter arrow functions

* Wait until optimization before pushing placeholder into scope
@thiagoarrais

This comment has been minimized.

Copy link
Contributor Author

commented May 25, 2019

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.