-
Notifications
You must be signed in to change notification settings - Fork 1
chore(deps): update dependency astro to v5.16.15 #56
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
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/astro-monorepo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+477
−172
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
95e2553 to
681a7e8
Compare
681a7e8 to
69fd42e
Compare
69fd42e to
390e6a4
Compare
390e6a4 to
664e6c5
Compare
692857a to
734796d
Compare
734796d to
21f5ed9
Compare
21f5ed9 to
2d7fd28
Compare
2d7fd28 to
c7338bf
Compare
1e33fef to
3786571
Compare
3786571 to
d74a3e7
Compare
d74a3e7 to
4c4493c
Compare
4c4493c to
21dc98c
Compare
21dc98c to
f3bbaa7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
5.16.3→5.16.15Release Notes
withastro/astro (astro)
v5.16.15Compare Source
Patch Changes
0aafc83Thanks @florian-lefebvre! - Fixes a case where font providers provided as class instances may not work when using the experimental Fonts API. It affected the local providerv5.16.14Compare Source
Patch Changes
#15213
c775fceThanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyUpdates how the local provider must be used when using the experimental Fonts API
Previously, there were 2 kinds of font providers: remote and local.
Font providers are now unified. If you are using the local provider, the process for configuring local fonts must be updated:
Once configured, there is no change to using local fonts in your project. However, you should inspect your deployed site to confirm that your new font configuration is being applied.
See the experimental Fonts API docs for more information.
#15213
c775fceThanks @florian-lefebvre! - ExposesrootonFontProviderinit()contextWhen building a custom
FontProviderfor the experimental Fonts API, theinit()method receives acontext. This context now exposes arootURL, useful for resolving local files:import type { FontProvider } from "astro"; export function registryFontProvider(): FontProvider { return { // ... - init: async ({ storage }) => { + init: async ({ storage, root }) => { // ... }, }; }#15185
edabeaaThanks @EricGrill! - Add.vercelto.gitignorewhen adding the Vercel adapter viaastro add vercelv5.16.13Compare Source
Patch Changes
#15182
cb60ee1Thanks @florian-lefebvre! - Adds a newgetFontBuffer()method to retrieve font file buffers when using the experimental Fonts APIThe
getFontData()helper function fromastro:assetswas introduced in 5.14.0 to provide access to font family data for use outside of Astro. One of the goals of this API was to be able to retrieve buffers using URLs.However, it turned out to be impactical and even impossible during prerendering.
Astro now exports a new
getFontBuffer()helper function fromastro:assetsto retrieve font file buffers from URL returned bygetFontData(). For example, when using satori to generate OpenGraph images:// src/pages/og.png.ts import type{ APIRoute } from "astro" -import { getFontData } from "astro:assets" +import { getFontData, getFontBuffer } from "astro:assets" import satori from "satori" export const GET: APIRoute = (context) => { const data = getFontData("--font-roboto") const svg = await satori( <div style={{ color: "black" }}>hello, world</div>, { width: 600, height: 400, fonts: [ { name: "Roboto", - data: await fetch(new URL(data[0].src[0].url, context.url.origin)).then(res => res.arrayBuffer()), + data: await getFontBuffer(data[0].src[0].url), weight: 400, style: "normal", }, ], }, ) // ... }See the experimental Fonts API documentation for more information.
v5.16.12Compare Source
Patch Changes
#15175
47ae148Thanks @florian-lefebvre! - Allows experimental Font providers to specify family optionsPreviously, an Astro
FontProvidercould only accept options at the provider level when called. That could result in weird data structures for family-specific options.Astro
FontProviders can now declare family-specific options, by specifying a generic:// font-provider.ts import type { FontProvider } from "astro"; import { retrieveFonts, type Fonts } from "./utils.js", interface Config { token: string; } +interface FamilyOptions { + minimal?: boolean; +} -export function registryFontProvider(config: Config): FontProvider { +export function registryFontProvider(config: Config): FontProvider<FamilyOptions> { let data: Fonts = {} return { name: "registry", config, init: async () => { data = await retrieveFonts(token); }, listFonts: () => { return Object.keys(data); }, - resolveFont: ({ familyName, ...rest }) => { + // options is typed as FamilyOptions + resolveFont: ({ familyName, options, ...rest }) => { const fonts = data[familyName]; if (fonts) { return { fonts }; } return undefined; }, }; }Once the font provider is registered in the Astro config, types are automatically inferred:
// astro.config.ts import { defineConfig } from "astro/config"; import { registryFontProvider } from "./font-provider"; export default defineConfig({ experimental: { fonts: [{ provider: registryFontProvider({ token: "..." }), name: "Custom", cssVariable: "--font-custom", + options: { + minimal: true + } }] } });#15175
47ae148Thanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyUpdates how options are passed to the Google and Google Icons font providers when using the experimental Fonts API
Previously, the Google and Google Icons font providers accepted options that were specific to given font families.
These options must now be set using the
optionsproperty instead. For example using the Google provider:import { defineConfig, fontProviders } from "astro/config"; export default defineConfig({ experimental: { fonts: [{ name: 'Inter', cssVariable: '--astro-font-inter', weights: ['300 900'], - provider: fontProviders.google({ - experimental: { - variableAxis: { - Inter: { opsz: ['14..32'] } - } - } - }), + provider: fontProviders.google(), + options: { + experimental: { + variableAxis: { opsz: ['14..32'] } + } + } }] } })#15200
c0595b3Thanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyRemoves
getFontData()exported fromastro:assetswithfontDatawhen using the experimental Fonts APIAccessing font data can be useful for advanced use cases, such as generating meta tags or Open Graph images. Before, we exposed a
getFontData()helper function to retrieve the font data for a givencssVariable. That was however limiting for programmatic usages that need to access all font data.The
getFontData()helper function is removed and replaced by a newfontDataobject:We may reintroduce
getFontData()later on for a more friendly DX, based on your feedback.#15254
8d84b30Thanks @lamalex! - Fixes CSSassetsPrefixwith remote URLs incorrectly prepending a forward slashWhen using
build.assetsPrefixwith a remote URL (e.g.,https://cdn.example.com) for CSS assets, the generated<link>elements were incorrectly getting a/prepended to the full URL, resulting in invalid URLs like/https://cdn.example.com/assets/style.css.This fix checks if the stylesheet link is a remote URL before prepending the forward slash.
#15178
731f52dThanks @kedarvartak! - Fixes an issue where stopping the dev server withq+enterincorrectly created adistfolder and copied font files when using the experimental Fonts API#15230
3da6272Thanks @rahuld109! - Fixes greedy regex in error message markdown rendering that caused link syntax examples to capture extra characters#15253
2a6315aThanks @matthewp! - Fixes hydration for React components nested inside HTML elements in MDX files#15227
9a609f4Thanks @matthewp! - Fixes styles not being included for conditionally rendered Svelte 5 components in production builds#14607
ee52160Thanks @simensfo! - Reintroduces css deduplication for hydrated client components. Ensures assets already added to a client chunk are not flagged as orphanedv5.16.11Compare Source
Patch Changes
#15017
9e7a3c8Thanks @ixchio! - Fixes CSS double-bundling when the same CSS file is imported in both a page's frontmatter and a component's script tag#15225
6fe62e1Thanks @ematipico! - Updates to the latest version ofdevaluev5.16.10Compare Source
Patch Changes
2fa19c4- Improved error handling in the rendering phaseAdded defensive validation in
App.render()and#renderError()to provide a descriptive error message when a route module doesn't have a valid page function.#15199
d8e64efThanks @ArmandPhilippot! - Fixes the links to Astro Docs so that they match the current docs structure.#15169
b803d8bThanks @rururux! - fix: fix image 500 error when moving dist directory in standalone Node#14622
9b35c62Thanks @aprici7y! - Fixes CSS url() references to public assets returning 404 in dev mode when base path is configured#15219
43df4ceThanks @matthewp! - Upgrades thediffpackage to v8v5.16.9Compare Source
Patch Changes
#15174
37ab65aThanks @florian-lefebvre! - Adds Google Icons to built-in font providersTo start using it, access it on
fontProviders:#15150
a77c4f4Thanks @matthewp! - Fixes hydration for framework components inside MDX when usingAstro.slots.render()Previously, when multiple framework components with
client:*directives were passed as named slots to an Astro component in MDX, only the first slot would hydrate correctly. Subsequent slots would render their HTML but fail to include the necessary hydration scripts.#15130
9b726c4Thanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyChanges how font providers are implemented with updates to the
FontProvidertypeThis is an implementation detail that changes how font providers are created. This process allows Astro to take more control rather than relying directly on
unifonttypes. All of Astro's built-in font providers have been updated to reflect this new type, and can be configured as before. However, using third-party unifont providers that rely onunifonttypes will require an update to your project code.Previously, an Astro
FontProviderwas made of a config and a runtime part. It relied directly onunifonttypes, which allowed a simple configuration for third-party unifont providers, but also coupled Astro's implementation to unifont, which was limiting.Astro's font provider implementation is now only made of a config part with dedicated hooks. This allows for the separation of config and runtime, but requires you to create a font provider object in order to use custom font providers (e.g. third-party unifont providers, or private font registeries).
What should I do?
If you were using a 3rd-party
unifontfont provider, you will now need to write an AstroFontProviderusing it under the hood. For example:// astro.config.ts import { defineConfig } from "astro/config"; import { acmeProvider, type AcmeOptions } from '@​acme/unifont-provider' +import type { FontProvider } from "astro"; +import type { InitializedProvider } from 'unifont'; +function acme(config?: AcmeOptions): FontProvider { + const provider = acmeProvider(config); + let initializedProvider: InitializedProvider | undefined; + return { + name: provider._name, + config, + async init(context) { + initializedProvider = await provider(context); + }, + async resolveFont({ familyName, ...rest }) { + return await initializedProvider?.resolveFont(familyName, rest); + }, + async listFonts() { + return await initializedProvider?.listFonts?.(); + }, + }; +} export default defineConfig({ experimental: { fonts: [{ - provider: acmeProvider({ /* ... */ }), + provider: acme({ /* ... */ }), name: "Material Symbols Outlined", cssVariable: "--font-material" }] } });9cd5b87Thanks @matthewp! - Fixes scripts in components not rendering when a sibling<Fragment slot="...">exists but is unusedv5.16.8Compare Source
Patch Changes
#15124
81db3c0Thanks @leonace924! - Fixes an issue where requests with query parameters to thebasepath would return a 404 if trailingSlash was not'ignore'in development#15152
39ee41fThanks @rururux! - Fixes a case wherecontext.cookies.set()would be overriden when setting cookies via response headers in development#15140
6f6f8f8Thanks @cameronraysmith! - Fixes esbuild warning due to dead code in assets virtual module#15127
2cff904Thanks @Princesseuh! - Updates "Unsupported page types found" error to only appear in more realistic cases#15149
34f84c2Thanks @rahuld109! - Skips "Use the Image component" audit warning for images inside framework components (React, Vue, Svelte, etc.)v5.16.7Compare Source
Patch Changes
#15122
b137946Thanks @florian-lefebvre! - Improves JSDoc annotations forAstroGlobal,AstroSharedContextandAPIContexttypes#15123
3f58fa2Thanks @43081j! - Improves rendering performance by grouping render chunks when emitting from async iterables to avoid encoding costs#14954
7bec4bdThanks @volpeon! - Fixes remote imagesEtagheader handling by disabling internal cache#15052
b2bcd5aThanks @Princesseuh! - Fixes images not working in development when using setups with port forwarding#15028
87b19b8Thanks @Princesseuh! - Fixes certain aliases not working when using images in JSON files with the content layer#15118
cfa382bThanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyRemoves the
defineAstroFontProvider()type helper.If you are building a custom font provider, remove any occurrence of
defineAstroFontProvider()and use theFontProvidertype instead:#15055
4e28db8Thanks @delucis! - Reduces Astro’s install size by around 8 MB#15088
a19140fThanks @martrapp! - Enables the ClientRouter to preserve the original hash part of the target URL during server side redirects.#15117
b1e8e32Thanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API onlyChanges the font format downloaded by default when using the experimental Fonts API. Additionally, adds a new
formatsconfiguration option to specify which font formats to download.Previously, Astro was opinionated about which font sources would be kept for usage, mainly keeping
woff2andwofffiles.You can now specify what font formats should be downloaded (if available). Only
woff2files are downloaded by default.What should I do?
If you were previously relying on Astro downloading the
woffformat, you will now need to specify this explicitly with the newformatsconfiguration option. Additionally, you may also specify any additional file formats to download if available:// astro.config.mjs import { defineConfig, fontProviders } from 'astro/config' export default defineConfig({ experimental: { fonts: [{ name: 'Roboto', cssVariable: '--font-roboto', provider: fontProviders.google(), + formats: ['woff2', 'woff', 'otf'] }] } })8115752Thanks @florian-lefebvre! - Fixes a vite warning log during builds when using npmv5.16.6Compare Source
Patch Changes
#14982
6849e38Thanks @Princesseuh! - Fixes images outside the project directory not working when using astro:assets in development mode#14987
9dd9fcaThanks @Princesseuh! - Fixes SVGs not working in dev mode when using the passthrough image service#15014
a178422Thanks @delucis! - Adds support for extending the type of the props accepted by Astro’s<Image>component,<Picture>component, andgetImage()API.v5.16.5Compare Source
Patch Changes
#14985
c016f10Thanks @florian-lefebvre! - Fixes a case where JSDoc annotations wouldn't show for fonts related APIs in the Astro config#14973
ed7cc2fThanks @amankumarpandeyin! - Fixes performance regression and OOM errors when building medium-sized blogs with many content entries. Replaced O(n²) object spread pattern with direct mutation ingenerateLookupMap.#14958
70eb542Thanks @ascorbic! - Gives a helpful error message if a user setsoutput: "hybrid"in their Astro config.The option was removed in Astro 5, but lots of content online still references it, and LLMs often suggest it. It's not always clear that the replacement is
output: "static", rather thanoutput: "server". This change adds a helpful error message to guide humans and robots.#14901
ef53716Thanks @Darknab! - Updates theglob()loader to log a warning when duplicated IDs are detectedUpdated dependencies [
d8305f8]:v5.16.4Compare Source
Patch Changes
#14940
2cf79c2Thanks @ematipico! - Fixes a bug where Astro didn't properly combine CSP resources from thecspconfiguration with those added using the runtime API (Astro.csp.insertDirective()) to form grammatically correct CSP headersNow Astro correctly deduplicate CSP resources. For example, if you have a global resource in the configuration file, and then you add a
a new one using the runtime APIs.
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.
This PR was generated by Mend Renovate. View the repository job log.