Skip to content

Update Astro to v7 and bring all dependencies to latest - #27

Draft
dsnsgithub wants to merge 1 commit into
masterfrom
claude/astro-version-deps-update-qedg0w
Draft

Update Astro to v7 and bring all dependencies to latest#27
dsnsgithub wants to merge 1 commit into
masterfrom
claude/astro-version-deps-update-qedg0w

Conversation

@dsnsgithub

Copy link
Copy Markdown
Owner

Astro 5.16 -> 7.2, which pulls in the Astro 6 and 7 breaking changes, plus a Tailwind v3 -> v4 migration and React 18 -> 19.

Tailwind v4:

  • @astrojs/tailwind peers cap at astro ^5, so it is replaced by @tailwindcss/vite. tailwind.config.mjs becomes src/styles/global.css, with the viola palette and DM Sans stack in @theme and the typography / scrollbar plugins loaded via @plugin.
  • Apply the v4 utility renames: shadow-sm -> shadow-xs, shadow ->
    shadow-sm, rounded -> rounded-sm, outline-none -> outline-hidden, flex-shrink-0 -> shrink-0, flex-grow -> grow.
  • Pin the two inputs that relied on the old default border color to border-gray-200 (v4 defaults to currentColor), and restore the cursor: pointer on buttons that v4 dropped from preflight.
  • Point prettier-plugin-tailwindcss at the stylesheet, which is how it finds the theme now that there is no JS config.

Astro 6:

  • Content collections move to the Content Layer API: src/content/config.ts -> src/content.config.ts with a glob() loader, post.slug -> post.id, post.render() -> render(post). Blog URLs are unchanged.
  • -> .
  • Import z from astro/zod; the astro:content re-export is deprecated.

Astro 7:

  • compressHTML is pinned to true. The new "jsx" default strips whitespace between inline elements, which dropped the space before links in running text (e.g. "drag it intoPrism Launcher" on /smp-archive).

React 19 and friends:

  • react/react-dom 19 with matching @types. RecentGames imports JSX from react, since React 19 removed the global JSX namespace.
  • use-lanyard 2 replaces useLanyardWS with useLanyard.
  • Add an empty src/icons so astro-icon 1.2 stops warning about the missing directory and keeps generating its type definitions.

TypeScript goes to 6.0.3 rather than 7.0.2, because @astrojs/check peers on ^5.0.0 || ^6.0.0.

Verified with astro check (0 errors) and a full build. The rendered text of all 11 pages is byte-identical to the pre-upgrade output, and a headless browser pass confirms the React islands still hydrate and no page throws.

Claude-Session: https://claude.ai/code/session_01HhPy2zjGXtCgFruza2h6jv

Astro 5.16 -> 7.2, which pulls in the Astro 6 and 7 breaking changes, plus
a Tailwind v3 -> v4 migration and React 18 -> 19.

Tailwind v4:
- @astrojs/tailwind peers cap at astro ^5, so it is replaced by
  @tailwindcss/vite. tailwind.config.mjs becomes src/styles/global.css,
  with the viola palette and DM Sans stack in @theme and the typography /
  scrollbar plugins loaded via @plugin.
- Apply the v4 utility renames: shadow-sm -> shadow-xs, shadow ->
  shadow-sm, rounded -> rounded-sm, outline-none -> outline-hidden,
  flex-shrink-0 -> shrink-0, flex-grow -> grow.
- Pin the two inputs that relied on the old default border color to
  border-gray-200 (v4 defaults to currentColor), and restore the
  `cursor: pointer` on buttons that v4 dropped from preflight.
- Point prettier-plugin-tailwindcss at the stylesheet, which is how it
  finds the theme now that there is no JS config.

Astro 6:
- Content collections move to the Content Layer API: src/content/config.ts
  -> src/content.config.ts with a glob() loader, post.slug -> post.id,
  post.render() -> render(post). Blog URLs are unchanged.
- <ViewTransitions /> -> <ClientRouter />.
- Import z from astro/zod; the astro:content re-export is deprecated.

Astro 7:
- compressHTML is pinned to true. The new "jsx" default strips whitespace
  between inline elements, which dropped the space before links in running
  text (e.g. "drag it into<a>Prism Launcher</a>" on /smp-archive).

React 19 and friends:
- react/react-dom 19 with matching @types. RecentGames imports JSX from
  react, since React 19 removed the global JSX namespace.
- use-lanyard 2 replaces useLanyardWS with useLanyard.
- Add an empty src/icons so astro-icon 1.2 stops warning about the missing
  directory and keeps generating its type definitions.

TypeScript goes to 6.0.3 rather than 7.0.2, because @astrojs/check peers on
^5.0.0 || ^6.0.0.

Verified with astro check (0 errors) and a full build. The rendered text of
all 11 pages is byte-identical to the pre-upgrade output, and a headless
browser pass confirms the React islands still hydrate and no page throws.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HhPy2zjGXtCgFruza2h6jv
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dsns.dev Ready Ready Preview Aug 26, 2026 7:03am

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