whatwg / urlpattern

URL Pattern Standard
https://urlpattern.spec.whatwg.org/
Other
157 stars 22 forks source link

Only pass strings into component compiling steps #214

Closed jeremyroman closed 9 months ago

jeremyroman commented 9 months ago

Currently, some steps in "initialize a URLPattern" access potentially nonexistent entries in the processedInit map, and expect "compile a component" to receive these as null, even though it requires a string.

Instead, these entries are now always populated after calling "process a URLPatternInit" so that subsequent steps can depend on a valid string.

Since the comparison with the default port requires that the two types be the same, fix that too.

Fixes #209.

(See WHATWG Working Mode: Changes for more details.)


:boom: Error: 400 Bad Request :boom:

PR Preview failed to build. (Last tried on Jan 26, 2024, 8:28 PM UTC).

More PR Preview relies on a number of web services to run. There seems to be an issue with the following one: :rotating_light: [CSS Spec Preprocessor](https://api.csswg.org/bikeshed/) - CSS Spec Preprocessor is the web service used to build Bikeshed specs. :link: [Related URL](https://api.csswg.org/bikeshed/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjeremyroman%2Furlpattern%2F4d880bca59fca992264b669d4086b78904c5cd31%2Fspec.bs&force=1&md-status=LS-PR&md-Text-Macro=PR-NUMBER%20214) _If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please [file an issue](https://github.com/tobie/pr-preview/issues/new?title=Error%20not%20surfaced%20properly&body=See%20whatwg/urlpattern%23214.)._
jeremyroman commented 9 months ago

Since pr preview was unhappy, preview link: https://api.csswg.org/bikeshed/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjeremyroman%2Furlpattern%2Fprocessedinit-absent%2Fspec.bs&force=1&md-status=LS-PR&md-Text-Macro=PR-NUMBER%20214