-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix: updates types for live collection entries #14548
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
Conversation
🦋 Changeset detectedLatest commit: 975b375 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 |
📝 Changeset Validation Results❌ Changeset validation failed Issues Found:
|
CodSpeed Performance ReportMerging #14548 will not alter performanceComparing Summary
Footnotes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Two tiny, non-blocking thoughts below for your consideration!
Co-authored-by: Sarah Rainsberger <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for docs!
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`5.14.5` -> `5.14.6`](https://renovatebot.com/diffs/npm/astro/5.14.5/5.14.6) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>withastro/astro (astro)</summary> ### [`v5.14.6`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5146) [Compare Source](https://github.com/withastro/astro/compare/[email protected]@5.14.6) ##### Patch Changes - [#​14562](withastro/astro#14562) [`722bba0`](withastro/astro@722bba0) Thanks [@​erbierc](https://github.com/erbierc)! - Fixes a bug where the behavior of the "muted" HTML attribute was inconsistent with that of other attributes. - [#​14538](withastro/astro#14538) [`51ebe6a`](withastro/astro@51ebe6a) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Improves how Actions are implemented - [#​14548](withastro/astro#14548) [`6cdade4`](withastro/astro@6cdade4) Thanks [@​ascorbic](https://github.com/ascorbic)! - Removes support for the `maxAge` property in `cacheHint` objects returned by live loaders. #####⚠️ Breaking change for experimental live content collections only Feedback showed that this did not make sense to set at the loader level, since the loader does not know how long each individual entry should be cached for. If your live loader returns cache hints with `maxAge`, you need to remove this property: ```diff return { entries: [...], cacheHint: { tags: ['my-tag'], - maxAge: 60, lastModified: new Date(), }, }; ``` The `cacheHint` object now only supports `tags` and `lastModified` properties. If you want to set the max age for a page, you can set the headers manually: </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45OS4xMSIsInVwZGF0ZWRJblZlciI6IjQxLjk5LjExIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: https://code.richardbanks.dev/richard/astro-loader-youtube/pulls/21 Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>
Changes
rendered
property to live entries. This is documented and functional, but was missing from typescacheHint.maxAge
property. From feedback and observing usage, this doesn't make sense to be set by the loader. The max age is something that the user should choose, and isn't information that the loader has. This is a breaking change in the types, but it is an experimental feature so can go in a patch.Testing
Updated the tests, and added a new test for entry rendering
Docs
maxAge
from live collection docs docs#12571rendered
property was already documented.