108 Commits

Author SHA1 Message Date
a8619469bf v7.7.4-csx.1 2019-11-24 18:50:06 +01:00
9a80ee7950 v7.7.4-csx.0 in packages 2019-11-24 18:48:01 +01:00
Nicolò Ribaudo
75767d87cb v7.7.4 2019-11-23 00:05:58 +01:00
chrishinrichs
70c0ed512a Fix: Don't call Object.keys on non-objects (babel#10482) (#10683) 2019-11-08 21:31:46 -06:00
Nicolò Ribaudo
b9cb4af953
v7.6.2 2019-09-23 23:14:37 +02:00
Tan Li Hau
8027dca501 fix object rest in array pattern (#10275)
* fix object rest in array pattern

* update test fixtures

* early return

* use path.stop() at the right path
2019-09-10 15:18:45 +02:00
Nicolò Ribaudo
0407f034f0
v7.5.5 2019-07-17 23:08:08 +02:00
Nicolò Ribaudo
7dc5fdb390
Workaround #10179 in proposal-object-rest-spread (#10200) 2019-07-15 19:01:29 +02:00
Huáng Jùnliàng
5d9a786b2f perf: match ownKeys perf to the one of objectSpread (#10189) 2019-07-10 21:03:01 -05:00
Nicolò Ribaudo
a9a7f4e690
v7.5.4 2019-07-09 20:52:37 +02:00
Nicolò Ribaudo
fa5ec75c43
Fix _objectSpread2 for real (#10188)
* Fix _objectSpread2 for real

* Tests

* Test 2
2019-07-09 20:50:07 +02:00
Nicolò Ribaudo
759ff4d6df
v7.5.3 2019-07-09 16:41:44 +02:00
Nicolò Ribaudo
9e65472377
[_objectSpread2] Do not use hoisted var from prev iteration (#10180) 2019-07-09 16:38:40 +02:00
Nicolò Ribaudo
0dbf99bedb
v7.5.2 2019-07-08 21:46:49 +02:00
Nicolò Ribaudo
406a65c894
Don't rely on getOwnPropertyDescriptors in objectSpread2 (#10171) 2019-07-07 11:24:36 +02:00
Nicolò Ribaudo
d0519fa907
v7.5.1 2019-07-06 10:07:59 +02:00
Nicolò Ribaudo
24dde2e8e8
Fix objectSpread2 backward compatibility (#10170) 2019-07-06 09:48:36 +02:00
Nicolò Ribaudo
49da9a07c8
v7.5.0 2019-07-04 14:52:17 +02:00
Kagami Sascha Rosylight
a596da2822 Retry to fix object spread helper compatibility (#9384)
This reverts commit 43b83f8ed7545b9c049eeed85541fa162842fb8f.

Fix objectSpread helper breaking old codes

remove tests to regenerate later

renamed output

new name

try using word

add comment as requested

revert inline name changes

add 2 for consistency

Update packages/babel-helpers/src/helpers.js

Co-Authored-By: Daniel Tschinder <daniel@tschinder.de>
2019-05-25 12:57:13 +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
Nicolò Ribaudo
f1328fb913
v7.4.0 2019-03-19 21:27:16 +01:00
Denis Pushkarev
3303b079c5 Update to core-js@3 (#7646)
### `@babel/runtime`
- Added `@babel/runtime-corejs3` package and `corejs: 3` options to `@babel/plugin-transform-runtime`.
- Added support of instance methods, fixes #8928.
- Added flag `proposals` (in `corejs: { version: 3, proposals: true }` format) for support all proposals polyfills from `core-js`.
- Used separate directories in runtime for `core-js` entry points with proposals and without.
- Used `get-iterator-method` helper for getting iterators, fixes #2500.
- As a cheap bonus, added support of IE8- (except some cases of `regenerator`).

### `@babel/polyfill`
- Should be deprecated in favor of separate usage required features from `core-js` and `regenerator-runtime` with an informative message.

### `@babel/preset-env`
- Uses for built-ins data from [`core-js-compat`](https://github.com/zloirock/core-js/tree/master/packages/core-js-compat) instead of `compat-table` since information from `compat-table` [is not enough](https://github.com/zloirock/core-js/tree/master/packages/core-js-compat).
- `useBuilIns` now requires direct setting of `corejs` version option, without it will be used `2` by default and shown deprecation warning.
- Added support of minor `core-js` versions for simplify updating in the future.
- For preventing some order-related problems, polyfills in the both `core-js@3` plugins added on `post` stage in the order of `core-js-compat` data.
- Divided plugins and polyfills parts of `preset-env`, instead of 2 internal plugins for adding polyfills, we have 6: usage and entry versions of plugins for `core-js@2`, ### Current state:
`core-js@3`, `regenerator-runtime`.
- Added support `samsung` target (for Samsung Internet) since `core-js-compat` and `compat-table` now contains mapping for this, fixes #6602.

#### `useBuilIns: entry` with `corejs: 3`
- No longer transforms `@babel/polyfill`.
- Transforms **all possible** `core-js` entry points to import of related modules (based on data from [`core-js-compat`](https://unpkg.com/core-js-compat@3.0.0-beta.15/entries.json)).
- Since of this, we no longer need `shippedProposals` / `proposals` flags with `useBuilIns: entry`.
- Removes `regenerator-runtime/runtime` import where it's not required.

#### `useBuilIns: usage` with `corejs: 3`
- In addition to `shippedProposals`, added flag `proposals`  (in `corejs: { version: 3, proposals: true }` format) for polyfill all proposals from `core-js`.
- Fixed list of dependencies in built-in definitions.
- Improved the way of determination method / built-in name and source of this method.
- Adds import of required polyfills on `MemberExpression`, `ObjectPattern`, `in` operator.
- Adds import of required polyfills on access to global object properties.
- Adds import of all required common iterators on all syntax features which use iterators protocol (`for-of`, destructuring, spread, `yield` delegation, etc.).
- Adds import of promises on syntax features which use promises (async functions/generators, dynamic import, etc.), fixes #9250, #7402, etc.

### `core-js@2` stuff
I didn't want to tough `core-js@2`-related stuff, however
- Fixed some serious errors in definitions which breaks `Object.getOwnPropertySymbols`, `Symbol.toStringTag` logic, `Promise#finally`, `Array#forEach`, etc.
- `Array#flatMap` and trim methods moved to stable features as a part of ES2019 and loaded by deprecated `@babel/polyfill` and `@babel/preset-env` with `corejs: 2` option.
2019-03-19 21:07:45 +01:00
piotr
a64bf63639 [proposal-object-rest-spread] fix templateLiteral in extractNormalizedKeys (#9628)
Added additional check in extractNormalizedKeys function to handle templates differently than string.
2019-03-13 21:39:50 +01:00
Nicolò Ribaudo
5c8cc0d536
Mark FOO in "var { x: FOO }˝ as a binding, not as a reference (#9492) 2019-02-27 00:17:11 +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
1f6454cc90
v7.3.4 2019-02-25 19:29:12 +01:00
Daniel Tschinder
b78fdc0cb1
chore: Enable eqeqeq rule in eslint (#9541) 2019-02-18 21:16:42 -08: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
Nicolò Ribaudo
f2af6c1170 v7.3.1 2019-01-22 08:07:23 +01:00
Daniel Tschinder
43b83f8ed7 Revert "Differentiate object spread and non-spread properties (#9341)" (#9379)
This reverts commit 3ae5e79ec8ab1e6d1c6927f35d4a1eeac04faf9a.
2019-01-21 23:03:54 -08:00
Nicolò Ribaudo
f6ee26c3da v7.3.0 2019-01-21 22:22:39 +01:00
Kagami Sascha Rosylight
3ae5e79ec8 Differentiate object spread and non-spread properties (#9341)
* add isSpread field

* use argument

* t.booleanLiteral

* fix typo

* push empty-argument object

* .object

* .value

* object field should be an expression

* lint

* update outputs

* isSpread for the second argument is redundant

* add test

* alternating spread
2019-01-21 22:04:47 +01:00
Nicolò Ribaudo
282129ea66 v7.2.0 2018-12-03 20:00:35 +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
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
Jason Quense
47e05d70f3 Fixed issue with non-simple property paths in object-rest-spread loose mode (#8514)
* fix: object rest with default values bug

fixes #8323

* rename variable
2018-08-23 15:53:31 +02: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