test(dist-bundle): assert inlined prompt content survives bundling
After the prompts-core migration the TypeScript prompt sources were deleted; the only mechanism delivering markdown prompts to npm users is bun build inlining via bunfig.toml [loader] ".md" = "text" and import attributes. bun test runs from src/index.ts, not from dist/index.js, so a future Bun upgrade that silently regresses markdown inlining would pass source tests green while the published bundle is broken with Cannot find module ../prompts/atlas/default.md at first agent load. Add a smoke test that scans the built dist/index.js for unique signature strings from each migrated prompt file (15 signatures: 3 ultrawork + 5 atlas + 3 prometheus + 4 mode prompts). Skips gracefully if dist/index.js does not exist (local bun test before build). Wire into the existing CI Verify dist bundle tests step in .github/workflows/ci.yml so the regression catches in CI build. Closes pre-publish blocker V1 and V33.
This commit is contained in:
@@ -129,7 +129,7 @@ jobs:
|
||||
test -f dist/index.d.ts || (echo "ERROR: dist/index.d.ts not found!" && exit 1)
|
||||
|
||||
- name: Verify dist bundle tests
|
||||
run: bun test src/shared/dist-bundle-bun-globals.test.ts
|
||||
run: bun test src/shared/dist-bundle-bun-globals.test.ts src/shared/dist-bundle-prompt-content.test.ts
|
||||
|
||||
- name: Auto-commit schema changes
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
|
||||
Reference in New Issue
Block a user