14204 Commits

Author SHA1 Message Date
Huáng Jùnliàng
bc39a081f5
chore: update typescript to 4.1.3 (#12652) 2021-01-18 15:13:11 -05:00
Huáng Jùnliàng
ddd7cc6f83
chore: update rollup to 2.36 (#12651) 2021-01-18 15:12:55 -05:00
Armano
53f9fcd5f3
test: reuse lodash library within eslint tests (#12640) 2021-01-18 09:00:22 -06:00
Babel Bot
5a193cc14c
Update test262 (#12636) 2021-01-15 02:06:11 +01:00
Brian Ng
fec4a132ad
Bump prettier@2.2.1 (#12633) 2021-01-14 14:10:47 -05:00
Huáng Jùnliàng
6e9a174e7f
fix: print warning messages to stderr (#12626) 2021-01-14 08:45:48 -05:00
Chris West
bd4590e546
fix: cloneNode(deep, withoutLoc) handles absent comments (#12602)
This fragment (maybe all fragments?) throw during cloning, as
'comments' is unset here. Handle it being unset, by returning
undefined.
2021-01-12 20:40:23 -05:00
Huáng Jùnliàng
62290aa1ba
[babel 8] Don't create TSParenthesizedType nodes by default (#12608)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Sergey Melyukov <s.melukov@gmail.com>
2021-01-13 01:13:09 +01:00
Leslie Leigh (李的序)
2338b052ad
[systemjs] Fix: export star alongside with named export (#12612) 2021-01-13 00:12:12 +01:00
Nicolò Ribaudo
58d2f41930
Transform labeled for-of inside braceless if statement (#12611) 2021-01-12 12:19:15 -06: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
Huáng Jùnliàng
e004a91566
[babel 8] chore: do not push objectRestSpread parser option (#12607)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-01-12 10:46:52 +01:00
Zen
cba64f9a09
Correctly access shadowed class binding in super.* (#12544)
* rename own binding inside methods if it collides with class ref. fix #11994

* fix name collisions in constructor

* do fix name collisions in constructor

* move logic in ReplaceSupers

* fix tests of helper-create-class-features-plugin

* remove replaceSupers in pushConstructor

* use environmentVisitor

* skip classLike nodes

* fix super ref in computed key
2021-01-12 02:31:06 +01:00
Nicolò Ribaudo
4f83a09dd8
Load jsx-runtime after existing imports (#12546)
Co-authored-by: Brian Ng <bng412@gmail.com>
Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
2021-01-10 16:23:22 +01:00
Zen
6c9a481e83
@babel/preset-typescript: fix tsx assigment issue (#12599) 2021-01-10 09:21:39 -06:00
Nicolò Ribaudo
fce3e7124a
[babel 8] Remove useSpread and useBuiltIns jsx options (#12593)
* [babel 8] Remove `useSpread` and `useBuiltIns` jsx options

backport of 8cc8696851fa4bf02d7f6ae591404626d1ca32a3

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Brian Ng <bng412@gmail.com>

* Update fixtures (Windows)

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
2021-01-08 18:16:30 +01: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
6e70deabcf
Use correct label for "Update Parser Tests" action (#12596) 2021-01-07 21:52:54 -05:00
Babel Bot
37f3aabb66
Update test262 (#12595) 2021-01-08 01:45:09 +01:00
Nicolò Ribaudo
50462eb5e4
[babel 8] Enable allowDeclareFields option by default with TS (#12461) 2021-01-08 01:28:20 +01:00
Huáng Jùnliàng
ff52acee79
[babel 8] Type checking preset-typescript options (#12460)
* refactor: extract option normalization in preset-typescript

* breaking: type checking preset-typescript options

* chore: bundle preset-typescript into a single lib

* test: disable Babel 7 test on Babel 8 breaking change test

* workaround Jest 24 error snapshot dedent issue

* skip Babel 8 test when the Breaking ENV is not available

* chore: update test snapshot

* Update packages/babel-preset-typescript/test/normalize-options.spec.js

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

* update test fixtures

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-01-07 20:58:58 +01:00
Nicolò Ribaudo
866a742bf7
Remove remaining references to lerna (#12592) 2021-01-07 10:22:23 +01:00
Nicolò Ribaudo
c8117b6a49 fixup! Remove dependency from update-windows-fixtures job 2021-01-06 19:16:20 +01:00
Nicolò Ribaudo
47312bf1d1
Add a utility action to update fixtures in PRs (#12547) 2021-01-06 19:13:21 +01:00
Sosuke Suzuki
c1473e30b2
[ts]Add optional property to OptionalCallExpression node that has type arguments (#12562) 2021-01-06 08:41:45 -06:00
Bogdan Savluk
584518d04c
Improve types in @babel/helper-function-name (#12550) 2021-01-06 14:12:45 +01:00
Daniel Arthur Gallagher
e8b08523f4
docs: add package-specific documentation links (#12531)
[skip ci]
2021-01-06 14:11:53 +01:00
Nicolò Ribaudo
fb12afc289
Declare template objects inline (#12588) 2021-01-05 23:25:15 +01:00
Martin Packman
ed90f17978
Optimize jsx spreads of object expressions (#12557) 2021-01-05 23:04:26 +01:00
Babel Bot
0d6063f1b9
chore: update test262 to 9ca13b12728b7e0089c7eb03fa2bd17f8abe297f (#12579) 2021-01-03 23:59:04 +01:00
Niklas Mischkulnig
fdb5829a60
Use isIdentifierChar instead of regex for toIdentifier (#12575)
* Use isIdentifierChar instead of regex for toIdentifier

* Apply suggestions from code review

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

* Undo dep

* Update packages/babel-types/test/converters.js

* Add testcase starting with a number

* Add test for non-ascii starting character

Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2020-12-31 11:22:46 -05:00
Simen Bekkhus
2d35f5a8f7
fix(code-frame): do not pad gutter of empty lines (#12567)
* fix(code-frame): do not pad gutter of empty lines

* Add workaround for expected Jest e2e test failure

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-12-29 15:26:13 +01:00
Nicolò Ribaudo
fbef603c43
Report a SyntaxError for } and > in JSX text (#12451)
cherry-pick  #11046

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

Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
Co-authored-by: Kai Cataldo <kai@kaicataldo.com>
2020-12-28 19:04:54 +01:00
Zach Panzarino
0dbc3dd4a0
Add errorRecovery option to type definitions in babel-parser (#12564)
* Fix options types for babel-parser

* I love editing files on gh.com
2020-12-27 13:25:48 +01:00
Babel Bot
0d55896483 Add v7.12.12 to CHANGELOG.md [skip ci] 2020-12-23 14:06:07 +00:00
Nicolò Ribaudo
d88c60cea9 v7.12.12 2020-12-23 14:55:59 +01:00
Nicolò Ribaudo
5b5b548036
Publish to npm from GitHub actions (#12526)
* Publish to npm from GitHub actions

* Remove publish-ci from Makefile

This was meant to be used _now_, but I didn't end up using it

* Test

* Revert "Test"

This reverts commit 04095c17db8352710c12849a5b1fa53e853bd6f5.
2020-12-23 00:18:03 +01:00
Nicolò Ribaudo
d9dfd29ce8
Archive @babel/polyfill (#12541)
babel/babel-archive@701775cd9f
2020-12-22 16:52:40 +01:00
Babel Bot
60138bea0d
chore: update test262 to b2e9dff2816cceb5ee84c0c226c50a31d01a7297 (#12539) 2020-12-22 10:39:39 -05:00
Nicolò Ribaudo
17d62c3743
refactor: Move react-jsx-development implementation into react-jsx (#12524)
* Move react-jsx-development implementation into react-jsx

* Move helper-builder-jsx-experimental into transform-react-jsx

* Move JSX validation

* Move Program visitor

* introduce get/set utils

* pre -> getTag

* Dedupe code

* post -> getState

* Simplify logic

* Move final pieces

* Other simplifications

* Update lockfile

* Fix standalone bundling
2020-12-22 11:53:14 +01:00
Zen
e08f68bf61
Skip discriminant when renaming starting from SwitchStatement (#12530) 2020-12-22 03:10:43 +01:00
Huáng Jùnliàng
814212f0be
Remove babel polyfill from fixture test runner (#12130)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-12-22 02:42:39 +01:00
Huáng Jùnliàng
14534e6f78
polish: create ascii-only labels [skip ci] (#12540) 2020-12-22 01:52:12 +01:00
Huáng Jùnliàng
1805d50bb8
fix parser tests updater again (#12538) 2020-12-21 18:09:07 -05:00
Huáng Jùnliàng
bb2343aba4
fix: updater does not work on main branch (#12537)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-12-21 17:06:15 -05:00
Huáng Jùnliàng
0f866ed9d2
Add a workflow to update test262 tests weekly (#12523)
* chore: draft update parser tests workflow

* Build babel parser

* chore: use Babel bot as git user name

* use babel-bot token

* refactor: use actions/github-script

* rename
2020-12-21 10:04:57 -05:00
Nicolò Ribaudo
56c7024d5d
Update release-tool and define implicit deps for runtime (#12527) 2020-12-19 01:13:01 +01:00
Huáng Jùnliàng
d28c1e52d0
Enable PnP linker on CI build job (#12011)
* chore: use pnp when building babel artifacts

* chore: refine ci config

* fix: match any n_m as unambiguous

The pnp module path starts from global cache path, which does not
match **/n_m

* fix: remove dedupe option and abort rollup on unexpected warning messages

* chore: suppress Circular_Dependency warning

* fix build error

* replace make bootstrap-only by yarn install
2020-12-18 19:00:43 -05:00
Nicolò Ribaudo
b9deeb458b
Restore @babel/types support for old TS versions (#12521) 2020-12-17 18:34:23 +01:00
Nicolò Ribaudo
bfb51362c7
Fix annex B block function hoisting semantics (#12512) 2020-12-16 18:42:00 +01:00