fix(astro): restore Astro.site in getStaticPaths()#14576
Merged
florian-lefebvre merged 3 commits intowithastro:mainfrom Oct 20, 2025
Merged
fix(astro): restore Astro.site in getStaticPaths()#14576florian-lefebvre merged 3 commits intowithastro:mainfrom
florian-lefebvre merged 3 commits intowithastro:mainfrom
Conversation
Restores the astroGlobalArgs compiler option that was removed in withastro#14405. This parameter is needed to pass the site config to the compiler so Astro.site is available in getStaticPaths().
🦋 Changeset detectedLatest commit: 1bca9dd 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 |
CodSpeed Performance ReportMerging #14576 will not alter performanceComparing Summary
Footnotes |
Merged
richardnbanks
pushed a commit
to richardnbanks/astro-loader-youtube
that referenced
this pull request
Oct 22, 2025
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.6` -> `5.14.8`](https://renovatebot.com/diffs/npm/astro/5.14.6/5.14.8) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [googleapis](https://github.com/googleapis/google-api-nodejs-client) | [`164.0.0` -> `164.1.0`](https://renovatebot.com/diffs/npm/googleapis/164.0.0/164.1.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>withastro/astro (astro)</summary> ### [`v5.14.8`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5148) [Compare Source](https://github.com/withastro/astro/compare/[email protected]@5.14.8) ##### Patch Changes - [#​14590](withastro/astro#14590) [`577d051`](withastro/astro@577d051) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes image path resolution in content layer collections to support bare filenames. The `image()` helper now normalizes bare filenames like `"cover.jpg"` to relative paths `"./cover.jpg"` for consistent resolution behavior between markdown frontmatter and JSON content collections. ### [`v5.14.7`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5147) [Compare Source](https://github.com/withastro/astro/compare/[email protected]@5.14.7) ##### Patch Changes - [#​14582](withastro/astro#14582) [`7958c6b`](withastro/astro@7958c6b) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a regression that caused Actions to throw errors while loading - [#​14567](withastro/astro#14567) [`94500bb`](withastro/astro@94500bb) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes the actions endpoint to return 404 for non-existent actions instead of throwing an unhandled error - [#​14566](withastro/astro#14566) [`946fe68`](withastro/astro@946fe68) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes handling malformed cookies gracefully by returning the unparsed value instead of throwing When a cookie with an invalid value is present (e.g., containing invalid URI sequences), `Astro.cookies.get()` now returns the raw cookie value instead of throwing a URIError. This aligns with the behavior of the underlying `cookie` package and prevents crashes when manually-set or corrupted cookies are encountered. - [#​14142](withastro/astro#14142) [`73c5de9`](withastro/astro@73c5de9) Thanks [@​P4tt4te](https://github.com/P4tt4te)! - Updates handling of CSS for hydrated client components to prevent duplicates - [#​14576](withastro/astro#14576) [`2af62c6`](withastro/astro@2af62c6) Thanks [@​aprici7y](https://github.com/aprici7y)! - Fixes a regression that caused `Astro.site` to always be `undefined` in `getStaticPaths()` </details> <details> <summary>googleapis/google-api-nodejs-client (googleapis)</summary> ### [`v164.1.0`](https://github.com/googleapis/google-api-nodejs-client/blob/HEAD/CHANGELOG.md#16410-2025-10-20) [Compare Source](googleapis/google-api-nodejs-client@googleapis-v164.0.0...googleapis-v164.1.0) ##### Features - run the generator ([#​3820](googleapis/google-api-nodejs-client#3820)) ([fd02f58](googleapis/google-api-nodejs-client@fd02f58)) </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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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/22 Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>
1 task
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
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.
Fixes #14575
Summary
Restores
Astro.siteavailability ingetStaticPaths()by adding back theastroGlobalArgscompiler option that was removed in PR #14405.Bug
In v5.13.10,
Astro.sitebecameundefinedwhen accessed insidegetStaticPaths(), even when properly configured inastro.config.mjs.Root Cause
PR #14405 removed the
astroGlobalArgsparameter from the compiler options. This parameter passes the site configuration to the Astro compiler, which injects it into the compiled component, makingAstro.siteavailable in the frontmatter code (includinggetStaticPaths()).Fix
This PR restores the single line that was removed:
Testing
Verified that
Astro.siteis now correctly available ingetStaticPaths()as a URL object with the configured site value.Before (v5.13.10)
Astro.siteingetStaticPaths():undefinedAfter (with this fix)
Astro.siteingetStaticPaths():URL { href: 'https://example.com/', ... }