Files
Geoffrey Booth 61d408f093 2.5.0 (#5284)
* 2.5.0 changelog

* Update dependencies

* Colors are expected to be globals by the new AST test helpers

* Disable testing of deepStrictIncludeExpectedProperties in browsers for now

* Update output of compiler only

* Update browser compiler output

* Update docs output

* Document ast option

* Update output

* Fix and reenable deepStrict test for browser test suite

* Update output
2019-12-31 22:19:32 -08:00

2.1 KiB
Raw Permalink Blame History

releaseHeader('2019-12-31', '2.5.0', '2.4.1')
  • The compiler now supports a new ast option, available via --ast on the command line or ast via the Node API. This option outputs an “abstract syntax tree,” or a JSON-like representation of the input CoffeeScript source code. This AST follows Babels spec as closely as possible, for compatibility with tools that work with JavaScript source code. Two tools that use this new AST output are eslint-plugin-coffee, a plugin to lint CoffeeScript via ESLint; and prettier-plugin-coffeescript, a plugin to reformat CoffeeScript source code via Prettier. The structure and properties of CoffeeScripts AST are not final and may undergo breaking changes between CoffeeScript versions; please open an issue if you are interested in creating new integrations.
  • Numeric separators are now supported in CoffeeScript, following the same syntax as JavaScript: 1_234_567.
  • BigInt numbers are now supported in CoffeeScript, following the same syntax as JavaScript: 42n.
  • ''' and """ strings are now output as more readable JavaScript template literals, or backtick (`) strings, with actual newlines rather than \n escape sequences.
  • Classes can now contain computed properties, e.g. [someVar]: -> or @[anotherVar]: ->.
  • JSX tags can now contain XML-style namespaces, e.g. <image xlink:href="data:image/png" /> or <Something:Tag></Something:Tag>.
  • Bugfixes for comments after colons not appearing the output; reserved words mistakenly being disallowed as JSX attributes; indented leading elisions in multiline arrays; and invalid location data in source maps.