Skip to content

fix(regular_expression): correct named capture group reference error#16952

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-16-fix_regular_expression_correct_named_capture_group_reference_error
Dec 17, 2025
Merged

fix(regular_expression): correct named capture group reference error#16952
graphite-app[bot] merged 1 commit intomainfrom
12-16-fix_regular_expression_correct_named_capture_group_reference_error

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Dec 16, 2025

The error message was swapped.

-  × Invalid regular expression: Group specifier is empty
+  × Invalid regular expression: Invalid named reference
    ╭─[test262/test/language/literals/regexp/named-groups/invalid-dangling-groupname-2-u.js:21:9]
 20 │ 
 21 │ /(?<a>a)\k<ab>/u;
    ·         ──────
    ╰────

Copy link
Member Author

sapphi-red commented Dec 16, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 16, 2025

CodSpeed Performance Report

Merging #16952 will not alter performance

Comparing 12-16-fix_regular_expression_correct_named_capture_group_reference_error (bac65ed) with 12-16-feat_regular_expression_add_tests_for_diagnostics (5ba0d9e)

Summary

✅ 42 untouched
⏩ 3 skipped1

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@sapphi-red sapphi-red changed the base branch from 12-16-feat_regular_expression_add_tests_for_diagnostics to graphite-base/16952 December 16, 2025 11:26
@sapphi-red sapphi-red force-pushed the 12-16-fix_regular_expression_correct_named_capture_group_reference_error branch from 966eea2 to bfb9062 Compare December 16, 2025 11:29
@sapphi-red sapphi-red changed the base branch from graphite-base/16952 to 12-16-feat_regular_expression_add_tests_for_diagnostics December 16, 2025 11:29
@graphite-app graphite-app bot force-pushed the 12-16-feat_regular_expression_add_tests_for_diagnostics branch from ca71b52 to c693dca Compare December 16, 2025 11:38
@sapphi-red sapphi-red force-pushed the 12-16-fix_regular_expression_correct_named_capture_group_reference_error branch from bfb9062 to 6d2d18c Compare December 16, 2025 11:38
@graphite-app graphite-app bot force-pushed the 12-16-feat_regular_expression_add_tests_for_diagnostics branch from c693dca to 74820a3 Compare December 16, 2025 11:39
@graphite-app graphite-app bot force-pushed the 12-16-fix_regular_expression_correct_named_capture_group_reference_error branch from 6d2d18c to b068bbf Compare December 16, 2025 11:39
@sapphi-red sapphi-red requested a review from leaysgur December 16, 2025 11:45
@sapphi-red sapphi-red marked this pull request as ready for review December 16, 2025 11:45
@sapphi-red sapphi-red force-pushed the 12-16-feat_regular_expression_add_tests_for_diagnostics branch from 74820a3 to 5ba0d9e Compare December 16, 2025 12:09
@sapphi-red sapphi-red force-pushed the 12-16-fix_regular_expression_correct_named_capture_group_reference_error branch from b068bbf to bac65ed Compare December 16, 2025 12:09
@leaysgur leaysgur added the 0-merge Merge with Graphite Merge Queue label Dec 17, 2025
Copy link
Member

leaysgur commented Dec 17, 2025

Merge activity

…16952)

The error message was swapped.
```diff
-  × Invalid regular expression: Group specifier is empty
+  × Invalid regular expression: Invalid named reference
    ╭─[test262/test/language/literals/regexp/named-groups/invalid-dangling-groupname-2-u.js:21:9]
 20 │
 21 │ /(?<a>a)\k<ab>/u;
    ·         ──────
    ╰────
```
@graphite-app graphite-app bot force-pushed the 12-16-feat_regular_expression_add_tests_for_diagnostics branch from 5ba0d9e to 8d7ee53 Compare December 17, 2025 00:38
@graphite-app graphite-app bot force-pushed the 12-16-fix_regular_expression_correct_named_capture_group_reference_error branch from bac65ed to 5a2af88 Compare December 17, 2025 00:38
Base automatically changed from 12-16-feat_regular_expression_add_tests_for_diagnostics to main December 17, 2025 00:44
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 17, 2025
@graphite-app graphite-app bot merged commit 5a2af88 into main Dec 17, 2025
21 checks passed
@graphite-app graphite-app bot deleted the 12-16-fix_regular_expression_correct_named_capture_group_reference_error branch December 17, 2025 00:45
overlookmotel added a commit that referenced this pull request Dec 19, 2025
### 🚀 Features

- d209c21 allocator: Add cap to FixedSizeAllocatorPool and block when
exhausted (#17023) (Cameron)
- fb2af91 allocator: Add bitset utils (#17042) (zhaoting zhou)
- c16082c tasks/compat_data: Integrate `node-compat-table` (#16831)
(Boshen)
- 5586823 span: Extract TS declaration file check to its own function
(#17037) (camchenry)
- 3d2b492 minifier: Fold iife arrow functions in call expressions
(#16477) (Armano)
- 67e9f9e codegen: Keep comments on the export specifiers (#16943)
(夕舞八弦)
- cb515fa parser: Improve error message for `yield` as identifier usage
(#16950) (sapphi-red)
- dcc856b parser: Add help for `new_dynamic_import` error (#16949)
(sapphi-red)
- c3c79f8 parser: Improve import attribute value error message (#16948)
(sapphi-red)
- 291b57b ast_tools: Generate TS declaration files for deserializer and
walk files (#16912) (camc314)
- 74eae13 minifier: Remove unused import specifiers (#16797) (camc314)

### 🐛 Bug Fixes

- fb9e193 linter: OOM problems with custom plugins (#17082)
(overlookmotel)
- e59132b parser/napi: Fix lazy deser (#17069) (overlookmotel)
- a92faf0 ast_tools: Support `u128` in `assert_layouts` generator
(#17050) (overlookmotel)
- 47b4c2f minifier/docs: Correct hyperlink path in OPTIMIZATIONS.md
(#16986) (GRK)
- 3002649 transformer/typescript: Remove unused import equals
declaration (#16776) (Dunqing)
- 5a2af88 regular_expression: Correct named capture group reference
error (#16952) (sapphi-red)

### ⚡ Performance

- b657bb6 allocator: Reduce time `Mutex` lock is held in
`FixedSizeAllocatorPool::get` (#17079) (overlookmotel)
- 1f3b19b ast: `#[ast]` macro use `#[repr(transparent)]` for
single-field structs (#17052) (overlookmotel)
- 225f229 parser: Use SmallVec for duplicate default export detection
(#16801) (camc314)

### 📚 Documentation

- a9c419f traverse: Update safety comments (#16944) (overlookmotel)

Co-authored-by: overlookmotel <[email protected]>
qinyuhang pushed a commit to qinyuhang/oxc that referenced this pull request Jan 22, 2026
…xc-project#16952)

The error message was swapped.
```diff
-  × Invalid regular expression: Group specifier is empty
+  × Invalid regular expression: Invalid named reference
    ╭─[test262/test/language/literals/regexp/named-groups/invalid-dangling-groupname-2-u.js:21:9]
 20 │
 21 │ /(?<a>a)\k<ab>/u;
    ·         ──────
    ╰────
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments