13420 Commits

Author SHA1 Message Date
Raja Sekar
8415065d99 --copy-ignored flag added to CLI (#10887)
* prevent ignored files in out dir

* added includeIgnore cli option

* Help text change

* Update packages/babel-cli/src/babel/options.js

Copy review.

Co-Authored-By: Brian Ng <bng412@gmail.com>

* review comments

* throw error if copyIgnored is used without ignore flag

* check for ignored files

* duplicate pathToPattern fn in babel/cli

* change implementation

* removed ignore option from cliOption

* added test case with ignore in config

* added test case with ignore in config

* review

Co-authored-by: Brian Ng <bng412@gmail.com>
2020-01-10 03:03:37 +01:00
Sebastian Silbermann
3af02f63de Add --out-file-extension option to babel-cli (#9144)
* Add --use-file-extension option to babel-cli

* refactor file extension logic

use existing methods from path module

* Rename use-file-extension -> out-file-extension

* add error message if bot keep- and out-file-extension is used

* add test for error when mixing --keep- and --out-file-extension

* poke travis
2020-01-10 03:02:52 +01:00
Oleksandr Fediashov
c3388ea42f Enable nullish coalescing by default in @babel/parser (#10819)
* move files, remove hasPlugin() & expectPlugin()

* restore permissions
2020-01-10 02:52:53 +01:00
Abdul Ali
5b907e9bb7 [parser] enable dynamic import by default (#10843)
* [parser] enable dynamic import by default

* chore: add back babel-core api test
2020-01-10 02:28:52 +01:00
Huáng Jùnliàng
7bc22e42f5 StringNumericLiteral does not include NumericLiteralSeparator (#10938) 2020-01-10 02:28:16 +01:00
Nicolò Ribaudo
771c730fda
[parser] Disallow duplicate and undeclared private names (#10456)
* [parser] Add private names tracking to Scope

- Disallow duplicate private names
- Disallow undeclared private names

* Update tests

* Test all possible duplications

* Test undeclared private names

* Better error message for top-level private names

* Fix flow

* Update test262 whitelist

* Update fixtures

* Update flow whitelist

* Remove old output.json

* Move ClassScopeHandler to a separate class

* Make the code readable
2020-01-10 02:22:05 +01:00
Huáng Jùnliàng
9f148a1603 chore: update caniuse-usage fixtures (#10974) 2020-01-10 00:38:21 +01:00
Huáng Jùnliàng
09cb4273bc update corejs-compat fixtures (#10967)
* update corejs-compat fixtures

* chore: bump core-js-compat to 3.6.2
2020-01-07 18:43:14 +01:00
Huáng Jùnliàng
8fd532db39
LiteralPropertyName should allow BigIntLiteral (#10955)
* fix: property name should allow BigIntLiteral

* test: add non decimal test case

* add bigintIndex to whitelist
2020-01-07 10:23:50 -05:00
Nicolò Ribaudo
3fa37d2da3 Bump coverage target from 80% to 90% (#10964) 2020-01-05 18:08:50 -05:00
Nicolò Ribaudo
4636321f06
Make @babel/transform-runtime's absoluteRuntime/relative test meaningful (#10963) 2020-01-05 17:28:44 +01:00
Huáng Jùnliàng
a7dac49518 chore: workaround yarn issue (#10958) 2020-01-04 11:35:24 +01:00
Huáng Jùnliàng
03d163a0d9
Use chrome data when android is absent (#10790)
* chore: rename test folder

* chore: add test case

* fix: use chrome support data when android is absent

* chore: add type annotation

* chore: add testcases last 2 versions not ie

* chore: bump browerslist to v4.8.2

* chore: update test fixtures

* chore: update test fixtures
2020-01-03 18:26:27 -05:00
Huáng Jùnliàng
455d782ef0 test: add invalid-lone-import test (#10950)
* test: add lone import test

* polish: raise recoverable error
2020-01-03 23:08:59 +01:00
Huáng Jùnliàng
a28353703f fix: check await when parsing AsyncArrowBindingIdentifier (#10953) 2020-01-03 23:08:28 +01:00
Huáng Jùnliàng
467667af88 When reading a new string, U+2028/2029 should correctly set th… (#10944)
* test: add test on template

* fix: update lineStart when string contains U+2028/U+2029
2020-01-03 23:07:54 +01:00
Huáng Jùnliàng
6ee8c97e6a Fix: TopLevelAwait should respect await identifiers defined in… (#10947) 2020-01-03 23:07:11 +01:00
Huáng Jùnliàng
e5048053aa Add integration test: e2e-vue-cli (#10919)
* chore: add e2e-vue-cli test

* chore: add node-browsers-executor

* chore: state why node-browsers-executor is required
2020-01-03 23:06:13 +01:00
Kai Cataldo
9f832c2716
@babel/eslint-parser: Fix ClassPrivateMethods (#10913) 2020-01-02 18:36:58 -05:00
Jayen Ashar
daaa2063bb Override toString in case this function is printed (#10949)
* Override toString in case this function is printed

Related to https://stackoverflow.com/questions/59543968/unexpected-return-value-from-visitor-method

* Don't override `toString` if `wrapper` is true

Override `toString` immediately before returning a newFn, otherwise it will be overridden if wrapper is true

https://github.com/babel/babel/pull/10949#discussion_r362302625

* prettier
2020-01-01 15:36:20 +01:00
Huáng Jùnliàng
26eb891870
fix: Class Field Initializer should not allow await expression as immediate child (#10946)
* fix: scope.inAsync should exclude reference in class property initializers

* chore: add test on await in computed class property

* fix flow error :(
2019-12-31 09:36:03 -05:00
Huáng Jùnliàng
0238244268
refactor: remove unecessary checkYieldAwaitInDefaultParams (#10936) 2019-12-30 16:12:09 -05:00
Huáng Jùnliàng
2f3f77926d
refactor: remove unused invalidTemplateEscapePosition tokenizer state (#10935)
* refactor: remove unused invalidTemplateEscapePosition tokenizer state

* fix flow error
2019-12-30 16:11:56 -05:00
Huáng Jùnliàng
30449fe05d
Refactor parseSubscript (#10937)
* refactor: unify optionalMemberExpression generation

* test: add optional calls invalid typecasts

* fix: do not parse async arrow when call is optional

* test: update test fixtures
2019-12-30 16:11:39 -05:00
Huáng Jùnliàng
86245a83a2
TSTypeCastExpression should not be inside call parameters (#10939) 2019-12-30 16:10:19 -05:00
Huáng Jùnliàng
197a8da04d
Remove unused parser methods (#10942)
* chore: remove unused isStrictBody

* chore: remove unused eatRelational
2019-12-30 16:09:50 -05:00
Huáng Jùnliàng
314513374d
chore: update test262 (#10943)
* chore: update test262

* chore: ignore untoggleable features
2019-12-29 21:35:19 -05:00
Klaus Meinhardt
b91720c1cc helper-module-transforms: dereference imported template tag (#10934)
* Dereference imported template tag

* apply fix for OptionalCallExpression as well
2019-12-28 16:46:20 -05:00
Huáng Jùnliàng
e9dc74e787
fix: Promise.any requires global.AggregateError (#10930)
* fix: promise.any requires global.AggregateError

* address review comments
2019-12-26 20:29:47 -05:00
Nicolò Ribaudo
30f3b07ebf Replace custom "findSuggestion" function with "levenary" (#10924)
* Replace custom "findSuggestion" function with "levenary"

* Update
2019-12-26 00:45:26 +01:00
Huáng Jùnliàng
db3c31a8af fix: minified should not accept optional argument (#10923) 2019-12-25 19:13:23 +01:00
Nicolò Ribaudo
00758308ae Always use forked @lerna/collect-updates 2019-12-25 01:22:43 +01:00
Huáng Jùnliàng
fc5365fe4a
Fix parameter expression get binding (#10912)
* fix: parameter expression closure should not have access to the declaration inside function body

* fix: renameVisitor should skip when a pattern is a scope

* address review comments
2019-12-24 15:18:46 -05:00
Kai Cataldo
ee5b79d75d @babel-core: parse should parse only (#10914)
* @babel/core: parse methods should parse only

* Update Flow types
2019-12-24 18:28:57 +01:00
Huáng Jùnliàng
875e9619b7
chore: refine e2e test scripts (#10918) 2019-12-24 12:25:23 -05:00
Huáng Jùnliàng
a18166d2a9 refactor: remove inClassProperty parser state (#10906) 2019-12-24 11:43:39 +01:00
Kai Cataldo
c09664f35d @babel/eslint-parser: Refactor (#10916) 2019-12-23 23:12:07 +01:00
Huáng Jùnliàng
83993b08d5 chore: separate build-standalone with coverage (#10905)
* chore: separate build-standalone with coverage

* style polish
2019-12-23 19:03:45 +01:00
Barthélémy Ledoux
f651f22f96 fix: lost leading comment after named import (#10901)
* create test for 10892

* update expected output

* fixed #10892

* add colon to restart build

* remove colon as it makes tests fail
2019-12-22 10:22:28 +01:00
Tsubasa Nakayama
416ce35638 fix: Object.getOwnPropertySymbols called on non-object (#10902)
* fix: Object.getOwnPropertySymbols called on non-object

* convert Object
2019-12-22 00:16:51 +01:00
Huáng Jùnliàng
c5cfc83182 Move coverage to GitHub actions (#10898)
* chore: remove Circle CI test config

* chore: add GitHub Actions: Report Coverage

* chore: polish the step names

* chore: remove Circle CI test job definition

* chore: remove cache actions as it seems that they are hanging forever
2019-12-20 21:32:22 +01:00
Nicolò Ribaudo
d389b702e6 Remove reverted PR from changelog [skip ci] 2019-12-19 02:02:16 +01:00
Babel Bot
aaa1b1f4b0 Add v7.7.7 to CHANGELOG.md [skip ci] 2019-12-19 00:53:52 +00:00
Nicolò Ribaudo
12da0941c8 v7.7.7 2019-12-19 01:33:19 +01:00
Huáng Jùnliàng
9be27bcfea fix: add computed property support for object Ref (#10863)
* fix: add computed property support for object Ref

* Apply suggestions from code review

Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

* Update output.js
2019-12-19 01:29:46 +01:00
Nicolò Ribaudo
c0d0bf2e5e Update core-js fixtures 2019-12-19 01:28:41 +01:00
Huáng Jùnliàng
e85c9b9ec8 fix: skip merging large input sourcemaps (#10890) 2019-12-19 01:16:20 +01:00
Nicolò Ribaudo
80e95d0c83 Fix flow 2019-12-18 14:34:06 +01:00
Raja Sekar
dbf3f91f1e Revert "Prevent ignored files in out dir (#10831)" (#10886)
This reverts commit 2b3590929b4eb955b0e8b287f9749b5af66cc1a0.
2019-12-18 11:17:35 +01:00
Huáng Jùnliàng
aa814073b7 Ignore some files in npm package (#10882) 2019-12-17 23:53:53 -06:00