2.0.2 by GeoffreyBooth · Pull Request #4758 · jashkenas/coffeescript
This should hopefully be the last release for awhile, unless people report cringeworthy bugs.
This PR adds a new breaking changes section about super and this.
2.0.2 changelog:
--transpilenow also applies torequired orimported CoffeeScript files.--transpilecan be used with the REPL:coffee --interactive --transpile.- Improvements to comments output that should now cover all of the Flow comment-based syntax. Inline
###comments near variable initial assignments are now output in the variable declaration statement, and###comments near a class and method names are now output where Flow expects them. - Importing CoffeeScript keywords is now allowed, so long as they’re aliased:
import { and as andFn } from 'lib'. (You could also doimport lib from 'lib'and then referencelib.and.) - Calls to functions named
getandsetno longer throw an error when given a bracketless object literal as an argument:obj.set propertyName: propertyValue. - In the constructor of a derived class (a class that
extendsanother class), you cannot callsuperwith an argument that referencesthis:class Child extends Parent then constructor: (@arg) -> super(@arg). This isn’t allowed in JavaScript, and now the CoffeeScript compiler will throw an error. Instead, assign tothisafter callingsuper:(arg) -> super(arg); @arg = arg. - Bugfix for incorrect output when backticked statements and hoisted expressions were both in the same class body. This allows a backticked line like
`field = 3`, for people using the experimental class fields syntax, in the same class along with traditional class body expressions likeprop: 3that CoffeeScript outputs as part of the class prototype. - Bugfix for comments not output before a complex
?operation, e.g.@a ? b. - All tests now pass in Windows.