Skip to content

test(extensions): prove scaffolded plugins and themes build against packed kits - #259

Merged
jouwdan merged 2 commits into
mainfrom
claude/mei-115-xt6308-smoke
Aug 26, 2026
Merged

test(extensions): prove scaffolded plugins and themes build against packed kits#259
jouwdan merged 2 commits into
mainfrom
claude/mei-115-xt6308-smoke

Conversation

@jouwdan

@jouwdan jouwdan commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Part of MEI-115 (deliverable 2 of 4: the publishability smoke). Follows #258, which added the scaffolds.

What this proves

scripts/extension-workspace-smoke.mts (pnpm extension:workspace:smoke, CI job extension-workspace) is the board-workspace-smoke treatment for extensions:

  1. Packs the @meith/plugin-kit and @meith/theme-kit closures with pnpm pack — the same tool a release uses, which rewrites workspace:* into real ranges.
  2. Scaffolds a plugin and a theme with create-meith --plugin / --theme.
  3. Packs each the way npm publish would, so what gets installed is exactly what the files allowlist ships.
  4. Installs, tests and typechecks both against the packed kits — not workspace aliases, which is the class of problem boards/stock solves for boards.
  5. Scaffolds a board, installs both extension tarballs into it, registers them in board.plugins.json, community.plugins.ts and community.config.ts, and runs forum-web build.

The bug it caught

Step 5 failed on the first run: Unknown module type for both extensions. The board's next.config.mjs listed transpilePackages as a hardcoded set of @meith/* names, so a board building with any other source-shipping dependency — which is what every third-party plugin and theme is — could not compile it. Since every @meith/* package deliberately ships TypeScript source, an extension installed from npm hit this immediately, while the same code inside the workspace was fine.

The board now derives transpilePackages from its own package.json dependencies (framework and serverExternalPackages entries excluded), so an installed extension needs no build step of its own. That is documented in both customization pages.

A second, smaller fix: the smoke's overrides block now covers every packed name, not just those absent from the board's dependencies — otherwise an extension's own transitive @meith/theme-default resolved against the real registry and 404'd on the smoke version.

Validated

  • pnpm extension:workspace:smoke passes end to end locally (the full run: 5 packed closures, both extensions green, board build clean).
  • pnpm lint, pnpm ci:parity:check and the staged comment check pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G22SRRgkUV7doefmw9NMNf


Generated by Claude Code

…acked kits

scripts/extension-workspace-smoke.mts packs the plugin-kit and theme-kit
closures, scaffolds a plugin and a theme with create-meith, packs each the
way npm publish would, installs, tests and typechecks both against the
packed tarballs rather than workspace aliases, then scaffolds a board,
installs both extensions into it, registers them and runs forum-web build.
Wired into CI as the extension-workspace job.

The board build compiles every dependency the board's own package.json
names, so an installed extension shipping TypeScript source builds without
a build step of its own. Without that, an extension installed from npm
failed the board build with an unknown-module-type error the workspace
never sees.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22SRRgkUV7doefmw9NMNf
wasm-tracing.test.ts reads next.config.mjs as text and greps the
serverExternalPackages array out of it, so hoisting that array into a
const above the config left the guard matching nothing and passing an
empty list to every assertion.

The literal goes back inline where the guard looks. A board's own
dependencies are appended to transpilePackages after the config is
built, reading serverExternalPackages and transpilePackages off the
object rather than duplicating either list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22SRRgkUV7doefmw9NMNf
@jouwdan
jouwdan merged commit 7cb261a into main Aug 26, 2026
15 checks passed
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.

2 participants