Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@astrojs/starlight": "0.37.4",
"@astrojs/starlight-tailwind": "4.0.2",
"@tailwindcss/vite": "catalog:",
"astro": "5.16.13",
"astro": "6.1.6",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

What are the breaking changes in Astro 6 compared to Astro 5 and what migration steps are required?

💡 Result:

Astro 6 introduces several breaking changes compared to Astro 5, primarily documented in the official upgrade guide. Key changes include dependency upgrades, removal of legacy features, changed defaults, and specific API modifications. Migration involves updating Node.js, dependencies, config flags, and code patterns. ## Dependency Upgrades (high impact) - Node.js: Drops support for Node 18 (EOL March 2025) and Node 20 (EOL April 2026). Requires Node 22.12.0+. Update your .nvmrc or deployment env: 22.12.0 - Vite 7.0: As dev server and bundler. Check Vite migration guide if using custom Vite plugins/config. - Zod 4: For content schema validation. Import Zod from astro/zod. Update schemas for Zod 4 breaking changes (e.g., deprecated async schema functions; use static schema property). - Shiki v4: For syntax highlighting. Update integrations like @astrojs adapters (Cloudflare, Netlify, etc.) for compatibility. ## Legacy Features Removed/Deprecated - Legacy Content Collections: Automatic backwards compatibility and legacy.collections flag removed. Migrate all to Content Layer API (src/content.config.ts). Use loaders like glob for filesystem content. - Astro object in getStaticPaths: Deprecated; use astro:config virtual module instead. - ViewTransitions: → ; removed deprecated exports from astro:transitions. - CommonJS config files: ESM-only now. - Removed experimental flags now stable: csp, liveCollections, preserveScriptOrder, headingIdCompat, etc. Remove from astro.config.mjs. ## Changed Defaults - i18n.routing.redirectToDefaultLocale: Now false (was true). - Image service: Cropping always enabled (no fit required); generates styles at build-time (data-astro-fit/pos attributes). - <script> and <style> tags: Render in declaration order (hoisted before). ## Breaking Changes - Endpoints with file extensions (e.g., api/user.json): No trailing slash access (e.g., /api/user.json/ → 404). - import.meta.env: Always inlined strings (no type coercion like "true"→boolean). - Assets: Always crop, never upscale. Remove fit: 'contain' if used for cropping. - Markdown: Heading IDs no longer strip trailing hyphens (e.g., ## Heading-- → heading--). - SSRManifest: Path properties changed. - Adapter/Integration API: Removed hooks like entryPoints/routes; new Adapter API with setAdapter({entryType: 'self'}); deprecated createExports/start. - Removed: emitESMImage, session test driver, prefetch 'with' option. ## Migration Steps 1. Run npx @astrojs/upgrade (automated tool) or npm install astro@latest. 2. Update Node to 22.12.0+ locally and in deployment. 3. Remove legacy/experimental flags from astro.config.mjs. 4. Migrate content collections to Content Layer API if using legacy src/content/. 5. Update Zod schemas: Import from astro/zod; fix async schemas. 6. Check images: Remove unnecessary fit: 'contain'. 7. Update ViewTransitions to ClientRouter. 8. Test i18n routing defaults. 9. Review adapters/integrations changelogs. 10. Run astro check, astro build, astro preview; fix errors. Full details: Official upgrade guide and changelog. Most projects migrate smoothly; content-heavy sites need Content Layer updates. Zod 4 may break third-party loaders.

Citations:


🌐 Web query:

Is @astrojs/starlight version 0.37.4 compatible with Astro 6.1.6?

💡 Result:

No, @astrojs/starlight version 0.37.4 is not compatible with Astro 6.1.6. Starlight 0.37.x requires Astro 5.x, as indicated by its dev dependencies on astro ^5.x and the absence of Astro 6 support announcements in its release notes. Astro 6 support was added in Starlight 0.38.0, which explicitly drops Astro 5 support and requires Astro ^6.0.0. Using Starlight 0.37.4 with Astro 6 may result in compatibility issues due to breaking changes in Astro 6.

Citations:


🏁 Script executed:

#!/bin/bash
# Description: Check for Astro API usage patterns that might be affected by v6 upgrade

echo "=== Checking Content Collections API usage ==="
rg -n --type=ts --type=js "defineCollection|docsLoader|getCollection" apps/site/

echo -e "\n=== Checking Astro config patterns ==="
rg -n --type=js --type=mjs "defineConfig|redirects" apps/site/

echo -e "\n=== Checking Astro runtime API usage ==="
rg -n "Astro\.(locals|props|request|response|cookies)" apps/site/

Repository: samui-build/samui-wallet

Length of output: 623


🏁 Script executed:

#!/bin/bash
# Read astro.config.mjs to check for defineConfig and redirects
echo "=== Checking astro.config.mjs content ==="
if [ -f "apps/site/astro.config.mjs" ]; then
  cat -n "apps/site/astro.config.mjs"
else
  echo "File not found"
  find apps/site -name "astro.config.*" -type f
fi

Repository: samui-build/samui-wallet

Length of output: 2170


🌐 Web query:

Is Astro.locals API still available and compatible in Astro 6?

💡 Result:

Yes, the Astro.locals API is still available and fully compatible in Astro 6.

Citations:


🌐 Web query:

Does Astro 6 with Vite 7 resolve the Vite 6 incompatibility issues?

💡 Result:

Yes, Astro 6 with Vite 7 resolves the Vite 6 incompatibility issues.

Citations:


Starlight 0.37.4 is incompatible with Astro 6.1.6—upgrade to Starlight 0.38.0+ is required.

The codebase cannot upgrade to Astro 6.1.6 while using @astrojs/starlight 0.37.4. Starlight 0.37.x requires Astro 5.x; Astro 6 support was added in Starlight 0.38.0, which drops Astro 5 support and requires astro ^6.0.0. Both dependencies must be updated together.

Beyond the Starlight blocker, Astro 6 introduces extensive breaking changes that require migration:

  • Node.js: Drops support for Node 18 and 20; requires Node 22.12.0+
  • Content Collections: The docsLoader() pattern in src/content.config.ts requires verification against Starlight 0.38.0's loader API
  • Vite upgrade: Astro 6 bundles Vite 7, which resolves the current Vite 6 vs 7 incompatibility flagged in astro.config.mjs line 61 (the @ts-expect-error comment becomes unnecessary)
  • Zod 4: Required for schema validation; may break custom loaders
  • Config defaults: i18n.routing.redirectToDefaultLocale now defaults to false; image cropping behavior changed

Verify that Starlight 0.38.0's loader implementation is compatible with your current content structure before proceeding.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/package.json` at line 6, Update the Starlight dependency in
apps/site package.json to a version compatible with Astro 6 (bump
`@astrojs/starlight` to 0.38.0 or later) so it matches the existing "astro":
"6.1.6" entry; after bumping `@astrojs/starlight`, run dependency install and
validate the site build, then review content loader usage (e.g., docsLoader in
src/content.config.ts) and any schema/zod usages to ensure compatibility with
Starlight 0.38.0 and Astro 6 before merging.

"sharp": "0.34.5",
"tailwindcss": "catalog:"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"globals": "16.4.0",
"tw-animate-css": "1.4.0",
"typescript": "5.9.3",
"vite": "7.2.4"
"vite": "7.3.2"
},
"name": "basic",
"private": true,
Expand Down
Loading