Skip to content

2.0.2 #4758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 27, 2017
Merged

2.0.2 #4758

merged 4 commits into from
Oct 27, 2017

Conversation

GeoffreyBooth
Copy link
Collaborator

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:

  • --transpile now also applies to required or imported CoffeeScript files.
  • --transpile can 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 do import lib from 'lib' and then reference lib.and.)
  • Calls to functions named get and set no 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 extends another class), you cannot call super with an argument that references this: 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 to this after calling super: (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 like prop: 3 that 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.

@jashkenas @lydell @connec @vendethiel

@GeoffreyBooth GeoffreyBooth merged commit cbc695b into jashkenas:master Oct 27, 2017
@GeoffreyBooth GeoffreyBooth deleted the 2.0.2 branch October 27, 2017 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant