90 Commits

Author SHA1 Message Date
Henry Zhu
12f9cd0826 v6.18.0 2016-10-24 17:18:36 -04:00
Dan Harper
7f772e94ce retain method return types on transform-es2015-classes (closes #4665) (#4668) 2016-10-04 18:22:29 -04:00
Henry Zhu
174e44f656 fix broken test from old PR 2016-08-31 14:55:38 -04:00
Stanislav Sysoev
33da726638 Not null check in babel-helper-builder-binary-assignment-operator-visitor (#3647)
Fix: T7537 — https://phabricator.babeljs.io/T7537

When transforming super call in class constructor, part of ast is replaced using method "replaceWithMultiple" here:
https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-es2015-classes/src/vanilla.js#L379

It leads to removing the node (replacing it with null) here:
https://github.com/babel/babel/blob/master/packages/babel-traverse/src/path/replacement.js#L51

But parent ExpressionsStatement is still untouched and when it reaches visitor generated in here
https://github.com/babel/babel/blob/master/packages/babel-helper-builder-binary-assignment-operator-visitor/src/index.js#L18

It blows up because expression is null from previous visitors.
2016-08-31 14:41:49 -04:00
Henry Zhu
5ce325c399 v6.14.0 2016-08-24 17:40:46 -06: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
Henry Zhu
cf6304a34b v6.9.0 2016-05-17 14:49:17 -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
696c74933a v6.7.7 2016-04-20 20:09:20 -07:00
Logan Smyth
7d6d4c204b Create a duplicate class identiier to avoid sharing 'loc'. 2016-04-10 21:18:33 -07:00
Henry Zhu
57ef6a2b6a v6.6.5 2016-03-04 18:16:17 -05:00
Henry Zhu
3689cae8e5 Merge pull request #3399 from babel/flow-comments
use flow instead of flow-comments
2016-03-04 16:24:28 -05:00
Henry Zhu
937b8a6767 use flow instead of flow-comments 2016-03-04 15:50:05 -05:00
Amjad Masad
3667527d04 Revert "Remove flow"
This reverts commit 2827ff6b01dcce69e9d3c0402e96b52b3a2a47ee.
2016-03-03 14:49:20 -08:00
Henry Zhu
39a8f5b796 v6.6.4 2016-03-02 16:29:17 -05:00
Sam Goldman
2827ff6b01 Remove flow 2016-03-01 22:33:30 -08:00
Henry Zhu
f34e6518ff v6.6.0 2016-02-29 16:12:12 -05:00
Sebastian McKenzie
5b89849f43 Switch to klint, fix some lint rules 2016-02-14 23:25:14 +00:00
Henry Zhu
b1bb39e733 v6.5.2 2016-02-12 11:29:58 -05:00
Henry Zhu
5a271b091a Docs: update plugin readmes with options [ci skip] 2016-02-10 18:12:58 -05:00
Henry Zhu
f9f8ad6eff v6.5.0 2016-02-06 19:06:41 -05:00
Henry Zhu
ad81f5b149 check if valid.id is defined 2016-01-22 14:20:54 -05:00
Henry Zhu
e152e7044e v6.4.5 2016-01-19 18:02:31 -05:00
Amjad Masad
95c93dd22b Method names should not be bound to body
As an artificat of compiling methods to named function expressions the
function name is being considered a "local" binding in the function
body. This means that we will throw errors anytime someone would want to
create a new local binding with the same name.

This is solved by assigning a symbol to function Identifiers that
indicates that they should not be considered local bindings.
2016-01-17 13:19:37 -08:00
Henry Zhu
8cac20d845 v6.4.0 2016-01-06 15:34:12 -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
Henry Zhu
3f7019f964 v6.3.15 2015-12-06 11:31:46 -05:00
James Kyle
abb85b498a Merge pull request #3138 from loganfsmyth/class-rename-failure-T2494
Skip name inference on hard-to-replace classes - fixes T2494
2015-12-05 20:58:37 -08:00
Logan Smyth
925804798d Skip name inference on hard-to-replace classes - fixes T2494 2015-12-05 17:07:10 -08:00
Logan Smyth
9f32061769 Merge pull request #3134 from loganfsmyth/default-renamer-T6750
Ensure that default exports have a name before splitting them - fixes T6750
2015-12-05 16:23:39 -08:00
Logan Smyth
a12a116b9f Ensure that default exports have a name before splitting them - fixes T6750 2015-12-05 15:28:48 -08:00
Logan Smyth
03f189fc46 Ensure that the async/generator flags carry over when converting class methods - fixes T6755 2015-12-05 12:24:00 -08:00
Sebastian McKenzie
7b36967416 v6.3.13 2015-12-04 22:56:51 +11:00
Sebastian McKenzie
ae831c2270 v6.3.12 2015-12-04 22:56:13 +11:00
Henry Zhu
b515fa8db8 v6.3.2 2015-12-03 22:48:04 -05:00
phantom10111
9a270a3d0a Fix return super(); in class constructor - fixes T2997 2015-11-25 23:53:53 +01:00
Sebastian McKenzie
3c5bced67d v6.2.2 2015-11-19 14:45:57 -08:00
Logan Smyth
b3f2ea0aa1 Avoid duplicating traversal of class declarations - fixes T2694 2015-11-19 00:30:56 -08:00
Sebastian McKenzie
ac90ea20ea v6.2.0 2015-11-18 20:33:47 -08:00
Daniel Lo Nigro
0076204f80 Fix Flow.
Removed `@flow` annotation from files that don't actually pass Flow check at the moment. These will be added back file by file once the files are properly converted to use Flow.

Closes #3064
2015-11-15 21:30:22 -08:00
Sebastian McKenzie
11e50695d3 v6.1.21 2015-11-13 16:57:03 -08:00
Sebastian McKenzie
01356191d4 avoid revisiting classes - #2694 2015-11-13 16:55:54 -08:00
Sebastian McKenzie
5b6a39f227 v6.1.20 2015-11-13 03:38:54 -08:00
Sebastian McKenzie
688dcec6a3 fix queueing of nested paths being pushed onto the priority queue 2015-11-13 03:37:15 -08:00
Sebastian McKenzie
4a1e5c17b4 v6.1.18 2015-11-12 13:46:30 -08:00
Sebastian McKenzie
23fd185590 v6.1.17 2015-11-12 13:40:25 -08:00
Sebastian McKenzie
c4c66687ea v6.1.16 2015-11-12 13:33:20 -08:00