Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URLPattern #2286

Open
vamsaya opened this issue Mar 3, 2023 · 9 comments
Open

URLPattern #2286

vamsaya opened this issue Mar 3, 2023 · 9 comments
Labels
enhancement New feature or request web-api Something that relates to a standard Web API wintercg Web-interoperable Runtimes Community Group compatiblity

Comments

@vamsaya
Copy link

vamsaya commented Mar 3, 2023

What is the problem this feature would solve?

https://developer.mozilla.org/en-US/docs/Web/API/URLPattern

What is the feature you are proposing to solve the problem?

Although this is an experimental function, it is undoubtedly very practical for bun routing, and deno has already implemented it, so we can't live without it.

What alternatives have you considered?

No response

@vamsaya vamsaya added the enhancement New feature or request label Mar 3, 2023
@Electroid Electroid added the web-api Something that relates to a standard Web API label Mar 3, 2023
@Jarred-Sumner
Copy link
Collaborator

URLPattern is designed to be slow, so we aren't going to support this officially unless it becomes a web standard (WICG != W3C). You can use JS polyfills until then

@PodaruDragos
Copy link

is it not a web standard ? link

@nektro nektro added the wintercg Web-interoperable Runtimes Community Group compatiblity label Jun 6, 2024
@ghost
Copy link

ghost commented Jun 21, 2024

URLPattern is designed to be slow, so we aren't going to support this officially unless it becomes a web standard (WICG != W3C). You can use JS polyfills until then

Please reconsider this. Make it an optional import and allow us to opt into using it if we are willing to accept the performance hit.

@michaldo
Copy link

I would like to make http server with bun. Here: https://bun.sh/guides/http/server only trivial path matching is demonstrated.
I need match segments, for example /foo/{bar}/baz
I don't want use regexp because they are too complex for simple segment matching.
Bun does not implement URLPattern

Then what is bun proposal for that?

@kravetsone
Copy link

What is the problem this feature would solve?

https://developer.mozilla.org/en-US/docs/Web/API/URLPattern

What is the feature you are proposing to solve the problem?

Although this is an experimental function, it is undoubtedly very practical for bun routing, and deno has already implemented it, so we can't live without it.

What alternatives have you considered?

No response

Routing with regexp is painful and should be abandoned

@kravetsone
Copy link

What is the problem this feature would solve?

https://developer.mozilla.org/en-US/docs/Web/API/URLPattern

What is the feature you are proposing to solve the problem?

Although this is an experimental function, it is undoubtedly very practical for bun routing, and deno has already implemented it, so we can't live without it.

What alternatives have you considered?

No response

Routing with regexp is painful and should be abandoned

It is great feature for web but not so for server-side

@TiBianMod
Copy link

nice to have!!!

@juriadams
Copy link

Currently blocking the use of cross-runtime fetch mocks like @c4spar/mock-fetch.

@samuelstroschein
Copy link

NodeJS just merged support for URLPattern nodejs/node#40844.

If Bun wants full Node compatibility, implementing URLPattern seems unavoidable now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request web-api Something that relates to a standard Web API wintercg Web-interoperable Runtimes Community Group compatiblity
Projects
None yet
Development

No branches or pull requests

10 participants