Add support for skew protect for images and fonts#14627
Conversation
🦋 Changeset detectedLatest commit: 04e5bd7 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
CodSpeed Performance ReportMerging #14627 will not alter performanceComparing Summary
Footnotes |
Add comprehensive test suite for adapter client assetQueryParams feature across different asset types. Tests verify that query parameters (e.g., deployment IDs for skew protection) are correctly appended to: - Stylesheet URLs in SSR - Image component src attributes in SSR - Font preload links in SSR Updates fonts fixture to enable experimental fonts feature for testing.
florian-lefebvre
left a comment
There was a problem hiding this comment.
Can you update the fonts unit tests:
- Make sure types are still fine after my suggestions (eg.
searchParamsis not optional) - Add unit test for
searchParamsinimplementations.test.js
packages/astro/src/assets/fonts/implementations/url-resolver.ts
Outdated
Show resolved
Hide resolved
packages/astro/src/assets/fonts/implementations/url-resolver.ts
Outdated
Show resolved
Hide resolved
ematipico
left a comment
There was a problem hiding this comment.
I would update the code to work with URL types instead of strings
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
📝 Changeset Validation Results❌ Changeset validation failed Issues Found:
|
Changes
assetQueryParamsavailable as theimageConfigpassed to image services so they can append. Default service uses it.Testing
Docs
N/A, bug fix.