Skip to content

Commit 7bd2fdd

Browse files
committed
ci: check one component per chat module in the pack smoke
The CI consumer smoke only checked Button, Conversation and Badge, so dropping an export * line for most of the chat family from src/index.ts would still pass. Check one component per chat module (Message, Activity, Reasoning, Tool, ToolApproval, ToolGroup, PromptInput, Panel, Attachments, MediaViewer, ConversationThread, ConversationMap) and report every missing name at once.
1 parent 513a981 commit 7bd2fdd

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@ jobs:
2929
mkdir -p "$RUNNER_TEMP/c" && cd "$RUNNER_TEMP/c"
3030
npm init -y >/dev/null && npm pkg set type=module >/dev/null
3131
npm install "$TARBALL"
32-
node -e 'import("@corbits/react-ui").then((m) => { for (const n of ["Button", "Conversation", "Badge"]) if (typeof m[n] !== "function") throw new Error("missing export: " + n); })'
32+
# One component per chat module, so a dropped `export *` line in
33+
# src/index.ts fails here and not in a consumer's build.
34+
node --input-type=module -e '
35+
const m = await import("@corbits/react-ui");
36+
const names = ["Button", "Badge", "Conversation", "ConversationThread", "ConversationMap", "Message", "Activity", "Reasoning", "Tool", "ToolApproval", "ToolGroup", "PromptInput", "Panel", "Attachments", "MediaViewer"];
37+
const missing = names.filter((n) => typeof m[n] !== "function");
38+
if (missing.length) throw new Error("missing exports: " + missing.join(", "));
39+
'

0 commit comments

Comments
 (0)