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
| Package | Previous | Updated |
| astro | 5.16.0 | 5.16.11 |
| @astrojs/check | 0.9.5 | 0.9.6 |
| @astrojs/mdx | 4.3.12 | 4.3.13 |
| @astrojs/node | 9.5.1 | 9.5.2 |
| @astrojs/sitemap | 3.6.0 | 3.7.0 |
| @astrojs/svelte | 7.2.2 | 7.2.5 |
| @astrojs/vercel | 9.0.1 | 9.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