fix(deps): bump catalog to @astrojs/cloudflare 13.5.3 + @astrojs/node 10.1.1#1116
Conversation
13.5.2 introduced an astroFrontmatterScanPlugin that breaks any `virtual:*` module import inside .astro frontmatter (e.g. astro-iconset, astro-expressive-code). 13.5.0/13.5.1 also expose a cascade-reload bug in workerd that surfaces as "Astro is not defined" or "chunk-XXX.js does not exist" on the first request after a clean cache, unless every transitive dep is pre-bundled. 13.5.1 escapes both: no frontmatter scan, and its dep-resolution fixes keep the cascade quiet for the deps emdash actually uses. Pinning the catalog to exact `13.5.1` (no caret) propagates to all four `templates/*-cloudflare/package.json` files via the catalog sync, so `create-emdash` scaffolded sites install a known-good combination. 13.5.1 declares peerDependencies.astro: ^6.3.0, so bump the catalog astro range to ^6.3.0 to satisfy it. Add a picomatch override to ^4.0.4 so the workspace's transitive graph dedups to a single version. Without it, `@rollup/pluginutils` pulls picomatch@4.0.3 on a sibling path that the adapter's `astro > picomatch` pre-bundle doesn't cover, and workerd hits raw CJS at module load. End-user installs happened to dedup correctly, but local dev in this repo did not.
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-perf-coordinator | cc92cc0 | May 20 2026, 02:12 PM |
Scope checkThis PR changes 530 lines across 2 files. Large PRs are harder to review and more likely to be closed without review. If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs. See CONTRIBUTING.md for contribution guidelines. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-i18n | cc92cc0 | May 20 2026, 02:12 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | cc92cc0 | May 20 2026, 02:12 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | cc92cc0 | May 20 2026, 02:13 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | cc92cc0 | May 20 2026, 02:13 PM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
There was a problem hiding this comment.
Pull request overview
Pins the Astro Cloudflare adapter version used by scaffolded Cloudflare templates to a known-good release to avoid runtime 500s/regressions introduced in newer adapter versions, and aligns workspace dependencies accordingly.
Changes:
- Pin
@astrojs/cloudflarein the workspace catalog to13.5.1(exact). - Bump
astrocatalog range to^6.3.0to satisfy adapter peer requirements. - Add a workspace-level
picomatchoverride and refreshpnpm-lock.yamlto match the new resolution graph.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pnpm-workspace.yaml | Pins @astrojs/cloudflare to 13.5.1, bumps astro, and adds a picomatch override. |
| pnpm-lock.yaml | Updates lockfile to reflect the new catalog pins/overrides and resulting dependency graph. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # ssr.optimizeDeps.include. Sibling resolution paths (rollup/pluginutils, | ||
| # tinyglobby, fdir) keep raw CJS picomatch that workerd can't load. | ||
| # Force a single 4.0.4 so the pre-bundle covers every consumer. | ||
| picomatch: "^4.0.4" |
@astrojs/cloudflare 13.2+ writes the auto-provisioned SESSION binding into both the top-level config and previews.kv_namespaces of the built wrangler.json, but with no id field. wrangler preview reads from previews.kv_namespaces and forwards namespace_id verbatim; unlike wrangler deploy it has no provisionBindings path. The API rejects the binding-without-id with error 10021. Declare the SESSION KV id explicitly in the playground's wrangler.jsonc at both locations so the adapter's customizer skips re-injecting and the user-supplied id propagates to both. Uses the existing emdash-playground-session namespace already bound to the production worker.
@astrojs/node@10.0.0 calls app.getAdapterLogger() at server start,
which doesn't exist on the new Astro v6 App class. Crashes any node
adapter consumer (including fixtures/perf-site, used by the query-
counts CI workflow):
TypeError: app.getAdapterLogger is not a function
at createAppHandler
at createStandaloneHandler
@astrojs/node@10.1.1 updates to the v6 Adapter API. The astro@^6.3.0
catalog bump that #1116 introduced (required by @astrojs/cloudflare
13.5.1) made this surface.
Query-count snapshot changes28 routes changed, total Δ -165 queries. SQLite
D1
Comparing snapshot files between base and head. Updated automatically on each push. |
Replaces the exact 13.5.1 pin with ^13.5.3, the upstream-shipped fix (withastro/astro#16801) that reverts the broken esbuild scan plugin from 13.5.2. The picomatch override is also no longer needed. The override was defending against a workspace-only dual-resolve (picomatch@4.0.3 and @4.0.4 both installed). With the catalog now on @cloudflare/vite-plugin ^1.36.3 and @astrojs/cloudflare 13.5.3, transitive consumers dedup cleanly to a single 4.0.4 and the workerd dev runtime no longer hits the unbundled CJS path. Temporarily exempts astro and @astrojs/cloudflare from minimumReleaseAge so the catalog can pick up the fix versions that are still inside the 24h supply-chain cooldown. The exclusions should be removed once the cooldown passes.
|
I think the query counts are an artifact of changes to how frontmatter is evaluated meaning we're missing some queries in our tests. I don't think it's a real reduction. We'll update with a fix to the test tooling. |
What does this PR do?
Catalog bumps + workspace fixes so freshly scaffolded sites (and the workspace itself) install a working combination of
@astrojs/cloudflare,astro, and@astrojs/node.Closes #
Problem: Sites scaffolded with
create-emdashwere installing@astrojs/cloudflare@13.5.2(the catalog's^13.1.7floats to the latest) and 500ing on every request:Two distinct bugs in
@astrojs/cloudflare13.5.x converged:emdash/middleware/redirect,@emdash-cms/cloudflare/storage/r2), the runner-worker holds the previous bundle hash, and the first request lands on a chunk that doesn't exist yet. Surfaces asAstro is not definedorchunk-XXX.js does not exist.astroFrontmatterScanPlugin(withastro/astro#16708) which routed every.astroimport through esbuild. esbuild can't resolve Vite virtual modules, so any.astrocomponent that doesawait import("virtual:…")(astro-iconset,astro-expressive-code, …) crashed the pre-bundle.Upstream has now shipped withastro/astro#16801 (released as
@astrojs/cloudflare@13.5.3+astro@6.3.6), which reverts #16708. Combined with the dep-resolution work in 13.5.1, the combo is now stable.Changes
pnpm-workspace.yamlcatalog:@astrojs/cloudflare:^13.1.7→^13.5.3(picks up the upstream revert; unpinned so future fixes flow in).astro:^6.0.1→^6.3.0(required by 13.5.3'speerDependencies.astro).@astrojs/node:^10.0.0→^10.1.1.10.0.0callsapp.getAdapterLogger()which doesn't exist on the Astro v6.3Appclass, breaking every Node-adapter consumer in the workspace (includingfixtures/perf-site, used by the query-counts CI workflow).10.1.1updates to the v6 Adapter API.pnpm-workspace.yamlcooldown:astroand@astrojs/cloudflareare temporarily exempted fromminimumReleaseAgeso this PR can install the fix versions that are still inside the 24h supply-chain cooldown. The exclusions should be removed once the cooldown passes.demos/playground/wrangler.jsonc:SESSIONKV binding (emdash-playground-session) explicitly under both the top-levelkv_namespacesandpreviews.kv_namespaces. From 13.2.0 onwards, the adapter injects the auto-provisioned SESSION binding intopreviews.kv_namespaceswith noid.wrangler ... preview(used by Workers Builds on non-main branches fortry.emdashcms.com) readspreviews.kv_namespacesand forwardsnamespace_idverbatim — unlikewrangler deploy, it has noprovisionBindingsstep, so a binding withoutidfails the deploy with API error 10021. Declaring the id explicitly satisfies both paths.Verified
demos/cloudflaredev (pnpm dev) — was failing with the cascade-reload error on a clean install; now serves/,/posts,/category/development,/rss.xml,/_emdash/adminas 200/302.demos/cloudflarebuild (astro build) — clean.fixtures/perf-site(Node adapter) — was failing withTypeError: app.getAdapterLogger is not a function; now boots, query-counts harness completes.try.emdashcms.comWorkers Builds preview deploy — was failing withbinding SESSION of type kv_namespace must have a namespace_id specified [code: 10021]; the playground wrangler.jsonc fix unblocks it.Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.AI-generated code disclosure