15 Commits

Author SHA1 Message Date
Axel Nyffenegger
bd98041321 Fix function name computation for literal values (#7435)
* Fix name computation for literal values

* Add more computed literal test cases

* Always return a string in getNameFromLiteralId

- Also concatenate quasis id for regex literal

* Add a test clarifying function name for template literals

* Remove useless else ifs
2018-04-09 21:00:55 -04:00
Nicolò Ribaudo
252ea5a966 Fix reused nodes - part 2 (#7149) 2018-01-29 22:59:06 +01:00
Diogo Franco
81811bf1b9 Fix transform-arrow-functions in { spec: true } shadowing (#6760)
* Fix transform-arrow-functions in { spec: true } shadowing

The function name matching the variable declaration name could
shadow the actual function object inside the generated function,
leading to invalid behavior due to holding a reference to the
original unbound function.

* Combine it with transform-function-name just to be sure in spec: false

* Revert "Fix transform-arrow-functions in { spec: true } shadowing"

This reverts commit 1cafe2561d0b0ddd181b956a85eb074621da12e8.

* Much simpler version of the above fix

* Missing fixture updates

* Avoid using rest/spread to make the tests pass on node 4

* ...actually update _all_ the fixtures
2017-11-08 17:21:30 -05:00
Henry Zhu
cde0054227 Scoped: change src imports to @babel/ [skip ci] 2017-10-16 22:49:56 -04:00
Justin Ridgewell
28ae47a174 Stop mutating nodes (#5963)
* Stop mutating nodes

* Update tests

* linting
2017-07-18 13:24:07 -04:00
Brian Ng
e4b35f680d
Run prettier 2017-06-27 12:15:00 -05:00
Brian Ng
8a82cc060a Run new lint rules (#5413) 2017-03-04 10:46:01 -05:00
Logan Smyth
b845f2b69d Re-enable the max-len ESLint rule. (#5265) 2017-02-04 11:07:15 -05:00
Henry Zhu
672adba9a1 enable prefer const (#5113) 2017-01-14 09:48:52 -05:00
Sebastian McKenzie
5b89849f43 Switch to klint, fix some lint rules 2016-02-14 23:25:14 +00:00
Amjad Masad
c1a7fc93d0 Move setting NOT_LOCAL_BINDING to the function name helper 2016-01-22 14:07:57 -08:00
Ben Alpert
248f00fe82 Set function names from assignment expressions
Based on http://www.2ality.com/2015/09/function-names-es6.html.
2015-12-27 12:46:56 -08:00
Logan Smyth
925804798d Skip name inference on hard-to-replace classes - fixes T2494 2015-12-05 17:07:10 -08:00
Daniel Lo Nigro
0076204f80 Fix Flow.
Removed `@flow` annotation from files that don't actually pass Flow check at the moment. These will be added back file by file once the files are properly converted to use Flow.

Closes #3064
2015-11-15 21:30:22 -08:00
Sebastian McKenzie
ae7d5367f1 6.0.0
I'm extremely stupid and didn't commit as I go. To anyone reading this
I'm extremely sorry. A lot of these changes are very broad and I plan on
releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm
afraid I couldn't wait. If you're ever in London I'll buy you a beer
(or assorted beverage!) to make up for it, also I'll kiss your feet and
give you a back massage, maybe.
2015-10-29 17:51:24 +00:00