Babel Adds Smart Pipelines
Written by Kay Ewbank   
Monday, 01 April 2019

Babel has been updated with support for smart pipelines and private instant accessors. The JavaScript compiler takes JavaScript ECMAScript 2015+ code and converts it into a backwards compatible version to run in older browsers. 

Babel can also convert React JSX syntax into JavaScript. The main rationale for using Babel has been reduced as fewer people rely on older browsers that don't have support for ES2015 and beyond.

babel

The most recent release (7.3) has added support for smart pipelines. Parsing support was added in version 7.2 of Babel for the Smart Pipelines Operator proposal, and this release lets you transpile it down to standard ECMAScript and try it out. The developers say the current release only supports the main proposal, and none of the additional features. The current implementation also lacks support for yield and await in pipelines.

The next improvement in this version is the ability to parse and compile private instance accessors. Babel already had support for private fields and methods for class instances. Private methods and accessors (getter/setters) have now been added, meaning any class element can be private. The addition to Babel adds support for private accessors within the current babel-plugin-class-features + babel-plugin-proposal-private-methods plugin combination. The private getter and setter functions retrieve and update a private field. 

The final main improvement to the new version is support for named capturing groups. The developers describe this as being the biggest ECMAScript 2018 feature missing in Babel - until now.  Named capture groups let you assign a name to a capture group. The way this works is that when you match a regular expression against a string, you get a match object, and can assign a name to this. After matching, you can access the captured string by using the name you assigned to it.

The current release also adds better TypeScript parsing, and a number of bug fixes. 

babel 

 

More Information

Babel On GitHub

Related Articles

Babel 7 Released With Improved TypeScript Support

Babel 6 More Than A JavaScript Modernizer

6to5 Renamed As Babel - Are You Ready For The Next Gen JavaScript?       

JavaScript 6 EcmaScript 2015 Final Approval         

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


With MCP Docs Servers You'll Never Run Out Of Fresh Documentation
14/08/2025

MCP has changed the way you interact with your tools overnight. Now it targets your documentation. Wouldn't be great to have the latest and updated code samples and documentation of your favorite fram [ ... ]



Python Still Growing - 2024 Developer Survey Results
20/08/2025

The results of the 2024 Python Developers Survey, conducted as a collaborative effort between the Python Software Foundation and JetBrains have been published. This was the eighth editi [ ... ]


More News

pico book

 

Comments




or email your comment to: comments@i-programmer.info