urlpattern icon indicating copy to clipboard operation
urlpattern copied to clipboard

Difference with path-to-regexp v8

Open vitalets opened this issue 1 year ago • 2 comments

What is the issue with the URL Pattern Standard?

I've discovered that path-to-regexp v8 dropped support of ? and + parameter modifiers. Will URLPattern spec follow this change or indicate the difference somewhere in the docs?

vitalets avatar Feb 11 '25 08:02 vitalets

Wondering the same thing. How stable is the URLPattern API?

It seems like there are several open questions:

  • ReDos (which is the reason why path-to-regexp dropped regex in v8)

  • Slow on the server https://github.com/oven-sh/bun/issues/2286#issuecomment-1454267759

samuelstroschein avatar Feb 13 '25 03:02 samuelstroschein

URLPattern seems to become the standard as it is right now.

From https://github.com/pillarjs/path-to-regexp/issues/349#issuecomment-2661004096

I decided to adopt URLPattern now that it has become the standard for the web.

samuelstroschein avatar Feb 15 '25 17:02 samuelstroschein