Henry Zhu
ab68800e06
v7.0.0-alpha.3
2017-03-23 15:49:01 -04:00
Nitin Tulswani
8c1cd177b2
added examples for transforms. [skip ci] ( #5393 )
2017-03-14 09:43:51 -05:00
Henry Zhu
230712e091
Internal: back to fixed, publish everything ( #5436 )
2017-03-08 22:56:00 -05:00
Brian Ng
8a82cc060a
Run new lint rules ( #5413 )
2017-03-04 10:46:01 -05:00
Henry Zhu
11e54a6bd3
v7.0.0-alpha.1
2017-03-02 16:04:47 -05:00
Daniel Tschinder
6c03cb0783
Merge branch 'master' into merge-master
...
# Conflicts:
# lerna.json
# packages/babel-cli/package.json
# packages/babel-core/package.json
# packages/babel-generator/package.json
# packages/babel-helper-builder-react-jsx/package.json
# packages/babel-helper-function-name/package.json
# packages/babel-helper-optimise-call-expression/package.json
# packages/babel-helper-replace-supers/package.json
# packages/babel-helper-transform-fixture-test-runner/package.json
# packages/babel-helpers/package.json
# packages/babel-plugin-transform-class-properties/package.json
# packages/babel-plugin-transform-es2015-block-scoping/package.json
# packages/babel-plugin-transform-es2015-classes/package.json
# packages/babel-plugin-transform-es2015-modules-commonjs/package.json
# packages/babel-plugin-transform-es2015-modules-systemjs/package.json
# packages/babel-plugin-transform-es2015-modules-umd/package.json
# packages/babel-plugin-transform-es2015-parameters/package.json
# packages/babel-plugin-transform-react-jsx/package.json
# packages/babel-register/package.json
# packages/babel-template/package.json
# packages/babel-traverse/package.json
# packages/babel/package.json
2017-02-14 12:46:23 +01:00
Logan Smyth
48573f1fb4
v6.23.0
2017-02-13 17:14:12 -08:00
Henry Zhu
9083bd6283
Merge branch 'master' into 7.0
2017-02-09 18:36:02 -05:00
Logan Smyth
b845f2b69d
Re-enable the max-len ESLint rule. ( #5265 )
2017-02-04 11:07:15 -05:00
Kai Cataldo
e09ea222c9
Remove babel-runtime from packages' dependencies ( #5218 )
2017-01-27 09:04:35 -05:00
Henry Zhu
e9fc38bcd3
v6.22.0
2017-01-19 19:33:22 -05:00
Brian Ng
8c35b320d3
Bump eslint-config-babel and fix lint ( #5129 )
2017-01-17 10:51:16 +01:00
Sergey Rubanov
292c3ca206
Refactor test packages to use ES modules instead of CJS ( #5138 )
2017-01-16 11:25:04 -05:00
Henry Zhu
672adba9a1
enable prefer const ( #5113 )
2017-01-14 09:48:52 -05:00
Sven SAULEAU
982850731e
fix: [skip ci] consistent documentation ( #5111 )
2017-01-14 09:45:20 -05:00
Henry Zhu
77d9e3e5c4
v6.21.0
2016-12-16 16:55:53 -05:00
Henry Zhu
bfe4faa0d9
fix tests
2016-12-16 11:50:57 -05:00
Justin Ridgewell
852348d700
Fix default parameter - rest parameter edge case ( #3572 )
...
When the rest parameter shared the same name as a default identifier
for a param, the loop would be hoisted outside the function!
```js
var a = 1;
for (var _len = arguments.length, a = Array(_len > 1 ? _len - 1 : 0),
_key = 1; _key < _len; _key++) {
a[_key - 1] = arguments[_key];
}
function foo2() {
var b = arguments.length <= 0 || arguments[0] === undefined ? a :
arguments[0];
assert.equal(b, 1);
}
foo2(undefined, 2);
```
And if you tried to reference any index or `#length`, it’d blow up and
refuse to transpile.
2016-12-16 10:53:52 -05:00
Tommaso
27e201e0e1
Update plugins READMEs from babel.github.io [skip ci] ( #4931 )
2016-12-02 17:07:16 -06:00
Brian Ng
f71efbce92
Update transform-es2015 READMEs from babel.github.io [skip ci] ( #4926 )
...
Signed-off-by: Brian Ng <bng412@gmail.com>
2016-12-01 16:11:36 -05:00
Henry Zhu
e86f62b304
README: add --save-dev [skip ci]
...
Closes gh-4910
2016-11-29 08:40:27 -05:00
Sven SAULEAU
2311b5b53a
README: remove dollar in sh snippets [skip ci]
2016-11-29 08:39:23 -05:00
Henry Zhu
12f9cd0826
v6.18.0
2016-10-24 17:18:36 -04:00
Brian Ng
dfe896dd54
Avoid unnecessary +0 in transform-es2015-parameters ( #4738 )
2016-10-17 17:09:55 +02:00
Moti Zilberman
9fc51d6292
Consolidate contiguous var declarations in destructuring transform ( #4690 )
...
* Consolidate contiguous var declarations in destructuring transform
Fixes #3081 .
* Simplify var node coalescing in es2015-destructuring
* Revert "Simplify var node coalescing in es2015-destructuring"
This reverts commit 15cb373f0726f68225f7080a7ae206a63af174ee.
* More careful condition for var coalescing in es2015-destructuring
2016-10-14 11:51:22 -04:00
Dan Harper
33eb56ab09
fix error when constructor default arg refers to own static property or self ( #4666 )
...
(closes #4253 )
(closes #4442 )
2016-10-05 17:52:42 -04:00
Moti Zilberman
0366d1ad19
Handle side effects correctly in rest params index expressions ( #4348 ) ( #4674 )
2016-10-05 21:59:41 +02:00
Moti Zilberman
12d2673038
Add test for rest params name collision with top-level name ( #4333 ) ( #4673 )
2016-10-05 10:15:04 -04:00
Henry Zhu
e50b3c890f
v6.17.0
2016-10-01 15:23:18 -04:00
Daniel Tschinder
16716ea3de
Fix rest parameters with flow type casting ( #4636 )
...
Do not skip TypeCastExpressions when finding referenced identifiers as the
type cast contains valid non flow code that we need to visit.
2016-10-01 12:58:14 -04:00
Henry Zhu
6d22f258db
v6.16.0
2016-09-28 15:38:45 -04:00
Justin Ridgewell
c2ed9de7fb
Flip default parameter template ( #4515 )
...
* Flip default parameter template
YMMV, I saved ~10b on a 2kb library. Not noticeable at the small scale, by why not do it anyway?
I've (unscientifically) found that flipping the default parameter conditional yields better gzip results. I think this is due to the slightly longer string it can now repeatedly match:
```js
// old
var param = arguments.length <= 0 || void 0 === arguments[0] ? null : arguments[0]
--------------------------------------------------------------^
// new
var param = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null
------------------------------------------------------------------------^
```
Though it's entirely likely gzip will also choose up to the index of the arguments if you many default parameters at different indexes.
* Update tests
2016-09-25 14:05:53 -07:00
Daniel Tschinder
590ad4d24f
Replace phabricator tickets with github ones in code comments ( #4519 )
2016-09-17 22:50:02 -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
Henry Zhu
6e58954bce
v6.11.4
2016-07-19 21:59:53 -04:00
Justin Ridgewell
9a6890c92f
Default parameters cleanup ( #3574 )
...
* Remove buildDefaultParamAssign
This seems to have been
[added](https://github.com/babel/babel/commit/4b85b05839017ab2abc03ba2d1
e875a63f002890) in v5.5.4 to address
[#1690 ](https://phabricator.babeljs.io/T1690 ). It [became
“dead”](https://github.com/babel/babel/blob/v6.0.0/packages/babel-core/t
est/fixtures/transformation/es6.parameters/default-before-last/expected.
js) (as far as I can tell) in the [v6.0.0
commit](https://github.com/babel/babel/commit/ae7d5367f1c3d438667242d692
5db024f875fccd).
Either way, this code is never executed.
- `pushDefNode` is only called when the param is a default param.
- `buildDefaultParamAssign` (which is inside `pushDefNode`) only runs
of the param index is less than or equals to the lastNonDefaultParam.
AKA, is this param before any non-defaulting params.
Which is a contradiction.
* Small optimization
No need to check if we need an iife if we already know we need one.
2016-07-18 11:03:59 -04:00
Henry Zhu
7076c675d9
v6.11.3
2016-07-12 22:33:58 -04:00
Justin Ridgewell
823ffbd87c
Fix error in rest parameter length optimization ( #3573 )
...
If there aren’t enough arguments to get to the offset index, we would
return an negative length.
2016-07-12 21:12:45 -04:00
Logan Smyth
231f27f170
Fix non-unique 'ref' binding name - fixes T7468
2016-06-28 19:16:44 -07:00
Henry Zhu
cf6304a34b
v6.9.0
2016-05-17 14:49:17 -04:00
Jay Phelps
330071e59d
also visit ClassProperty's for rest param deopt check, fixes #T7311 ( #3481 )
2016-05-13 17:18:14 -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
Amjad Masad
3d5969ecff
v6.7.0
2016-03-08 16:52:45 -08:00
Amjad Masad
b7465843dd
Merge pull request #3375 from jmm/parameters-rest-optimization-errors
...
Fix errors in parameters rest transformation [T7138]
2016-03-07 11:58:15 -08:00
Henry Zhu
57ef6a2b6a
v6.6.5
2016-03-04 18:16:17 -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