10993 Commits

Author SHA1 Message Date
Henry Zhu
c8b32485a0 Update readme - es2017 [skip ci] 2016-08-23 17:47:20 -04:00
Daniel Tschinder
27ad69d43f Fix declare class with qualified type identifier (#97)
This makes declare class extends behave the same way as in flow
The ast-token after the extends keyword, might be either Identifier or
QualifiedTypeIdentifier

To do that this commits splits the parseGenericType into two functions,
one for parsing genericType and on for qualifiedTypeIdentifier
2016-08-23 17:29:23 -04:00
Dan Harper
efab40154e Fix arrow functions with destructuring, types & default value (#94)
Flow's "toAssignable" override wasn't calling the inner function,
resulting in the destructuring in an AssignmentPattern not having the
node type changed from ObjectExpression to ObjectPattern, resulting in
"Binding rvalue" thrown from "checkLVal()"
2016-08-23 17:27:39 -04:00
Daniel Tschinder
db0705bc51 Fix issues with flow-types and async function (#95)
the typeAnnotation was not correctly resolved in async
functions
2016-08-23 17:22:01 -04:00
Daniel Tschinder
2cfae60b15 Fix issues with default object params in async functions (#96)
This change allows async functions to have a spread argument which
defines a default value.
2016-08-23 17:19:49 -04:00
Daniel Tschinder
4506822180 Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas (#98)
* This removes the exponentiationOperator as it is now in es2016

* Remove from tests

* Remove asyncFunctions and restructure test dirs

* Remove trailingFunctionCommas
2016-08-23 17:11:01 -04:00
Daniel Tschinder
10cd6519d8 Fix class inheritance in IE <=10 (T3041) (#3527)
* Fix class inheritance in IE9 & IE10 (T3041)

Internet Explorer 9&10 do not support __proto__ at all, don't have
Object.setPrototypeOf(), but have Object.getPrototypeOf().

Because of this setting the prototype is not possible, which makes the
babelHelpers.inherits() function to set __proto__ although not supported.

Afterwards Object.getPrototypeOf() is used, but this one is not
respecting the "custom" property __proto__ that we set.

The solution is to check for __proto__ first and afterwards fallback to
Object.getPrototypeOf().

* Do the same logic in babel-helper-replace-supers

* Fix tests

* Extract creation of prototype nodes to small helper
2016-08-23 15:08:44 -04:00
Thomas Aylott
2a4186faf3 Fixes #6726 ignore config option (#3644)
https://phabricator.babeljs.io/T6726
2016-08-23 14:55:37 -04:00
Diogo Franco
53ed4e5eb8 Support 'spec' option on babel-preset-es2015 (#3671)
Allows enabling the spec options in the couple of presets that have it.

Generally enables a slower, but more correct codepath.
2016-08-23 14:28:19 -04:00
Henry Zhu
3bf479789d add options to babel-preset-latest (#3673) 2016-08-23 14:27:43 -04:00
Diogo Franco
1e6257bdcb Fixes modules test to actually test modules (#3672)
* Fixes modules test to actually test modules

It is a mystery how these tests ever passed before.

* Correct test -> suite
2016-08-23 14:06:02 -04:00
Sota Yamashtia
3d0ef3a001 Create preset babel-preset-latest (#3625) 2016-08-23 11:07:23 -04:00
Henry Zhu
20551cf729 Docs: add babel-preset-es2017, change version [skip ci] 2016-08-23 09:32:30 -04:00
Sota Yamashtia
68d7032e0f Add es2017-preset (#3624) 2016-08-23 09:29:38 -04:00
Daniel Tschinder
b06eed30c3 Ensure correct version of babel installed for preset options (#3668) 2016-08-22 08:49:56 -04:00
Greenkeeper
0a8fc15169 chore(package): update istanbul to version 0.4.5 (#3666)
https://greenkeeper.io/
2016-08-22 11:27:17 +02:00
Guy Bedford
de2791a696 ensure consistent expression value for post-assignment unary expressions (#3650) 2016-08-20 12:21:17 -04:00
Paul O’Shannessy
55f37a1b1e Use arrow syntax for ObjectTypeProperty FunctionTypeAnnotations (#3663)
This fixes an issue where optional properties would get transformed to
an invalid syntax. The easiest solution was to make all FunctionTypes
get transformed to the arrow syntax (previously everything went the
other way).
2016-08-20 10:37:56 -04:00
Sebastian McKenzie
07b3dc18a0 Add wrapPluginVisitorMethod option to allow introspection and metrics tracking of plugins (#3659) 2016-08-20 10:36:52 -04:00
Daniel Tschinder
ea69362249 set sourceRoot in babel-register transform (#3608) 2016-08-18 22:42:57 +02:00
Adam Leventhal
0d1e1ee10c incorrect handling of returns nested in switch cases (#3618) 2016-08-18 10:14:07 -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
Daniel Tschinder
b6496718a7 Correct codecoverage paths (#93) 2016-08-17 18:21:25 +02:00
Sebastian McKenzie
4a19661346 Generate names field for identifiers to get correct names mappings (#3658) 2016-08-16 13:43:55 -04:00
Kai Cataldo
aa51dd4a3d Throw error for multiple exports default (#3518)
Fixes https://phabricator.babeljs.io/T7242
2016-08-16 13:21:00 -04:00
Daniel Tschinder
8bef3156be Correct code example 2016-08-16 19:07:56 +02:00
Daniel Tschinder
308de41992 Add support for the new declare module.exports of flow. (#3570) 2016-08-16 16:54:00 +02:00
Daniel Tschinder
56c7d5a67d Update CHANGELOG.md [skip ci] (#91) 2016-08-16 16:34:51 +02:00
Logan Smyth
2aaee8b8d4 Strip flow-only class props without needing transform-class-properties. (#3655) 2016-08-16 10:30:04 -04:00
Henry Zhu
043da1a26a Revert "Revert "Use es2015 loose mode after publish (#3639)"" (#3645)
This reverts commit a2d66c0fc8ee58e82be3efd59173803e66dee3e0.
2016-08-16 16:28:05 +02:00
Sebastian McKenzie
dc6a5d2f86 6.9.0 2016-08-16 15:11:06 +01:00
Sebastian McKenzie
4af484b805 Merge pull request #65 from danez/fix-syntax-error-pos
Fixes SyntaxError position with flow optional type
2016-08-16 15:06:25 +01:00
Sebastian McKenzie
43cdd2f5b0 Merge pull request #57 from danez/fix-arrow-location
Fix arrow param locations with flow types
2016-08-16 15:06:19 +01:00
Sebastian McKenzie
0b87d4c97c Add identifier name to node loc field (#90) 2016-08-16 09:41:10 -04:00
Henry Zhu
090f8cd10f Internal: remove comments (#3657) 2016-08-15 11:40:10 -04:00
Jordan Scales
ca27cf135d Revert "Merge pull request #3641 from babel/guy-fieri" (#3646)
This reverts commit 033681af8941d9678961f985c13e500c3c70f337, reversing
changes made to a2d66c0fc8ee58e82be3efd59173803e66dee3e0.

I brought you into this world, and I can take you out.
2016-08-15 11:35:39 -04:00
Daniel Tschinder
69e914baeb Set correct include patterns for code-coverage 2016-08-14 12:39:41 +02:00
Greenkeeper
2abef9dbaa chore(package): update nyc to version 8.0.0 (#88)
https://greenkeeper.io/
2016-08-14 12:37:25 +02:00
Greenkeeper
0b23e5cc2d chore(package): update babel-plugin-istanbul to version 2.0.0 (#89)
https://greenkeeper.io/
2016-08-14 12:27:05 +02:00
Henry Zhu
d034c24b8e Initial commit 2016-08-13 23:48:33 -04:00
Marcelo Jorge Vieira
a61596472a Fixed typo in README.md (#3651)
Replaced 'seperate' with 'separate'
2016-08-12 10:39:00 +02:00
Sebastian McKenzie
033681af89 Merge pull request #3641 from babel/guy-fieri
Fix exports of babel-core
2016-08-09 10:52:26 +10:00
James Kyle
10f4546fef Remove unnecessary import 2016-08-08 17:34:01 -07:00
James Kyle
f36d07d303 Fixes from PR comments 2016-08-08 17:32:58 -07:00
James Kyle
a2d66c0fc8 Revert "Use es2015 loose mode after publish (#3639)"
This reverts commit 154922c0f76ad9fcbf2d08f3835cd8cd94e84499.
2016-08-06 12:33:07 -07:00
Greenkeeper
0a6d333531 chore(package): update ava to version 0.16.0 (#86)
https://greenkeeper.io/
2016-08-06 18:29:38 +02:00
James Kyle
9eb12e2c34 Fix lint 2016-08-05 12:40:50 -07:00
James Kyle
fd89bd136f Fix exports of babel-core 2016-08-05 12:36:08 -07:00
Henry Zhu
154922c0f7 Use es2015 loose mode after publish (#3639) 2016-08-05 10:23:45 -04:00
Brian Donovan
a1c0b5a118 Update test name to reflect reality. (#3640)
Originally pointed out by @Kovensky in https://github.com/babel/babel/pull/3635#discussion_r73652441.
2016-08-05 10:12:33 -04:00