Skip to content
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

Fix test-utils.ts error #1059

Merged
merged 2 commits into from
Nov 12, 2023
Merged

Conversation

HiDeoo
Copy link
Member

@HiDeoo HiDeoo commented Nov 9, 2023

What kind of changes does this PR include?

  • Changes to Starlight code

Description

This PR fixes a type error in test-utils.ts:

Type 'ZodObject<{ src: ZodString; width: ZodNumber; height: ZodNumber; format: ZodUnion<[ZodLiteral<"png">, ZodLiteral<"jpg">, ZodLiteral<"jpeg">, ZodLiteral<...>, ZodLiteral<...>, ZodLiteral<...>, ZodLiteral<...>]>; }, "strip", ZodTypeAny, { ...; }, { ...; }>' is not assignable to type 'ZodObject<{ src: ZodString; width: ZodNumber; height: ZodNumber; format: ZodUnion<[ZodLiteral<"png">, ZodLiteral<"jpg">, ZodLiteral<"jpeg">, ... 4 more ..., ZodLiteral<...>]>; }, UnknownKeysParam, ZodTypeAny, { ...; }, { ...; }>'.
  The types of '_getCached().shape' are incompatible between these types.
    Type '{ src: z.ZodString; width: z.ZodNumber; height: z.ZodNumber; format: z.ZodUnion<[z.ZodLiteral<"png">, z.ZodLiteral<"jpg">, z.ZodLiteral<"jpeg">, z.ZodLiteral<"tiff">, z.ZodLiteral<...>, z.ZodLiteral<...>, z.ZodLiteral<...>]>; }' is not assignable to type '{ src: ZodString; width: ZodNumber; height: ZodNumber; format: ZodUnion<[ZodLiteral<"png">, ZodLiteral<"jpg">, ZodLiteral<"jpeg">, ... 4 more ..., ZodLiteral<...>]>; }'.ts(2322)

Unfortunately, I don't think we can apply a similar fix as #775 as we do not only need the type but the actual value so I think we need to keep it synced manually for now.

Copy link

changeset-bot bot commented Nov 9, 2023

⚠️ No Changeset found

Latest commit: 4acb85c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Nov 9, 2023

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 81f47b5
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/654d05587977f100088a5a41
😎 Deploy Preview https://deploy-preview-1059--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.

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Nov 9, 2023
Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

LGTM 🫡

Copy link
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.

Looks good to me! I could have sworn I just fixed exactly this the other day, but it's probably in one the various open branches. Happy to merge this one for now!

Copy link

vercel bot commented Nov 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Nov 12, 2023 11:06am

@HiDeoo HiDeoo merged commit 60edb22 into withastro:main Nov 12, 2023
6 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants