18599 Commits
Author SHA1 Message Date
Huáng JùnliàngandGitHub ba084ef619 Fix(parser): async x => {} must be in leading pos (#17839)
* test: add new test cases

* fix(parser):  async x => {} must be in leading pos
2026-02-27 15:40:50 -05:00
liuxingbaoyuandGitHub a90ebd5538 Avoid Prettier CI failure (#17842) 2026-02-27 21:03:18 +01:00
liuxingbaoyuandGitHub c344460fb9 Enable strictNullChecks for more packages (#17828) 2026-02-27 18:06:28 +01:00
Huáng JùnliàngandGitHub 60fc947de1 Improve F# pipeline direct body check (#17806) 2026-02-27 17:46:51 +01:00
liuxingbaoyuandGitHub 385383c17d fix: Remove decorators from TSDeclareMethod (#17835) 2026-02-27 17:46:22 +01:00
4cdafb148f Do not split awaitAsyncGenerator in await yield (#17362)
Co-authored-by: Babel Bot <[email protected]>
2026-02-27 17:17:32 +01:00
Huáng JùnliàngandGitHub fc9aaff2e9 chore: avoid outdated regex in readNumber (#17837) 2026-02-27 17:17:03 +01:00
Huáng JùnliàngandGitHub 48225ab82a fix(build-external-helpers): incorrect bin path (#17827)
* fix(build-external-helpers): incorrect bin path

* set bin to .mjs file

* update yarn lock

* fix: incorrect path in mjs file
2026-02-27 10:46:05 -05:00
Huáng JùnliàngandGitHub cc4da44a4d fix(parser): performance issue due to debug code (#17834)
* fix(parser): performance issue due to debug code

* perf(parser): avoid optional chain in node constructor

The optional chains do not affect Babel 7 because they are transpiled.
2026-02-27 10:45:40 -05:00
Babel BotandGitHub a12c880eec Update test262 (#17836)
chore: update test262 to a47576c9c5af16a77c97ac9af728209322bc3f71
2026-02-27 14:32:57 +08:00
Huáng JùnliàngandGitHub 3ee45ce171 Disallow non-leading solo await within F# pipeline (#17803)
* fix: disallow non-leading solo await

* add more test cases

* refactor: remove unused soloAwait state

* fix: disallow binary operator after solo await

* fix: respect [In] production parameter

* update babel-parser dts
2026-02-24 16:35:55 -05:00
liuxingbaoyuandGitHub 02478b1dd0 Enable strictNullChecks for create-class-features-plugin (#17824) 2026-02-25 02:52:20 +08:00
liuxingbaoyuandGitHub 0df1fbf0a4 Do not use the latest Node.js version in CI (#17826) 2026-02-25 02:23:40 +08:00
liuxingbaoyuandGitHub aeef3872c2 chore: Enable strictNullChecks for more packages (#17820) 2026-02-23 19:08:10 +01:00
Nicolò RibaudoandGitHub ebacc453d6 Pass file instead of path to importToPlatformApi builders (#17816) 2026-02-23 18:14:06 +01:00
dacd15bb83 Fix TypeScript parser failing on async calls in ternary consequent (#17799)
* Fix TypeScript parser failing on async calls inside ternary consequent

When the TypeScript plugin encounters `async(a)` followed by `:` inside
a ternary consequent, it incorrectly treats `:` as a return type annotation
for an async arrow function, rather than the ternary separator.

For example, `true ? async(a) : b => b` should parse as a ternary with
`async(a)` as the consequent (a call expression) and `b => b` as the
alternate (an arrow function). Instead, babel tried to parse
`async(a): b => b` as an async arrow with return type `b`.

This commit:
- Adds an `inConditionalConsequent` state flag set during ternary
  consequent parsing
- When the flag is active, `shouldParseAsyncArrow` no longer treats
  `:` as a return type annotation start
- Resets the flag inside parenthesized expressions, so
  `a ? (async(b): T => body) : c` still works correctly

Fixes #17547

* Address review: use this.next() instead of this.expect() and add tests from #17572

Since the `?` token is already verified at the start of parseConditional,
use `this.next()` to consume it instead of redundantly checking with
`this.expect()`. Also add additional conditional expression test fixtures
ported from #17572 to improve coverage of arrow/async ambiguity edge cases.

* Add expected output files for test fixtures from #17572

These test cases document known limitations of the current fix:
- arrow-ambiguity, arrow-like, arrow-param: Non-async arrow disambiguation
  in ternary expressions (out of scope for this PR)
- async-call, async-call-3: Edge cases where async call parsing interacts
  with nested arrow/paren contexts

* fix: replace throws expectations with output.json for async-call fixtures

The async-call and async-call-3 test fixtures had "throws" directives in
options.json expecting parse errors, but the parser fix now correctly
handles these cases. Replace with output.json files containing expected ASTs.

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-02-23 11:55:12 -05:00
Huáng JùnliàngandGitHub 27e95fa65d refactor: simplify hack pipeline tokenizer state (#17807) 2026-02-23 11:53:53 -05:00
Huáng JùnliàngandGitHub 2c02424707 Build: Ensure make build will build Babel parser typings (#17808)
* chore: remove .ts hooks from interpret

* chore: bump gulp to 5.0.1

* chore: restructure bundle-dts task

Split bundle-dts into bundle-babel-parser-dts and bundle-babel-packages-dts. Added bundle-babel-parser-dts task to the make watch

* add bundle-babel-parser-dts to make build

* update artifacts

* fixup makefile update

* update babel-parser dts banner

* chore: also build babel-parser dependencies

* add bundle-babel-parser-dts to ci build task

* yarn dedupe
2026-02-23 11:53:35 -05:00
Huáng JùnliàngandGitHub 9a958824de Bump @eslint/js to 10.0.1 (#17819)
* chore: bump @eslint/js to 10.0.1

* preserve-caught-error

* no-unassigned-vars

* disable a few eslint rules on identifier regex

* no-useless-assignment

* prefer-const

* chore: update test snapshot

* update comment
2026-02-20 13:58:44 -05:00
Huáng JùnliàngandGitHub 5a0aff8213 Support ESLint v10 for babel-eslint-plugin (#17811) 2026-02-20 13:44:03 +01:00
Babel BotandGitHub 9cc5d64169 Update test262 (#17814)
chore: update test262 to e0cf381364825aa67485dca11c0a7ac34c7c1753
2026-02-20 09:48:11 +01:00
Huáng JùnliàngandGitHub 47af34b2a4 chore: bump @babel/* to 8.0.0-rc.2 (#17810) 2026-02-19 11:57:39 -05:00
liuxingbaoyuandGitHub 96a2ab901b chore: Update prettier (#17809)
update
2026-02-19 10:02:29 -05:00
Huáng JùnliàngandGitHub 33698c1cd8 Fix TS5055 error when running make tscheck twice (#17802)
* build: include only dts from sub packages

* update artifacts
2026-02-17 11:43:13 +01:00
Babel Bot c6688f217c Add v8.0.0-rc.2 to CHANGELOG.md [skip ci] 2026-02-15 20:24:26 +00:00
Babel Bot 61fc88af27 v8.0.0-rc.2 v8.0.0-rc.2 2026-02-15 20:15:06 +00:00
Nicolò RibaudoandGitHub abae525b8f Set peer dep on @babel/core to workspace:^ (#17800)
* Set peer dep on `@babel/core` to `workspace:^`

* Other folders
2026-02-15 20:15:33 +01:00
Nicolò RibaudoandGitHub bf44c0be80 Remove Babel 7 plugins from parser types (#17793)
* Remove Babel 7 plugins from parser types

* Remove useless explicitResourceManagement usage
2026-02-15 19:33:15 +01:00
liuxingbaoyuandGitHub 236421aa20 fix: Properly handle await in finally (#17797)
fix
2026-02-15 19:08:24 +01:00
Huáng JùnliàngandGitHub 5fa1c7aa21 Support ESLint 10 (#17796)
* chore: update test case for shared options.json

* chore: test against eslint 10

* fix: remove program location adjustment for ESLint 10

* test: invoke ESLint 9 program loc adjustment on ts-estree tests

* chore: add eslint 9 test job

* remove test from allowlist

* chore: remove @types/eslint
2026-02-15 19:07:23 +01:00
Huáng JùnliàngandGitHub 5dae1e98b4 Fix(parser): reject flow type annotation within array pattern (#17795)
* fix(flow): disallow type annotation within array pattern

* chore: extend toAssignableListItem instead

* refactor: check refExpressionErrors in parseConditional

* chore: remove unused maybeInArrowParameters state
2026-02-15 19:06:41 +01:00
Nicolò RibaudoandGitHub 52a64b9966 Archive syntax plugins enabled by default (#17792)
* Archive syntax plugins enabled by default

* Update fixture options
2026-02-15 19:06:08 +01:00
Huáng JùnliàngandGitHub d883d4d304 Fix: preset-env include/exclude should accept bugfix plugins (#17787)
* fix: allow include/exclude on bugfix plugins

* add test cases

* chore: cleanup flatMap polyfill
2026-02-15 19:05:50 +01:00
liuxingbaoyuandGitHub 439f0ddc9e Remove unused code for old ESLint versions (#17766) 2026-02-13 15:28:15 +01:00
liuxingbaoyuandGitHub 24fda9baeb chore: Migrate scripts to .ts (#17767) 2026-02-13 15:26:32 +01:00
Huáng JùnliàngandGitHub b828e65096 Improve core typings (#17778) 2026-02-13 15:14:00 +01:00
Huáng JùnliàngandGitHub f33a877ca1 fix: preserve trailing comma in optional call args (#17781) 2026-02-13 14:55:52 +01:00
Babel BotandGitHub 1068fe7cfa Update test262 (#17790) 2026-02-12 23:39:47 -05:00
Huáng JùnliàngandGitHub e8451d206f docs: update spec.md (#17786) 2026-02-11 14:19:22 +01:00
d84c0437fb Update compat data (#17686)
* chore: update compat data to 8f4179ffb5e7a06a12739400fcd31b5a34ef7964

* chore: update test fixtures

* chore: update test fixtures for Babel 8

* chore: improve compat-table clone speed

* chore: fix parser test clone

* chore: ignore the rest subtest

* chore: update test fixtures

* revert snapshot change

---------

Co-authored-by: Huáng Jùnliàng <[email protected]>
2026-02-10 11:41:21 -05:00
Babel BotandGitHub 879fcce752 Update test262 (#17783)
chore: update test262 to f2d59ea6e4b2f6f87de9f0d18a41d73782b6a9bc
2026-02-10 09:40:15 -05:00
fisker CheungandGitHub fcc6264ebe Remove deprecated default export from @babel/code-frame (#17772)
* Remove deprecated default export from `@babel/code-frame`

* Clean

* Update tests
2026-02-04 10:16:10 -05:00
Huáng JùnliàngandGitHub 973504b8b6 fix: ensure targets.esmodules is validated (#17770)
fix: ensure target.esmodules is validated
2026-02-04 09:38:26 -05:00
Youssef HennaandGitHub 5d08357653 Fix undefined indentation when exactly 64 indents (#17774) 2026-02-03 12:28:52 +01:00
Huáng JùnliàngandGitHub b89bf60517 chore: clean up unused error message (#17764)
* chore: clean up unused error message

* chore: update artifacts
2026-02-01 09:42:59 +01:00
Babel Bot 0b93976a12 Add v8.0.0-rc.1 to CHANGELOG.md [skip ci] 2026-01-31 17:49:33 +00:00
Babel Bot 63a1a64aec v8.0.0-rc.1 v8.0.0-rc.1 2026-01-31 17:39:26 +00:00
wulu007andGitHub d92141800b fix(parser): correctly parse type assertions in extends clause (#17761) 2026-01-31 16:00:41 +01:00
liuxingbaoyuandGitHub 51cbd6427c Drop support for eslint v7-v8 (#17763)
fix
2026-01-31 15:34:40 +01:00
Nicolò RibaudoandGitHub adc1eb85d1 Remove browser entrypoint for @babel/register (#17762) 2026-01-31 14:51:04 +01:00