fix(parser): register function id in labeled function declaration #18375

Closed
babel-bot opened 8:39pm on October 20, 2026 wanted to merge 1 commit into babel/babel 7.x from
automation/backport-18327

Pull request #18375 quality checks

Code files and functions touched by this pull request are analyzed below.

Quality targets

How does this pull request compare to chosen code quality targets? Read more about code quality targets.

Target name Target value This PR
Maximum Diff Delta per PR 500 0
Maximum comment count per PR 10 2
Pull request maximum business days between activity 3 23
Pull request maximum business days open 5 24

Coupled files

Are there any files from this commit that are always committed alongside another file? This often suggests that there exists code coupling to potentially remove. Read more about code coupling

Committed together % Code file
Coupled code file
Commits in PR with both
100 packages/babel-parser/src/plugins/flow/index.ts
packages/babel-parser/src/plugins/typescript/index.ts
1
100 packages/babel-parser/src/plugins/placeholders.ts
packages/babel-parser/src/plugins/flow/index.ts
1
100 packages/babel-parser/src/plugins/placeholders.ts
packages/babel-parser/src/plugins/typescript/index.ts
1
100 packages/babel-parser/src/plugins/placeholders.ts
packages/babel-parser/src/parser/statement.ts
1
88 packages/babel-parser/src/plugins/flow/index.ts
packages/babel-parser/src/parser/statement.ts
1

Biggest files changes in pull request

Path View whole file Lines removed Lines added Final line count
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-var-redeclaration/output.json 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.3-function-in-if-body-lexical-redeclaration/output.json 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-redeclaration-catch-param/output.json 0 0 ---
packages/babel-parser/test/fixtures/placeholders/labels/labeled-function-in-if-body/input.js 0 0 ---
packages/babel-parser/test/fixtures/placeholders/labels/labeled-function-redeclaration/output.json 0 0 ---
packages/babel-parser/test/fixtures/annex-b/disabled/3.1-sloppy-labeled-functions-redeclaration/input.js 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-redeclaration-top-level/output.json 0 0 ---
packages/babel-parser/test/fixtures/placeholders/labels/labeled-function-redeclaration/input.js 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.3-function-in-if-body-lexical-redeclaration/input.js 0 0 ---
packages/babel-parser/test/fixtures/typescript/function/labeled-bodiless-redeclaration/output.json 0 0 ---
packages/babel-parser/test/fixtures/placeholders/labels/labeled-function-in-if-body/output.json 0 0 ---
packages/babel-parser/src/parser/statement.ts 10 23 3108
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-redeclaration-switch/input.js 0 0 ---
packages/babel-parser/test/fixtures/typescript/function/labeled-bodiless-redeclaration/input.ts 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-redeclaration-function-body/output.json 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-duplicate-in-block/output.json 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-async-functions-redeclaration/input.js 0 0 ---
packages/babel-parser/src/plugins/typescript/index.ts 1 1 4931
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-duplicate-in-block/input.js 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-var-redeclaration/input.js 0 0 ---
packages/babel-parser/test/fixtures/annex-b/disabled/3.1-sloppy-labeled-functions-redeclaration/output.json 0 0 ---
packages/babel-parser/src/plugins/placeholders.ts 0 7 445
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-async-functions-redeclaration/output.json 0 0 ---
packages/babel-parser/src/plugins/flow/index.ts 0 1 3915
packages/babel-parser/test/fixtures/typescript/function/labeled-bodiless-redeclaration/options.json 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-redeclaration-block/output.json 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-redeclaration-catch-param/input.js 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-redeclaration-function-body/input.js 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-redeclaration-switch/output.json 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-redeclaration-block/input.js 0 0 ---
packages/babel-parser/test/fixtures/annex-b/enabled/3.1-sloppy-labeled-functions-redeclaration-top-level/input.js 0 0 ---

️ Biggest functions grown or shrunk by pull request

Which functions had their line count change as part of this pull request?

Qualified function name View whole function Lines removed Lines added Final line count
tsIsEntityName::TypeScriptParserMixin::tsTryParseDeclare 1 1 86