529 Commits

Author SHA1 Message Date
Logan Smyth
3a2aa9b862 v7.0.0-beta.46 2018-04-22 21:29:42 -07:00
Henry Zhu
b414387bb1 v7.0.0-beta.45 2018-04-22 21:55:16 -04:00
Yosuke Kurami
1f97b91655 fix: don't write ': ' token when name is null (#7769) 2018-04-21 11:34:24 -04:00
Brian Ng
3299086955
Add support for flow implements (#7741) 2018-04-18 08:54:30 -05:00
Nicolò Ribaudo
341bdab90c Update decorators parsing (#7719)
* Update decorators parsing

This commit introduces three changes:
1) Class properties can be decorated
2) Decorators can contain arbitrary expressions, using @(...)
3) The Decorator node type has a new property, "arguments". This
    makes it possible do distinguish @dec() and @(dec()), which have
    different behaviors because @(dec()) is equivalent to @(dec())().

* Rename Decorator#expression to Decorator#callee

* Add test for @dec()()
2018-04-17 16:22:03 -05:00
Deven Bansod
95894397eb Migrate babel-cli and babel-generator tests to use jest-expect (#7549) 2018-04-11 13:12:56 -05:00
Justin Ridgewell
43040a4181
Private Properties phase 1 (#7666)
* Private Properties phase 1

Co-authored-by: CodingItWrong

* Private fields are optional

* Docs update
2018-04-05 11:17:34 +01:00
Henry Zhu
a6df92f245 v7.0.0-beta.44 2018-04-02 18:19:30 -04:00
Henry Zhu
bdfeeb38c6 v7.0.0-beta.43 2018-04-02 12:47:55 -04:00
Andy
19708e0154 TypeScript: support mapped type modifiers syntax (#7383) 2018-03-23 14:34:15 -04:00
Henry Zhu
d260bfaec4 v7.0.0-beta.42 2018-03-15 16:50:03 -04:00
Josh Justice
b8d1d221f8 Rename actual/expected test files to input/output (#7578)
These files appear to have been missed in the update of test file naming from actual/expected.js to input/output.js. As a result, they were silently not being run. I've confirmed that they were not running, updated the names, then confirmed that they are running now.
2018-03-15 19:02:41 +01:00
Henry Zhu
270ea17fed v7.0.0-beta.41 2018-03-14 12:25:26 -04:00
Daniel Tschinder
9d2d499760
Replace lodash/map with array equivalent (#7550)
* Replace lodash/map with array equivalent

* Fix review comments
2018-03-12 11:03:03 +01:00
Logan Smyth
b5e6536f26
Remove the sourceMapTarget option from core and implement it in babel-cli. (#7500) 2018-03-09 14:14:25 -08:00
Will Monk
0389035e15 Add exact Param To ObjectTypeAnnotations (#7535) 2018-03-09 19:22:01 +01:00
Andy
6f3be3a543 typescript: Support definite assignment assertion (#7159) 2018-02-24 16:26:07 -06:00
Andy
6f6c8dabba TypeScript: Support conditional types syntax (#7404)
Microsoft/TypeScript#21316 and Microsoft/TypeScript#21496
2018-02-24 14:56:14 +01:00
Justin Falcone
128fc6864e Link generator readme to Babylon AST spec [skip ci] (#7380) 2018-02-14 11:40:39 -05:00
Henry Zhu
ea3f2d9299 v7.0.0-beta.40 2018-02-12 11:41:13 -05:00
Naveen jain
a3ad518ce1 [BugFix] : OptionalChaining Bug fixes (#7288)
* Added optionalExpression types to babylon and babel-types

* OptionalChain transforms bug fix

* Added OptionalExpressions to babel-generator. Fixed OptionalChain Bugs

* Removed 'optionalChain' from newExpression and added test cases

* Added test cases for optionalChain

* Update index.js
2018-02-07 19:42:14 -05:00
Henry Zhu
73e64c6cb0 v7.0.0-beta.39 2018-01-30 15:27:19 -05:00
Andy
dccfed3601 TypeScript: Support parsing 'unique' type operator (#7239) 2018-01-22 16:09:22 -05:00
Henry Zhu
b5d20ab171 v7.0.0-beta.38 2018-01-17 11:31:32 -05:00
Boris Cherny
c3654d83c8 Generate TypeScript typings, and improve generated Flow typings (#7101)
* generate typescript types

* improve type generator output

* move generator scripts to scripts/generators

* use new stringifier for generating flow types too

* export summary types

* add support for oneOfNodeOrValueTypes to improve type generation

* export typescript types from top level, and remove module declaration

* generate typescript/flow types and copy typescript types to babel-types/lib as part of make build

* copy flow types to babel-types/lib as part of make build (fix #6839)

* improve typing: Identifier->name should be a string, not any

* avoid destructuring, to support node 4

* update doc generator to share more code, regenerate babel-types readme, pipe all generator output to stdout

* regenerate babel-types readme as part of make build

* improve typing: ClassProperty->key should be Identifier | StringLiteral | NumericLiteral | Expression, not any

* improve typing: optional node properties are nullable, not undefinedable

* improve docs: FlowClassImplements should be ClassImplements

* make ts usage more friendly: when using babel-types api, make optional params | undefined, and when reading nodes keep optional params | null

* rm lib/types.d.ts and lib/types.js in favor of packages/babel-types/lib

* add missing variance node type, address review comments

* add tests for flow variance

* Comment should be a disjoint union of tagged types

* update .flowconfig
2018-01-17 10:31:46 -05:00
Raja Sekar
2d05487293 Add support for @@iterator (#7058) 2018-01-12 09:19:11 -06:00
Nicolò Ribaudo
8659e1a88c Remove old expected.{js,json} files (#7187) 2018-01-09 13:10:30 -06:00
Raja Sekar
0f42accb87 Renamed files 2018-01-09 15:36:42 +01:00
Nicolò Ribaudo
9fe30b98a1 Remove "quotes" internal flag from babel-generator (#7174) 2018-01-08 23:37:33 -08:00
Henry Zhu
7c99f4653f v7.0.0-beta.37 2018-01-08 11:02:14 -05:00
Raja Sekar
152e95fb52 Preserve jsx comment (#7155) 2018-01-04 14:11:08 -06:00
Boris Cherny
4208099f5b Add validators for Flow AST node fields (#7107) 2017-12-30 15:26:01 -06:00
Fabian Streitel
3956b3ee0e Fix turning division operator into line comment in compact mode (#7131) 2017-12-29 08:11:35 -06:00
Diogo Franco
f9e0805337
Regenerate fixtures (#7120)
* Update line endings in test fixtures to match current output

* Fix incorrectly set up static-property-tdz fixtures

It seems the fixture runner does not look into subfolders.

* Remove expected file that should not exist

* Reenable disable optimisation test

* Reenable disabled nbsp tests

* Reenable comments between props test

The comments adjacent to children test is still broken so it stays off.
2017-12-28 19:28:05 +09:00
Henry Zhu
7d798952d2 v7.0.0-beta.36 2017-12-25 14:04:08 -05:00
Bogdan Chadkin
d25918aa5d Fix generation flow unnamed computed property (#7095) 2017-12-22 12:55:40 -06:00
Andy
6a73f39199 Support parsing export default abstract class {} (#7075) 2017-12-21 16:13:31 +01:00
Brian Ng
2b065350b5 Treat import type * as a parser error (#7061) 2017-12-19 10:54:20 -05:00
Henry Zhu
8a4124b2ff v7.0.0-beta.35 2017-12-14 16:47:27 -05:00
Brian Ng
f5ef928586
Add method property to ObjectTypeProperty (#7005) 2017-12-11 09:32:16 -06:00
Diogo Franco
2958548c2c
Fix code generation for async generator methods (#6998)
Fixes generator to write `async *foo() {}` instead of `*async foo() {}`.
2017-12-08 17:38:31 +09:00
Henry Zhu
a7c9264c79 v7.0.0-beta.34 2017-12-02 09:38:52 -05:00
Henry Zhu
413aa79711 v7.0.0-beta.33 2017-12-01 09:27:57 -05:00
Brian Ng
d8bbaaae0a Split exportExtensions into exportDefault and exportNamespace plugins… (#6920)
* Split exportExtensions into two plugins in babylon
* rename proposal-export-default to proposal-export-default-from
* rename proposal-export-namespace to proposal-export-namespace-from
2017-11-30 17:46:36 -05:00
Nicolò Ribaudo
18c8d97c3d
UpdateExpressions as callees must be parenthesized (#6922) 2017-11-27 23:31:24 +01:00
Brian Ng
881fc14329
Add handling parens for extends clause in generator (#6897) 2017-11-27 12:08:35 -06:00
Henry Zhu
4e6cd298c7 v7.0.0-beta.32 2017-11-12 08:32:53 -05:00
Clement Hoang
a18f83b4de Prefix XJS test directories with JSX instead (#6801) 2017-11-11 20:43:10 -05:00
Daniel Tschinder
7dbed2170e Move typscript test copy script to scripts folder and run once (#6749) 2017-11-06 09:46:49 -06:00
Henry Zhu
f76ac0b197 v7.0.0-beta.31 2017-11-03 16:03:01 -04:00