Skip to content

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

Open
0xharkirat wants to merge 1 commit into
mainfrom
chore/upstream-sync
Open

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

Conversation

@0xharkirat
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.

UI / Tailwind / block-builder changes from upstream PR #42 are intentionally NOT adopted — SSW Global landing is custom (Hark + Tiago's design refresh) and would be overwritten. This PR is dependency hygiene only.

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

  • Add engines.node: ">=22.12.0"
  • Replace pnpm.overrides react pin with explicit react/react-dom devDeps at 18.3.1 (upstream PR #45 pattern)

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
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 Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ssw-website-global 3226821 Commit Preview URL

Branch Preview URL
May 29 2026, 12:44 AM

Copy link
Copy Markdown

Copilot AI left a comment

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 on lines +8 to +14
export async function GET(context: APIContext) {
const posts = await listBlogs();
return rss({
title: config.seo.title,
description: config.seo.description,
site: context.site ?? '',
items: posts.map((post) => ({
Comment thread src/content.config.ts
Comment on lines +12 to +16
const config = defineCollection({
loader: glob({ pattern: '**/*.json', base: 'src/content/config' }),
});

export const collections = { config };
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