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

@thiagoarrais thiagoarrais 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

Inludes support for optimizing single-parameter arrow functions
@babel-bot
Copy link
Collaborator

babel-bot 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;
Copy link
Member

Choose a reason for hiding this comment

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

It seems that these aren't needed 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

@nicolo-ribaudo nicolo-ribaudo added PR: New Feature 🚀 A type of pull request used for our changelog categories Spec: Pipeline Operator labels May 15, 2019
@nicolo-ribaudo nicolo-ribaudo added this to In progress in Pipeline Operator via automation May 15, 2019
// (a = b, ((c) => d + e)(a))
// to
// (a = b, a + e)
const buildOptimizedSequenceExpression = ({ assign, call, path }) => {
Copy link
Member

Choose a reason for hiding this comment

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

@mAAdhaTTah
Copy link
Contributor

🎉

@nicolo-ribaudo nicolo-ribaudo added the PR: Needs Review A pull request awaiting more approvals label May 21, 2019
@nicolo-ribaudo nicolo-ribaudo added PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release and removed PR: Needs Review A pull request awaiting more approvals labels May 25, 2019
@nicolo-ribaudo nicolo-ribaudo merged commit 32296af into babel:feature-7.5.0/fsharp-pipeline May 25, 2019
Pipeline Operator automation moved this from In progress to Done May 25, 2019
nicolo-ribaudo pushed a commit that referenced this pull request May 25, 2019
* Transform for F#-style await

Inludes support for optimizing single-parameter arrow functions

* Wait until optimization before pushing placeholder into scope
@thiagoarrais
Copy link
Contributor Author

🎉

nicolo-ribaudo pushed a commit that referenced this pull request Jun 30, 2019
* Transform for F#-style await

Inludes support for optimizing single-parameter arrow functions

* Wait until optimization before pushing placeholder into scope
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 3, 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: New Feature 🚀 A type of pull request used for our changelog categories PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release Spec: Pipeline Operator
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants