Henry Zhu
9ac326b075
remove es20xx prefixes from plugins and rename folders ( #6575 )
2017-10-28 20:43:15 -04:00
Henry Zhu
5b47e4a6cb
Merge transform-async-to-module-method into transform-async-to-generator ( #6573 )
2017-10-27 17:14:40 -04:00
Mateusz Burzyński
4684edaec7
Adhering to async generator yield behavior change ( #6452 )
2017-10-21 21:48:27 +02:00
Henry Zhu
691f90a774
Scoped: change test imports to @babel/ [skip ci]
2017-10-16 22:49:56 -04:00
Mateusz Burzyński
88b7983e4f
Fixed asyncToGenerator helper using arrow function ( #6289 )
2017-09-21 17:09:43 -07:00
Pranav Prakash
e98bb3dc60
Use new Array instead of Array for V8 optimization ( #6250 )
...
* Use new Array instead of Array for V8 optimization
* fix spacing [skip ci]
* Remove extraneous use strict clauses
2017-09-18 14:14:46 -04:00
Logan Smyth
1e750a945c
Convert CommonJS to use new shared implementation.
2017-09-12 17:17:41 -07:00
Artem Yavorsky
b2b3d7944a
Spec compatibility for iteratorClose condition. ( #6094 )
...
* for-of: IteratorClose spec compatibility.
See #3 :
https://tc39.github.io/ecma262/#sec-iteratorclose
* Update spec fixtures for for-of.
* Fix IteratorClose case for remap-async-to-generator.
* Fix IteratorClose case for async-generator-function test output.
* Modify few tests according to iteratorClose fix.
* Fix iteratorClose for helpers.slicedToArray also.
* Update iteratorClose fixture for commonjs.
2017-08-28 13:39:02 -06:00
Noah Lemen
2db0c3ad1d
linting: disallow t.identifier("undefined") in plugins ( #6096 )
...
* add new custom eslint rule, replace remaining t.identifier("undefined") with buildUndefinedNode(), update tests
* change no-undefined-identifier reporting descriptor
2017-08-24 15:43:01 -04:00
Henry Zhu
0f823beeb1
Newlines in fixtures ( #6044 )
...
* write newlines for fixtures
* rerun fixtures
2017-08-02 15:35:29 -04:00
Justin Ridgewell
51ff4dd936
Fix async-to-generator ForAwait transform ( #5932 )
...
The old transform called an external `babel-traverse`, which doesn’t
does something funky.
2017-07-09 23:49:44 -05:00
Daniel Tschinder
b3372a572d
Remove whitespace generation ( #5833 )
...
* Remove whitespace generation and rely on default printing
Changes to printing:
* Add newline after last empty SwitchCase
* Add newlines around block comments if they are non-flow comments or contain newlines
* Fix a few more fixtures
2017-06-27 21:57:02 -05:00
Henry Zhu
123dce5fcd
Hardcode to double quotes, indent to 2 spaces ( #5824 )
2017-06-05 22:14:37 -05:00
Buu Nguyen
f58f4ac351
Fix incorrect destructuring in for loop let initialization ( #5763 )
...
* Fix incorrect destructuring in for loop `let` initialization
* Improve approach and fix tests
2017-05-31 15:29:50 -04:00
Logan Smyth
6646707e01
Fix 'Unhandled promise rejection (rejection id: 1): ReferenceError: setTimeout is not defined' warning.
2017-05-05 14:13:11 -07:00
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
Steven Hargrove
d5aa6d3ff8
Fix for #4943 "Calling an async function with default parameter as function for arguments checking handled synchonous" ( #5688 )
...
* moved applying arguments inside new Promise handler block
* updated test fixture to reflect change
* corrected the apply to use correct scope and arguments
* added regression test for issue #4943 , added async-to-generator/async-default-arguments test
* added regression test for issue #4943
* switched back to using arrow function, since now pointing to v7 release base branch
* simplified async-to-generator regression test for issue #4943 , imrproved change to self/arguments refs by using arrow function on returned promise
* updated text fixtures
* removed es2015 preset usage from issue #4943 regression exec test
* added use strict to test fixture
* added use strict to test fixture
* added destructing transform to test options
* removed use strict from exec test
* added parameters & destructing transforms to test
2017-05-03 21:44:41 -07:00
Henry Zhu
2a874dff8c
fix the fixtures after PR was merged
2017-04-06 14:14:15 -04:00
Diogo Franco
452f8f150c
Always use the native (or polyfilled) Promise in transform-async-to-generator ( #5536 )
...
* Always use the native (or polyfilled) Promise in transform-async-to-generator
Fixes #5531
* Simplify scope handling to only un-shadow the Program's Promise
Only the helper needs to see the native Promise.
2017-04-06 11:17:31 -04:00
Henry Zhu
b363e7b199
add @danez's changes
2017-03-01 12:54:22 -05:00
Sergey Rubanov
292c3ca206
Refactor test packages to use ES modules instead of CJS ( #5138 )
2017-01-16 11:25:04 -05:00
Logan Smyth
5aa87aab8d
Calculate the correct arity for async functions with destructuring - fixes #4977 ( #4978 )
2016-12-08 21:51:24 -05:00
Logan Smyth
80dfdd2a43
Only base async fn arity on non-default/non-rest params - fixes #4891 ( #4901 )
2016-12-08 09:48:15 -05:00
lion
862b387ad7
👕 Fix crlf to lf ( #4837 )
2016-11-13 21:42:08 +01:00
Justin Ridgewell
15eeeb6559
Fix line endings ( #4793 )
2016-10-28 23:44:00 -04:00
Dan Harper
682e9658c9
Fix bodyless async functions ( #4600 )
...
* fix bodyless async functions (#4599 )
* Do the same in the async-generator-functions transform
2016-09-29 12:01:37 +02:00
zenparsing
26e79c5433
Implement support for async generator functions and for-await statements
2016-09-27 17:37:21 -04:00
Logan Smyth
231f27f170
Fix non-unique 'ref' binding name - fixes T7468
2016-06-28 19:16:44 -07: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
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
keijokapp
105299f26d
Fix named FunctionExpression scoping issue.
2016-02-29 19:21:48 +02:00
Erik Desjardins
84af53d356
Async function will be hoisted above some imports
...
...but it's still below `exports.foo = undefined;`, so the test is intact
2016-02-03 12:11:14 -05:00
Erik
e759b5f835
Add exec test for T6882 (async function hoisting)
2016-02-03 12:11:08 -05:00
Erik
ec61bd9386
Revert "Don't mark async functions as hoist"
...
This reverts commit d34cb69912ee5789c7d1029c3be75d22d13e7bf8.
2016-02-02 22:13:26 -05:00
Amjad Masad
7428654c19
Merge pull request #3290 from AgentME/exportAsyncTest
...
Add test for T3026
2016-02-02 16:55:58 -08:00
horpto
d0a932d0e8
[hotfix][T2765#72428] Wrong 'this' for nested arrow in arrow function
2016-01-22 10:29:04 +05:00
Chris Cowan
7621d38bbd
Add test for T3026.
2016-01-20 12:11:57 -08:00
Amjad Masad
9980b6b8b2
[hotfix][T7006] Arrow functions don't have arguments bound
2016-01-20 00:41:17 -08:00
horpto
5ac022ab9b
4 -> 2 spaces tab size
2016-01-13 15:37:20 +05:00
horpto
fa9f8ea4be
Fix for deeply nested async arrows
2016-01-11 04:37:16 +05:00
horpto
f2fdc74d1b
[2765] transform-async-to-generator doesn't work for this inside arrow
...
function
2016-01-10 21:52:04 +05:00
Amjad Masad
0d8e5a9e86
Fix over-parenthesizing of function expressions
2015-12-24 14:55:51 -08:00
Sebastian McKenzie
1fa24b1efd
rename babel-plugin-external-helpers-2 to babel-plugin-external-helpers
2015-12-24 03:54:40 +00:00
Sławomir Laskowski
d34cb69912
Don't mark async functions as hoist
...
`babel-template` no longer crashes in IE attempting to access unpopulated error stack
2015-11-29 01:47:24 +01:00
Sebastian McKenzie
15969a0904
move all plugin tests out of babel-core and into their appropriate folders
2015-11-08 23:04:10 -08:00