Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

v6.11.0

Compare
Choose a tag to compare
@hzoo hzoo released this 22 Sep 18:09
· 576 commits to master since this release

6.11.0 (2016-09-22)

Spec Compliancy

// Only one default export allowed per module. (2:9)
export default function() {};
export { foo as default };

// Only one default export allowed per module. (2:0)
export default {};
export default function() {};

// `Foo` has already been exported. Exported identifiers must be unique. (2:0)
export { Foo };
export class Foo {};

New Feature (Syntax)

  • Add support for computed class property names (#121) @motiz88
// AST
interface ClassProperty <: Node {
  type: "ClassProperty";
  key: Identifier;
  value: Expression;
  computed: boolean; // added
}
// with "plugins": ["classProperties"]
class Foo {
  [x]
  ['y']
}

class Bar {
  [p]
  [m] () {}
}

Bug Fix

  • Fix static property falling through in the declare class Flow AST (#135) @danharper
declare class X {
    a: number;
    static b: number; // static
    c: number; // this was being marked as static in the AST as well
}

Polish

  • Rephrase "assigning/binding to rvalue" errors to include context (#119) @motiz88
// Used to error with:
// SyntaxError: Assigning to rvalue (1:0)

// Now:
// Invalid left-hand side in assignment expression (1:0)
3 = 4

// Invalid left-hand side in for-in statement (1:5)
for (+i in {});

Internal

  • Fix call to this.parseMaybeAssign with correct arguments (#133) @danez
  • Add semver note to changelog (#131) @hzoo