Aaron Ang
3d987ed6c0
Keep parentheses for logical expression when in await expression ( fix #5428 ) ( #5433 )
2017-03-09 09:13:53 -05:00
Brian Ng
8a82cc060a
Run new lint rules ( #5413 )
2017-03-04 10:46:01 -05:00
Henry Zhu
696e63c58b
Merge pull request #5380 from babel/extra-do + 6.x commits
2017-02-25 18:48:27 -05:00
Henry Zhu
6529cb5f01
babel-generator: add another do test
2017-02-25 18:39:18 -05:00
Alex Kuzmenko
01918c68c1
Improve babel-generator's code coverage ( #5338 )
2017-02-25 13:26:29 -05:00
Henry Zhu
d33d023594
Merge remote-tracking branch 'origin/master' into merge-master
2017-02-23 18:54:15 -05:00
Zachary Miller
6614a63b3b
Wrap some generated do expressions in parens ( #5339 )
2017-02-22 07:50:58 -05:00
Henry Zhu
9083bd6283
Merge branch 'master' into 7.0
2017-02-09 18:36:02 -05:00
Erik Desjardins
e9d7757433
Emit parens for await (but not yield) of ternary expressions ( #5270 )
2017-02-06 09:06:48 -08:00
Logan Smyth
b845f2b69d
Re-enable the max-len ESLint rule. ( #5265 )
2017-02-04 11:07:15 -05:00
Brian Ng
e530e3c025
[7.0] List babylon plugins instead of * in babel-generator tests ( #5231 )
2017-01-28 09:35:21 -05:00
Brian Ng
b69dc51be0
Fix missing parens when function expressions is tag ( #5193 )
2017-01-23 08:45:57 -08:00
Chau Nguyen
d710e6dd5b
[7.0] Drop flowUsesCommas option from babel-generator ( #5123 )
2017-01-19 22:24:13 -05:00
Sergey Rubanov
292c3ca206
Refactor test packages to use ES modules instead of CJS ( #5138 )
2017-01-16 11:25:04 -05:00
Andres Suarez
85b3aec747
Use native or lodash util module where full "lodash" is required
2017-01-15 13:35:00 -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
chico
2d7703afd9
Like was discussed in Slack chat with @ljharb and @hzoo spaces was added with no particular reason.
...
https://babeljs.slack.com/archives/discussion/p1481744017001806
I'm still not sure if everything here is correct (for example source maps)
2016-12-21 19:14:39 +03:00
Dan Harper
d90aaf2c76
Print Flow optional & type annotations in function params with defaults ( #4872 )
...
Fixes #4863
2016-12-16 15:31:05 -05:00
Brian Ng
01bc43464e
Ensure directives get printed in block statements ( #4873 )
2016-12-16 15:30:14 -05:00
Justin Ridgewell
2bbc36d25e
JSXSpreadChildren, throw in transform-react-jsx ( #4988 )
2016-12-16 15:30:00 -05:00
David Aurelio
7ea283eb82
babel-generator: Expose raw mappings
...
Exposes raw mappings when source map generation is enabled. To avoid the cost of source map generation for consumers of the raw mappings only, `.map` is changed to a getter that generates the source map lazily on first access.
2016-12-09 09:55:42 +00:00
Sean Larkin
39c92160f7
Add generator support for Import ( #4945 )
2016-12-07 18:22:12 -05:00
Brian Ng
3a27f49c57
Fix identation with empty leading ObjectTypeProperty ( #4862 )
2016-11-19 10:47:41 -05:00
Henry Zhu
19bb830c50
use *, add test for assign-expression in parameter ( #4865 )
2016-11-19 10:45:00 -05:00
Henry Zhu
cd041541b8
Fix bug + Generate test fixtures if no expected.js ( #4858 )
2016-11-17 17:53:46 -05:00
Juriy Zaytsev
cf3a38fb40
Add jsonCompatibleStrings option to generator ( #4827 )
2016-11-15 15:03:41 -05:00
Sam Pepose
db85bdc3fc
Added flowCommaSeparator option for object types ( #3547 )
2016-11-15 14:43:42 -05:00
Shine Wang
5075f3cb6f
Bug fix for printing minified literals ( #4830 )
...
* Fixed minified literal generator: now prints the shorter of `raw` and `value`.
2016-11-15 10:50:57 -05:00
Sam Goldman
7bb430aeea
Add variance node type and generate property variance annotations ( #4697 )
...
* Add variance node type and generate property variance annotations
babel/babylon#161 adds parsing support for property variance
annotations. This PR adds the necessary node type for the new Variance
node and generate support for all the positions where variance can now
appear.
* Variance is no longer a separate node type
This diff also adds tests to class properties and to the
flow-strip-types transform.
* Add test + fix for edge case with variance and class proeprties
2016-10-21 16:05:36 -04:00
Andrew Levine
9f8ab29213
Change usage of "suite"/"test" in unit-tests to "describe"/"it" ( #4734 )
...
Fixes #4733
2016-10-15 18:45:35 -04:00
Andrew Levine
c0038221d7
Run ESLint on test files, and fix lint errors in test files ( #4732 )
2016-10-15 18:27:48 -04:00
sugargreenbean
c57e0e88a5
changed bool to boolean as well as updated tests ( #4646 )
2016-10-03 19:31:56 -04:00
Bruno Jouhier
f9ccee9d83
fixed babel/babel#4632 - missing parentheses around yield expression … ( #4633 )
...
* fixed babel/babel#4632 - missing parentheses around yield expression in conditional test
* babel/babel#4632 - added test
2016-10-01 12:58:59 -04:00
Juriy Zaytsev
1d728750c9
Add retainFunctionParens option ( #4621 )
...
* Add retainParens option
* Add doc, remove option
* Add negation test
* Make sure parens are not added
* Change name
* Change dir name
2016-09-30 18:05:33 -04:00
Moti Zilberman
03d772c2ec
Computed class properties ( #4500 )
...
* Support computed class property names (#4499 )
** Depends on babel/babylon#121 **
* `babel-types`: Add `computed` field to `ClassProperty`
* `babel-plugin-transform-class-properties`: handle computed property names correctly
* `babel-generator`: add tests for class properties (computed/literal, static/instance)
* doc: Update babel-types with ClassProperty.computed
* chore(package): update babylon to v6.11.0
* babel-types: move ClassProperty.computed to be last builder arg
2016-09-26 17:46:00 +02:00
Kai Cataldo
f3a6e4b0ae
Fix tests with duplicate named exports ( #4538 )
...
* Fix babel-plugin-transform-flow-strip-types tests
* Fix babel-plugin-transform-es2015-modules-umd tests
* Fix babel-generator tests
* Fix babel-plugin-transform-es2015-modules-systemjs tests
* Fix babel-plugin-transform-es2015-modules-commonjs tests
* Fix babel-plugin-transform-es2015-modules-amd tests
2016-09-21 10:52:59 +02:00
Basil Hosmer
cb4b2b0744
flow plugin: generate exact object type annotations ( #3702 )
2016-09-20 11:10:55 +02:00
Dan Harper
41f2bbc104
Flow: Fix generating arrow functions with param ( #4504 )
...
* transform-flow-comments, single arrow param support #4503
* further tests for printing single arrow func param flow code
* cleanup
2016-09-12 08:27:49 -04:00
Mathias Bynens
b9919bdc48
babel-generator: Ensure ASCII-safe output for string literals ( #4478 )
...
Ref. #4477 .
2016-09-08 18:04:52 -04:00
Paul O’Shannessy
55f37a1b1e
Use arrow syntax for ObjectTypeProperty FunctionTypeAnnotations ( #3663 )
...
This fixes an issue where optional properties would get transformed to
an invalid syntax. The easiest solution was to make all FunctionTypes
get transformed to the arrow syntax (previously everything went the
other way).
2016-08-20 10:37:56 -04:00
Sebastian McKenzie
4a19661346
Generate names field for identifiers to get correct names mappings ( #3658 )
2016-08-16 13:43:55 -04:00
Daniel Tschinder
308de41992
Add support for the new declare module.exports of flow. ( #3570 )
2016-08-16 16:54:00 +02:00
Logan Smyth
4dcec860bd
Drop trailing whitespace after all newlines.
2016-07-17 21:51:01 -07:00
Logan Smyth
0e05e9f216
Rely on .space and .newline behavior instead of explicit format checks.
2016-07-17 12:39:22 -07:00
Logan Smyth
d6b1e36d49
Make the 'catchUp' call implicit to source location updates.
2016-07-04 22:49:58 -07:00
Sam Pepose
3ee06187d5
Fixed incorrect newlines with Flow object types ( #3548 )
2016-06-23 20:38:05 -04:00
Sam Pepose
7d83147e16
Added semicolon
2016-06-22 21:21:53 -07:00
Sam Pepose
199a612131
Fixed incorrect printing of array of nullable flow type
2016-06-22 20:33:43 -07:00