187 Commits

Author SHA1 Message Date
Henry Zhu
6ab3e35075 v6.13.0 2016-08-04 19:34:51 -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
Henry Zhu
698ef139bc v6.12.0 2016-07-27 15:23:17 -04:00
Sebastian McKenzie
3b4b3656a8 Fix React constant elements transform from hoisting elements to positions where their referenced bindings haven't been evaluated yet (#3596) 2016-07-27 10:54:21 -04:00
Henry Zhu
6e58954bce v6.11.4 2016-07-19 21:59:53 -04:00
Jhen
e464b9ab87 Add block if parent is no block statement for remove-console/debugger 2016-07-19 12:56:29 +08:00
Logan Smyth
faf024ad44 v6.10.4 2016-06-21 09:43:33 -07:00
Sebastian McKenzie
b2390cca02 deopt on recursion in path.evaluate - fixes T7397 2016-06-19 22:08:39 +01:00
Henry Zhu
cf6304a34b v6.9.0 2016-05-17 14:49:17 -04:00
dlwalsh
cdb465a834 remove repeating dependency from babel-traverse (#3501) 2016-05-16 09:54:37 -04:00
Amjad Masad
109d99bb5e don't double count binding references (#3465)
When, for example, a function is moved between from one place to another we recrawl and end up double counting any references it holds to the upper scope. This protects against that. (The same thing is done for constant violations in the `reassign` method)
2016-05-13 17:20:32 -04:00
Jordan Klassen
dc1f40540d Upgrade to lodash 4 (#3315)
* Upgrade to lodash 4

* Fix incorrect require in babel-runtime/scripts

* Replace cloneDeep with cloneDeepWith where applicable
2016-05-13 17:15:14 -04:00
Logan Smyth
9843c87573 Fix block statement code style. (#3493) 2016-05-02 21:15:37 -04:00
Henry Zhu
05bf216339 v6.8.0 2016-05-02 19:43:49 -04:00
Henry Zhu
4c23b01798 change plugins to use babel-runtime 6 2016-04-24 20:06:23 -04:00
Logan Smyth
0130c6c186 v6.7.6 2016-04-08 09:27:12 -07:00
Logan Smyth
c3ccddaaaf Revert "Merge pull request #3433 from loganfsmyth/bail-out-rename"
This reverts commit 2d0a007d14e519fe60a849dd17068a0f3df79a28, reversing
changes made to e4d6d420415a0c290a321fb6c18ba5f19675b5c1.
2016-04-08 09:09:48 -07:00
Logan Smyth
89ecbda25c v6.7.5 2016-04-07 20:24:49 -07:00
Logan Smyth
2d0a007d14 Merge pull request #3433 from loganfsmyth/bail-out-rename
Only attempt to rename export declarations, not expressions - fixes T7215
2016-04-06 19:04:21 -07:00
nkzawa
85ecb6c97b stop traversing when target type is found 2016-03-28 03:01:06 +09:00
Logan Smyth
bad2c768f2 Remove this check which will never pass with the new cache. 2016-03-23 20:57:18 -07:00
Logan Smyth
6470426f7a v6.7.4 2016-03-22 20:37:46 -07:00
Logan Smyth
078f6c0ed3 Only attempt to rename export declarations, not expressions - fixes T7215 2016-03-16 23:26:52 -07:00
Simeon Willbanks
93d438cf01 Fix misspelling 2016-03-16 22:17:09 -07:00
Henry Zhu
459b1ffa1c Merge pull request #3420 from loganfsmyth/scope-cache-invalidation
Invalidate the scope cache if a node is moved to a different path - fixes T7194
2016-03-16 23:18:48 -04:00
Logan Smyth
80aa424b75 Invalidate the scope cache if a node is moved to a different path - fixes T7194 2016-03-12 14:21:21 -08:00
Logan Smyth
b1c50b01f2 Ensure that we push and pop evenly so things don't fail to queue - fixes T7199 2016-03-12 12:30:33 -08:00
Amjad Masad
5373733b8d v6.7.3 2016-03-10 17:35:55 -08:00
Amjad Masad
4abc03eef1 Rework logic that controls flowBinding warning
The flag to control whether we should warn didn't take into account
nested calls or scope chains. An easier approach is to have a
counter. That way we know for sure if we're somewhere deep inside a
crawl call or not.
2016-03-10 16:39:12 -08:00
Amjad Masad
de92d632f3 v6.7.2 2016-03-10 14:41:27 -08:00
Amjad Masad
5a081a8572 Update comment, reformat message 2016-03-10 13:00:45 -08:00
Amjad Masad
9f0dbf0234 Better warnings 2016-03-10 12:54:02 -08:00
Amjad Masad
7f4b57a7a4 Add warning instead of removing support 2016-03-10 12:35:15 -08:00
Amjad Masad
342f9d5eb5 Don't consider flow types as bindings 2016-03-10 11:48:14 -08:00
Henry Zhu
0cc53dafc0 add test to npmignores [ci skip] 2016-03-08 22:33:23 -05:00
Amjad Masad
3d5969ecff v6.7.0 2016-03-08 16:52:45 -08:00
Amjad Masad
b35013abe5 Merge pull request #3406 from babel/fix-scope-info
Update scope info after block-scoping transform
2016-03-08 00:57:18 -08:00
Amjad Masad
0200542e82 don't use Array.includes 2016-03-08 00:33:37 -08:00
Logan Smyth
de21f2ef77 Resolve 'arguments' for rest args relative to direct parent. 2016-03-07 20:45:21 -08:00
Logan Smyth
836f398619 Re-use central inShadow logic. 2016-03-07 20:45:19 -08:00
Logan Smyth
8b8e3ddbec Flatten inShadow logic for readability. 2016-03-07 20:45:18 -08:00
Amjad Masad
77c7cc5363 Rework scope info updating in block-scoping transform
I previously tried an approach to scope bindings from var to scope but
it didn't catch all cases. This is evident in this bug:

https://phabricator.babeljs.io/T2892

Where even after transforming a const to a var we still get an error
that it's read-only.

This approach will go through and delete every existing let and const
binding and creates a new one with the kind "var"
2016-03-07 18:19:10 -08:00
Amjad Masad
60d773f370 Merge pull request #3393 from babel/cache
Move NodePath cache out of the AST
2016-03-07 13:57:47 -08:00
Amjad Masad
ec18fa0059 Add clearCache test 2016-03-07 12:50:57 -08:00
Amjad Masad
d5e78384ef Only export methods and not the entire cache 2016-03-07 12:50:29 -08:00
Amjad Masad
fc19ac2af5 Remove merge artificats 2016-03-07 12:05:46 -08:00
Amjad Masad
403d6153fd correct cache path 2016-03-07 12:04:44 -08:00
Amjad Masad
b53755422c Move things around 2016-03-07 12:04:44 -08:00
Amjad Masad
bf91a68375 Move scope cache to the cache module 2016-03-07 12:04:44 -08:00
Amjad Masad
3c148148bc Semicolon 2016-03-07 12:04:44 -08:00