209 Commits

Author SHA1 Message Date
Nicolò Ribaudo
cb404e4776 Add targets and browserslist* options to @babel/core (#12189) 2021-02-21 17:09:43 +01:00
Huáng Jùnliàng
af2ed36535
chore: bump core-js-compat (#12821) 2021-02-19 13:27:38 +01:00
Huáng Jùnliàng
108564fdad
refactor: raise AwaitNotInAsyncContext when an AwaitExpression will be parsed (#12716)
* refactor: raise AwaitNotInAsyncContext when an AwaitExpression will be parsed

* tweak logic

* early exit when errors are before thrown error position

* fix: always return true in assert.throws callback

See https://nodejs.org/api/assert.html#assert_assert_throws_fn_error_message

* update test fixtures

* fix flow error
2021-02-01 10:46:43 -05:00
Huáng Jùnliàng
6e9a174e7f
fix: print warning messages to stderr (#12626) 2021-01-14 08:45:48 -05:00
Huáng Jùnliàng
eda4130d5e
Tweak helper compilation targets (#12615)
* refactor: simply browserslists defaults overwriting

When `hasTargets` is `false`,  `targets` is always an empty object by definition, `objectToBrowserslist({})` always return `[]` therefore we can remove `objectToBrowserslist`.

* test: apply external-helpers on preset-env test fixtures

* test: add ie 6 to force all transforms in corejs 3, debug, corejs 2 fixtures

* Add ie 6 as targets for test fixtures
2021-01-12 13:09:45 -05:00
Nicolò Ribaudo
606c91cd33
[babel 8] Remove uglify target support in preset-env (#12594)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-01-08 17:58:44 +01:00
Nicolò Ribaudo
fb12afc289
Declare template objects inline (#12588) 2021-01-05 23:25:15 +01:00
Huáng Jùnliàng
1382437ad6
Add js extension to preset-env generated polyfill imports (#10862) 2020-12-10 20:16:46 +01:00
Andrew Smith
71f87874ce
Clarify warning source about underspecified corejs option in preset-env. (#12402)
* Clarify these warnings are for babel-preset-env.

* Fix lint.

* Fix specs.

* Fix merge conflict.

* PR feedback.
2020-12-01 08:58:06 +00:00
Huáng Jùnliàng
9891c020b1
Bump core-js-compat to version 3.8.0 (#12399) 2020-11-25 22:46:07 +01:00
Huáng Jùnliàng
2db500451b
Bump caniuse-lite resolutions (#12368) 2020-11-17 16:38:02 +01:00
Brian Ng
08c7280167
Fix support for polyfilling Array.prototype.values in core-js@2 (#12340) 2020-11-10 16:43:11 +01:00
Nicolò Ribaudo
2984f0cb88
Use the correct context when re-using a cached NodePath (#12331) 2020-11-10 15:03:21 +01:00
Nicolò Ribaudo
32279147e6
Update core-js-compat (#12323)
* Update `core-js-compat`

* Update lockfile
2020-11-06 18:19:57 +01:00
Huáng Jùnliàng
5b48f40a08
Polish parser errors (#12258)
* polish: update AwaitNotInAsyncFunction message

* polish: update YieldInParameter error message

* Apply suggestions from code review

Co-authored-by: Brian Ng <bng412@gmail.com>

* update test fixtures

Co-authored-by: Brian Ng <bng412@gmail.com>
2020-10-26 20:55:04 -04:00
Nicolò Ribaudo
b4ae7b7893
Update to Browserslist 4.14.5 (#12241) 2020-10-23 21:15:49 -04:00
Huáng Jùnliàng
afc03581cc
chore: bump electron-to-chromium (#12118)
* chore: bump electron-to-chromium

* test: update test fixtures
2020-09-29 13:51:20 -04:00
Huáng Jùnliàng
f2da186714
refactor: add @babel/helper-validator-option (#12006)
* refactor: add @babel/helper-validator-option

* refactor: simplify validateTopLevelOptions

* perf: the recursive version is not practically fast

* Update packages/babel-helper-validator-option/README.md

Co-authored-by: Brian Ng <bng412@gmail.com>

* Update packages/babel-helper-validator-option/src/validator.js

* fix: incorrect type annotation

* refactor: use babel/helper-option-validator in babel/compat-data

* chore: fix flow types error

* Address review comments

* address review comments

Co-authored-by: Brian Ng <bng412@gmail.com>
2020-09-24 16:23:35 -04:00
Huáng Jùnliàng
3fad7eab9b
Use Yarn 2 (#11962)
* chore: use yarn 2

* chore: remove redundant yarn locks

* chore: remove publishEslintPkg

* chore: remove redundant make bootstrap

* Update .yarnrc.yml

Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>

* chore: use workspace protocol for eslint packages in the root

Co-Authored-By: merceyz <merceyz@users.noreply.github.com>

* chore: pin caniuse-lite versions

Testcases in packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie
depends on specific caniuse-lite versions. We pinned the version here
so we don't have to deal with fixture different in e2e-tests
where all deps will be updated and tested.

* chore: resolve yarn install warnings

* chore: update yarn cache path on circle/travis

* chore: add yarn deduplicate plugin

* chore: deduplicate lock files

* chore: move devDependencies to leaf packages

* chore: remove @yarnpkg/plugin-constraints

* chore: remove unused dedupe options

* test: fix unwanted self reference

* chore: remove output-file-sync dependency

* chore: update browserify to 16.5.2

Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
2020-08-25 14:37:30 -04:00
morrme
2f89e72321 enable logical assignment in babel preset env (#11876)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-07-29 18:32:12 -04:00
Huáng Jùnliàng
ccd98f042c Add numeric-separator to preset-env (#11865) 2020-07-29 18:32:12 -04:00
Huáng Jùnliàng
cdb81d7703 Add export-namespace-from to preset-env (#11849)
* feat: add compat-data of proposal-export-namespace-from

* feat: add export-namespace-from to preset-env

* chore: update test fixtures

* address review comments
2020-07-29 18:32:12 -04:00
Huáng Jùnliàng
48be93b46c
refactor: replace caniuse-db by mdn-browser-compat-data (#11838)
* refactor: replace caniuse-db by mdn-browser-compat-data

* fix broken test
2020-07-20 17:11:21 -04:00
Bogdan Savluk
4108524856
Update prettier to v2 (#11579)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-06-07 22:21:33 +02:00
Brian Ng
3a3457d808
Fix some test fixtures (#11655) 2020-05-31 09:57:00 -05:00
Nicolò Ribaudo
e6d873e061
Class features loose should have precedence over preset-env (#11634)
* Class features loose should have precedence over preset-env

* Comment

* Update packages/babel-helper-create-class-features-plugin/src/features.js

[skip ci]

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>

* Future proof

* Add warning when loose mode changes automatically

* Better message

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-05-29 23:56:32 +02:00
Nicolò Ribaudo
32bd530f25
[hotfix] Use same targets for fields as for private methods (#11633) 2020-05-27 22:43:23 +02:00
Huáng Jùnliàng
b457f52ab5 update test fixture 2020-05-25 15:00:40 -04:00
Justin Ridgewell
97f0b7c4a0
Transform ES2015 Unicode Escapes to ES5 (#11377) 2020-05-25 01:26:55 +02:00
Andrew Leedham
c5ba345ac2
[preset-env] Add browserslistEnv option (#11434) 2020-05-24 23:44:39 +02:00
Nicolò Ribaudo
28231e1be6
Add "allowArrayLike" support to the for-of transform (#11266) 2020-05-24 22:58:47 +02:00
Huáng Jùnliàng
93a50056ca
Add class proposals to shipped proposals (#11451) 2020-05-24 22:32:53 +02:00
Justin Ridgewell
c3a5bf1ff5
Update preset-env tests, and add yarn.lock deps (#11537) 2020-05-08 23:53:09 +02:00
Christoph Nakazawa
2bb2933dea
[helpers] Add a private function name within createSuper (#11514) 2020-05-04 23:30:53 +02:00
Nicolò Ribaudo
4d40bf646e
Update browserslist (#11517) 2020-05-04 15:48:02 -04:00
Nicolò Ribaudo
7c80ed9598
Update compat table script (#11496)
* Update compat-data build script

* Update generated data

* Update fixtures

* Use older --shallow-since (the last commit has 04-17 as the date)
2020-04-28 16:14:43 -04:00
Chintan Acharya
93429f8b09
Fix helpers.unsupportedIterableToArray for Map and Set (#11495)
Fixes #11494
2020-04-28 07:27:03 +02:00
Nicolò Ribaudo
1b777f5266
Update preset-env fixtures (#11486) 2020-04-26 21:34:29 +02:00
Nicolò Ribaudo
d4c8db5177
Update babel-plugin-dynamic-import-node to 2.3.3 (#11458) 2020-04-21 21:26:33 +02:00
Nicolò Ribaudo
5b8477e969
Update dynamic import (#11453)
* Update babel-plugin-proposal-dynamic-import fixture test outputs

* Update package.json files

Co-authored-by: Arun Kumar Mohan <arunmohandm@gmail.com>
2020-04-21 12:12:54 +02:00
Nicolò Ribaudo
1a08aa5adc
Update failing fixtures (#11447) 2020-04-20 18:06:08 +02:00
Justin Ridgewell
070ec201bb
Speed up the createSuper helper (#11401) 2020-04-10 16:00:20 +02:00
Nicolò Ribaudo
cab1e79ba7
Update browserslist (#11398) 2020-04-09 22:51:28 +02:00
Jovica Markoski
40db926170
Fixed useBuiltIns and modules validation when using 'false' as option (#11373)
* Fixed useBuiltIns and modules validation when using 'false' as option

* Added tests for 'validateUseBuiltInsOptions' and for 'validateModulesOption' when input is 'false'

Co-authored-by: Jovica Markoski <jovica@upshiftwork.com>
2020-04-03 15:41:32 -04:00
Nicolò Ribaudo
67609a1232
Don't call createSuper in loose mode (it was unused) (#11358)
* Don't call `createSuper` in loose mode (it was unused)

* Update fixtures
2020-04-01 23:08:21 +02:00
Huáng Jùnliàng
0a02a12235
Move object-rest-spread after transform-parameters (#11280)
* fix: move proposal-object-rest-spread after transform-parameters

* update test fixtures

* fix: update plugin-features.js
2020-03-19 17:08:54 +01:00
Nicolò Ribaudo
fa7ec81771
Allow for-of on polyfilled or builtin iterables without Symbol support (#11285) 2020-03-19 11:02:12 +01:00
Nicolò Ribaudo
6f932978f8
Add for-of fallback for arrays in browsers without symbol supp… (#11263)
* Add for-of fallback for arrays in browsers without symbol support

* Update after rebase

* Re-throw error when iterating array

* Update fixture
2020-03-19 02:17:41 +01:00
Nicolò Ribaudo
78ace99615
Silence dynamic import() warnings in tests (#11279) 2020-03-18 15:42:19 +01:00
Brian Ng
f405cd809c
Update compat-data (#11277) 2020-03-18 10:24:14 +01:00