test(extensions): prove scaffolded plugins and themes build against packed kits - #259
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 jobextension-workspace) is theboard-workspace-smoketreatment for extensions:@meith/plugin-kitand@meith/theme-kitclosures withpnpm pack— the same tool a release uses, which rewritesworkspace:*into real ranges.create-meith --plugin/--theme.npm publishwould, so what gets installed is exactly what thefilesallowlist ships.boards/stocksolves for boards.board.plugins.json,community.plugins.tsandcommunity.config.ts, and runsforum-web build.The bug it caught
Step 5 failed on the first run:
Unknown module typefor both extensions. The board'snext.config.mjslistedtranspilePackagesas 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
transpilePackagesfrom its ownpackage.jsondependencies (framework andserverExternalPackagesentries 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
overridesblock now covers every packed name, not just those absent from the board's dependencies — otherwise an extension's own transitive@meith/theme-defaultresolved against the real registry and 404'd on the smoke version.Validated
pnpm extension:workspace:smokepasses end to end locally (the full run: 5 packed closures, both extensions green, board build clean).pnpm lint,pnpm ci:parity:checkand the staged comment check pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01G22SRRgkUV7doefmw9NMNf
Generated by Claude Code