Skip to content

chore: Upgrade to Astro v6#113

Open
evadecker wants to merge 4 commits intoascorbic:mainfrom
evadecker:astro-6
Open

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

Conversation

@evadecker
Copy link

@evadecker evadecker 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

netlify bot commented Mar 14, 2026

👷 Deploy request for astro-loaders pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 814f40d

@changeset-bot
Copy link

changeset-bot bot commented Mar 14, 2026

⚠️ No Changeset found

Latest commit: 814f40d

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


// 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
Author

@evadecker evadecker 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
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
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.

);
if ("createSchema" in loader && loader.createSchema) {
const result = await loader.createSchema();
return result.schema as z.ZodTypeAny;
Copy link
Author

Choose a reason for hiding this comment

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

There's probably a cleaner way to update mock-loader without needing to cast as.

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