Take this snippet, borrowed from the coffeescript changelog:
$ 'body'
.click (e) ->
$ '.box'
.fadeIn 'fast'
.addClass '.active'
.css 'background', 'white'When compiled with anything older than 1.7.0, it will produce something like the following:
// Generated by CoffeeScript 1.6.3
(function() {
$('body'.click(function(e) {
return $('.box'.fadeIn('fast'.addClass('.active')));
}).css('background', 'white'));
}).call(this);However, in 1.7.0, they changed how leading dots are compiled:
// Generated by CoffeeScript 1.7.1
(function() {
$('body').click(function(e) {
return $('.box').fadeIn('fast').addClass('.active');
}).css('background', 'white');
}).call(this);Now, I like this change, because at least to me, it makes it more obvious what the code is actually trying to do.
However, effectively changing how a newline works in a minor version bump is not something I approve of. Sure, the coffeescript is not following semver, because they believe it's a lie.
This, combined with the section on versions on npmjs.org, did probably end up confusing a bunch of people, and at least gave me doubts as to what parts of the coffeescript API you can actually trust.