11387 Commits

Author SHA1 Message Date
Henry Zhu
cde42329ac Merge pull request #658 from babel/expect
Syntax Error: add message with the plugin that should be enabled
2017-08-28 15:44:26 -06:00
Daniel Tschinder
19c099d116 Use expectPlugin 2017-08-28 17:31:58 -04:00
Daniel Tschinder
96bd271495 Fix tests 2017-08-28 17:31:58 -04:00
Daniel Tschinder
aec1bdb359 Enable no-case-declarations to prevent bugs and remove if (true) 2017-08-28 17:31:58 -04:00
Daniel Tschinder
dfb279f478 Add test for function. 2017-08-28 17:30:10 -04:00
Henry Zhu
de47b0423f rename folders, add more 2017-08-28 17:30:10 -04:00
Henry Zhu
2dbba25d1a change some things to expectPlugin 2017-08-28 17:30:10 -04:00
Moti Zilberman
cf3ebacf4f add expectPlugin which throws an error with the missing plugin 2017-08-28 17:30:09 -04:00
Buu Nguyen
75861fac87 Fix bug replacement nodes not requeued (#5743) 2017-08-28 15:10:00 -06:00
Brian Ng
2f76fc88be Fix regression with generic type and jsx (#702) 2017-08-28 14:51:37 -06: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
Henry Zhu
827d84536a Merge pull request #6156 from jridgewell/pr/5502
Fix overshadowing local binding
2017-08-28 13:38:21 -06:00
Justin Ridgewell
3e487f89ab Don't merge test options. (#6157)
* Don't merge test options.

Particularly, I don't want `lodash/merge` to merge my specific plugins
with the general test plugins. It led to odd behavior where I could
enable a loose transform in my specific test, just to have it overridden
by the test fixture's general options.

* Need options
2017-08-28 13:36:03 -06:00
Noah Lemen
40805894c5 default to spec mode for template literal transform (#6098)
* spec/loose/default switch for template literal transform, update/re-org tests

* update readme

* flip if statements

* consolidate else/if

* readme wording modification, updates to examples
2017-08-28 12:57:09 -06:00
Henry Zhu
95dd16aeeb Merge pull request #6159 from jridgewell/pr/3701
Allow native Symbols as computed property names
2017-08-28 12:50:10 -06:00
Justin Ridgewell
ac6eda2709 Class instance properties define their own context (#6158) 2017-08-28 12:47:17 -06:00
Karl Cheng
19bc694e7d Rename PrivateName.name to .id (#698)
Given that it refers to an identifier, it's somewhat confusing to have
to use .name.name to get the actual string. The type declared within
types.js is also incorrect, which this commit fixes.
2017-08-28 13:47:37 -04:00
Artem Yavorsky
7af44fce75 Merge pull request #401 from yuzhakovvv/feature/add-types-to-npmignore
Add `lib/types.js` to .npmignore
2017-08-27 15:14:19 +03:00
Oliver Don
960151c876 Fix #4840: Alias class prototype for methods in loose mode (#5560)
* Fix #4840: Alias class prototype for methods in loose mode

* Cleanup
2017-08-26 21:15:45 -04:00
Henry Zhu
6d24416645 7.0.0-beta.21 2017-08-26 12:05:26 -06:00
James Henry
acf0e65090 Apply location data fix to decorators plugin (#699) 2017-08-26 11:38:11 -04:00
Brian Ng
8f2f250144 Merge pull request #696 from babel/obj-rest-not-last
Throw if rest element is not in last position for object expressions
2017-08-26 09:57:51 -05:00
Brian Ng
2fa1f9929f
Throw if rest element is not in last position for object expressions 2017-08-26 09:34:33 -05:00
Brian Ng
083a44658c Enable optionalCatchBinding plugin for test262 tests (#697) 2017-08-26 12:14:56 +02:00
Justin Ridgewell
7795750862 Tests 2017-08-25 22:52:17 -04:00
Adam Miller
2d8fdf3045 Allow native Symbols as computed property names (#6705)
The for-in loop in helpers.defineEnumerableProperties doesn't iterate over Symbols.
If Object.getOwnPropertySymbols exists, include the discovered values when defining properties.
2017-08-25 22:33:51 -04:00
Brian Ng
6ba38a2a78 Merge pull request #693 from babel/trailing-comma-rest-param
Raise error if trailing comma after rest element in async func params
2017-08-25 20:12:59 -05:00
Brian Ng
a659ac6bda Merge pull request #695 from babel/issue691
Fix TypeScript TypeParameterDeclaration location start values
2017-08-25 20:12:47 -05:00
Justin Ridgewell
a70cda812c Remove old test 2017-08-25 19:52:15 -04:00
Justin Ridgewell
4b297907d1 Move fix into #checkBlockScopedCollisions 2017-08-25 19:23:11 -04:00
Moti Zilberman
48c114169f Move up check for binding kind "local"
This puts the check before the call to `checkBlockScopedCollisions`.
Fixes #4946.
2017-08-25 19:21:38 -04:00
Moti Zilberman
68786c4f0f Add test for issue #4946 2017-08-25 19:21:38 -04:00
Moti Zilberman
1ef5871300 Add tests for #5491 and related cases
The two function expression tests would fail before 6705de7. The
function declaration test was not a failing case but is added here for
completeness.
2017-08-25 19:21:38 -04:00
Moti Zilberman
c3e8715010 Mask existing "local" bindings when registering new binding
Fixes #5491.
2017-08-25 19:21:38 -04:00
Brian Ng
af2c974473
Fix TypeScript TypeParameterDeclaration location start values 2017-08-25 09:54:16 -05:00
James Henry
87b322cfc2
Add failing test case 2017-08-25 09:49:03 -05:00
Brian Ng
65db277364
Raise error if trailing comma after rest element in async func params 2017-08-24 21:59:01 -05:00
Brian Ng
c441afeaa6
Improve error message for comma after rest element in arrow func 2017-08-24 21:28:19 -05:00
Mauro Bringolf
d8b4073536 Consistent const violations (#6100)
* Changed updateExpression to report itself as violation instead of its argument

* Update getBindingIdentifiers to work with forXStatement and return proper node as violation

* Updated unaryExpression violation to be consistent with changes.
2017-08-24 21:19:02 -04:00
Brian Ng
27aae6c0f9 Merge pull request #686 from babel/invalid-label-declarations 2017-08-24 19:45:17 -05:00
Brian Ng
2bc124bf49
Fix some cases of keywords with escape sequences 2017-08-24 19:27:09 -05:00
Brian Ng
5e60ad6688
Fix some cases of invalid labeled declarations 2017-08-24 19:00:52 -05:00
Mateusz Burzyński
5d83e2692f Adjusted Object Rest/Spread syntax handling to the latest spec (#670) 2017-08-24 18:31:50 -05:00
Mateusz Burzyński
5df1139567 Test262 update (#692) 2017-08-24 17:42:04 -05:00
Mateusz Burzyński
3c4f19a28d Adjusted Object Rest/Spread tests to use only allowed syntax from the latest spec (#6102) 2017-08-24 15:50:43 -04: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
Sven SAULEAU
f0e49dceb5 Merge pull request #400 from devdevil666/feature/license
Change license year
2017-08-24 09:20:18 +02:00
Nikita Yuzhakov
93ebb58e28 Add 'lib/types.js' to .npmignore 2017-08-23 19:08:23 +03:00
Evgeniy
0507c067f4 Change license 2017-08-23 18:48:21 +03:00
Nicolò Ribaudo
4577bd1b7c TypeParameterInstantiation params can be "Flow" nodes, not "FlowType" (#6140) 2017-08-22 23:11:02 -04:00