Skip to content

Bump Astro 5→6, Tina canary→stable, CF adapter 12→13#24

Open
0xharkirat wants to merge 2 commits into
mainfrom
chore/upstream-sync
Open

Bump Astro 5→6, Tina canary→stable, CF adapter 12→13#24
0xharkirat wants to merge 2 commits into
mainfrom
chore/upstream-sync

Conversation

@0xharkirat

@0xharkirat 0xharkirat commented May 29, 2026

Copy link
Copy Markdown
Member

Why

Sync SSW.Website.Global with the floor of tinacms/tina-astro-starter's main, and move off the date-pinned canary Tina builds onto stable releases.

Also supersedes the open Dependabot PR #23 (covers everything that PR bumps, plus the two it skipped — @tinacms/astro and @astrojs/mdx).

Dependency bumps

Package From To
astro ^5.16.0 ^6.3.7
@astrojs/cloudflare ^12.6.13 ^13.1.10
@astrojs/mdx ^4.3.0 ^5.0.6
@astrojs/rss ^4.0.15 ^4.0.18
@astrojs/sitemap ^3.7.0 ^3.7.2
@tinacms/astro canary ^0.4.0 stable
@tinacms/cli canary ^2.4.0 stable
tinacms canary ^3.8.2 stable
wrangler 4.59.2 ^4.95.0
@types/node ^25.1.0 ^25.9.1

Other package.json

Config

  • wrangler.tomlmain = "@astrojs/cloudflare/entrypoints/server". Required by the new @cloudflare/vite-plugin in @astrojs/cloudflare v13.
  • astro.config.mjs — drop the rollupOptions.onwarn shim; @tinacms/astro@0.4.0 no longer triggers the warning.
  • src/content.config.ts (new) — declare the config collection so Astro 6 doesn't glob the JSON-only dir as Markdown. Mirrors upstream.
  • src/pages/rss.xml.jsrss.xml.ts — switch to listBlogs() (Tina). Fixes "collection blog does not exist or is empty" under Astro 6.
  • public/admin/.gitignore — auto-rewritten by Tina CLI 2.4.

Verification

pnpm run build:local succeeds. Remaining cosmetic warnings: unenv fs.mkdirSync and /home/index.html empty body (redirect ships via dist/_redirects).

Test plan

Skipped

Upstream UI overhaul (blocks/ui/space components, ThemeToggle, Tailwind 4), Vercel adapter, Astro Icon, upstream blog seed, block-builder rewrites of home.mdx / page.ts.

🤖 Generated with Claude Code

Sync the repo with the upstream tina-astro-starter dependency
floor and move off the pinned canary Tina builds onto stable
releases. UI / block-builder / Tailwind changes from upstream
PR #42 are intentionally NOT adopted — SSW Global landing is
custom and would be overwritten.

Dependency bumps:
- astro                 ^5.16.0 → ^6.3.7
- @astrojs/cloudflare   ^12.6.13 → ^13.1.10
- @astrojs/mdx          ^4.3.0 → ^5.0.6
- @astrojs/rss          ^4.0.15 → ^4.0.18
- @astrojs/sitemap      ^3.7.0 → ^3.7.2
- @tinacms/astro        0.0.0-c724883-… (canary) → ^0.4.0 (stable)
- @tinacms/cli          0.0.0-c724883-… (canary) → ^2.4.0 (stable)
- tinacms               0.0.0-c724883-… (canary) → ^3.8.2 (stable)
- wrangler              4.59.2 → ^4.95.0 (satisfies @astrojs/cloudflare
                        13 + @cloudflare/vite-plugin peer ranges)
- @types/node           ^25.1.0 → ^25.9.1

