Skip to content

[Snyk] Security upgrade astro from 4.16.18 to 6.4.8 - #60

Open
qbey wants to merge 1 commit into
mainfrom
snyk-fix-641bac44d1f3bcb6d8760776952d070b
Open

[Snyk] Security upgrade astro from 4.16.18 to 6.4.8#60
qbey wants to merge 1 commit into
mainfrom
snyk-fix-641bac44d1f3bcb6d8760776952d070b

Conversation

@qbey

@qbey qbey commented Jul 9, 2026

Copy link
Copy Markdown
Member

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • website/package.json
  • website/package-lock.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Use of Non-Canonical URL Paths for Authorization Decisions
SNYK-JS-ASTRO-17901336
  715  

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

@qbey

qbey commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

Merge Risk: High

This is a major upgrade from Astro v4 to v6, which includes significant breaking changes and requires mandatory code modifications. Key changes are introduced across two major versions (v5 and v6).

Astro v5 Breaking Changes

  • Content Collections: A new Content Layer API was introduced, making the v2 API legacy. This requires moving the config file from src/content/config.ts to src/content.config.ts and updating collection definitions to use a loader instead of type.
  • Rendering Mode: The output: 'hybrid' configuration is removed and its functionality is merged into output: 'static'.
  • Component Rename: The <ViewTransitions /> component was renamed to <ClientRouter />.
  • Astro.glob() Deprecated: This API is deprecated in favor of the new Content Collections API.

Astro v6 Breaking Changes

  • Node.js Requirement: Support for Node.js 18 and 20 is dropped. Node.js 22.12.0 or higher is now required.
  • Mandatory Content Layer API: Legacy support for old content collections and the Astro.glob() API are completely removed. All projects must migrate to the Content Layer API.
  • Zod v4 Upgrade: Astro's internal dependency, Zod, is upgraded to v4. This requires updating any custom content schemas and changing imports from astro:content to astro/zod.
  • Dev Server Rearchitecture: The development server was rebuilt to unify the development and production environments, which may affect integration hooks and custom server configurations.

Recommendation:
This upgrade requires significant developer effort. Before merging, you must:

  1. Ensure your development and deployment environments use Node.js 22.12.0+.
  2. Fully migrate from Astro.glob() and legacy content collections to the new Content Layer API.
  3. Update all Zod schemas to be compatible with Zod v4.
  4. Replace any instances of <ViewTransitions /> with <ClientRouter />.
  5. Review and upgrade official integrations like @astrojs/cloudflare or @astrojs/tailwind, as they have their own breaking changes.

Source: Astro v5 Upgrade Guide, Astro v6 Upgrade Guide

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

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.

2 participants