Skip to content

Conversation

@TarikSogukpinar
Copy link
Contributor

fix(urlpattern): remove inline (?u) flag in regex generation to resolve invalid-group error in URLPattern

related issue:
fixes #31072

The inline (?u) flag was being embedded regardless of context and caused certain regex constructs to misbehave in the JavaScript environment.

How
• Edited regexp.rs to no longer prepend inline flags such as (?u) to the pattern.
• Updated tests to cover alternation use-cases:
• /install.sh → match true
• /install.ps1 → match true
• install.exe, install.sh/extra → match false
• Ensured no regression for wildcard or other pattern types.

@CLAassistant
Copy link

CLAassistant commented Oct 25, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@crowlKats crowlKats left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@crowlKats crowlKats merged commit 8b22e44 into denoland:main Nov 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to construct 'URLPattern': pathname is invalid

3 participants