Skip to content

fix: resolve smoke test failures -- CLI JSON output, port collision, stale DBs#105

Merged
ascorbic merged 2 commits intomainfrom
fix/smoke-test-failures
Apr 2, 2026
Merged

fix: resolve smoke test failures -- CLI JSON output, port collision, stale DBs#105
ascorbic merged 2 commits intomainfrom
fix/smoke-test-failures

Conversation

@ascorbic
Copy link
Copy Markdown
Collaborator

@ascorbic ascorbic commented Apr 2, 2026

Summary

Fixes three independent issues causing pnpm test:smoke failures in core:

  • CLI --json output pollution: consola.success()/consola.start() messages leaked into stdout alongside JSON data, breaking JSON.parse() in tests (and any script piping CLI output). Added configureOutputMode() that redirects consola to stderr when --json is set -- standard Unix convention. Applied to all CLI commands.
  • Comments test port collision: comments.test.ts and cli.test.ts both used port 4398. When running in parallel, the second server got bumped to a different port and the client connected to the wrong server. Changed comments to port 4396.
  • Site-matrix stale database files: demos/simple and demos/plugins-demo had leftover data.db files with schemas predating the migration system (no kysely_migration table). Migration 002 failed with "duplicate column name: status". The test now removes data.db and WAL/SHM sidecars before booting each site.

Testing

Full smoke suite passes: 7 test files, 225 tests, 0 failures.

pnpm test:smoke   # in packages/core

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 2, 2026

🦋 Changeset detected

Latest commit: 25a327b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/plugin-ai-moderation Patch
@emdash-cms/plugin-atproto Patch
@emdash-cms/plugin-audit-log Patch
@emdash-cms/plugin-color Patch
@emdash-cms/plugin-embeds Patch
@emdash-cms/plugin-forms Patch
@emdash-cms/plugin-webhook-notifier Patch

Not sure what this means? Click here to learn what changesets are.

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

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

cloudflare-workers-and-pages bot commented Apr 2, 2026

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 25a327b Apr 02 2026, 03:34 PM

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 2, 2026

Open in StackBlitz

@emdash-cms/admin

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

@emdash-cms/auth

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

@emdash-cms/blocks

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

@emdash-cms/cloudflare

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

emdash

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

create-emdash

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

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

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

@emdash-cms/x402

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

@emdash-cms/plugin-ai-moderation

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

@emdash-cms/plugin-atproto

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

@emdash-cms/plugin-audit-log

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

@emdash-cms/plugin-color

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

@emdash-cms/plugin-embeds

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

@emdash-cms/plugin-forms

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

@emdash-cms/plugin-webhook-notifier

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

commit: 25a327b

@ascorbic ascorbic merged commit ecdfa08 into main Apr 2, 2026
17 of 18 checks passed
travisbreaks pushed a commit to travisbreaks/emdash that referenced this pull request Apr 5, 2026
…ures

fix: resolve smoke test failures -- CLI JSON output, port collision, stale DBs
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