13459 Commits

Author SHA1 Message Date
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
Nicolò Ribaudo
d0a8982c12 Ignore .map files in standalone packages (#10994) 2020-01-12 19:43:10 -05:00
Nicolò Ribaudo
a677d59a63
Archive syntax plugins enabled by default (#10820)
* Remove syntax plugins enabled by default

Moved to babel-archive: babel/babel-archive@8f23ddce03

- `@babel/plugin-syntax-async-generators`
- `@babel/plugin-syntax-bigint`
- `@babel/plugin-syntax-dynamic-import`
- `@babel/plugin-syntax-json-strings`
- `@babel/plugin-syntax-nullish-coalescing-operator`
- `@babel/plugin-syntax-object-rest-spread`
- `@babel/plugin-syntax-optional-catch-binding`
- `@babel/plugin-syntax-optional-chaining`

* Fix build script

* Fix jest config

* Remove archived plugins from tests
2020-01-13 00:31:48 +01:00
Babel Bot
c7f7f9b8b5 Add v7.8.2 to CHANGELOG.md [skip ci] 2020-01-12 22:50:23 +00:00
Nicolò Ribaudo
61d01f1114 v7.8.2 2020-01-12 23:44:39 +01:00
Haoqun Jiang
f995f8e02c fix: isPluginRequired returns the opposite result in v7.8.0 (#10992) 2020-01-12 23:43:03 +01:00
Babel Bot
2ccc451e96 Add v7.8.1 to CHANGELOG.md [skip ci] 2020-01-12 13:04:04 +00:00
Nicolò Ribaudo
575eeb370e v7.8.1 2020-01-12 13:58:53 +01:00
Nicolò Ribaudo
27668377b5
Downgrade semver for compatibility with Node 6 (#10991) 2020-01-12 13:56:09 +01:00
Nicolò Ribaudo
d1c93e7e3e
Remove ESLint packages from the changelog
They are not published
2020-01-12 01:54:11 +01:00
Babel Bot
9647560dd6 Add v7.8.0 to CHANGELOG.md [skip ci] 2020-01-12 00:27:36 +00:00
Nicolò Ribaudo
2486615a74 v7.8.0 2020-01-12 01:09:29 +01:00
Kai Cataldo
d8e6219ad9 @babel/eslint-plugin: Update rules/tests to use @babel/eslint-parser (#10977)
* Use @babel/eslint-parser for tests

* Update rules/tests

* Update docs

* add @babel/eslint-shared-fixtures to package.json

* remove bug fix

* convert RuleTester to ESM

* Update devDep versions
2020-01-11 20:42:21 +01:00
Huáng Jùnliàng
81c5f1f22d
Disallow private name in object elements and TS type elements (#10980)
* fix: disallow private name in object member and TS type elements

* chore: update test262 whitelist

* chore: make flow happy

* Update packages/babel-parser/src/parser/expression.js

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

* chore: update test fixtures

* Update packages/babel-parser/src/parser/expression.js

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

* chore: update test fixtures

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
2020-01-11 11:26:10 -05:00
Nicolò Ribaudo
e7b80a2cb9
Improve @babel/types with env.BABEL_TYPES_8_BREAKING (#10917)
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2020-01-11 10:34:30 +01:00
Huáng Jùnliàng
405c1aaad8 Merge env-standalone to babel-standalone (#10821)
* feat: add babel-preset-env to babel-standalone

* chore: copy preset-env-standalone test

* polish: tune warning message when babel-preset-env-standalone is loaded
2020-01-11 10:31:29 +01:00
Huáng Jùnliàng
a1310333f7 chore: update corejs fixtures (#10983) 2020-01-11 09:23:58 +01:00
Huáng Jùnliàng
903ad6160d
Filename detection should respect short flags (#10763)
* chore: add test files

# Conflicts:
#	packages/babel-node/package.json

* fix: respect short flags when finding filename index

* fix: use attributeName for kebab-case
2020-01-10 20:46:19 -05:00
Anders Kaseorg
5a3e97073e CONTRIBUTING: Update link to plugin-features.js [skip ci] (#10982)
It was moved in #10899.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2020-01-10 20:43:10 -05:00
Yordis Prieto
4c28f54152 Add babelrc.json support (#10783)
* Add babelrc.json support

* Add tests

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-01-10 23:41:42 +01:00
Nicolò Ribaudo
ae06baf22f
Add support for babel.config.mjs and .babelrc.mjs (#10903)
* Add support for babel.config.mjs and .babelrc.mjs

* Use path.extname
2020-01-10 23:14:29 +01:00
Nicolò Ribaudo
282f81bd67
Prepare @babel/core for asynchronicity (#10507)
* Prepare @babel/core for asynchronicity

* Include regenerator-runtime in standalone build

* Fix rollup build
2020-01-10 22:44:13 +01:00
Huáng Jùnliàng
9fec528016 Reduce false negative cases of typescript parser tests (#10979)
* tests: read baesline errors for typescript parsing error

* chore: add error codes

* chore: tune the regex
2020-01-10 22:11:10 +01:00
James Beavers
80aa7dc3c6 Add optional-chaining and nullish-coalescing to preset-env (#10811)
* Add support for optional-chaining (stage 4) in present-env

* revert babel-preset-env built-in-modules.json

* add shipped proposal syntax map entry, optional chaining

* update remaining syntax plugin references, proposal description

* Add support for nullish coalescing operator in preset-env

* selectively enable sort-keys rule

* enforce sort-keys on shipped-proposals

* don't use Object.entries()

* Update fixtures
2020-01-10 22:07:43 +01:00
Kai Cataldo
4cb2148273 @babel/eslint-plugin: remove deprecated rules (#10975) 2020-01-10 20:22:39 +01:00
Siddhant N Trivedi
3dcb8ca99e Added instructions to fork the repo in order to setup. (#10973)
* Added instructions to fork the repo to setup

* Capitalized Github and Indented the guidelines

[skip ci]
2020-01-10 20:05:58 +01:00
Nicolò Ribaudo
bfc56ebbab Update Test262, Flow and TS parser tests (#10976)
* Update Test262, Flow and TS parser tests

* Updates
2020-01-10 09:50:11 -05:00
Huáng Jùnliàng
e8dac621de
chore: specify package type (#10849) 2020-01-09 21:40:15 -05:00
Huáng Jùnliàng
44f9d85904 add allowTopLevelThis option to transform-modules-systemjs (#10780)
* feat: expose rewriteThis method

* feat: add allowTopLevelThis option to transform-modules-systemjs
2020-01-10 03:16:26 +01:00
Nicolò Ribaudo
04354d1556
Extract targets parser and compat data from preset-env (#10899)
* Extract targets parser and compat data from preset-env

* Review by Jùnliàng

* isItemRequired -> targetsSupported

* Export isRequired
2020-01-10 03:15:20 +01:00
jack
5f807ae45b Enable optional chaining by default in @babel/parser (#10817) 2020-01-10 03:09:39 +01:00
ZYSzys
646409b23e Use babel > as prompt in babel-node (#9695) 2020-01-10 03:04:02 +01:00
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