Skip to content

Revert "fix(core): transform EmDash/adapter/plugin packages inline in CF dev (#1359)"#1363

Merged
ascorbic merged 1 commit into
mainfrom
revert-1359-cf-inline
Jun 5, 2026
Merged

Revert "fix(core): transform EmDash/adapter/plugin packages inline in CF dev (#1359)"#1363
ascorbic merged 1 commit into
mainfrom
revert-1359-cf-inline

Conversation

@ascorbic
Copy link
Copy Markdown
Collaborator

@ascorbic ascorbic commented Jun 5, 2026

What does this PR do?

Reverts #1359 (commit c9d0724), which broke the E2E Cloudflare lane on main and the release PR (#1360).

main was green at 4fb27752 and went red on c9d07241 (the #1359 merge). The E2E Cloudflare (1/8) shard fails deterministically (confirmed across two runs) on three tests, while the only Node-lane failure (an invite-flow flake) recovered on re-run:

  • api-tokens.spec.ts:22 / :137strict mode violation: locator('text=dev-bypass-token') resolved to 2 elements
  • accessibility.spec.ts:28 — Login Page h1 "Sign in" not found (15s timeout)

Why #1359 caused it

#1359 added emdash, @emdash-cms/cloudflare, and configured plugin packages to ssr.optimizeDeps.exclude + noExternal (dev only), so Vite transforms them inline instead of pre-bundling. Under the workerd dev runtime used by the CF e2e fixture this regresses the admin/login route (slow cold compile and/or SSR error): the login h1 never appears within 15s, and global-setup's dev-bypass?token=1 (guarded by waitForOk with a 10s per-attempt timeout) times out client-side after the server has already created the token, retries, and creates a second dev-bypass-token — hence the duplicate.

The fix itself is still wanted (it resolves the dependency-optimize reload cascade on registry installs, the original report). It needs to be redone with verification against the CF e2e fixture (EMDASH_E2E_TARGET=cloudflare), which I did not run for #1359 — my manual verification used route requests, not the e2e suite. Reverting unblocks the release; I'll reopen a corrected PR.

Type of change

  • Bug fix
  • Feature
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes (pure revert to a previously-green commit)
  • pnpm lint passes
  • pnpm test — relying on CI; this restores the previously-green tree
  • pnpm format — n/a, revert only
  • Tests — n/a (revert)
  • User-visible strings — n/a
  • Changeset — n/a; the revert removes fix(core): transform EmDash/adapter/plugin packages inline in CF dev #1359's unreleased changeset, so the feature simply won't ship in this release
  • Discussion — n/a

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Claude Opus 4.8 (OpenCode)

Copilot AI review requested due to automatic review settings June 5, 2026 13:57
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 5, 2026

⚠️ No Changeset found

Latest commit: 7296208

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ascorbic ascorbic enabled auto-merge (squash) June 5, 2026 13:58
@github-actions github-actions Bot added the review/needs-review No maintainer or bot review yet label Jun 5, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
docs 7296208 Jun 05 2026, 01:58 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
emdash-playground 7296208 Jun 05 2026, 01:59 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-cache 7296208 Jun 05 2026, 01:59 PM

Copy link
Copy Markdown
Contributor

@emdashbot emdashbot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a clean, complete revert of #1359 (commit c9d0724). The PR removes the inlinePackages optimization that caused deterministic failures in the E2E Cloudflare lane, restoring the repository to the previously-green state at 4fb27752.

I verified the revert is exact:

  • git diff 4fb27752..HEAD -- packages/core/src/astro/integration/vite-config.ts produces no output, confirming the file is byte-for-byte identical to its pre-#1359 state.
  • Both #1359 and this revert touch exactly 2 files (the changeset + vite-config.ts), and the line counts of the forward and reverse diffs match (103 lines each).

The removed inlinePackages logic (helper functions packageNameFromSpecifier / collectPluginPackages, the inlinePackages array, and its injection into ssr.noExternal and ssr.optimizeDeps.exclude) is all faithfully restored. The stray "astro/zod" entry added by #1359 is correctly removed.

No AGENTS.md issues: no new code to localize, no SQL, no API routes, no database changes, no tests needed (revert), and removing the unreleased changeset is the right call. No findings.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 5, 2026

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@1363

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@1363

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@1363

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@1363

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@1363

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@1363

emdash

npm i https://pkg.pr.new/emdash@1363

create-emdash

npm i https://pkg.pr.new/create-emdash@1363

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@1363

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@1363

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@1363

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@1363

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@1363

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@1363

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@1363

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@1363

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@1363

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@1363

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@1363

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@1363

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@1363

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@1363

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@1363

commit: 7296208

@github-actions github-actions Bot added review/approved Approved; no new commits since cla: signed and removed review/needs-review No maintainer or bot review yet labels Jun 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts PR #1359 (commit c9d07241) to restore the previously-green main behavior after Cloudflare E2E started failing deterministically. The revert removes the dev-only Vite SSR inline-transform configuration for EmDash/core + Cloudflare adapter + plugins, and drops the accompanying changeset so the reverted behavior won’t be released.

Changes:

  • Remove inlinePackages/plugin-package collection logic that altered Cloudflare dev SSR noExternal + ssr.optimizeDeps.exclude.
  • Remove the additional ssr.optimizeDeps.include entry (astro/zod) introduced in #1359.
  • Delete the changeset that would have shipped the reverted behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/core/src/astro/integration/vite-config.ts Reverts Cloudflare-dev SSR dependency optimization tweaks (inline package transforms and related optimizeDeps changes).
.changeset/fix-cf-dev-inline-plugins.md Removes the unreleased changeset associated with the reverted functionality.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ascorbic ascorbic merged commit 1986dd4 into main Jun 5, 2026
47 of 48 checks passed
@ascorbic ascorbic deleted the revert-1359-cf-inline branch June 5, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants