Skip to content

chore: Upgrade to Astro v6#113

Open
kydecker wants to merge 6 commits intoascorbic:mainfrom
kydecker:astro-6
Open

chore: Upgrade to Astro v6#113
kydecker wants to merge 6 commits intoascorbic:mainfrom
kydecker:astro-6

Conversation

@kydecker
Copy link
Copy Markdown

@kydecker kydecker commented Mar 14, 2026

Hi @ascorbic!

This upgrades all Astro packages with pnpm dlx @astrojs/upgrade and adds ^6.0.0 to the peerDependency range for all packages.

Supersedes #100. Supersedes #112.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 14, 2026

👷 Deploy request for astro-loaders pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1232524

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 14, 2026

🦋 Changeset detected

Latest commit: 1232524

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

This PR includes changesets to release 7 packages
Name Type
@ascorbic/airtable-loader Patch
@ascorbic/bluesky-loader Patch
@ascorbic/youtube-loader Patch
@ascorbic/loader-utils Patch
@ascorbic/feed-loader Patch
@ascorbic/mock-loader Patch
@ascorbic/csv-loader 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


// Legacy schemas from original implementation for exact backward compatibility
export const LegacyNSSchema = z.record(z.string());
export const LegacyNSSchema = z.record(z.string(), z.unknown());
Copy link
Copy Markdown
Author

@kydecker kydecker Mar 14, 2026

Choose a reason for hiding this comment

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

Zod 4 requires two arguments for z.record(): https://zod.dev/v4/changelog?id=drops-single-argument-usage

},
schema: () =>
zodSchemaFromAirtableTable({
createSchema: async () => {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Since the schema generation is async we need to use createSchema now: https://docs.astro.build/en/guides/upgrade-to/v6/#removed-schema-function-signature-content-loader-api

"airtable": "^0.12.2",
"ts-pattern": "^5.6.2"
"ts-pattern": "^5.6.2",
"zod-to-ts": "^1.2.0"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

zod-to-ts v2.0.0 is available, but the API is different from what the Astro docs expect. Since Astro v5 used zod-to-ts@1.2.0, I kept the version there for parity.

...options
}: MockLoaderOptions): Loader {
async function getSchema() {
async function getSchema(): Promise<z.ZodType<Record<string, unknown>>> {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Unfortunately had to cast getSchema() since there are conflicting types between Astro 6/Zod 4 and @anatine/zod-mock.

@kydecker
Copy link
Copy Markdown
Author

@ascorbic Pushed a change which should fix the type error that was causing the test to fail. Added a basic changeset!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant