kenchris / urlpattern-polyfill

URLPattern polyfill
https://www.npmjs.com/package/urlpattern-polyfill
MIT License
267 stars 30 forks source link

`URLPatternList` defined in source but not exported in dist #36

Closed bennypowers closed 2 years ago

bennypowers commented 3 years ago
import { URLPatternList } from 'https://unpkg.com/urlpattern-polyfill@1.0.0-rc1/dist/index.js?module';

import not found: URLPatternList

Indeed, it's defined in /src, but not in /dist

kenchris commented 3 years ago

@wanderview what is the spec status of URLPatternList?

wanderview commented 3 years ago

We haven't figured out the API yet and I think it may change from the original based on feedback I got on ordering, finding the best route in a set, etc. See here.

I would recommend removing it from the polyfill for now. I intend to work on it further after we get the initial API shipped.

bennypowers commented 3 years ago

Thanks for the feedback @wanderview

FYI my case is your typical SPA router but this time its Lit ReactiveControllers. The service worker stuff is super cool, but i'm not focused on that atm.

Thanks for working on this v. nifty spec

wanderview commented 3 years ago

If you have time, it would help if you posted in the spec issue what kind of features you need out of the list. Does it need to be supported, have fast lookup, etc? How do you define "best match"? Sorting by particular URL components? This kind of feedback will help us figure out a reasonable API shape.

kenchris commented 2 years ago

Closing as this was on purpose. Maybe we should remove the code

hax commented 1 year ago

It seems chrome already land URLPatternList behind the flag. So maybe it's the time to reopen the issue?

kenchris commented 1 year ago

@hax does it have WPT test cases we can use to make sure it works as intended?