14963 Commits

Author SHA1 Message Date
Sneh Khatri
d6ff91d560
Fix unicode handling in generated function names (#14047) 2021-12-20 22:03:35 +01:00
Huáng Jùnliàng
ad17fe1cce
fix: check preceding line break before exclamation (#14049) 2021-12-16 15:50:15 -05:00
Babel Bot
7178fbb008 Add v7.16.6 to CHANGELOG.md [skip ci] 2021-12-14 23:39:47 +00:00
Babel Bot
5687ade5e7 v7.16.6 2021-12-14 23:32:57 +00:00
Huáng Jùnliàng
7794201940
fix: handle tokens for invalid template element (#14055) 2021-12-14 17:54:09 -05:00
Nicolò Ribaudo
f32e3dddc4
Update jest-worker in CRA tests (#14050) 2021-12-14 01:09:34 +01:00
Babel Bot
bd3e6b1dd8 Add v7.16.5 to CHANGELOG.md [skip ci] 2021-12-13 22:29:32 +00:00
Babel Bot
7b7ab94066 v7.16.5 2021-12-13 22:12:58 +00:00
Nicolò Ribaudo
7dec78de28
Skip hasMoreThanOneBinding tests on publish (#14048) 2021-12-13 23:07:24 +01:00
Sneh Khatri
a7acde3885
Fix: default rest argument array elements as undefined (#14032) 2021-12-13 21:51:57 +01:00
Sneh Khatri
add64e870b
Don't resolve shadowed arguments variables from functions (#14036) 2021-12-13 18:29:10 +01:00
Nicolò Ribaudo
dfcfbf3b27
Disable test262 CircleCI job (#14044) 2021-12-11 17:49:33 +01:00
Nicolò Ribaudo
2d9fb7f83b
Pin jest-worker to 27.2.1 in CRA e2e tests (#14040) 2021-12-11 17:31:54 +01:00
wentout
c59870c526
Mark class prototype as read-only (#12115)
* initial code 2 fix the issue #2025

* Mark class prototype as read-only

* Update fixtures

* Fix failure

* Update Babel 8 fixtures

* Disable in loose mode

* Update fixtures

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-12-10 21:44:48 +01:00
Huáng Jùnliàng
39080492f4
maintain estree string literal shape when cloned (#14039) 2021-12-09 17:58:25 -05:00
Huáng Jùnliàng
94af0e5c62
Improve template tokenizing (#13919)
* add benchmarks

* refactor: tokenize template as middle + tail

* perf: avoid push tc.brace

* refactor: overwrite skipSpace in jsx plugin

* transform tl.templateMiddle/Tail

* refactor: simplify JSX context tracking

* fix flow error

* refactor: move JSX context to context.js

* fix: ensure comment stack is correctly handled

* rename createPositionFromPosition

* rename token type and methods

* add tokenIsTemplate

* refactor: merge babel 7 logic in babel7CompatTokens

* fix flow error
2021-12-06 16:43:46 -05:00
Nicolò Ribaudo
3a85ddfb1b
Bring back deferred require() calls in core and cli (#14028) 2021-12-06 21:33:33 +01:00
Nicolò Ribaudo
2a3b0b9601
Update @typescript-eslint/* packages (#14029) 2021-12-05 23:20:11 +01:00
Sneh Khatri
a943f576d1
Fix duplicate declaration error on ambient class declarations (#14016) 2021-12-05 18:24:56 +01:00
Nicolò Ribaudo
2d989a983d
Run tests in a native Node.js ESM environment (#13966) 2021-12-03 15:32:58 +01:00
Nicolò Ribaudo
578ab22fb7
Update test262 parser tests ignoredFeatures list (#14019) 2021-12-03 09:06:42 -05:00
Babel Bot
2597184d27
Update test262 (#14020) 2021-12-03 11:05:13 +01:00
Kyle Rosenberg
4079ee519f
Support flow function type annotation with no parent (#14014) 2021-12-02 20:16:19 -05:00
J. S. Choi
f4236f43a1
Extend hasPlugin to accept plugin-configuration array pairs (#13982)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-12-02 23:17:51 +01:00
renovate[bot]
ecae53a98e
chore(deps): update dependency typescript to ~4.5.0 (#14018)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
2021-12-02 16:59:11 +01:00
Sneh Khatri
029cd15bd9
Fix JSX pragma anywhere in comment (#14012)
* Fix JSX pragma anywhere in comment

* jsx regex patterns support jsx docs

* removed extra spaces from regex patterns
2021-12-02 10:35:44 -05:00
Nicolò Ribaudo
36a5ac4145
Fix handling of this&co in computed keys in arrows transform (#14005) 2021-11-30 22:54:17 +01:00
chimurai
893650130a
chore(deps): update dependency husky to v7 (#14011) 2021-11-29 22:04:50 +01:00
Nicolò Ribaudo
29de280006
Use Node.js interop when importing lib in test (#13995) 2021-11-29 21:48:34 +01:00
Nicolò Ribaudo
1bbe1fc3cb
Regenerate monorepo READMEs (#14006)
* Fix script to generate readmes

* Regenerate READMEs
2021-11-29 10:03:23 -05:00
Huáng Jùnliàng
4a337538f9
chore: update @babel/* deps (#14002) 2021-11-29 08:54:15 -06:00
Nicolò Ribaudo
23fec0c8c9
Update to prettier 2.5.0 (#14000) 2021-11-26 10:48:16 +01:00
Babel Bot
bafa016bff
Update test262 (#14001) 2021-11-26 01:23:17 +01:00
Bogdan Savluk
0058b7fef4
Migrate Babel from Flow to TypeScript (except Babel parser) (#11578)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-25 23:09:13 +01:00
Nicolò Ribaudo
473f145b27
Don't use ESM for required files in @babel/helpers tests (#13996) 2021-11-25 16:19:07 +01:00
Huáng Jùnliàng
55f020e02d
Convert proposal-object-rest-spread to TS (#13948)
* chore: add typings to object-rest-spread

* chore: bundle object-rest-spread package

* improve type inference

* address review comments
2021-11-24 10:48:31 -05:00
Nicolò Ribaudo
ad1798ed48
Only bundle the release build, and don't import src in tests (#13978)
* Only bundle the release build, and don't import `src` in tests

* Use file extension to signal skipping

* Remove unnecessary config change

* Fix imports
2021-11-24 10:08:53 -05:00
Nicolò Ribaudo
75996cb62b
Use full import specifier path in tests (#13938) 2021-11-24 11:43:18 +01:00
Huáng Jùnliàng
a470f7b479
Recover from shorthand assign exprs (#13968)
* refactor: avoid duplicate property access

* refactor: tweak parseMember

* polish: recover from shorthand assign in exprs
2021-11-19 10:22:29 -05:00
Babel Bot
d017d43535
Update test262 (#13979) 2021-11-19 01:09:44 +01:00
Nicolò Ribaudo
90c659b4cb
Fail CI when @babel/runtime ESM tests fail (#13976) 2021-11-19 00:22:32 +01:00
Mickey Rose
cd77ad1680
minify helpers-generated.ts (#13837)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-18 23:51:28 +01:00
Huáng Jùnliàng
d30308fe8e
fix: update UnexpectedPrivateField error message (#13975) 2021-11-17 18:54:23 +01:00
Babel Bot
6e2222756d Add v7.16.4 to CHANGELOG.md [skip ci] 2021-11-16 22:46:57 +00:00
Babel Bot
99774ee9fa v7.16.4 2021-11-16 22:37:47 +00:00
Sosuke Suzuki
87fc2e76d7
Add assertions to ExportNamedDeclaration without from (#13957) 2021-11-16 11:53:28 +01:00
Francisco Ryan Tolmasky I
966387d263
Always expose expressionValue in DirectiveLiteral nodes (#13960)
* fix(babel-parser): Move storage of expressionValue in DirectiveLiteral to main parser so it is accessible to others.

Closes #13953.

Reviewed by @tolmasky.

* Add results from running `OVERWRITE=true yarn jest babel-parser`.

Reviewed by @tolmasky.
2021-11-13 20:46:16 -05:00
M Behzad
d3fffd95b6
Add file extension when using absoluteRuntime (#12827)
* fix: add file extention when the absolute path to the runtime files are used (#12824)
the es module imports need the file extention (e.g. import "@babel/runtime/helpers/jsx.js", Or the filenames being listed in the package.json's subpath exports (e.g. "import "@babel/runtime/helpers/jsx" + pkg: "./helpers/jsx": "./helpers/jsx.js"). when the user passes a path via `absoluteRuntime` then the rendered require staemnts is not the module name + subpath which will be resolved via pkg.json but rather the absolute path to the file. for this case, add the file extention / index.js to prevent bundlers from raising a warning.

* Update deps

* Fix imports resolution

* Update fixtures (Windows)

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
2021-11-14 02:03:30 +01:00
Nicolò Ribaudo
d16f8111ea
Wait the correct number of ticks on nested await (#13961) 2021-11-14 02:02:35 +01:00
Huáng Jùnliàng
54c539ecc1
Refactor bindingProperty parsing (#13929)
* refactor: inline parseMaybePrivateName

* correct test case

* perf: fast exit in checkExpressionErrors

* refactor: add parseBindingProperty

* fix: private property with variance

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

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

* chore: update testcase

* refactor: remove refExpressionErrors for record/tuple

They are always non-ambiguous.

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2021-11-12 10:11:46 -05:00