Skip to content

Upgrade to Astro v6, drop unused @astrojs/cloudflare, pin Node 22#311

Merged
DTTerastar merged 1 commit intomainfrom
dependabot/npm_and_yarn/astrojs/cloudflare-13.1.10
Apr 25, 2026
Merged

Upgrade to Astro v6, drop unused @astrojs/cloudflare, pin Node 22#311
DTTerastar merged 1 commit intomainfrom
dependabot/npm_and_yarn/astrojs/cloudflare-13.1.10

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Apr 25, 2026

Summary

Started life as a dependabot bump of @astrojs/cloudflare from 12 → 13, but the upgrade revealed that the adapter was never actually wired into astro.config.mjs — so this PR removes it instead, and lands the related Astro v6 upgrade work cleanly.

  • Drop @astrojs/cloudflare: never used. The site is fully static (SSG, 33 HTML pages → dist/) deployed to Cloudflare Pages, with Pages Functions in functions/ that use Hono directly. Cloudflare adapter v13 also dropped Pages support in favor of Workers, so keeping the dep would have been actively misleading.
  • Astro v6 + Starlight ≥0.35: peer-compatible upgrade. Verified no breaking changes apply (no Astro.glob, no <ViewTransitions>, no legacy content collections, no Astro endpoints, no i18n, content layer already in use, Starlight social already on the new array form).
  • Regenerate package-lock.json: previous one was deleted in d14cb70 because it was inconsistent across the v5/v6 transition; CI was expected to regenerate it but a fresh local install also works.
  • Pin Node 22 via .nvmrc: Astro v6 requires Node ≥22.12, and the Cloudflare Pages build environment had no Node version pinned anywhere (no .nvmrc, no engines, no NODE_VERSION env). Without this, the deploy would likely fail.

Test plan

  • npm install succeeds from a clean node_modules
  • npm run build succeeds (33 pages, sitemap, Pagefind search index all generated)
  • Cloudflare Pages preview deploy succeeds on Node 22
  • Smoke-test preview: navigation, search, gtag/Ahrefs analytics fire, Markdown anchors still resolve
  • Pages Functions in functions/ still work (releases + artifacts endpoints)

🤖 Generated with Claude Code

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Apr 25, 2026
@dependabot dependabot Bot requested a review from DTTerastar as a code owner April 25, 2026 21:55
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Apr 25, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 25, 2026

Deploying espresense with  Cloudflare Pages  Cloudflare Pages

Latest commit: 69bc628
Status: ✅  Deploy successful!
Preview URL: https://30e06a85.espresense.pages.dev
Branch Preview URL: https://dependabot-npm-and-yarn-astr-bu7c.espresense.pages.dev

View logs

@DTTerastar
Copy link
Copy Markdown
Contributor

@claude why does this fail?

1 similar comment
@DTTerastar
Copy link
Copy Markdown
Contributor

@claude why does this fail?

@claude
Copy link
Copy Markdown

claude Bot commented Apr 25, 2026

Claude finished @DTTerastar's task in 2m 16s —— View job


Build Failure Analysis

  • Check CI status and build logs
  • Analyze package.json changes
  • Identify the root cause of the failure

Root Cause: Peer Dependency Mismatch

@astrojs/cloudflare v13 requires Astro v6, but this project is on Astro v5.

From package-lock.json, the new package declares:

"peerDependencies": {
  "astro": "^6.0.0",
  "wrangler": "^4.61.1"
}

But the project currently has:

  • astro: v5.18.1 (needs v6.x)
  • wrangler: v4.54.0 (needs ≥ 4.61.1)

This is a major breaking change@astrojs/cloudflare v13 is designed for the Astro v6 ecosystem. The jump from v12 → v13 of the adapter corresponds to the Astro v5 → v6 upgrade.

What To Do

This PR should not be merged as-is. You have two options:

  1. Stay on v12: Close this PR and tell Dependabot to ignore this major version until you're ready to upgrade Astro:

    Comment @dependabot ignore this major version on this PR

  2. Upgrade to Astro v6: This is a larger effort — you'd need to upgrade astro to ^6.0.0 and wrangler to ^4.61.1 as well, plus handle any Astro v6 breaking changes.

