mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
* 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
2.1 KiB
2.1 KiB
releaseHeader('2019-12-31', '2.5.0', '2.4.1')
- The compiler now supports a new
astoption, available via--aston the command line orastvia the Node API. This option outputs an “abstract syntax tree,” or a JSON-like representation of the input CoffeeScript source code. This AST follows Babel’s spec as closely as possible, for compatibility with tools that work with JavaScript source code. Two tools that use this new AST output areeslint-plugin-coffee, a plugin to lint CoffeeScript via ESLint; andprettier-plugin-coffeescript, a plugin to reformat CoffeeScript source code via Prettier. The structure and properties of CoffeeScript’s 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. BigIntnumbers 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\nescape 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.