Mauro Bringolf
d8b4073536
Consistent const violations ( #6100 )
...
* Changed updateExpression to report itself as violation instead of its argument
* Update getBindingIdentifiers to work with forXStatement and return proper node as violation
* Updated unaryExpression violation to be consistent with changes.
2017-08-24 21:19:02 -04:00
Nicolò Ribaudo
4577bd1b7c
TypeParameterInstantiation params can be "Flow" nodes, not "FlowType" ( #6140 )
2017-08-22 23:11:02 -04:00
Justin Ridgewell
7e726a81e6
Complete export transform split ( #6139 )
...
They were each transforming the other's syntax (including namespace
transform would transform default, too, and vice-versa).
2017-08-21 14:15:40 -04:00
Andy
a74b307752
babel-types: Add missing field, fix incorrect definitions ( #6083 )
...
* babel-types: Add missing field, fix incorrect definitions
* Regenerate babel-types readme
2017-08-09 16:56:19 -04:00
Boopathi Rajaa
ab76cb6b53
Fix scope of catch block ( #5980 )
...
* Fix scope of catch block
* Throw error on Duplicate variable declaration
* Update test
2017-08-08 16:26:29 -04:00
Sarup Banskota
75808a2d14
Prevent getFunctionParent from returning Program ( #5923 )
2017-08-02 16:30:33 -05:00
jbrown215
4e9a25e34a
Flow opaque type aliases ( #5990 )
2017-08-02 16:30:19 -05:00
Brian Ng
21eeed8a8c
Fix generate interfaces script ( #6031 )
...
* Fix typo in TSPropertySignature type definition
* Sort fields in generate-interfaces script
2017-08-01 14:38:46 -04:00
Andy
1563221171
babel-types: Have NewExpression inherit from CallExpression ( #6019 )
2017-07-26 17:53:23 -04:00
Andy
248743e6c5
babel-types: Add TypeScript definitions ( #5856 )
...
* babel-types: Add TypeScript definitions
* Add missing builders
* Allow arrow function to have "generator"
* Replace link to resolved issue with comment
* Re-add 'generator' to functionCommon
2017-07-25 11:42:25 -04:00
Brian Ng
9a1b8ea443
Add support for flow predicates in babel-generator ( #5984 )
2017-07-25 11:38:17 -04:00
MarckK
9fc910d8c0
Add optionality to catch bindings ( #5956 )
2017-07-25 09:38:48 -05:00
Justin Ridgewell
28ae47a174
Stop mutating nodes ( #5963 )
...
* Stop mutating nodes
* Update tests
* linting
2017-07-18 13:24:07 -04:00
Mauro Bringolf
465c087ac0
Removed update operators from number unary operators ( #5940 )
2017-07-11 19:08:50 -05:00
Brian Ng
e4b35f680d
Run prettier
2017-06-27 12:15:00 -05:00
Henry Zhu
89d8f70fcd
Merge pull request #5813 from jridgewell/pr/5786
...
Optional Chaining Operator (Stage 1)
2017-06-27 11:10:47 -04:00
MarckK
b6b69c615a
Fix type errors for destructuring assignments( #4227 ) ( #5865 )
2017-06-24 15:56:51 -04:00
Daniel Tschinder
36ab72f095
Support declare export statements ( #5589 )
...
* Add definition of declare export statements
* Add more codecoverage
2017-06-08 23:15:54 +02:00
Justin Ridgewell
d92309f0db
PR comments
2017-06-07 03:22:52 -04:00
Justin Ridgewell
1f22ac353a
Lint
2017-06-07 03:22:51 -04:00
Justin Ridgewell
b048bff77d
Add optional to MemberExpression
2017-06-07 03:22:51 -04:00
Justin Ridgewell
5cc1cbf3bc
Matches pattern cleanup ( #5826 )
...
* Extract duplicated function into babel-types
Also reimplements in a sane way.
* Add tests
* cleanup
2017-06-06 11:20:05 -04:00
Justin Ridgewell
53e3f0dbdc
babel-types: avoid recreating validator closures ( #5821 )
2017-06-05 12:38:30 -04:00
Bo Lingen
8772e7fb89
Fix ObjectProperty patterns ( #5762 )
...
* Fix Object Property values to allow Patterns
* Add RestElement to allowed types
* add tests for nested pattern structures
2017-05-22 20:24:19 -04:00
Justin Ridgewell
58216f5022
Hoist toSequenceExpression's convert helper ( #5693 )
2017-05-19 17:35:05 -04:00
Logan Smyth
086cdfc705
Add more compat logic for Rest/SpreadElement for 6.x vs 7.x
2017-05-11 18:24:34 -07:00
Diogo Franco
899a754bef
Correct the validator for ArrayPattern ( #5722 )
...
The elements of the `elements` array should be either `Identifier`, `Pattern` or `RestElement`, but the validator was requiring `Expression`. It happened to work for `Identifier` since an `Identifier` is an `Expression`, but not for the other possible pattern elements.
2017-05-10 10:50:01 +09:00
Robert Brignull
5633e3c4f6
Fix typo a => b
2017-05-07 15:58:24 -07:00
Logan Smyth
14584c218c
Kill the "shadow-functions.js" internal plugin in favor of an explicit helper ( #5677 )
...
* Handle arrow function processing via shared API rather than default plugin.
* Fix a few small PR comments.
* Preserve existing spec arrow 'this' rewrites, and support spec in subclass constructors.
2017-05-05 13:27:18 -07:00
Conrad Buck
8434f89bc0
Add support for object type spread ( #5525 )
...
* Add support for object type spread
* Type spread: remove variance and add stripping test
2017-04-20 11:59:45 -04:00
Sven SAULEAU
2b774f46fb
fix: handle bailed when recursive convert ( #5499 )
2017-03-22 09:18:37 +01:00
Daniel Tschinder
ae8728c146
Merge branch 'master' into 7.0
2017-03-19 14:21:00 +01:00
Diogo Franco
256fcbc58f
Treat "await" as an invalid identifier ( #4954 )
...
It is valid (outside `async` functions) in the "script" parse goal, but always invalid in the "module" parse goal.
Fixes #4952 .
2017-03-19 11:28:52 +09:00
Brian Ng
8a82cc060a
Run new lint rules ( #5413 )
2017-03-04 10:46:01 -05:00
Henry Zhu
3ff77a61e4
Update babylon beta 3 ( #5394 )
...
* Update babylon to v7-beta.3
* convert RestProperty/SpreadProperty to RestElement/SpreadElement
* add virtual types to make it easier to upgrade
2017-02-28 16:58:19 -05:00
Daniel Tschinder
7c62278dcd
[7.0] Change for-await to use new AST ( #5321 )
2017-02-15 17:29:09 -05:00
Toru Kobayashi
9188be9ed5
[7.0] Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation ( #5199 )
2017-02-15 14:58:07 -05:00
Charles Pick
bc8f476d33
[7.0] Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation ( #5229 )
2017-02-15 14:54:27 -05:00
Andres Suarez
8c3392f058
Remove uses of lodash/compact ( #5181 )
2017-02-04 13:01:45 -08:00
Logan Smyth
b845f2b69d
Re-enable the max-len ESLint rule. ( #5265 )
2017-02-04 11:07:15 -05:00
Andres Suarez
658f13e030
Replace uses of "lodash/each" with native equivalents
2017-01-15 13:54:54 -08:00
Andres Suarez
2bee765e6b
Replace lodash is* with equivalent typeof check
2017-01-15 13:53:58 -08:00
Logan Smyth
3c2e9c0021
Merge pull request #5110 from loganfsmyth/flowtype-codegen
...
Validate importKind and ensure code generation exists.
2017-01-14 10:41:25 -08:00
Henry Zhu
672adba9a1
enable prefer const ( #5113 )
2017-01-14 09:48:52 -05:00
Logan Smyth
80a757819f
Validate importKind and ensure code generation exists.
2017-01-13 22:17:39 -08:00
Ryan Tsao
39d18679e1
Fix getBindingIdentifiers in babel-types ( #5068 )
...
* Added getBindingIdentifier tests
* Added failing test for getBindingIdentifiers
* Fix babel-types getBindingIdentifiers
2017-01-09 09:08:07 -05:00
Justin Ridgewell
2bbc36d25e
JSXSpreadChildren, throw in transform-react-jsx ( #4988 )
2016-12-16 15:30:00 -05:00
Sean Larkin
39c92160f7
Add generator support for Import ( #4945 )
2016-12-07 18:22:12 -05:00
Nikolai Tillmann
efefe828f9
Preserve null in babel-types' clone and deepClone. ( #4853 )
...
* Preserve null in babel-types' clone and deepClone.
* Also respect undefined when cloning.
* Updating last test to reflect original test case "[,0]"
2016-11-17 08:52:04 -05:00
Henry Zhu
6a6ec8785b
Start babel-types tests, add isNodesEquivalent ( #3553 )
2016-11-15 14:24:20 -05:00