1.10.0 — September 3, 2015
* CoffeeScript now supports ES6-style destructuring defaults.
* (offsetHeight: height) -> no longer compiles. That syntax was accidental and
partly broken. Use ({offsetHeight: height}) -> instead. Object destructuring
always requires braces.
* Several minor bug fixes, including:
- A bug where the REPL would sometimes report valid code as invalid, based
on what you had typed earlier.
- A problem with multiple JS contexts in the jest test framework.
- An error in io.js where strict mode is set on internal modules.
- A variable name clash for the caught error in catch blocks.
1.9.3 — May 27, 2015
* Bugfix for interpolation in the first key of an object literal in an
implicit call.
* Fixed broken error messages in the REPL, as well as a few minor bugs with
the REPL.
* Fixed source mappings for tokens at the beginning of lines when compiling
with the --bare option. This has the nice side effect of generating smaller
source maps.
* Slight formatting improvement of compiled block comments.
* Better error messages for on, off, yes and no.
1.9.2 — April 15, 2015
* Fixed a watch mode error introduced in 1.9.1 when compiling multiple files
with the same filename.
* Bugfix for yield around expressions containing this.
* Added a Ruby-style -r option to the REPL, which allows requiring a module
before execution with --eval or --interactive.
* In <script type="text/coffeescript"> tags, to avoid possible duplicate
browser requests for .coffee files, you can now use the data-src attribute
instead of src.
* Minor bug fixes for IE8, strict ES5 regular expressions and Browserify.
1.7.0 – January 28, 2014
* When requiring CoffeeScript files in Node you must now explicitly register
the compiler. This can be done with require 'coffee-script/register' or
CoffeeScript.register(). Also for configuration such as Mocha's, use
coffee-script/register.
* Improved error messages, source maps and stack traces. Source maps now use
the updated //# syntax.
* Leading . now closes all open calls, allowing for simpler chaining syntax.
$ 'body'
.click (e) ->
$ '.box'
.fadeIn 'fast'
.addClass '.active'
.css 'background', 'white'
$('body').click(function(e) {
return $('.box').fadeIn('fast').addClass('.active');
}).css('background', 'white');
* Added **, // and %% operators and ... expansion in parameter lists and
destructuring expressions.
* Multiline strings are now joined by a single space and ignore all
indentation. A backslash at the end of a line can denote the amount of
whitespace between lines, in both strings and heredocs. Backslashes
correctly escape whitespace in block regexes.
* Closing brackets can now be indented and therefore no longer cause
unexpected error.
* Several breaking compilation fixes. Non-callable literals (strings, numbers
etc.) don't compile in a call now and multiple postfix conditionals compile
properly. Postfix conditionals and loops always bind object
literals. Conditional assignment compiles properly in subexpressions. super
is disallowed outside of methods and works correctly inside for loops.
* Formatting of compiled block comments has been improved.
* No more -p folders on Windows.
* The options object passed to CoffeeScript is no longer mutated.
1.6.1 – March 5, 2013
* First release of source maps. Pass the --map flag to the compiler, and off
you go. Direct all your thanks over to Jason Walton.
* Fixed a 1.5.0 regression with multiple implicit calls against an indented
implicit object. Combinations of implicit function calls and implicit
objects should generally be parsed better now — but it still isn't good
style to nest them too heavily.
* .coffee.md is now also supported as a Literate CoffeeScript file extension,
for existing tooling. .litcoffee remains the canonical one.
* Several minor fixes surrounding member properties, bound methods and super
in class declarations.
1.5.0 – Feb 25, 2013
* First release of Literate CoffeeScript.
* The CoffeeScript REPL is now based on the Node.js REPL, and should work
better and more familiarly.
* Returning explicit values from constructors is now forbidden. If you want to
return an arbitrary value, use a function, not a constructor.
* You can now loop over an array backwards, without having to manually deal
with the indexes: for item in list by -1
* Source locations are now preserved in the CoffeeScript AST, although source
maps are not yet being emitted.
1.3.1 – APRIL 10, 2012
* CoffeeScript now enforces all of JavaScript's Strict Mode early syntax
errors at compile time. This includes old-style octal literals, duplicate
property names in object literals, duplicate parameters in a function
definition, deleting naked variables, setting the value of eval or
arguments, and more. See a full discussion at #1547.
* The REPL now has a handy new multi-line mode for entering large blocks of
code. It's useful when copy-and-pasting examples into the REPL. Enter
multi-line mode with Ctrl-V. You may also now pipe input directly into the
REPL.
* CoffeeScript now prints a Generated by CoffeeScript VERSION header at the
top of each compiled file.
* Conditional assignment of previously undefined variables a or= b is now
considered a syntax error.
* A tweak to the semantics of do, which can now be used to more easily
simulate a namespace: do (x = 1, y = 2) -> ...
* Loop indices are now mutable within a loop iteration, and immutable between
them.
* Both endpoints of a slice are now allowed to be omitted for consistency,
effectively creating a shallow copy of the list.
* Additional tweaks and improvments to coffee --watch under Node's "new" file
watching API. Watch will now beep by default if you introduce a syntax error
into a watched script. We also now ignore hidden directories by default when
watching recursively.
CoffeeScript is a little language that compiles into JavaScript.
Underneath all of those embarrassing braces and semicolons,
JavaScript has always had a gorgeous object model at its heart.
CoffeeScript is an attempt to expose the good parts of JavaScript
in a simple way.