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
9b229f1f08
Merge pull request #3414 from babel/flow-binding
...
Warn on Flow-based bindings and don't count as a const violation
2016-03-10 13:41:58 -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
fd7b1c3386
don't rely on scope to get the type alias
2016-03-10 12:13:05 -08:00
Amjad Masad
342f9d5eb5
Don't consider flow types as bindings
2016-03-10 11:48:14 -08:00
Sebastian McKenzie
986ac9950a
Merge pull request #3413 from babel/remove-babylon
...
Remove babylon
2016-03-09 22:36:28 -08:00
Sebastian McKenzie
0a490ef294
Remove babylon
2016-03-10 06:25:26 +00:00
Amjad Masad
7fb4133994
Merge pull request #3410 from babel/test-npmignore
...
add test to npmignores [ci skip]
2016-03-09 14:15:32 -08:00
Amjad Masad
a141bd9c1f
Update changelog with v6.7 and v6.7.1
2016-03-09 14:12:38 -08:00
Amjad Masad
fedd8bd50e
v6.7.1
2016-03-09 14:03:50 -08:00
Amjad Masad
facf6bc82f
Merge pull request #3411 from babel/hotfix-7197
...
[hotfix T7197] Use scope.moveBindingTo
2016-03-09 14:00:01 -08:00
Amjad Masad
07d2c15e99
quotes
2016-03-09 13:34:06 -08:00
Amjad Masad
3dd80a6b14
Update updateScopeInfo method to use moveBindingTo
2016-03-09 13:28:45 -08:00
Amjad Masad
8b4b02a5fb
[hotfix T7197] Use scope.moveBindingTo
...
I had deleted the binding and created a new one. I naively thought that
the analysis will automatically run again. But now discovered the method
I actually want to use: `scope.moveBindingTo` which moves the binding
and all the correct analysis. The only thing that was left to do is to
update `binding.kind` which I did manually.
2016-03-09 13:24:20 -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
bbdc308e92
Merge pull request #3409 from babel/sourcempa
...
Fix sourcemap generation for ES2015 modules
2016-03-08 16:42:36 -08:00
Amjad Masad
ad3d5bea44
Add more test cases
2016-03-08 15:28:29 -08:00
Amjad Masad
13dc2423f0
Fix auxiliary comment test
2016-03-08 13:59:34 -08:00
Amjad Masad
46ebd90acb
Test and fix export statement sourcemap
2016-03-08 13:47:02 -08:00
Amjad Masad
108838c66c
Copy source location to require statement for sourcemap generation
2016-03-08 13:38:24 -08:00
Logan Smyth
1da5cda3ab
Merge pull request #3408 from loganfsmyth/expand-regression-tests
...
Expand the regression tests for T2765.
2016-03-08 08:34:04 -08:00
Logan Smyth
af4575c43e
Expand the regression tests for T2765.
2016-03-08 08:15:42 -08:00
Amjad Masad
2f654650bb
Merge pull request #3407 from babel/async-tests
...
Async context tests
2016-03-08 02:00:40 -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
69773a45f4
Add more async context tests
2016-03-08 00:55:42 -08:00
Amjad Masad
57c6c4ea81
Add test for T2765
2016-03-08 00:47:18 -08:00
Amjad Masad
0200542e82
don't use Array.includes
2016-03-08 00:33:37 -08:00
Logan Smyth
bbc3401c71
Merge pull request #3405 from loganfsmyth/shadowing-fixes
...
Fix shadow function processing for async functions
2016-03-07 21:22:54 -08:00
Logan Smyth
de21f2ef77
Resolve 'arguments' for rest args relative to direct parent.
2016-03-07 20:45:21 -08:00
Logan Smyth
42d3844f24
Revert special arrow wrapper and avoid shadowing arguments.
2016-03-07 20:45:20 -08:00
Logan Smyth
51ddeade8a
Avoid renaming this bindings in simple arrow function cases.
2016-03-07 20:45:20 -08:00
Logan Smyth
db3a43869c
Remap across arrow function boundaries - fixes T7108
2016-03-07 20:45:19 -08:00
Logan Smyth
2e210927d8
Move the necessary exec transforms to the exec test.
2016-03-07 20:45:19 -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
891becffc1
Merge pull request #3363 from danez/patch-1
...
fix(babel-template): Fix Error in IE <= 9
2016-03-07 18:35:27 -08:00
Amjad Masad
3bebc3a7ca
lint
2016-03-07 18:26:51 -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
Henry Zhu
1f92e5a15c
Failing test for nested async with const
2016-03-07 13:59:03 -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
5d0645e308
Merge pull request #3381 from keijokapp/fix-named-functionexpression-scoping-issue
...
Fix named async FunctionExpression scoping issue.
2016-03-07 13:39:52 -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