Skip to content

Prevent Zod errors from crashing build#2288

Merged
delucis merged 2 commits intomainfrom
oops-undefined
Sep 6, 2024
Merged

Prevent Zod errors from crashing build#2288
delucis merged 2 commits intomainfrom
oops-undefined

Conversation

@matthewp
Copy link
Copy Markdown
Contributor

@matthewp matthewp commented Sep 6, 2024

Description

  • Errors are weakly typed and some undefineds were escaping due to a missing typeof, which this fixes.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 6, 2024

🦋 Changeset detected

Latest commit: 1da8a34

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Patch

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

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Sep 6, 2024
@netlify
Copy link
Copy Markdown

netlify bot commented Sep 6, 2024

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 1da8a34
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/66db04de8291000008213d84
😎 Deploy Preview https://deploy-preview-2288--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@astrobot-houston
Copy link
Copy Markdown
Contributor

Hello! Thank you for opening your first PR to Starlight! ✨

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any issues you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Netlify 🤩

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@astrobot-houston
Copy link
Copy Markdown
Contributor

astrobot-houston commented Sep 6, 2024

size-limit report 📦

Path Size
/index.html 6.15 KB (0%)
/_astro/*.js 22.33 KB (0%)
/_astro/*.css 13.72 KB (0%)

@matthewp matthewp marked this pull request as draft September 6, 2024 13:32
@matthewp matthewp marked this pull request as ready for review September 6, 2024 14:01
Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite sure what changed to cause us to start hitting this, but I believe you that the error object is inconsistent.

Might be the new use of async transforms perhaps (added by content layer) — could be a Zod issue of doing things subtly differently in safeParse() and safeParseAsync().

Either way, approved!

@delucis delucis added the 🌟 patch Change that triggers a patch release label Sep 6, 2024
@delucis delucis merged commit b15f725 into main Sep 6, 2024
@delucis delucis deleted the oops-undefined branch September 6, 2024 14:38
@astrobot-houston astrobot-houston mentioned this pull request Sep 6, 2024
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Sep 7, 2024
* main: (37 commits)
  [ci] format
  i18n(ko-KR): update `manual-setup.mdx` (withastro#2294)
  i18n(ko-KR): update `configuration.mdx` (withastro#2295)
  [ci] release (withastro#2292)
  Add support for SSR (withastro#1255)
  Add Markdoc preset and example (withastro#2249)
  Refactor sidebar persistence logic for better slow device performance (withastro#2242)
  [ci] format
  Add docs.ryzekit.com to showcase (withastro#2291)
  Update astro dependency to 4.15.3 across monorepo (withastro#2289)
  [ci] release (withastro#2290)
  Prevent Zod errors from crashing build (withastro#2288)
  i18n(fr): update `guides/css-and-tailwind` (withastro#2286)
  i18n(ko-KR): update `css-and-tailwind.mdx` (withastro#2284)
  Add WCAG AAA colour contrast option to theme editor (withastro#2282)
  [ci] release (withastro#2283)
  Parse `<StarlightPage />` frontmatter asynchronously (withastro#2279)
  Ensure unhandled directives are restored without any extra whitespace (withastro#2281)
  i18n(fr): update `resources/plugins` (withastro#2278)
  i18n(ko-KR): update `plugins.mdx` (withastro#2277)
  ...
Yoxnear pushed a commit to Yoxnear/starlight-custom that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🌟 core Changes to Starlight’s main package 🌟 patch Change that triggers a patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants