feat(KB-131): bundle workspace dependencies into CLI for npm publish

- Replace tsc with tsup (esbuild) to inline @kb/* workspace code into a single dist/bin.js
- Move @kb/core, @kb/dashboard, @kb/engine from dependencies to devDependencies
- Add tsup.config.ts that copies dashboard client assets into dist/client/
- Add bundle output tests verifying shebang, inlined code, and no bare @kb/* imports
- Add changeset for the bundled CLI build fix
This commit is contained in:
Dustin Byrne
2026-03-27 19:55:45 -04:00
parent a32897921c
commit b4577994b4
6 changed files with 314 additions and 8 deletions

View File

@@ -33,6 +33,12 @@ describe("CLI package.json publishing config", () => {
it("is not private", () => {
expect(pkg.private).not.toBe(true);
});
it("does not have @kb/* workspace packages in dependencies", () => {
const deps = Object.keys(pkg.dependencies || {});
const kbDeps = deps.filter((d) => d.startsWith("@kb/"));
expect(kbDeps).toEqual([]);
});
});
describe("Scoped @kb/* packages publishing config", () => {