Updated Astro and Related Dependencies to Latest Versions

Summary

Updated Astro and all related @astrojs/* integrations to their latest versions using the official @astrojs/upgrade tool. Resolved pnpm monorepo hoisting issues that prevented the Vercel adapter from finding required dependencies.

Why Care

Keeping Astro and its integrations up to date ensures access to bug fixes, performance improvements, and new features. The 5.16.x releases include hydration fixes for MDX components with multiple client:* directives and rendering performance improvements.

Implementation

Version Updates

PackagePreviousUpdated
astro5.16.05.16.11
@astrojs/check0.9.50.9.6
@astrojs/mdx4.3.124.3.13
@astrojs/node9.5.19.5.2
@astrojs/sitemap3.6.03.7.0
@astrojs/svelte7.2.27.2.5
@astrojs/vercel9.0.19.0.4

pnpm Hoisting Fix

After the upgrade, the production build failed with ENOENT errors for cookie and smol-toml packages. This is a known issue with @astrojs/vercel in pnpm monorepo setups where strict dependency isolation prevents the adapter from finding transitive dependencies.

Solution

Created .npmrc file with targeted hoisting patterns:
text
# Hoist specific packages needed by @astrojs/vercel adapter
public-hoist-pattern[]=cookie
public-hoist-pattern[]=smol-toml
This approach preserves pnpm's strict dependency isolation benefits while allowing only the necessary packages to be hoisted for Vercel adapter compatibility.

Alternative Considered

Using shamefully-hoist=true would have also worked but defeats pnpm's phantom dependency protection. The targeted approach is preferred for maintaining stricter dependency management.

Additional Fix

Fixed a pre-existing Mermaid syntax error in content/lost-in-public/reminders/Maintain-Conditional-Client-Specific-Content-Paths.md where special characters in node labels needed quoting:
diff
- E --> F[/:client/* Routes]
+ E --> F["/:client/* Routes"]

Files Changed

text
Created:
  site/.npmrc

Modified:
  site/package.json (via pnpm upgrade)
  site/pnpm-lock.yaml
  content/lost-in-public/reminders/Maintain-Conditional-Client-Specific-Content-Paths.md

Build Verification

  • Production build completes successfully
  • All static pages generated (~60 seconds)
  • Vercel adapter bundles correctly
  • Sitemap generated at dist/client/sitemap-index.xml