Feature/update astro 6#181
Conversation
✅ Deploy Preview for accessible-astro-starter-incluud ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdded a Sass/Vite 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| "astro-eslint-parser": "^1.3.0", | ||
| "@typescript-eslint/eslint-plugin": "^8.57.2", | ||
| "@typescript-eslint/parser": "^8.57.2", | ||
| "astro": "^6.1.1", |
There was a problem hiding this comment.
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.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (2 files)
Reviewed by gpt-5.2-codex · 105,115 tokens |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
astro.config.mjs (1)
15-15: Consider standardizing SCSS import paths across components.The
loadPathsconfiguration enables the shorterscss/base/breakpointimport syntax used inHeader.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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
astro.config.mjspackage.jsonsrc/components/Header.astrosrc/content.config.ts
| "astro-eslint-parser": "^1.3.0", | ||
| "@typescript-eslint/eslint-plugin": "^8.57.2", | ||
| "@typescript-eslint/parser": "^8.57.2", | ||
| "astro": "^6.1.1", |
There was a problem hiding this comment.
🧩 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.globorgetCollection - Zod 4 upgrade; update custom schemas if present
- Environment variables no longer type-coerced;
"true"remains string - i18n configuration changes to
redirectToDefaultLocaleandprefixDefaultLocaledefaults - 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.
…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.
362bb30 to
d456c8c
Compare
|
hi, this got approved, is it ready to be merged? |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
package.json (1)
46-46: Movecompress()to the end ofintegrations.
astro-compressrecommends being last in the integration list for best optimizations. The currentastro.config.mjsLine 43 still hascompress()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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
README.mdpackage.json
✅ Files skipped from review due to trivial changes (1)
- README.md
|
@Mood93 You are absolutely right. It is merged and a new version (v5.1.0) is released. |
Update dependencies to latest version including astro to v6
Summary by CodeRabbit
Chores
Refactor
Documentation