Skip to content

Update the website to Astro 7 to clear its security advisories - #273

Merged
patrickdappollonio merged 2 commits into
mainfrom
bump-dependencies-astro
Jul 27, 2026
Merged

patrickdappollonio merged 2 commits into
mainfrom
bump-dependencies-astro

Conversation

@patrickdappollonio

Copy link
Copy Markdown
Owner

The website was carrying seven open advisories. astro 6.4.8 accounted for three cross-site scripting issues and pulled in a vulnerable sharp, while @astrojs/rss, js-yaml, postcss and svgo each had one of their own. This moves the site to astro 7.1.3, @astrojs/mdx 7.0.3 and sharp 0.35.3, which clears the direct ones; the remaining four are transitive and resolve on their own once the ranges refresh. The esbuild override is no longer needed either, since Astro 7 depends on a safe version directly. npm audit now reports no vulnerabilities.

Two configuration changes come with the major version bump, and neither is optional. Astro 7 replaced remark and rehype with a new default Markdown engine and made the old pipeline a peer dependency, so @astrojs/markdown-remark is now an explicit dependency — the unified() processor and its plugins (emoji shortcodes, heading slugs, autolink anchors, prose images) are otherwise untouched. Tailwind also moves from its PostCSS plugin to its Vite plugin, and postcss.config.mjs is deleted: Astro 7 ships Vite 8, whose CSS pipeline treats the bare @import "tailwindcss" in global.css as a file path and fails the build before Tailwind ever runs. The Vite plugin is what Astro and Tailwind both document for Tailwind 4.

The built site was compared page by page against a build from before the upgrade, rather than relying on the build simply succeeding. The HTML is equivalent throughout and rss.xml and the sitemaps are byte-identical, but the comparison did surface one silent regression worth calling out: Vite 8 minifies CSS against a newer browser target than Tailwind compiles for, and was stripping out the -webkit- prefixes that the sticky header's blur relies on in Safari before 18. Nothing would have failed loudly; the blur would just have stopped working on older iPhones. Pinning cssTarget to Tailwind's own floor keeps those prefixes in the shipped stylesheet, and prefix coverage now slightly exceeds what the site had before.

…ories

Astro 6.4.8 carried three cross-site scripting advisories and pulled in a
vulnerable sharp; @astrojs/rss, js-yaml, postcss and svgo each had their own.
Moving to Astro 7.1.3, @astrojs/mdx 7.0.3 and sharp 0.35.3 clears all of them,
and the remaining four resolve transitively once the ranges refresh. The
esbuild override is gone: Astro 7 depends on a safe esbuild directly, so
nothing needs to be forced any more.

Two config changes come with the major bump. Astro 7 replaced remark and rehype
with a new default Markdown engine and made the old pipeline a peer dependency,
so @astrojs/markdown-remark is now an explicit dependency; the unified()
processor and its plugins are otherwise untouched. Tailwind moves from its
PostCSS plugin to its Vite plugin because Vite 8 resolves the bare
`@import "tailwindcss"` in global.css as a file path and fails the build before
Tailwind runs.

Vite 8 minifies CSS against a newer browser target than Tailwind compiles for,
which silently dropped the vendor prefixes the sticky header's blur needs on
Safari before 18. Setting cssTarget to Tailwind's own floor keeps them in the
shipped stylesheet.
The web UI build writes crates/dux-web/web/dist on every run, so it shows up as
a wall of untracked assets in git status.
@patrickdappollonio
patrickdappollonio merged commit 14e044d into main Jul 27, 2026
5 checks passed
@patrickdappollonio
patrickdappollonio deleted the bump-dependencies-astro branch July 27, 2026 07:48
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