Skip to content

Feature/update astro 6#181

Merged
peterpadberg merged 8 commits into
mainfrom
feature/update-astro-6
Apr 3, 2026
Merged

Feature/update astro 6#181
peterpadberg merged 8 commits into
mainfrom
feature/update-astro-6

Conversation

@peterpadberg
Copy link
Copy Markdown
Member

@peterpadberg peterpadberg commented Mar 28, 2026

Update dependencies to latest version including astro to v6

Summary by CodeRabbit

  • Chores

    • Updated multiple npm dependencies and set Node engine requirement (>=22.12.0).
    • Added an SCSS load path to improve style asset resolution during build.
  • Refactor

    • Standardized stylesheet import paths site-wide for more consistent styling behavior.
  • Documentation

    • Updated README minimum supported framework version.

@peterpadberg peterpadberg linked an issue Mar 28, 2026 that may be closed by this pull request
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 28, 2026

Deploy Preview for accessible-astro-starter-incluud ready!

Name Link
🔨 Latest commit d3b0e75
🔍 Latest deploy log https://app.netlify.com/projects/accessible-astro-starter-incluud/deploys/69cf9bc1d8e7510008e1b97c
😎 Deploy Preview https://deploy-preview-181--accessible-astro-starter-incluud.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added a Sass/Vite loadPaths entry resolving ./src/assets; updated Node engine and bumped Astro and multiple deps; switched several SCSS @use imports to module-style scss/...; and changed the z import source from astro:content to astro/zod.

Changes

Cohort / File(s) Summary
Build & Dependency Configuration
astro.config.mjs, package.json, .nvmrc
Added Sass loadPaths (resolves ./src/assets) to Vite css.preprocessorOptions.scss; bumped version, Node engine (>=22.12.0), Astro and multiple deps/devDeps.
SCSS import updates — components, layout & pages
src/components/.../Header.astro, src/components/.../CallToAction.astro, src/components/.../ColorContrast.astro, src/components/.../Feature.astro, src/components/.../Navigation.astro, src/components/.../ResponsiveToggle.astro, src/layouts/DefaultLayout.astro, src/pages/.../accessible-components.astro
Replaced relative/@assets SCSS @use paths with bare module-style scss/... imports to use the added Sass load path.
Content schema import
src/content.config.ts
Changed z import source from astro:content to astro/zod (no schema changes).

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer / Build
    participant Astro as Astro Config
    participant Vite as Vite Dev Server
    participant Sass as Sass Preprocessor
    participant FS as File System

    Dev->>Astro: run build/dev
    Astro->>Vite: provide config (css.preprocessorOptions.scss with loadPaths)
    Vite->>Sass: invoke preprocessor for .scss imports
    Sass->>FS: resolve import paths (includes ./src/assets via loadPaths)
    Sass-->>Vite: compiled CSS
    Vite-->>Dev: serve/build site
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • markteekman

Poem

🐰 I hopped through paths of sass and light,
Repointed imports, set engines right.
Astro rose and packages flew,
Zod found its place, styles stitched anew.
I nibble code crumbs — a tidy view.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feature/update astro 6' directly describes the main objective of the PR—upgrading Astro to version 6 and updating dependencies accordingly, which aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/update-astro-6

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread package.json
"astro-eslint-parser": "^1.3.0",
"@typescript-eslint/eslint-plugin": "^8.57.2",
"@typescript-eslint/parser": "^8.57.2",
"astro": "^6.1.1",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Node version requirement likely exceeds current .nvmrc

Astro 6 and @astrojs/mdx v5 require newer Node (the lockfile shows >=22.12.0), but .nvmrc currently pins v20.5.1. This can break local dev/CI for contributors following .nvmrc. Consider bumping .nvmrc (and any CI engines) to match the new minimum Node version.

@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented Mar 28, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
package.json 45 Node version requirement likely exceeds current

Fix these issues in Kilo Cloud

Files Reviewed (2 files)
  • README.md
  • package.json

Reviewed by gpt-5.2-codex · 105,115 tokens

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
astro.config.mjs (1)

15-15: Consider standardizing SCSS import paths across components.

