Skip to content

feat(es/regexp): Transpile unicode property escapes in RegExp constructor calls#11542

Closed
kdy1 wants to merge 2 commits intomainfrom
claude/issue-11539-20260209-0432
Closed

feat(es/regexp): Transpile unicode property escapes in RegExp constructor calls#11542
kdy1 wants to merge 2 commits intomainfrom
claude/issue-11539-20260209-0432

Conversation

@kdy1
Copy link
Member

@kdy1 kdy1 commented Feb 10, 2026

Previously, SWC only transformed unicode property escapes (\p{...} and \P{...}) in regex literals (/\p{ID_Start}/u). This adds support for transforming them in RegExp constructor calls as well.

Closes #11539

Generated with Claude Code

…ctor calls

Previously, SWC only transformed unicode property escapes (\p{...} and
\P{...}) in regex literals (/\p{ID_Start}/u). This adds support for
transforming them in RegExp constructor calls as well:
- new RegExp('\\p{ID_Start}', 'u')
- RegExp('\\p{ID_Start}', 'u')

Closes #11539

Co-authored-by: Donny/강동윤 <kdy1@users.noreply.github.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

⚠️ No Changeset found

Latest commit: 1c6e2bf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

Binary Sizes

File Size
swc.linux-x64-gnu.node 28M (28578248 bytes)

Commit: 2f3cc89

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 10, 2026

Merging this PR will not alter performance

✅ 184 untouched benchmarks


Comparing claude/issue-11539-20260209-0432 (1c6e2bf) with main (b7e87c7)

Open in CodSpeed

@kdy1
Copy link
Member Author

kdy1 commented Feb 12, 2026

@claude fix clippy

@claude
Copy link
Contributor

claude bot commented Feb 12, 2026

Claude finished @kdy1's task in 2m 31s —— View job


Fixed Clippy Warning

  • Run clippy to identify warnings
  • Fix clippy issues
  • Commit and push

Fixed 1 clippy warning in crates/swc_ecma_transformer/src/regexp.rs:118: replaced manual match with .unwrap_or_default() (clippy::manual_unwrap_or_default).
| Branch

Co-authored-by: Donny/강동윤 <kdy1@users.noreply.github.com>
@@ -0,0 +1,5 @@
{
"jsc": {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TEst

@kdy1 kdy1 closed this Feb 17, 2026
@kdy1 kdy1 deleted the claude/issue-11539-20260209-0432 branch February 17, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Transpile regexp unicode property escapes when using the RegExp constructor

2 participants

Comments