npm babylon 6.11.0
v6.11.0

latest releases: 7.0.0-beta.47, 7.0.0-beta.46, 7.0.0-beta.45...
8 years ago

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

Don't miss a new babylon release

NewReleases is sending notifications on new releases.