The loadPaths configuration enables the shorter scss/base/breakpoint import syntax used in Header.astro. However, other components (Navigation.astro, DefaultLayout.astro, ResponsiveToggle.astro, accessible-components.astro) still use the relative path style (../assets/scss/base/breakpoint). Both work, but standardizing on one approach would improve maintainability.

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

In `@astro.config.mjs` at line 15, Standardize SCSS import paths to the shorter
loadPath form used in Header.astro: update the imports in Navigation.astro,
DefaultLayout.astro, ResponsiveToggle.astro, and accessible-components.astro to
use the alias-style path (e.g., scss/base/breakpoint) instead of relative paths
like ../assets/scss/base/breakpoint so they rely on the existing
astro.config.mjs loadPaths setting and remain consistent across components.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 45: Update the project to be compatible with Astro v6: bump Node engine
to >=22 in package.json and ensure CI/test runners use Node 22+, review Vite
config and plugins referenced in vite.config.js and any astro integrations
(check functions/hooks named like viteConfig, integrations or hooks) for Vite 7
compatibility, replace any uses of Astro.glob (search for "Astro.glob") with
import.meta.glob or getCollection, migrate legacy content collections to Content
Layer API and calls to getCollection or collection schema usage, update Zod
schemas to Zod 4 signatures where custom schemas are defined (search for
"z.object" or imports from "zod"), audit environment variable handling where
code expects booleans/typed values and treat process.env values as strings, and
update any integration hooks to use Vite’s Environment API per the migration
guide.

---

Nitpick comments:
In `@astro.config.mjs`:
- Line 15: Standardize SCSS import paths to the shorter loadPath form used in
Header.astro: update the imports in Navigation.astro, DefaultLayout.astro,
ResponsiveToggle.astro, and accessible-components.astro to use the alias-style
path (e.g., scss/base/breakpoint) instead of relative paths like
../assets/scss/base/breakpoint so they rely on the existing astro.config.mjs
loadPaths setting and remain consistent across components.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 27cd3d7a-224f-48f2-a80e-a3ad74b61d09

📥 Commits

Reviewing files that changed from the base of the PR and between 2ec1b73 and c9d7e93.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • astro.config.mjs
  • package.json
  • src/components/Header.astro
  • src/content.config.ts

Comment thread package.json
"astro-eslint-parser": "^1.3.0",
"@typescript-eslint/eslint-plugin": "^8.57.2",
"@typescript-eslint/parser": "^8.57.2",
"astro": "^6.1.1",
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 | 🟠 Major

🧩 Analysis chain

🌐 Web query:

What are the breaking changes in Astro v6 compared to v5?

💡 Result:

The breaking changes in Astro v6 compared to v5, based on the official upgrade guide, include: Dependency Upgrades (potentially breaking): - Node.js: Drops support for Node 18 and 20; now requires Node 22+. - Vite: Upgrades to Vite 7.0; check Vite migration guide for plugin/config changes. - Zod: Upgrades to Zod 4; update custom schemas (e.g., import from astro/zod, API changes like z.string.email to z.email). - Shiki: Upgrades to Shiki 4 for code highlighting. - Official adapters: All updated to new major versions, especially Cloudflare adapter with significant changes. Removed/Legacy Features: - Legacy content collections support removed (no more legacy.collections flag); must use Content Layer API. - Astro.glob removed; use import.meta.glob or getCollection. - Experimental flags removed that are now stable: preserveScriptOrder, headingIdCompat, etc. Changed Defaults: - Image service: Default cropping now applied without fit option. - i18n: Changes to redirectToDefaultLocale and prefixDefaultLocale behavior. - Endpoints with file extensions cannot be accessed with trailing slash. Other Breaking Changes: - Environment variables: No more type coercion (e.g., "true" stays string); non-public vars not replaced with process.env. - Integration hooks and HMR: Now uses Vite's Environment API. - SSRManifest: Path properties and astro:ssr-manifest virtual module changes. - Removed: emitESMImage, old (now ClientRouter), Astro.locals.runtime simulation. - Rollup output file name config path changed. - Hybrid rendering mode removed (from v5, but noted). For full migration, use npx @astrojs/upgrade and follow https://docs.astro.build/en/guides/upgrade-to/v6/. Astro 6.0 released around March 2026 per GitHub and blog.

Citations:


Review Astro v6 breaking changes and ensure codebase compatibility.

