13501 Commits

Author SHA1 Message Date
Liam Doran
11d9826e77
Fix Async Generic After Await Parsing Error (#11092)
* test: add test case

* fix: reset awaitPos before parsing generic arrow fn

* fix: maybeInArrowParameters reset to true
2020-02-04 23:06:04 +01:00
Nicolò Ribaudo
636c1dc86d
Only download compat-table if it's not already downloaded (#11081)
* Only download compat-table if it's not already downloaded

* Use git rev-parse
2020-02-04 22:39:15 +01:00
Nicolò Ribaudo
bd1daa756e
Update fixtures after browserslist release (#11091) 2020-02-04 09:19:14 +01:00
Brian Ng
779f00b8e9
Update @babel deps (#11072) 2020-02-01 01:00:47 +01:00
Kai Cataldo
f987821099
Clean babel-eslint-*/**/lib (#11070) 2020-01-31 20:49:27 +01:00
Nicolò Ribaudo
4070b7a7f6 Update changelog [skip ci] 2020-01-31 19:59:51 +01:00
Babel Bot
011f11c1de Add v7.8.5 to CHANGELOG.md [skip ci] 2020-01-31 18:53:09 +00:00
Nicolò Ribaudo
11641b5f70 v7.8.5 2020-01-31 19:43:51 +01:00
Daniel Tschinder
7ee98363df
Do not publish build directory of compat-data (#11078) [skip ci] 2020-01-31 19:40:50 +01:00
Kai Cataldo
66721eaa0e
Further refactoring of @babel/eslint-parser (#11071) 2020-01-31 00:07:26 +01:00
Nicolò Ribaudo
d57b9aabdd
Update CHANGELOG.md [skip ci] 2020-01-30 13:49:20 +01:00
Nicolò Ribaudo
8b13513daa
Update CHANGELOG.md [skip ci] 2020-01-30 13:47:56 +01:00
Babel Bot
32de1ac97b Add v7.8.4 to CHANGELOG.md [skip ci] 2020-01-30 12:21:40 +00:00
Nicolò Ribaudo
5c2e6bc07f v7.8.4 2020-01-30 13:18:09 +01:00
Nicolò Ribaudo
92c6807ae8
[@babel/cli] Copy ignored files by default (#11063)
This commit restores the pre-7.8.0 behavior of the --copy-files option, by making
--copy-ignored default to true when --copy-files is enabled.
2020-01-30 13:01:04 +01:00
Daniel Tschinder
1528d7d2d3
Fix core-js 2 builtin data for opera (#11066) 2020-01-29 18:14:26 +01:00
Tan Li Hau
3e21a09da3 feat: support node 6 for levenary (#11059) 2020-01-28 06:57:35 +01:00
Nicolò Ribaudo
eae6211258
Update compat table (#11039)
* Fix compat-data build script

* Update compat table

* Update mappings for transform-parameters

kangax/compat-table#1570

* Update unrelated fixture

* Update
2020-01-27 22:23:27 +01:00
Nicolò Ribaudo
916429b516
Avoid compiling the _typeof helper with itself (#11049)
* Avoid compiling the typeof helper with itself

* Update fixtures
2020-01-27 22:02:34 +01:00
Pavel Pustovalov
d0518b7566 Update browserslist (#11058) 2020-01-27 21:54:18 +01:00
Nicolò Ribaudo
2e5594d562 Update failing tests after last merged PR 2020-01-24 23:07:34 +01:00
Nicolò Ribaudo
ed47d2e89a
Delete duplicated file in @babel/compat-data (#11041)
This file is the same as `native-modules.json`, which is exported in package.json
2020-01-24 22:45:37 +01:00
Huáng Jùnliàng
b54a946048 chore: map mobile browser data to their desktop version (#10814)
* chore: map mobile browser data to their desktop version

* chore: skip android until upstream support is resolved

* Revert "chore: skip android until upstream support is resolved"

This reverts commit 436e9af8297b284a426b5a3240e2a550a20fca86.

* Update fixtures

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-01-24 22:40:11 +01:00
Nicolò Ribaudo
1815c34987
Update preset-env fixtures (#11040) 2020-01-21 22:46:49 +01:00
Huáng Jùnliàng
fa975bf7cd polish: throw human-friendly error when item-option pair is in… (#10969)
* polish: throw human-friendly error when item-option pair is incorrectly unwrapped

* add testcase for plugin

* fix: exclude false positive

* fix: validate should support plugin optionsSourceKind

* Revert "fix: validate should support plugin optionsSourceKind"

* fix: validate plugin object in assertNoUnwrappedItemOptionPairs

* fix flow error

* update test fixtures

* refactor: move to loadDescriptor catch clause

* chore: throw Error instead of builtin ReferenceError

* fix flow errors

* chore: add more test cases
2020-01-20 21:05:07 +01:00
Huáng Jùnliàng
43b23e0869 refactor: simplify toAssignable routine (#11032)
* refactor: remove isBinding parameter

* remove unused contextDescription

* refactor: remove unnecessary nullish check

* refactor: simplify toAssignable on ParenthesizedExpression

* tests: categorize createParenthesizedExpression tests
2020-01-20 21:04:16 +01:00
Chunpeng Huo
9bc04baeb5 fix(babel-parser): avoid state.clone() to clone the whole token store (#11029)
* fix(babel-parser): avoid state.clone() to clone the whole token store

Fixed the performance issue on large input when turned on option {tokens: true} and typescript plugin which uses quite a few state.clone().

* test(babel-parser): turn on 2 typescript tests with tokens:true

The output.json is generated by old master to make sure no regression.

* fix(babel-parser): avoid duplicated tokens trapped by mainly typescript/flow plugins

* test(babel-parser): update output.json to latest master result

* chore(babel-parser): improve performance by storing tokensLength in state
2020-01-19 22:38:33 -05:00
Erlend Tobiassen
740064ced7 Fix missing ClassDeclaration references after scope#crawl (#11011)
* Bug replication test

* Simplify test

* Fixes #10896

* Merge path.crawl `ClassDeclaration` and `Declaration` visitors

Merged to avoid subtle assumption that `Declaration` is called before `ClassDeclaration`

* Move registartion of class id in crawl to BlockScoped

* Add some assertions to crawl test
2020-01-19 21:32:05 -05:00
Nicolò Ribaudo
2b23c283dd
Check that generated compat-data is up to date on CI (#11024) 2020-01-20 01:42:47 +01:00
Huáng Jùnliàng
de75dbf2a0 update compat-data related docs/config [skip ci] (#11030)
* ignore compat-data build

* ignore CONTRIBUTING.md when publishing preset-env

* docs: update preset-env CONTRIBUTING.md
2020-01-20 01:00:38 +01:00
Huáng Jùnliàng
facfd4d8a1 Enable no-process-exit ESLint rule (#11025) 2020-01-20 00:48:47 +01:00
Vedant Roy
341964bd4e fix: properly parse member expression after property initializ… (#11031)
Fixes issue 10989 where the only the identifier in a member expression that is the value of an object property would be parsed. Removing checkExpressionErrors in parseExprSubscripts results in the subscript also being parsed.
2020-01-20 00:33:09 +01:00
Benoît Zugmeyer
85ddc297c2 Fix rest parameters indexing with TypeScript 'this parameter' (#9714)
* Fix rest parameters indexing with TypeScript 'this parameter'

The TypeScript [this parameter][0] is a fake parameter and should not be
taken into account when counting the function parameters.  This patch
skips it by using the condition taken from the `transform-typescript`
plugin.

Note: since the `transform-typescript` plugin is removing this kind of
parameter, including it before the `transform-parameters` plugin solves
the issue.  This patch fixes the issue in other cases.

[0]: https://www.typescriptlang.org/docs/handbook/functions.html#this-parameters

* nit: improve the 'this parameter' detection condition

* improve performance by checking the parameter list length before
accessing it
* simplify the test a bit by using the `isIdentifier` second
parameter
2020-01-17 21:00:37 +01:00
Sven Sauleau
34a9653281 add AST for the module attribute proposal (#11015)
Introduce a `ImportAttribute` structure and add an `attributes` key on
the `ImportDeclaration` node.

[skip ci]
2020-01-17 20:58:30 +01:00
Huáng Jùnliàng
45301c5304 Update coalesce precedence (#11017)
* refactor: reimplement nullish coalescing precedence tracking

Co-authored-by: Toru Nagashima <public@mysticatea.dev>

* fix: Coalesce has same precedence with LogicalOR

* fix flow errors

Co-authored-by: Toru Nagashima <public@mysticatea.dev>
2020-01-17 20:57:07 +01:00
Huáng Jùnliàng
6648d62f40
chore: use @babel/eslint-config-internal (#11026) 2020-01-17 07:57:25 -05:00
Huáng Jùnliàng
1a1454328b
chore: replace yarn-upgrade by bump-babel-dependencies in e2e tests (#11021)
* chore: pin yarn version in e2e vue tests

* fix: replace yarn-upgrade by bump-babel-dependencies

* chore: update e2e-cra test
2020-01-17 07:55:29 -05:00
Huáng Jùnliàng
06dace1cdb fix: for-of transform should skip for-await-of (#11023) 2020-01-17 00:15:31 +01:00
Nicolò Ribaudo
3daab41e61 Re-generate preset-env fixtures (#11016)
* Fix plugin ordering in preset-env

* Update stdout fixtures

* Comments [skip ci]
2020-01-16 10:49:30 -05:00
Huáng Jùnliàng
a1063d2583
fix: triple __proto__ in object patterns should be allowed (#11009) 2020-01-16 09:34:47 -05:00
Nicolò Ribaudo
6363b594cc Re-generate plugins compat data
They are now alphabetically ordered, but the data is the same
2020-01-16 01:45:02 +01:00
Nicolò Ribaudo
d75652eb5e
Exclude import() tests from pubilsh build (#10995)
I really don't like this commit, but import() is currently breaking
our publish script.
When "normal" tests we are transpiling import() so that it works
with Jest. We can't do it while publishing because we need to
publish the untranspiled import() so that it can load real .mjs files.

Follow up to #10903
2020-01-15 23:38:18 +01:00
Siddhant N Trivedi
6ad7e19a27 Fix parentheses removal in nullish-coalescing operation (#11014)
* Added precedence for nullish-coalescing-operator

* Made precedence equal to logical OR

* Renamed the folders made for testing

* Fixed the output test file of nullish-coalescing op
2020-01-15 23:30:28 +01:00
Huáng Jùnliàng
e7961a08a8
fix: supply ‘.’ subpath for node.js < 13.2 (#11006) 2020-01-14 22:54:41 -05:00
Huáng Jùnliàng
9df70b4505
Duplicate __proto__ key should be allowed in object patterns (#10987)
* refactor: replace refShorthandDefaultPos by refExpressionErrors

* fix: duplicate __proto__ keys should be allowed in patterns

* docs: add comments for ExpressionErrors.doubleProto [ci-skip]

* test: add more test for coverage
2020-01-14 22:53:45 -05:00
Huáng Jùnliàng
a0a9c64a47
chore: test against babel-preset-app (#11004) 2020-01-13 18:30:37 -05:00
Babel Bot
b138b5a62e Add v7.8.3 to CHANGELOG.md [skip ci] 2020-01-13 21:44:41 +00:00
Nicolò Ribaudo
a7620bd266 v7.8.3 2020-01-13 22:36:19 +01:00
Huáng Jùnliàng
6874c244ab fix: generated builder parameter should respect builder keys (#11002) 2020-01-13 22:30:24 +01:00
Nicolò Ribaudo
8fce431d88
Revert "chore: specify package type (#10849)" (#11003)
This reverts commit e8dac621de9dba27b47646169562c0a0c2e02c96.

Fixes installs when using npm <= 3.9.5 (Node.js <= 6.2.2)
2020-01-13 21:18:42 +01:00