Other package.json changes:
- Add engines.node ">=22.12.0" (matches upstream + .nvmrc)
- Replace the pnpm.overrides react pin with explicit
  react/react-dom devDependencies at 18.3.1 (upstream pattern,
  PR #45); keeps @tinacms/cli's React 18 admin bundle correct
  without overriding the whole tree

Config changes:
- wrangler.toml: point `main` at `@astrojs/cloudflare/entrypoints/
  server` (the adapter's unified dev+prod entry). Required by
  the new @cloudflare/vite-plugin in @astrojs/cloudflare v13,
  which validates the entry path eagerly at config-load time —
  the old `./dist/_worker.js/index.js` path doesn't exist until
  after a build, so the previous setup failed before Astro even
  started.
- astro.config.mjs: drop the rollupOptions.onwarn shim that
  silenced UNUSED_EXTERNAL_IMPORT from tinacms/dist/client. With
  @tinacms/astro@0.4.0 the warning no longer fires.
- Add src/content.config.ts: declare the `config` collection so
  Astro's content layer (mandatory in v6) doesn't try to glob
  the JSON-only src/content/config dir as Markdown. blog and
  page stay auto-inferred. Mirrors upstream's pattern.
- src/pages/rss.xml.js → rss.xml.ts: switch from
  `getCollection('blog')` (Astro content layer, didn't see Tina
  posts in v6) to `listBlogs()` from `src/lib/data.ts`, which
  is the existing Tina query path used by /blog. RSS now
  generates correctly without the "collection blog does not
  exist or is empty" warning.
- public/admin/.gitignore: auto-rewritten by the new Tina CLI
  (drops the stale bridge.js entry; the new admin bundle
  doesn't emit a separate bridge file).

Local verification: `pnpm run build:local` succeeds; only
remaining warning is unenv fs.mkdirSync (cosmetic, from
Cloudflare adapter's build-time cache attempt) and an empty
/home/index.html prerender (cosmetic — the redirect ships
via dist/_redirects, which is what Cloudflare actually uses).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 29, 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 failed
View logs
ssw-website-global e0e0c09 Jun 12 2026, 07:50 AM

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the project’s Astro/Tina/Cloudflare toolchain to newer stable versions (Astro 6, Tina stable releases, Cloudflare adapter v13 / Wrangler updates) and applies the related configuration adjustments needed for the upgrade.

Changes:

  • Bump core dependencies: astro 5→6, @astrojs/cloudflare 12→13, Tina canary→stable, wrangler 4.59→4.95, plus related integration updates.
  • Update Cloudflare Worker entrypoint (wrangler.toml) and simplify Astro build config (remove Rollup warning shim).
  • Add Astro content config to avoid JSON-only collection warnings and migrate RSS implementation to use Tina-backed listBlogs().

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Updates dependency versions, adds Node engine constraint, and pins React via explicit devDeps.
pnpm-lock.yaml Lockfile regeneration reflecting Astro 6 / adapter 13 / Tina stable / Wrangler upgrades.
wrangler.toml Switches Worker main entrypoint to the Cloudflare adapter v13 server entry.
astro.config.mjs Removes the Rollup onwarn shim now that upstream warning is resolved.
src/content.config.ts Introduces collection config to avoid Astro 6 content-layer warnings for JSON-only folders.
src/pages/rss.xml.ts Replaces RSS endpoint implementation to use Tina listBlogs() and TypeScript route.
src/pages/rss.xml.js Removes the prior RSS endpoint that used astro:content collections.
public/admin/.gitignore Updates ignore rules to match Tina CLI output layout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pages/rss.xml.ts
Comment thread src/content.config.ts
- Match blog/index.astro and blog/[...slug].astro, which build the slug
  from _sys.relativePath. The feed used _sys.filename (basename), so a post
  in a nested Tina folder would 404 from the feed while the page resolved.
- Drop the misleading `site: context.site ?? ''` fallback — an empty string
  isn't a valid @astrojs/rss site anyway. astro.config.mjs always sets
  `site`, so throw if that invariant is ever broken.

Addresses Copilot review feedback on #24.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@0xharkirat

Copy link
Copy Markdown
Member Author

Independent Codex review (cross-model) + triage

Verdict: merge-able. The Astro 5→6 / Cloudflare adapter 12→13 / Tina canary→stable migration checks out end to end:

  • Versions resolve cleanly — astro 6.4.2, @astrojs/mdx@5 (peer astro ^6 satisfied), @astrojs/cloudflare@13.6 (peers satisfied), tinacms 3.8.3.
  • wrangler.toml main = "@astrojs/cloudflare/entrypoints/server" is the correct entrypoint for the v13 @cloudflare/vite-plugin model.
  • output: 'static' is valid in v13 (static + one on-demand island route is supported).
  • No removed Astro 6 APIs left dangling — the old getCollection('blog') RSS path was correctly switched to Tina's listBlogs(), and the dead onwarn rollup shim was cleaned up.

One real fix applied (e0e0c09): the RSS feed linked posts by _sys.filename while the blog routes derive the slug from _sys.relativePath, so a post in a nested Tina folder would 404 from the feed (latent — current posts are flat). Now consistent.

Copilot threads addressed: the site fallback was fixed; the content.config.ts landing suggestion was verified unnecessary (Astro 5+ doesn't auto-glob undefined src/content/ dirs — build:local shows no warning).

Reviewed by Codex (gpt-5.5) + triage verification. No critical or important issues outstanding.

@0xharkirat

Copy link
Copy Markdown
Member Author

Ready for human review.

Automated review complete — no outstanding issues:

  • Codex (gpt-5.5) — independent cross-model review of the Astro 5→6 / Cloudflare adapter v13 / Tina canary→stable migration.
  • Claude — triaged and verified every Codex finding against the working tree, resolved the two Copilot threads, and applied the one real fix (e0e0c09).

See the review summary comment above for details.

@0xharkirat 0xharkirat requested a review from GordonBeeming June 12, 2026 07:55
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