Skip to content

Upgrade to Astro 7 - #26

Merged
minimaldesign merged 3 commits into
mainfrom
astro-7-upgrade
Jul 18, 2026
Merged

Upgrade to Astro 7#26
minimaldesign merged 3 commits into
mainfrom
astro-7-upgrade

Conversation

@minimaldesign

Copy link
Copy Markdown
Owner

What

Upgrades the docs site from Astro 6.1.7 to Astro 7.1.1 (a major version jump).

Version bumps (package.json):

  • astro 6.1.7 → 7.1.1
  • @astrojs/mdx 5 → 7, @astrojs/preact 5 → 6
  • astro-expressive-code 0.41 → 0.44 (first release declaring an Astro 7 peer)
  • astro-tunnel 0.1.8 → 0.1.9, @astrojs/rss 4.0.18 → 4.0.19
  • Added @astrojs/markdown-remark 7.2.1. The blog list pages import createMarkdownProcessor directly, but it was an undeclared transitive dependency. Pinning it keeps that usage from drifting from Astro's copy.

Content fix (src/content/blog/colors-in-css.mdx):

Astro 7's new default MDX processor (Satteri, Rust-based) rejects a JSX opening tag whose > starts its own line after multi-line attributes, which is prettier's default multi-line JSX formatting. Reflowed the gradient-demo divs so each > ends the attribute line. This was the only build breakage across all 50 MDX files.

Why

Answering "does upgrading to the latest Astro break anything?" The site was already past the usual pain points for an Astro major (Content Layer API, no view transitions, middleware, actions, DB, or experimental flags), so this is mostly coordinated version bumps plus the one MDX parser fix.

Verification

  • astro build: 100 pages, no errors. astro check: 0 errors.
  • CSS @layer cascade order intact in the bundled site CSS. Vite 8 drops the redundant standalone @layer ...; declaration but preserves block order, so layer priority is unchanged. The dist/mcss.css artifact from build:css is untouched (still carries the explicit declaration).
  • Blog descriptions render (the markdown-remark path), and astro:assets images optimize (6 → webp/svg).
  • Dev server runs Astro 7.1.1. The ColorPickerOklch Preact island hydrates at runtime (client:visible, range sliders live). No console or server errors.

Notes for reviewer

  • compressHTML now defaults to JSX-style whitespace collapse. Left at the default. If inline spacing looks off anywhere, set compressHTML: true in astro.config.mjs.
  • Node requirement is unchanged (>=22.12).
  • Harmless install warnings: a sugarss peerOptional warning (from postcss-mixins) and a dual-Vite (7.3.1 hoisted from @preact/preset-vite alongside Astro's own Vite 8). The build uses Vite 8; both are cosmetic.

🤖 Generated with Claude Code

Bump astro 6.1.7 to 7.1.1 and companion packages: @astrojs/mdx to 7,
@astrojs/preact to 6, astro-expressive-code to 0.44 (first release with an
Astro 7 peer), astro-tunnel to 0.1.9, @astrojs/rss to 4.0.19. Add
@astrojs/markdown-remark 7.2.1 explicitly since the blog pages import
createMarkdownProcessor directly.

Astro 7's new MDX processor (Satteri) rejects a JSX opening tag whose '>'
starts its own line after multi-line attributes. Reflow the gradient demo
divs in colors-in-css.mdx so each '>' ends the attribute line.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for mcssdev ready!

Name Link
🔨 Latest commit bfafb87
🔍 Latest deploy log https://app.netlify.com/projects/mcssdev/deploys/6a5bfcb443573800084c406d
😎 Deploy Preview https://deploy-preview-26--mcssdev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 98
Accessibility: 96
Best Practices: 100
SEO: 99
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

minimaldesign and others added 2 commits July 18, 2026 15:14
`npm ci` on CI (Node 22 / npm 10) rejected the lock file generated locally
by npm 11: it computed a different ideal tree and reported sugarss@5.0.1 and
the emnapi wasm-fallback packages as missing. Regenerate the lock with npm 10
so it matches CI's resolution. Verified with `npm@10 ci --dry-run` (exit 0)
and the full CI sequence (check, lint:css, build, build:css) passing locally.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The previous lock regenerations ran with node_modules present, so npm
reused the local (macOS) tree and wrote a darwin-only lock: rolldown,
satteri, and esbuild lost their linux/windows optional bindings, and CI's
npm ci failed with "Cannot find module '@rolldown/binding-linux-x64-gnu'".

Removing both node_modules and package-lock.json and reinstalling resolves
purely from the registry, which records the full platform matrix (26
esbuild platforms, matching the pre-upgrade lock). Verified: npm@10 ci
--dry-run exits 0, and check / lint:css / build / build:css all pass
against the fresh tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@minimaldesign
minimaldesign merged commit bf4ee65 into main Jul 18, 2026
5 checks passed
@minimaldesign
minimaldesign deleted the astro-7-upgrade branch July 18, 2026 22:28
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.

1 participant