13953 Commits

Author SHA1 Message Date
Brian Ng
3ba1ece0ce
Fix printing TSTypeOperator (#12114) 2020-09-28 11:01:13 -05:00
Huáng Jùnliàng
62df8d2b79
fix: push exported variable when hoisting export declared names (#12110) 2020-09-28 11:38:39 -04:00
Niklas Mischkulnig
a080c82777
[cjs] Skip duplicate reexported bindings in namespace reexports (#11739) 2020-09-28 16:22:13 +02:00
Sosuke Suzuki
39a12674b4
Improve syntax error for class fields in ambient context (#12108)
* Improve error messages for ambient context class fields

* Modify switching state.isDeclareContext for class fields with declare
2020-09-26 15:52:12 -04:00
Huáng Jùnliàng
3d5da4c2b9
fix: apply terser plugin only on *.min.js (#12099)
* fix: apply terser plugin only on *.min.js

* chore: move rollup terser to output plugin

* chore: simplify rollup build scripts
2020-09-26 15:50:34 -04:00
Sosuke Suzuki
434b65bc2a
[ts] Throw a syntax error for index signature with declare (#12111) 2020-09-26 18:06:13 +02:00
overlookmotel
1a074ee7e6
Ensure expressions wrapped in parens (#12082) 2020-09-25 15:58:04 -05:00
Huáng Jùnliàng
63d9f5397b
Update minimum node version in build requirement (#12098) 2020-09-25 15:25:42 -04:00
Ananda Umamil
af612db8c3
Fix @babel/generator does not print decorators of private properties (#12081) 2020-09-25 08:16:28 -05:00
Huáng Jùnliàng
6d87f46a7a
Bump compat-table (#12073)
* chore: update compat-table data source

* refactor: use chromeVersions from electron-to-chromium

* chore: deduplicate yarn.lock
2020-09-24 16:28:26 -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
Sosuke Suzuki
0d32e3fc36
Add missing tests for TypeScript syntax errors (#12103)
* Add missing tests for index signatures with modifiers

* Add missing test for import type
2020-09-24 14:38:11 -04:00
Tim Gates
1334bc99e0
docs: Fix simple typo, preprelease -> pre-release (#12102)
There is a small typo in packages/babel-core/src/transformation/file/file.js, packages/babel-plugin-transform-runtime/src/helpers.js.

Should read `pre-release` rather than `preprelease`.
2020-09-23 16:06:21 -04:00
Justin Ridgewell
f49234aa69
Add sourcemap markings for each line of a string (#12086)
* Add sourcemap markings for each line of a string

Fixes https://github.com/babel/babel/issues/12083

* Fix for multiple newlines

* Optimize with indexOf

* Comment explaining newline search
2020-09-22 21:36:21 -04:00
Sosuke Suzuki
a4a14caee7
Throw a syntax error for empty type parameter/argument (#12088) 2020-09-22 08:26:30 -05:00
Sosuke Suzuki
cb4e436018
Throw an error for a declare class field that have an initializer (#12093) 2020-09-22 08:23:58 -05:00
Sosuke Suzuki
3628c52867
Do not throw an error for optional binding pattern params in function declaration (#12085) 2020-09-21 09:14:13 -05:00
fisker Cheung
18d13d0032
Fix invalid setter parse (#12076)
* Fix invalid `setter` parse

* estree

Co-authored-by: Brian Ng <bng412@gmail.com>
2020-09-19 10:03:35 +02:00
Sosuke Suzuki
ae18f9c0d9
Throw a syntax error for a declare function with a body (#12054) 2020-09-19 00:35:37 +02:00
Brian Ng
6182001a4c
Bump regexpu-core (#12077)
* Bump regexpu-core

* dedupe
2020-09-18 15:36:37 -04:00
Brian Ng
37a02dfc0e
Bump Babel deps (#12078) 2020-09-18 13:07:48 -05:00
Barron Wei
1a8e7ff2ec
fix(do-expr): SwitchStatement with IfStatement cases (#11728)
* test(do-expr): condition before break

* test(do-expr): labeled break

* fix(do-expr): add check for break in BlockStatement

* fix(do-expr): add LabeledStatement case for getCompletionRecords

* test(do-expr): rename condition before break to condition before expression

* revert(do-expr): undo remove break for do switch

* revert(do-expr): undo remove labeled break

* test(do-expr): add condition before break

* test(do-expr): update condition before break

* test(do-expr): remove labeled break

* fix(do-expr): add tree search in findBreak

* fix(do-expr): ignore isFunction case in findBreak
2020-09-18 10:34:35 -04:00
Huáng Jùnliàng
44f8287d7a
chore: pin browserslist version to 4.12.0 (#12070) 2020-09-17 21:46:38 +02:00
Sosuke Suzuki
7028a14c7f
fix: throw for constructors with type parameters (#12065)
* Throw a syntax error for a constructor with type parameters

* Modify to match error location with TypeScript

* Update typescript parser tests

Update allowlist.txt
2020-09-17 13:03:33 -04:00
Huáng Jùnliàng
69e98fcf4a
chore: add git-blame-ignore-revs (#12063) 2020-09-17 09:37:10 -05:00
Sosuke Suzuki
bbe0cf09fc
Throw a syntax error for a parameter properties in not constructor (#12061) 2020-09-14 16:28:06 -05:00
Huáng Jùnliàng
c8f0b6dc1e
chore: use latest node on ci workflow when possible (#12049) 2020-09-10 17:33:19 -04:00
Huáng Jùnliàng
70cf2d704a
chore: remove unused dependencies (#12044) 2020-09-09 22:05:57 -04:00
Huáng Jùnliàng
20fd450ab7
Update CHANGELOG.md 2020-09-03 11:57:40 -04:00
Babel Bot
a8e5fc1540 Add v7.11.6 to CHANGELOG.md [skip ci] 2020-09-03 15:55:50 +00:00
Huáng Jùnliàng
e51139d7fd v7.11.6 2020-09-03 11:11:11 -04:00
Huáng Jùnliàng
a8505c2c96
Revert "Update Yarn to 2.2.2 (#12023)" (#12031)
This reverts commit b5481cccbf4aeac6bfdf1c3e37ccc7de5a70c3b9.
2020-09-03 11:09:23 -04:00
Huáng Jùnliàng
2026a42497
Run prepublish build after versioning (#12028)
* test: run prepublish-build after versioning in publish test

* chore: run yarn install when lerna version is invoked
2020-09-03 08:25:44 -04:00
Huáng Jùnliàng
b5481cccbf
Update Yarn to 2.2.2 (#12023)
* chore: update Yarn to 2.2.2

* chore: add yarn dedupe check on CI
2020-09-03 09:24:34 +02:00
Huáng Jùnliàng
a91fdeb1f6
Revert #12014 (#12027)
* Revert "chore: bump source-map to 0.6.1 (#12014)"

This reverts commit d5bcc08bf7134db165af91a88a61c8c6bfe39144.

* test: add regression tests for #12025
2020-09-01 15:42:01 -04:00
Nicolò Ribaudo
cb3a9515b8
Update CHANGELOG.md [skip ci]
Replaced the list of all the packages in the Yarn 2 commit with "Every package", as already done in the past, to make it more readable.
2020-09-01 14:59:56 +02:00
Jan Brašna
a023b6456c
docs: Fix minor link wording woes [skip ci] (#12024)
* Fix design/monorepo.md DO blog link [skip ci]

* Fix README signup wording [skip ci]

* Update README link [skip ci]

* Fix CONTRIBUTING signup wording [skip ci]

* Fix CONTRIBUTING Slack link [skip ci]
2020-08-31 23:29:29 -04:00
Huáng Jùnliàng
3342374710 chore: update yarn.lock 2020-08-31 16:08:41 -04:00
Babel Bot
d0671e72b3 Add v7.11.5 to CHANGELOG.md [skip ci] 2020-08-31 20:05:30 +00:00
Huáng Jùnliàng
af64ccb2b0 v7.11.5 2020-08-31 15:54:06 -04:00
Joe Haddad
371e152cd2
fix(jsx): do not throw on generated element in development mode (#12017)
* Fix `jsxDEV` for generated elements

* Throw invariant error

* Add test

* test: revise test layout

* fix: node 6 does not support trailing comma

* Use undefined node

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-08-31 15:16:47 -04:00
Huáng Jùnliàng
ce6a7f1d98
Remove unused enhanced-resolve and normalize lock resolutions (#12013)
* chore: remove enhanced-resolve

It was introduced as a peer dependency of `webpack-dependency-suite`, see https://github.com/babel/babel/pull/7453 and https://travis-ci.org/github/babel/babel/jobs/347175454#L545

* chore: remove custom @lerna/collect-updates resolution

The forked @lerna/collect-updates are meant to update runtime-corejs2 when helpers
are updated. However they are now always force published. So we don't need the fork
anymore
2020-08-27 20:12:41 -04:00
Huáng Jùnliàng
d5bcc08bf7
chore: bump source-map to 0.6.1 (#12014) 2020-08-27 17:17:49 -04:00
Huáng Jùnliàng
8d59ff658d
chore: use Rollup 2 (#12010)
* chore: use Rollup 2

* chore: downupgrade @rollup/plugin-commonjs to 13.0.2

* nit: restore extraPlugins move

* chore: remove unused rollup-plugin-babel

* chore: bump rollup-plugin-terser to 7.0.0

* chore: remove invalid terser options
2020-08-26 18:20:14 -04:00
Huáng Jùnliàng
2c60595342
fix: ExpressionBody should respect [In] parameter (#11931) 2020-08-26 13:24:44 -04:00
Huáng Jùnliàng
97075c9091
Restructure CI workflow (#12002)
* chore: share build artifacts in node version tests

* chore: build runtime in test stage

* Update .github/workflows/ci.yml

* Update .github/workflows/ci.yml

* Update .travis.yml

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-08-26 13:14:04 -04:00
Huáng Jùnliàng
b8f3453d3c
chore: improve Yarn 2 cache on CI (#11781)
* chore: add cache actions for yarn

* chore: validate yarn cache before CI jobs

* chore: remove restore-keys as cache-hit must be true

* chore: disable post install scripts in yarn-cache validate

* chore: use pnp linker in validate-yarn-cache step

* chore: add job names
2020-08-26 11:53:06 -04:00
Huáng Jùnliàng
2e20f1b8a6
add test on ES2021 features (#12005) 2020-08-25 15:23:45 -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
Giovanni Calò
304eea4133
Added linting support for private class methods (#11993)
* Added linting support for private class methods

* Renamed variable

* Renamed variable
2020-08-24 14:57:17 -04:00