Upgrade to Astro 6 with Content Layer API migration#44
Open
devin-ai-integration[bot] wants to merge 7 commits into
Open
Upgrade to Astro 6 with Content Layer API migration#44devin-ai-integration[bot] wants to merge 7 commits into
devin-ai-integration[bot] wants to merge 7 commits into
Conversation
- Bump astro from ^5.17.2 to ^6.1.5 - Bump @astrojs/react from ^4.4.2 to ^5.0.3 - Bump @astrojs/rss from ^4.0.15 to ^4.0.18 - Migrate content collections from legacy to Content Layer API with glob loaders - Move collection definitions to src/content.config.ts - Update Zod schemas for Zod 4 (z.string().url() -> z.url(), remove .step()) - Replace entry.slug with entry.id throughout codebase - Replace entry.render() with imported render() from astro:content - Update getEntry calls for ID-based lookup Co-Authored-By: Davis Haupt <davis@davishaupt.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for davish-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Add .nvmrc with Node 22 - Add NODE_VERSION=22 to netlify.toml build environment - Update package-lock.json for Astro 6 dependencies Co-Authored-By: Davis Haupt <davis@davishaupt.com>
Derive the file extension from entry.filePath instead of hardcoding .md, so .org and other formats display correctly. Co-Authored-By: Davis Haupt <davis@davishaupt.com>
Co-Authored-By: Davis Haupt <davis@davishaupt.com>
Contributor
Author
Visual Comparison Test ResultsTested deploy preview vs live site across 7 page types. Found and fixed a bug — 5 components still used All 7 tests passed after fix. Bug Found & Fixed: slug→id in 5 components
Files fixed: Test Results (7/7 passed)
|
- Add @astrojs/check and typescript as dev dependencies for type checking - Fix verbatimModuleSyntax errors: use type-only imports for CollectionEntry - Fix optional body handling: body is string | undefined in Content Layer API - Fix astro-icon import: use named import from astro-icon/components - Fix Buffer type in og_image.tsx: wrap in Uint8Array for Response constructor - Fix import conflict in [project].astro: rename Project to ProjectLayout Co-Authored-By: Davis Haupt <davis@davishaupt.com>
Co-Authored-By: Davis Haupt <davis@davishaupt.com>
Co-Authored-By: Davis Haupt <davis@davishaupt.com>
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.
Summary
Upgrades Astro from 5.17.2 to 6.1.5 with full Content Layer API migration, plus adds
@astrojs/checkandtypescriptfor type checking.Astro 6 Migration
glob()loaders (src/content.config.ts)entry.slug→entry.idandentry.render()→render(entry)throughoutz.string().url()→z.url(), removed.step()).nvmrcandNODE_VERSION=22innetlify.toml(Astro 6 requires Node 22)entry.filePathfor nav prompt (preserves.md,.org, etc.)Type Checking
@astrojs/checkandtypescriptas dev dependenciesastro check:verbatimModuleSyntax: use type-only imports forCollectionEntrybody: handlebody?: stringin Content Layer APIastro-icon: spread typed props to avoid v0.x/v1.x type mismatchog_image.tsx: wrapBufferinUint8ArrayforResponseconstructor[project].astro: rename import to avoid conflict with local declarationReview & Testing Checklist for Human
markov-ideas.md) — this is an intentional change/undefined)npx astro checklocally to verify type checking works in your environmentNotes
astro-iconpackage uses the v0.x runtime API (pack/nameprops) but ships v1.x types — worked around with typed spread props rather than migrating the Icon usage (which would require adding theicon()integration toastro.config.mjs)pnpm-lock.yamlwas updated alongsidepackage-lock.jsonLink to Devin session: https://app.devin.ai/sessions/79c3ab22e9a1430db50a92123c2c309c
Requested by: @davish