Repository navigation
Fix union schema extend regression - #4095
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: afa713c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
Author
I totally forgot about that. Before merging, I'll try this branch against the docs to make sure I don't spot anything else while at it. |
Member
Author
|
Confirmed updating Astro Docs to Using the version from this PR fixes both the type error and the build issue. |
Merged
dadezzz
pushed a commit
to dadezzz/university_notes
that referenced
this pull request
Aug 1, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@astrojs/starlight](https://starlight.astro.build) ([source](https://github.com/withastro/starlight/tree/HEAD/packages/starlight)) | [`0.41.4` → `0.41.5`](https://renovatebot.com/diffs/npm/@astrojs%2fstarlight/0.41.4/0.41.5) |  |  | --- ### Release Notes <details> <summary>withastro/starlight (@​astrojs/starlight)</summary> ### [`v0.41.5`](https://github.com/withastro/starlight/blob/HEAD/packages/starlight/CHANGELOG.md#0415) [Compare Source](https://github.com/withastro/starlight/compare/@astrojs/starlight@0.41.4...@astrojs/starlight@0.41.5) ##### Patch Changes - [#​4095](withastro/starlight#4095) [`bb06434`](withastro/starlight@bb06434) Thanks [@​HiDeoo](https://github.com/HiDeoo)! - Fixes a regression when using a union to [extend](https://starlight.astro.build/reference/frontmatter/#extend) Starlight’s `docsSchema()`. </details> --- ### Configuration 📅 **Schedule**: (UTC) - 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 [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yODEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI4MS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
HiDeoo
added a commit
to HiDeoo/starlight
that referenced
this pull request
Aug 16, 2026
* main: (219 commits) i18n(fr): update `authoring-content.mdx`, `i18n.mdx` & `plugins.md` (withastro#4128) i18n(de): update links to Astro docs (withastro#4126) Update `size-limit` config (withastro#4122) Replace 3 outdated links to Astro Docs (withastro#4120) [ci] release (withastro#4115) Update dependencies (withastro#4113) Add Astro LilyPond to Starlight showcase (withastro#4116) Refactor Sätteri RTL code support plugin (withastro#4114) Use pinned version of `pkg-pr-new` for preview releases (withastro#4111) chore(deps): update vite and rolldown (withastro#4108) i18n(ru): update translations (withastro#4107) [ci] release (withastro#4106) Add Forgejo icon (withastro#4102) [ci] format i18n(de): update `themes.mdx` (withastro#4104) i18n(de): update `plugins.mdx` (withastro#4103) i18n(de): update `community-content.mdx` (withastro#4101) [ci] release (withastro#4097) Fix union schema `extend` regression (withastro#4095) [ci] release (withastro#4090) ...
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.

Description
docsSchema({ extend })doesn't supportZodUnion#4094This PR fixes a regression introduced in #3936 for an edge case I definitely didn't think about: using a union to extend the
docsschema.To address this, after unwrapping (optional, nullable, etc.) the user-provided schema, we need to check if it's a union and if it is, we deep-merge each member of the union with the default schema.