199 Commits

Author SHA1 Message Date
Nicolò Ribaudo
0407f034f0
v7.5.5 2019-07-17 23:08:08 +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
49da9a07c8
v7.5.0 2019-07-04 14:52:17 +02:00
Brian Ng
cbb482e2f9
Bump compat-table and update preset-env mappings (#10127) 2019-07-03 09:37:06 -05:00
Nicolò Ribaudo
ef3f555be9
Add proposal-dynamic-import to preset-env (#10109) 2019-06-30 13:58:50 +02:00
Brian Ng
77fd7cd4c4 Allow defaults query in preset-env (#8897) 2019-06-30 11:00:43 +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
33ab4f1661
v7.4.5 2019-05-21 19:38:26 +02:00
Daniel Tschinder
0430a48775
Update preset-env dependencies and fix fixtures (#10002)
* Fix fixtures after core-js update

* Update core-js, caniuse and compat-table
2019-05-20 23:27:19 -07:00
Matthew Schupack
45ca6751fa use console.warn for warning (#9992)
* use console.warn for warning

* fix tests
2019-05-18 00:36:18 +02:00
Nicolò Ribaudo
9febf63882
Fix mobile browsers support in preset-env (#9978)
* Fix mobile browsers support in preset-env

* Update fixtures

* Alias other mobile browsers, since they aren't included by compat-table
2019-05-15 14:05:37 +02:00
Sebastian Silbermann
eae7a33316 Fix destructuring assignments being transpiled for edge 15 (#9902)
* Current behavior for preset-env destructuring and edge

* fix(preset-env): destructuring transpiled in edge 15
2019-05-03 23:35:28 +02:00
Nicolò Ribaudo
2c88694388
v7.4.4 2019-04-26 23:00:07 +02:00
Nicolò Ribaudo
8ca323e810
Disable chromeforandroid test in preset-env (#9906) 2019-04-26 20:57:13 +02:00
Nicolò Ribaudo
508fde4009
v7.4.3 2019-04-02 21:36:09 +02:00
Denis Pushkarev
ae9b25ac69 Add to preset-env ES3 transforms for ES3 targets (#9781)
* add to preset-env ES3 transforms for ES3 targets

* add `transform-reserved-words`

* fix `transform-reserved-words` plugin in `@babel/standalone`
2019-03-30 23:25:12 +01:00
Denis Pushkarev
adb4701e00 Normalize core-js entry points (#9752)
* normalize `core-js` entry points names

* Update packages/babel-preset-env/src/polyfills/corejs3/entry-plugin.js

Co-Authored-By: zloirock <zloirock@zloirock.ru>

* handle windows paths
2019-03-24 01:03:25 +01:00
Ludwig Magnusson
419d8052d3 Upgrade browserslist and caniuse in preset-env (#9747) 2019-03-22 12:38:19 -05:00
Maximilian Lackaw
998024e913 Fix wrong minimum dependency version (#9738) 2019-03-21 10:40:55 -07:00
Nicolò Ribaudo
7dea0f23de
v7.4.2 2019-03-21 10:55:50 +01:00
Nicolò Ribaudo
de7dd7f015
Mark the core-js warning as such (#9732) 2019-03-21 10:38:21 +01:00
Brian Ng
7f8ded9851
Tweak preset-env corejs/useBuiltIns warning and error messages (#9716) 2019-03-20 19:47:30 -05:00
Denis Pushkarev
92fcd31eac Handle object rest parameters in the corejs3-usage plugin (#9724)
Fixes #9713
2019-03-20 22:29:01 +01:00
Nicolò Ribaudo
94d1a5e8d7
v7.4.1 2019-03-20 00:10:54 +01:00
Nicolò Ribaudo
6402d8d58c
Alias @babel/preset-env/data/built-ins.json.js (#9711)
Fixes vuejs/vue-cli#3671

Even if it has the `.js` extension, `require("@babel/preset-env/data/built-ins.json")` will still work.
2019-03-20 00:09:09 +01:00
Nicolò Ribaudo
c548e789bb
Bring back isPluginRequired (#9709) 2019-03-19 23:35:13 +01: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
Justin Ridgewell
039a74a8b9
preset-env: minimally supporting version (#9596)
* preset-env: minimally supporting version

This changes the "does browser support X" algorithm to "lowest version such that all higher versions support it".

Eg, given `{ chrome70: true, chrome60: false, chrome50: true }`, the lowest version is chrome70, not chrome50.

This is done to remove Tagged Template Literal support from Safari, which introduced a bug in Safari 12 but correctly implemented the feature in Safari 11-9.

* Add tests

* Fix tests

* Fix comment
2019-02-26 15:18:52 -05:00
Justin Ridgewell
e1ff4c47b9 preset-env: Sort versions before determining lowest (#9595)
Likely because of implicit `equals` (ie, Safari 12 support implies iOS Safari 12), the versions in the `res` hash are not always sorted in version order.

Doing a semver sort reveals some builtins have actually been supported a little longer than we thought!
2019-02-26 11:11:49 -08:00
Brian Ng
434fd32c90
Update esm and electron mappings in preset-env (#9573) 2019-02-25 16:51:38 -06:00
Nicolò Ribaudo
1f6454cc90
v7.3.4 2019-02-25 19:29:12 +01:00
Denis Pushkarev
cade33c647 Update compat-table (#9566)
fix #9465
2019-02-23 12:47:43 +01:00
Nicolò Ribaudo
b8d045f5cf
Update regenerator-transform (#9558) 2019-02-21 23:24:31 +01:00
Nicolò Ribaudo
7192546eb8 Run prettier again 2019-01-30 11:35:42 +01:00
Nicolò Ribaudo
4c4c22a316 Run prettier 2019-01-30 11:30:31 +01:00
Brian Ng
ede69eef7f Bump deps (#9417) 2019-01-26 22:49:48 -05:00
Brian Ng
f77c450cda
Bump prettier (#9373) 2019-01-22 09:16:32 -06: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
Brian Ng
b92ad318f1
Add support for transform-named-capturing-groups-regex in preset-env (#9345) 2019-01-17 19:51:38 -06:00
Brian Ng
40ae6568a4
Add support for proposal-json-strings in preset-env (#9323) 2019-01-13 08:32:33 -06:00