WordPress / performance

Performance plugin from the WordPress Performance Group, which is a collection of standalone performance modules.
https://wordpress.org/plugins/performance-lab/
GNU General Public License v2.0
362 stars 98 forks source link

Add URLPattern tests for Speculative Loading #1144

Open westonruter opened 6 months ago

westonruter commented 6 months ago

Feature Description

As @tunetheweb noted in https://github.com/WordPress/performance/pull/1143#issuecomment-2057925186, it would be useful if we could check the validity of the URLPattern strings that we're constructing in the Speculative Loading plugin to ensure they are valid.

swissspidy commented 6 months ago

On that note, I was thinking about writing a JSON schema for speculation rules to ensure validity of that part too

westonruter commented 6 months ago

Yeah, that'll be important especially if the entire rules array is filterable, as the schema could be checked even at runtime.