Astro v6 introduces multiple breaking changes that require code updates:

  • Node.js 22+ required (drops support for v18, v20)
  • Vite 7.0 dependency; review plugin/configuration compatibility
  • Legacy content collections removed; migrate to Content Layer API if used
  • Astro.glob removed; replace with import.meta.glob or getCollection
  • Zod 4 upgrade; update custom schemas if present
  • Environment variables no longer type-coerced; "true" remains string
  • i18n configuration changes to redirectToDefaultLocale and prefixDefaultLocale defaults
  • Integration hooks now use Vite's Environment API

Verify the codebase addresses these changes. Official migration guide: https://docs.astro.build/en/guides/upgrade-to/v6/

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

In `@package.json` at line 45, Update the project to be compatible with Astro v6:
bump Node engine to >=22 in package.json and ensure CI/test runners use Node
22+, review Vite config and plugins referenced in vite.config.js and any astro
integrations (check functions/hooks named like viteConfig, integrations or
hooks) for Vite 7 compatibility, replace any uses of Astro.glob (search for
"Astro.glob") with import.meta.glob or getCollection, migrate legacy content
collections to Content Layer API and calls to getCollection or collection schema
usage, update Zod schemas to Zod 4 signatures where custom schemas are defined
(search for "z.object" or imports from "zod"), audit environment variable
handling where code expects booleans/typed values and treat process.env values
as strings, and update any integration hooks to use Vite’s Environment API per
the migration guide.

markteekman
markteekman previously approved these changes Mar 28, 2026
Peter Padberg added 6 commits March 28, 2026 16:22
…tibility

- Upgraded several dependencies in package.json and package-lock.json, including @astrojs/mdx, @astrojs/partytown, and astro, to their latest versions.
- Updated other packages such as @tailwindcss/vite, sanitize-html, and sass for enhanced functionality and stability.
- Added loadPaths to the Astro configuration for SCSS to include the assets directory.
- Updated the import path in Header.astro to reflect the new SCSS structure.
- Changed the import statement for zod to use the correct path from 'astro/zod'.
- Ensured compatibility with the latest Astro content utilities.
…k.json

- Added "engines" field to both package.json and package-lock.json to require Node.js version 22.12.0 or higher for compatibility.
- Changed SCSS import paths in CallToAction, ColorContrast, Feature, Navigation, ResponsiveToggle, DefaultLayout, and accessible-components to remove the '../assets' prefix for consistency and improved structure.
@peterpadberg peterpadberg force-pushed the feature/update-astro-6 branch from 362bb30 to d456c8c Compare March 28, 2026 15:22
@Mood93
Copy link
Copy Markdown
Contributor

Mood93 commented Apr 3, 2026

hi, this got approved, is it ready to be merged?

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
package.json (1)

46-46: Move compress() to the end of integrations.

astro-compress recommends being last in the integration list for best optimizations. The current astro.config.mjs Line 43 still has compress() first, so this bump leaves the integration in a suboptimal position. (npmjs.com)

Suggested follow-up in astro.config.mjs
- integrations: [compress(), icon(), mdx(), sitemap()],
+ integrations: [icon(), mdx(), sitemap(), compress()],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 46, The astro-compress integration should be last in
the integrations array to maximize optimizations; open astro.config.mjs, find
the integrations array and move the compress() entry (the astro-compress
integration) to the end of that array so it is the final integration executed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@package.json`:
- Line 46: The astro-compress integration should be last in the integrations
array to maximize optimizations; open astro.config.mjs, find the integrations
array and move the compress() entry (the astro-compress integration) to the end
of that array so it is the final integration executed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7e3a70cc-f684-4972-be79-76bd634a1638

📥 Commits

Reviewing files that changed from the base of the PR and between d456c8c and d3b0e75.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • README.md
  • package.json
✅ Files skipped from review due to trivial changes (1)
  • README.md

@peterpadberg peterpadberg merged commit 90e6e78 into main Apr 3, 2026
6 checks passed
@peterpadberg
Copy link
Copy Markdown
Member Author

@Mood93 You are absolutely right. It is merged and a new version (v5.1.0) is released.
Thank you for your message. If there's anything else please let us know.

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.

Upgrade Astro to version 6

3 participants