Daniel Tschinder
07eaa3c63f
Ignore empty fixture directories and fix fixtures in the parser ( #9113 )
...
* Ignore fixture directories that do not contain input or exec
* Fix parser test fixtures structures for some imported esprima tests.
* Warn on test folders that are not empty and do not contain testfiles
2018-12-02 22:55:06 -08:00
Daniel Tschinder
3530d11418
Update find-cache-dir ( #9111 )
...
Dropped support for node <6
2018-12-02 12:12:19 -08:00
Kai Cataldo
806e133473
Export @babel/parser#tokTypes in @babel/core ( #8986 )
...
* Export @babel/parser in @babel/core
* Expose tokTypes instead of parser
2018-11-30 18:41:58 -08:00
Veaceslav Cotruta
2bf8dde782
Propagates the extensions overrides provided by CLI during files walk ( #8668 )
...
* Propagates the extensions overrides provided by CLI during files walk
* Adds tests for issue #7620 , PR #8668
2018-11-29 18:57:27 -08:00
Nicolò Ribaudo
4e28459a2f
Make @babel/plugin-class-features a normal helper package ( #9083 )
...
* Make @babel/plugin-class-features a normal helper package
This effectively disallows using it directly.
* Rename helper
* Style
* Don't add prefix to plugin name
* Move private methods plugin
2018-11-29 16:42:45 +01:00
wtgtybhertgeghgtwtg
c4d6f6dcce
Pass rootMode from @babel/node. ( #9078 )
...
* Pass `root-mode` from `@babel/node`.
* Filter `babelOptions`.
2018-11-28 21:29:38 -08:00
Tim McClure
0859535b62
Private class methods stage 3 ( #8654 )
...
* Add private method syntax support
* Add private method spec support
* Add private method loose support
* Throw error if static private method is used
* Add more isStatic & isMethod checks
* Remove `writable:false` from private method inits
`writable` is false by default.
* Add private method func obj equality check
* Throw if private accessor is used
* Add check for fields === private method loose mode
* Throw buildCodeFrameErrors instead of Errors
* Move obj destructuring inside for loop
* Remove "computed" from ClassPrivateMethod type def
2018-11-28 16:20:09 -08:00
Brian Ng
3fda01b185
Update mapping for regex unicode plugin in preset-env ( #9091 )
2018-11-27 22:09:15 -06:00
Daniel Tschinder
4f2eacf615
chore: Fix warning when using prettier in code generators ( #9093 )
...
Also add more output to the generation
2018-11-27 19:34:11 -08:00
Gcaufy
0047ae84b3
Remove unused variable ( #9089 )
...
When I was reading the code, I see `parent` is not used in `_getComments` function.
so it make me confused why we delivery the `parent` in those functions.
If I'm wrong, please correct me.
2018-11-27 14:03:39 -08:00
Paul Happ
2bb24f996f
Fix yield expression transform ( #9076 )
2018-11-27 09:45:06 -06:00
Nicolò Ribaudo
61f2aed5b0
Disallow await inside arrow functions ( #9074 )
...
* Disallow await inside arrow functions
* Update test262 whitelist
2018-11-26 12:43:04 +01:00
Ruben Verborgh
9308c870f5
Fix destructuring assignment in arrow functions. ( #8916 )
...
Fixes 8912.
2018-11-25 19:29:58 +01:00
wtgtybhertgeghgtwtg
1b8d664bbe
Move fs-readdir-recursive and output-file-sync to devDependencies ( #9079 )
...
For `@babel/node`.
2018-11-25 18:04:03 +01:00
Justin Ridgewell
844dd33f3d
Microbouji patch/8136 ( #9073 )
...
* Fix optional chaining bug regarding spread in function calls
* Revamp optional-chain to be top down
Instead of going both upwards and downwards from the first real optional expression, we can just start from the top down.
* Add more tests
2018-11-24 09:32:24 -05:00
Nicolò Ribaudo
856edbf95f
[flow] Allow type casts in array patterns inside arrow parameters ( #9069 )
2018-11-24 12:23:49 +01:00
Daniel Tschinder
d2971a1959
Fix compatibility between typescript and jsx plugins in interface declarations ( #9058 )
2018-11-21 15:58:50 -08:00
Brian Ng
4f16a12c03
Fix bug with parsing TS generic async arrow function ( #9055 )
2018-11-21 15:34:09 -06:00
Brian Ng
e7f0c065cf
Bump some deps ( #9056 )
2018-11-21 15:21:36 -06:00
Grigory Moroz
445b14148e
Better error for disallowed trailing commas/parameters after rest elements ( #9046 )
...
* handle disordered rest parameter in function expressions
* remove spaces [lint]
* polish function parameters validation
* add test with arrow function and comma after rest parameter [babel-parser]
2018-11-21 07:49:36 +01:00
Brian Ng
61c1c77a28
Update mappings for node 10 in preset-env ( #9048 )
2018-11-20 15:29:45 -06:00
Nicolò Ribaudo
5979b0669b
Merge class features plugins
...
* Create @babel/plugin-class-features
* Move class properties transformation logic to enanced-classes (#8130 )
2018-11-20 21:14:35 +01:00
Daniel Tschinder
a2afb974be
Fix parsing typescript function types with destructuring ( #9035 )
...
* Fix parsing typescript function types with destructuring
* Use integer instead of actual stack
2018-11-19 13:55:58 -08:00
Nicolò Ribaudo
c11cdcb6d8
Fix recursive async function expressions ( #9039 )
...
* Fix recursive async function expressions
* Update fixtures
2018-11-19 17:19:54 +01:00
Nicolò Ribaudo
8c7d4b55c9
Add plugins name ( #8769 )
...
* Add plugins name
* Add missing names found by the plugin
* Add eslint plugin
2018-11-18 23:02:58 +01:00
Logan Smyth
20a9d71016
Normalize presets before merging config with others. ( #9034 )
2018-11-16 21:23:23 -08:00
Nicolò Ribaudo
4e1d6e7ff4
v7.1.6
2018-11-13 22:10:06 +01:00
Logan Smyth
cbbb3c7962
Ensure that the arrow nodes have a location before using them. ( #9003 )
2018-11-12 17:10:49 -08:00
Greg Bergé
4fcee1751a
Fix cloneNode with typeAnnotation. ( #8997 )
...
Fixes #8996
2018-11-12 17:10:09 -08:00
Alican Çubukçuoğlu
bf8c4785f2
Fix "TypeError: comments is not iterable" ( #8701 )
2018-11-09 13:58:28 -08:00
Brian Ng
4f206b2416
prettier@1.15.1 ( #9001 )
2018-11-09 15:25:13 -06:00
Daniel Tschinder
504b331da4
Fix browser files to have the same API as the nodejs ones ( #9004 )
2018-11-09 13:11:46 -08:00
Daniel Tschinder
74f969b603
Update debug dependency ( #8989 )
2018-11-09 16:27:41 +01:00
Daniel Tschinder
62233ed7c9
Update json5 to latest version ( #8990 )
2018-11-08 17:29:13 -08:00
ylemkimon
7b54ab620b
preset-env: fix opera from esmodules target and Browserslist not used ( #8555 )
2018-11-08 10:29:49 -06:00
Daniel Tschinder
343f776ca5
Rename primitive types to reserved types ( #8984 )
2018-11-07 16:50:36 -06:00
Nicolò Ribaudo
b706e34fc8
[decorators] Correctly insert _initialize(this) after super(). ( #8970 )
...
* [decorators] Correctly insert `_initialize(this)` after `super()`.
This commit fixes to problem:
1) After `super();` statements, `_initialize(this)` was inserted without
a trailing semicolon.
2) `(0, super())` causes an infinite recursion.
* Fix tests
* Add test
2018-11-06 21:58:09 -08:00
Daniel Tschinder
5d5cd8612f
Fix several edge cases with context expression state ( #8972 )
...
* Fix several edge cases with context expression state
* Fix review comments
* Remove unused field
2018-11-06 19:37:24 -08:00
Henry Zhu
afe67a7035
v7.1.5
2018-11-06 17:21:22 -05:00
Nicolò Ribaudo
2fa1984635
Fix await in function name and parameters ( #7727 )
...
* Disallow await in function parameters
* Fix await as function name
* Update test whitelists
2018-11-06 08:30:06 +01:00
Retsam
2194842d11
Typescript: Validate tuple type element positions ( #8828 )
...
* feat: validate the positions of rest elements and optional elements in tuple types
Adds a validation step to the parser which raises syntax errors if a rest param is not at the end of a tuple, or if a mandatory param follows an optional parameter
* Fix spread after optional case; add test case
2018-11-05 23:19:34 -08:00
Daniel Tschinder
e3b2c1afff
fix: Do not allow TypeCastExpressions w/o parens ( #8956 )
2018-11-05 15:34:24 -08:00
Nicolò Ribaudo
24c4901ff5
Remove Babylon plugins for features already merged to the ECMAScript spec ( #8448 )
...
These are now enabled by default:
- objectRestSpread (2018)
- asyncGenerators (2018)
- optionalCatchBInding (2019)
- jsonStrings (2019)
TODO (after this commit):
- [ ] Deprecate the `@babel/plugin-syntax-*` packages.
- [ ] Deprecate the `@babel/plugin-proposal-*` packages.
- [ ] Create the `@babel/plugin-transform-*` packages.
2018-11-05 23:48:06 +01:00
Jordan Brown
f216a7b06f
[flow] Add support for parsing _ as implicit instantiation in call/new ( #8883 )
...
* [flow] Add support for parsing as implicit instantiation in call/new
* Update flow tests and fix underscore being a reserved type
* Rebase onto flow-test
* Fix flow commit hash
2018-11-05 10:45:40 -08:00
Logan Smyth
c6d2f45cab
Resolve babel.config.js 'babelrcRoots' values relative to the config file. ( #8910 )
2018-11-05 08:51:27 -08:00
Nicolò Ribaudo
d35563ee1a
Set correct methods name
2018-11-02 13:59:57 +01:00
Nicolò Ribaudo
38397ce11f
Use toPropertyKey in the "decorate" helper
...
This commit also makes the "toPropertyKey" helper call @@toPrimitive
when needed.
2018-11-02 13:59:57 +01:00
Daniel Tschinder
cd81b079ee
Allow function types in type params within arrow return types ( #8954 )
2018-11-01 09:10:46 -05:00
everdimension
e85faec47d
Fix message when plugin of a wrong type is passed ( #8950 )
2018-10-31 14:34:26 -05:00
Byron Luk
0d9e77f559
rename colliding let bindings with for loop init ( #8937 )
...
* rename colliding let bindings with for loop init
* added complex test case to check if loop init collisions were handled correctly
* updated test files
2018-10-31 20:28:36 +01:00