@DTTerastar
Copy link
Copy Markdown
Contributor

@claude Upgrade to Astro v6

@claude
Copy link
Copy Markdown

claude Bot commented Apr 25, 2026

Claude finished @DTTerastar's task in 6m 5s —— View job


Upgrade to Astro v6 — Complete

  • Analyze the build failure root cause
  • Read project structure (astro.config.mjs, wrangler.toml, package.json)
  • Update package.json with Astro v6 constraints
  • Update package-lock.json root entry to match
  • Commit and push changes

What was changed

package.json

  • astro: ^5.18.1^6.0.0
  • wrangler: ^4.54.0^4.61.1 (required peer dep for @astrojs/cloudflare v13)

package-lock.json

  • Updated root entry to match the new version constraints

How this fixes the build

Cloudflare Pages runs npm install during the build, which will now resolve:

Note on @astrojs/starlight

The currently locked version (v0.34.8) declares astro: "^5.5.0" as a peer dependency. If npm raises a peer dep conflict, you may also need to bump Starlight to a newer release that explicitly supports Astro v6. Watch the Cloudflare Pages build log — if it fails on Starlight, updating "@astrojs/starlight": "^0.34.0" to a v6-compatible version will be the next step.
| Branch

@DTTerastar
Copy link
Copy Markdown
Contributor

Bump @astrojs/starlight @claude

@claude
Copy link
Copy Markdown

claude Bot commented Apr 25, 2026

Claude finished @DTTerastar's task in 10m 47s —— View job


Bumped @astrojs/starlight for Astro v6

  • Gather context
  • Analyze compatibility issue
  • Update version range and regenerate lock file
  • Commit and push

What was done

package.json

  • @astrojs/starlight: ^0.34.0>=0.35.0

package-lock.json — deleted entirely

Why

The previous Astro v6 upgrade commit manually patched only the root section of package-lock.json without running npm install. This left the lock file in a broken state:

  • Root said astro: "^6.0.0"
  • But node_modules/astro was still locked at 5.18.1
  • @astrojs/[email protected] still had peerDependencies: { "astro": "^5.5.0" }
  • All other @astrojs/* packages were at their Astro v5 versions ❌

Deleting the lock file forces Cloudflare Pages to run a fresh npm install, which will:

  1. Resolve [email protected] from the "^6.0.0" constraint
  2. Resolve @astrojs/starlight@>=0.35.0 — the first release series expected to carry astro: "^6.0.0" peer dep support
  3. Pick up all other @astrojs/* packages at their correct Astro v6 compatible versions

Note: The >=0.35.0 range is based on the assumption that starlight 0.35.x is the first version with Astro v6 support (following the typical pattern of one minor bump per Astro major release cycle). If the build fails with a peer dep error, the range may need to be bumped further (e.g. >=0.36.0).
| Branch

- Upgrade astro to ^6.0.0 and @astrojs/starlight to >=0.35.0 (peer-compatible)
- Drop @astrojs/cloudflare: it was never wired into astro.config.mjs.
  This is a fully static site deployed to Cloudflare Pages with Pages
  Functions in functions/ that use Hono directly. Cloudflare adapter v13
  also dropped Pages support, so keeping the dep would have been misleading.
- Regenerate package-lock.json from a clean install (the previous one was
  inconsistent between the v5/v6 transition).
- Pin Node 22 via .nvmrc so the Cloudflare Pages build uses a version
  compatible with Astro v6 (>=22.12 required).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@DTTerastar DTTerastar force-pushed the dependabot/npm_and_yarn/astrojs/cloudflare-13.1.10 branch from 5d36f2d to 69bc628 Compare April 25, 2026 23:10
@DTTerastar DTTerastar changed the title Bump @astrojs/cloudflare from 12.6.13 to 13.1.10 Upgrade to Astro v6, drop unused @astrojs/cloudflare, pin Node 22 Apr 25, 2026
@DTTerastar DTTerastar merged commit 564f3b7 into main Apr 25, 2026
2 checks passed
@DTTerastar DTTerastar deleted the dependabot/npm_and_yarn/astrojs/cloudflare-13.1.10 branch April 25, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant