Skip to content

chore: upgrade to Astro 7#1579

Merged
ascorbic merged 3 commits into
mainfrom
chore/upgrade-astro-7
Jun 22, 2026
Merged

chore: upgrade to Astro 7#1579
ascorbic merged 3 commits into
mainfrom
chore/upgrade-astro-7

Conversation

@ascorbic

Copy link
Copy Markdown
Collaborator

What does this PR do?

Upgrades the project to stable Astro 7 and updates the templates, demo sites, and packages for compatibility. The pnpm catalog now pins astro@7.0.0, @astrojs/cloudflare@14.0.0, @astrojs/node@11.0.0, and @astrojs/react@6.0.0.

Notable changes:

  • Route caching → stable. Moved cache/routeRules out of experimental to the stable top-level config keys in demos/cloudflare and infra/cache-demo.
  • infra/cache-demo cleanup. Dropped the obsolete pkg.pr.new Astro preview pin (the route-caching feature is now stable) in favor of the catalog, and aligned its wrangler with the catalog (the v14 adapter's @cloudflare/vite-plugin requires >=4.99.0). It uses the adapter's native cacheCloudflare from @astrojs/cloudflare/cache, which ships in stable 14.0.0.
  • Cloudflare build fix. Externalized the bare zod import used by the type generator so EmDash sites build on Cloudflare under Astro 7.
  • Supply-chain config. Removed the now-obsolete @astrojs/telemetry override (it only existed for the removed preview pin) and refreshed the minimumReleaseAge cooldown exclusion to cover the Astro 7 release (published today, still inside the 24h window). The @astrojs/* scope exclusion is marked TEMPORARY and should be removed once the cooldown elapses.
  • Docs. Updated @emdash-cms/cloudflare cache JSDoc examples to the stable top-level cache key.

No published package peer ranges were tightened; the upgrade is additive. Verified that there is no usage of removed/relocated v7 APIs (@astrojs/db, astro:transitions internals, root getContainerRenderer(), src/fetch.ts conflicts, remark/rehype plugins).

Closes #

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes (also typecheck:demos and typecheck:templates)
  • pnpm lint passes (0 diagnostics)
  • pnpm test passes (core 4022, cloudflare 183, auth 57, x402 17, blocks 96)
  • pnpm format has been run
  • I have added/updated tests for my changes (n/a — dependency upgrade; verified by building all 9 templates + 8 demos)
  • User-visible strings in the admin UI are wrapped for translation (n/a — no admin UI strings changed)
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion (n/a — chore)

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Claude Opus 4.8

Screenshots / test output

Built all templates (blank, blog(-cloudflare), marketing(-cloudflare), portfolio(-cloudflare), starter(-cloudflare)) and demos (simple, cloudflare, plugins-demo, postgres, preview, cache-demo, do-demo, do-solo-demo) under the stricter Rust compiler with zero errors. Both cache paths verified: infra/cache-demo (native cacheCloudflare) and demos/cloudflare (EmDash's cloudflareCache).

Bump the catalog to stable Astro 7 (astro 7.0.0, @astrojs/cloudflare 14.0.0,
@astrojs/node 11.0.0, @astrojs/react 6.0.0) and update templates, demos, and
packages for compatibility.

- Move route caching config from experimental.cache/routeRules to the stable
  top-level cache/routeRules keys (demos/cloudflare, infra/cache-demo).
- Drop infra/cache-demo's obsolete pkg.pr.new Astro preview pin in favor of the
  catalog; align its wrangler with the catalog (v14 adapter needs >=4.99.0).
- Externalize the bare zod import used by the type generator so EmDash sites
  build on Cloudflare under Astro 7.
- Remove the now-obsolete @astrojs/telemetry override and refresh the
  minimumReleaseAge cooldown exclusion for the Astro 7 release.
- Update @emdash-cms/cloudflare cache JSDoc to the stable top-level cache key.
@changeset-bot

changeset-bot Bot commented Jun 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 69364a6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/admin Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash Patch
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 891 lines across 8 files. Large PRs are harder to review and more likely to be closed without review.

If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs.

See CONTRIBUTING.md for contribution guidelines.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
docs 04bdbff Jun 22 2026, 01:43 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground 04bdbff Jun 22 2026, 01:43 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-cache 04bdbff Jun 22 2026, 01:43 PM

@pkg-pr-new

pkg-pr-new Bot commented Jun 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@1579

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@1579

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@1579

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@1579

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@1579

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@1579

emdash

npm i https://pkg.pr.new/emdash@1579

create-emdash

npm i https://pkg.pr.new/create-emdash@1579

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@1579

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@1579

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@1579

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@1579

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@1579

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@1579

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@1579

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@1579

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@1579

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@1579

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@1579

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@1579

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@1579

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@1579

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@1579

commit: 04bdbff

@github-actions github-actions Bot added the query-count changed PR diff modifies query-count snapshot files label Jun 22, 2026

@emdashbot emdashbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approach

This is a clean, well-scoped chore: upgrading the monorepo to stable Astro 7 and aligning templates/demos/packages for compatibility. The approach fits EmDash: move the now-stable route-caching config out of experimental, drop the obsolete pkg.pr.new preview pin (and the @astrojs/telemetry override that existed solely for it), refresh the temporary supply-chain cooldown exclusion, fix a Cloudflare bundling gap with the bare zod import, and update JSDoc. Critically, the upgrade is additive — the published packages' peer ranges are astro: ">=6.0.0-beta.0", @astrojs/cloudflare: ">=12.0.0", @astrojs/react: ">=5.0.0-beta.0", all of which Astro 7 / adapter 14 / react 6 satisfy, so no consumer breaks and no peer range needed tightening. A changeset is present and correctly scoped to emdash (the package with the real behavioral change). I'd sign off.

What I checked

  • Peer ranges (packages/core, cloudflare, auth package.json): all >= lower bounds that already admit v7 — no backwards-incompatibility, consistent with the "additive" claim.
  • emdash > zod pre-bundle entry (vite-config.ts): confirmed packages/core/src/schema/zod-generator.ts imports the bare zod entry (from "zod") and emdash declares zod as a catalog dependency, so the ssr.optimizeDeps.include specifier is a valid pnpm path and consistent with the adjacent astro > zod/v4 entry.
  • Cache-config migration coverage: only demos/cloudflare and infra/cache-demo used Astro's experimental.cache; both were moved to the stable top-level cache key. The remaining experimental: blocks in the repo (blog-demo, do-demo, do-solo-demo, the skills scaffold, the DO SQL modules) are EmDash's own registry config or Cloudflare DO compatibility flags — unrelated and correctly left alone.
  • cache-demo cleanup: dropping the pkg.pr.new preview pin removes the exotic dep that the deleted @astrojs/telemetry override existed for; wrangler now resolves via catalog to 4.100.0 (per the lockfile), satisfying the v14 adapter's >=4.99.0 requirement.
  • Supply-chain exclusion: astro + @astrojs/* are excluded from the 24h minimumReleaseAge cooldown, explicitly marked TEMPORARY with a removal note — reasonable for a same-day coordinated release.
  • Catalog/lockfile: resolved to astro@7.0.0, @astrojs/cloudflare@14.0.0, wrangler@4.100.0, zod@4.4.1 as intended. blocks/playground's pre-existing wrangler: "^4.63.0" pin is irrelevant — it's a Vite SPA, not an Astro/CF-adapter app.
  • Changeset: present, user-facing, scoped to emdash. The @emdash-cms/cloudflare JSDoc edit is doc-only with no observable runtime/API effect, so it doesn't warrant its own changeset entry.

Unverified (no node_modules in the sandbox)

I could not independently confirm two things and relied on the author's stated build verification plus CI:

  1. The stable top-level cache + top-level routeRules shape in Astro 7 — matches the known graduated-from-experimental API, but I couldn't read the v7 type definitions directly.
  2. The @astrojs/cloudflare/cache subpath export shipping in v14 (used by infra/cache-demo). Note this import pre-existed and was not added by this PR; only its config placement changed.

Neither is a concern raised by this diff — both are consistent with the PR's intent and would be caught by the build/typecheck CI the author reports as green.

Conclusion

No bugs, regressions, or convention violations found. The implementation is internally consistent, the upgrade is additive, and the changeset/supply-chain hygiene is appropriate. Approving.

@github-actions github-actions Bot added review/approved Approved; no new commits since and removed review/needs-review No maintainer or bot review yet labels Jun 22, 2026
@emdash-cms emdash-cms deleted a comment from github-actions Bot Jun 22, 2026
@ascorbic ascorbic removed the query-count changed PR diff modifies query-count snapshot files label Jun 22, 2026
@ascorbic ascorbic merged commit 0bfab91 into main Jun 22, 2026
45 checks passed
@ascorbic ascorbic deleted the chore/upgrade-astro-7 branch June 22, 2026 15:43
@emdashbot emdashbot Bot mentioned this pull request Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant