fix(generators): run UI tests, guard optional bus, harden e2e clones

Three generator fixes:
- templates/feature/vitest.config.ts.hbs lacked an include for
  .test.{ts,tsx}; the node base only includes .test.ts, so scaffolded
  UI component tests never executed
- gen event consume emitted an unguarded bus.subscribe although
  ctx.bus is optional in BindContext — now wrapped in if (bus) {}
- e2e repo clones now exclude /dist and /.next build outputs, and
  every dep-stripping e2e strips the scaffolded package from EVERY
  workspace package.json via globSync instead of a hardcoded dependent
  list that drifts as packages gain or drop the dependency

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 16:42:46 +02:00
parent 1e3220aef5
commit a17b984675
11 changed files with 100 additions and 41 deletions

View File

@@ -38,7 +38,11 @@ describe("e2e: feature generator composition", () => {
filter: (src) =>
!src.includes("node_modules") &&
!src.includes(".turbo") &&
!src.includes(".pnpm-store"),
!src.includes(".pnpm-store") &&
// Build outputs are large and irrelevant to the scaffold — cloning
// dist/.next fills the tmp dir and slows every e2e run.
!src.includes("/dist") &&
!src.includes("/.next"),
});
execSync(`cd ${tmp} && pnpm install --frozen-lockfile=false`, {