82 Commits

Author SHA1 Message Date
Nicolò Ribaudo
49da9a07c8
v7.5.0 2019-07-04 14:52:17 +02:00
Tan Li Hau
b6486a22cb fix destructuring rest with template literal (#10013)
* fix destructuring rest with template literal

* update test
2019-05-24 00:03:27 +02:00
Nicolò Ribaudo
2c88694388
v7.4.4 2019-04-26 23:00:07 +02:00
Nicolò Ribaudo
508fde4009
v7.4.3 2019-04-02 21:36:09 +02:00
Moti Zilberman
1f5444e96a Destructuring: Fix handling of impure computed keys with object rest (#9416) 2019-03-26 19:11:44 -07:00
Moti Zilberman
f7bfc774ba Destructuring: Fix array unpacking assignments with holes on RHS (#9412)
This fixes an issue where destructuring assignments eligible for the "array unpacking" optimization would fail to compile when the array literal on the right-hand side of the expression contained holes.

Example input:
```js
[a, b] = [, 2];
; // Avoid completion record special case
```

The error message was `Property right of AssignmentExpression expected node to be of a type ["Expression"] but instead got null`.

Now the above code compiles to:
```js
a = void 0;
b = 2;
;
```

This PR also adds a couple of related test cases that were missing, to ensure the change doesn't regress them:
* Normal assignment expression with unpacking
* Declaration with unpacking and a hole on RHS
2019-03-27 01:14:21 +01:00
Nicolò Ribaudo
f1328fb913
v7.4.0 2019-03-19 21:27:16 +01:00
Nicolò Ribaudo
0345c1bc1d
Use for..of Object.keys instead of for..in (#9518)
In https://github.com/babel/babel/issues/9511 (and #9495 is another symptom), @PavelKastornyy reported a node crash becaue the JavaScript heap run out of memory. The problem was that their code was adding enumerable properties to `Object.prototype`: it is something that shouldn't be done, but Babel shouldn't make node crash if someone adds them.
I reduced down the problem to `for...in` loops in `@babel/traverse` that grew the memory consumption exponentially because of that unexpected properties.
2019-02-26 20:09:02 +01:00
Nicolò Ribaudo
d896ce2b53 v7.3.2 2019-02-04 23:20:05 +01:00
Moti Zilberman
1452e977a0 Destructuring: Create assignments from ForX non-declaration patterns (#9414) 2019-01-28 09:50:24 +01:00
Daniel Tschinder
47da5cf75a
Correctly transform spreads to use proper concat method (#9108)
* Correctly transform spreads to use proper concat method

* Add tests to ensure array spread clones elements
2018-12-13 23:24:43 -08:00
Nicolò Ribaudo
282129ea66 v7.2.0 2018-12-03 20:00:35 +01:00
Ruben Verborgh
9308c870f5 Fix destructuring assignment in arrow functions. (#8916)
Fixes 8912.
2018-11-25 19:29:58 +01:00
Nicolò Ribaudo
8c7d4b55c9
Add plugins name (#8769)
* Add plugins name

* Add missing names found by the plugin

* Add eslint plugin
2018-11-18 23:02:58 +01:00
Nicolò Ribaudo
38397ce11f Use toPropertyKey in the "decorate" helper
This commit also makes the "toPropertyKey" helper call @@toPrimitive
when needed.
2018-11-02 13:59:57 +01:00
Henry Zhu
8ee857e268 v7.1.3 2018-10-11 11:52:19 -04:00
Brian Ng
36d12b5969
Ensure destructuring's computed key handling matches object-rest-spread (#8793) 2018-10-02 20:46:08 -05:00
Henry Zhu
3f5b7554b8 v7.1.2 2018-09-28 18:19:38 -04:00
Henry Zhu
ead23d7112 v7.1.1 2018-09-28 16:02:43 -04:00
Nicolò Ribaudo
626f47982e Do not unpack array patterns that update a referenced binding (#8535)
Fixes #8528
2018-09-28 11:45:42 -04:00
Logan Smyth
79b2af5997
Format fixture JSON with Prettier. (#8658) 2018-09-09 17:57:52 -07:00
Henry Zhu
04d09cc754
add access public to all packages [skip ci] (#8573)
If people copy paste to make an new package they might miss this and we will get a publish error later so figured we should add it to all.
2018-08-29 09:54:53 -04:00
Henry Zhu
90fb82a535 v7.0.0 2018-08-27 17:41:21 -04:00
Henry Zhu
814c564c45 v7.0.0-rc.4 2018-08-27 12:42:00 -04:00
Henry Zhu
cada040bec v7.0.0-rc.3 2018-08-24 14:06:00 -04:00
Henry Zhu
f1d774b34f v7.0.0-rc.2 2018-08-21 15:22:07 -04:00
Henry Zhu
0a958861c9 v7.0.0-rc.1 2018-08-09 16:06:08 -04:00
Henry Zhu
904bcaffe3
fix peer deps [skip ci] (#8445)
Should be anything 7.x
2018-08-09 15:59:14 -04:00
Henry Zhu
8b1406127a v7.0.0-rc.0 2018-08-09 11:56:00 -04:00
Henry Zhu
6695f5e2f7 v7.0.0-beta.56 2018-08-03 21:02:42 -04:00
Henry Zhu
adca165ee9 v7.0.0-beta.55 2018-07-28 18:06:42 -04:00
Henry Zhu
84282f199b v7.0.0-beta.54 2018-07-16 13:59:43 -04:00
Henry Zhu
b89234b1a2 v7.0.0-beta.53 2018-07-11 09:39:52 -04:00
Mateusz Burzyński
c0c13ae30f Introduce objectWithoutPropertiesLoose helper (#8261) 2018-07-06 15:03:44 -04:00
Henry Zhu
663c96db04 v7.0.0-beta.52 2018-07-05 20:59:03 -04:00
Rodolfo Rodriguez
c6a4108e57 Update READMEs for yarn (#8215) [skip ci]
Closes https://github.com/babel/babel/pull/8255
2018-07-03 09:03:18 -04:00
Sven Sauleau
8f8b4e8e82 Switch new website in READMEs (#8181) [skip ci] 2018-06-15 10:13:20 -04:00
Henry Zhu
c313b267f7 v7.0.0-beta.51 2018-06-12 17:18:28 -04:00
Henry Zhu
eb54adb755 use a semver range for core peerDep [skip ci] 2018-06-12 17:10:15 -04:00
Henry Zhu
e0ef50c00f
Use older semver range since lerna update does not change peerDeps on publish [skip ci] (#8152) 2018-06-12 16:45:10 -04:00
Henry Zhu
3af623678f v7.0.0-beta.50 2018-06-12 15:46:05 -04:00
Sven SAULEAU
b445b79734 Refactor move docs (#8108)
* feat: [skip] generate readme script

* docs: [skip ci] update READMEs

* docs: [skip ci] fix code block type

* chore: [skip ci] move generator script
2018-06-04 10:32:39 -04:00
Logan Smyth
90566103a6 v7.0.0-beta.49 2018-05-25 09:00:02 -07:00
Henry Zhu
e6d198eef5 v7.0.0-beta.48 2018-05-24 15:20:31 -04:00
Henry Zhu
f03adbadf4 v7.0.0-beta.47 2018-05-14 17:15:44 -07:00
Michael Mantel
8060ae5dae Improve README's for several plugins. [skip ci] (#7844) 2018-05-01 10:24:53 -05:00
Logan Smyth
3a2aa9b862 v7.0.0-beta.46 2018-04-22 21:29:42 -07:00
Henry Zhu
b414387bb1 v7.0.0-beta.45 2018-04-22 21:55:16 -04:00
Henry Zhu
a6df92f245 v7.0.0-beta.44 2018-04-02 18:19:30 -04:00
Henry Zhu
bdfeeb38c6 v7.0.0-beta.43 2018-04-02 12:47:55 -04:00