Back to Coffeescript

2.4.0

documentation/sections/changelog/2.4.0.md

2.7.01.6 KB
Original Source
releaseHeader('2019-03-29', '2.4.0', '2.3.2')
  • Dynamic import() expressions are now supported. The parentheses are always required, to distinguish from import statements. See Modules. Note that as of this writing, the JavaScript feature itself is still Stage 3; if it changes before being fully standardized, it may change in CoffeeScript too. Using import() before its upstream ECMAScript proposal is finalized should be considered provisional, subject to breaking changes if the proposal changes or is rejected. We have also revised our policy on Stage 3 ECMAScript features, to support them when the features are shipped in significant runtimes such as major browsers or Node.js.
  • There are now two browser versions of the CoffeeScript compiler: the traditional one that’s been published for years, and a new ES module version that can be used via import. If your browser supports it, it is in effect on this page. A reference to the ES module browser compiler is in the package.json "module" field.
  • The Node API now exposes the previously private registerCompiled method, to allow plugins that use the coffeescript package to take advantage of CoffeeScript’s internal caching.
  • Bugfixes for commas in strings in block arrays, a reference to @ not being maintained in a do block in a class, and function default parameters should no longer be wrapped by extraneous parentheses.