86 Commits

Author SHA1 Message Date
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
ssuman
412180e203 Increase the code coverage for traverse evaluation (#5363)
* When applied this commit will increase the code coverage for evaluation.js

* Fixing linting issues
2017-04-09 16:49:37 -07:00
MrSpider
fd3a2c285a Fix replacing function declaration in export default (fixes #4468) (#5456) 2017-04-06 11:40:31 -04:00
Boopathi Rajaa
c9a851a218 Cleanup traverse cache APIs (#5494) 2017-03-23 12:00:28 -04:00
Damien Maillard
299e51298c Fix path.remove() leading & trailing comments sharing (#5504) 2017-03-23 11:55:14 -04:00
MrSpider
5287e13817 Fix replacing function declaration in export default (fixes #4468) (#5444) 2017-03-10 11:41:03 -08:00
Brian Ng
8a82cc060a Run new lint rules (#5413) 2017-03-04 10:46:01 -05:00
Jason Laster
ff2c24eed2 Add test for reference paths (#5296) 2017-02-15 15:05:31 -05:00
Logan Smyth
454933ef76 Revert "Rewrite Hub as interface #5047" (#5306) 2017-02-13 18:15:50 -08:00
Yongxu Ren
2985597d40 Rewrite Hub as interface #5047 (#5050)
* Rewrite Hub as interface #5047

* Update index.js
2017-02-13 12:49:10 -08:00
Boopathi Rajaa
f8ffe03e79 Deopt evaluation of undefined with a local binding. Fix #5204 (#5206) 2017-02-08 10:37:14 -05:00
Vicente Jr Yuchitcho
1ba4a3fe5d Add path sibling traversal methods (#5230)
* getPrevSibling
* getNextSibling
* getAllNextSiblings
* getAllPrevSiblings
2017-02-07 11:17:50 -05:00
Logan Smyth
b845f2b69d Re-enable the max-len ESLint rule. (#5265) 2017-02-04 11:07:15 -05:00
Brian Ng
8c35b320d3 Bump eslint-config-babel and fix lint (#5129) 2017-01-17 10:51:16 +01:00
Andres Suarez
85b3aec747 Use native or lodash util module where full "lodash" is required 2017-01-15 13:35:00 -08:00
Henry Zhu
672adba9a1 enable prefer const (#5113) 2017-01-14 09:48:52 -05:00
Daniel Tschinder
dc617129f6 Optimize removal-hooks for ArrowFunctions (#5076) 2017-01-09 09:05:23 -05:00
Boopathi Rajaa
73ff13f326 Add getBindingIdentifierPaths/getOuterBindingIdentifierPaths (#4876) 2016-12-08 12:43:14 -05:00
Boopathi Rajaa
7e020272c1 Fix path.evaluate for references before declarations (#4875) 2016-11-20 22:44:56 -05:00
Boopathi Rajaa
55a47a8819 Add path utilities isAncestor and isDescendant (#4836)
* Add path utilities isAncestor and isDescendant

* Create ancestry.js
2016-11-15 16:36:45 -05:00
Boopathi Rajaa
dbc1371ba9 Add clearCache and clearPath as separate APIs under traverse (#4835) 2016-11-15 10:48:59 -05:00
Moti Zilberman
fd4667e649 Increase test coverage (#4742)
* Add tests for path type inferers

* Add test for babel-types.valueToNode

* Add tests for babel-types.toKeyAlias

* Add tests for babel-types.toStatement

* Add tests for babel-types.toExpression

* Lint fixes in babel-traverse/test/inference
2016-10-23 10:51:09 +02:00
Juriy Zaytsev
beda884f41 Make getBinding ignore labels; add Scope#getLabel, Scope#registerLabel (#4758)
* Make getBinding ignore labels; add Scope#getLabel, Scope#registerLabel

* generateUid: account for labels again
2016-10-21 17:19:59 -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
Boopathi Rajaa
183d9570f9 Fix bug where redeclaration of var doesn't deopt (#3559)
* Fix bug where redeclaration of var doesn't deopt. (Close T7470)

* [evaluate] Add tests for cases - let/const/different scopes
2016-08-17 19:23:09 -04:00
Erik Desjardins
aeb42c2228 Fix bug where path.evaluate treats repeated identifiers as undefined (#3557)
* babel-traverse: add test to demonstrate repeated identifiers being evaluated to `false`

* fix typo: `value` -> `val`

* path.evaluate: only mark item as resolved if we're confident
2016-08-04 16:58:41 -04:00
Sebastian McKenzie
b2390cca02 deopt on recursion in path.evaluate - fixes T7397 2016-06-19 22:08:39 +01:00
Amjad Masad
ec18fa0059 Add clearCache test 2016-03-07 12:50:57 -08:00
Amjad Masad
76eae9bcd8 add failing test 2015-12-22 20:47:08 -08:00
Amjad Masad
a5b9afbebe Make sure we always return when not confident 2015-12-21 02:04:16 -08:00
Amjad Masad
902d04b8f1 Failing test 2015-12-21 02:04:16 -08:00
Amjad Masad
57b2ccdb66 Test and workaround inference bugs 2015-12-18 03:15:27 -08:00
Amjad Masad
2a2cb4f160 Support ObjectProperty in purity check 2015-12-09 16:49:16 -08:00
Sebastian McKenzie
e72d4508de only use outer bindings when registering a binding to prevent retreiving function params - fixes #2615 2015-11-03 03:00:27 +00: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