2.3.0 by GeoffreyBooth · Pull Request #5043 · jashkenas/coffeescript
Conversation
This release adds support for all the new features and syntaxes in ES2018 that weren’t already possible in CoffeeScript.
- Asynchronous iterators are now supported. You can now
yieldanawaitcall, e.g.do -> until file.EOF then yield await file.readLine(). Fix #4875: Asynchronous iterators #4893 - Object splats/destructuring, a.k.a. object rest/spread syntax, has been standardized as part of ES2018 and therefore this release removes the polyfill that had previously been supporting this syntax. Code like
{a, b, rest...} = objnow outputs more or less just like it appears, rather than being converted into anObject.assigncall. Note that there are some subtle differences between theObject.assignpolyfill and the native implementation. Fix #4876: remove polyfill for object rest/spread #4884 - The exponentiation operator,
**, and exponentiation assignment operator**=are new to JavaScript in ES2018. Now code likea ** 3is output as it appears, rather than being converted intoMath.pow(a, 3)as it was before. Fix #4877: Exponentiation operators #4881 - The
s(dotAll) flag is now supported in regular expressions. Regular expressionss(dotAll) flag #4880
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Since this PR is a bit bigger than usual, can anyone try using this branch in a project? Especially one with object spreads/rest.
I just tested this branch with my biggest app and it seemed to work fine, so hopefully this is good to go.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters