You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: typecheck + test stability across plugin, signals, and visuals
Five fixes the test job needed:
1. packages/stx/src/index.ts — alias `BuildResult` re-export from
site-builder to `SiteBuildResult` since build-optimizer also exports
`BuildResult` (TS2300 duplicate identifier).
2. packages/stx/src/utils.ts — `resolveTemplatePath`'s final guard now
also accepts paths inside the configured `root`/`layoutsDir`/
`componentsDir`/`partialsDir`/`pagesDir`. Tests and tools that point
those at directories outside cwd (e.g. spa-fragment-real.test.ts,
monorepo workspace setups) were getting their resolved templates
rejected by the cwd-only guard.
3. packages/stx/src/site-builder/seo.ts — `injectSeo` now writes the
per-page `<title>` and strips any prior one. Without this every
built page kept stx's default `<title>stx Project</title>` even
though og:title/twitter:title got rewritten correctly.
4. packages/bun-plugin/src/index.ts — `onResolve({ filter: /^\// })`
was marking the entrypoint absolute path as external when there
was no importer, causing `Bun.build` to silently produce zero
outputs under `bun test`. Skip when `args.importer` is falsy so
only actual imports get externalized.
5. packages/desktop/test/clipboard-strip.test.ts — afterEach was doing
`delete globalThis.Blob`, wiping Bun's built-in for every later
test in the run (the build-optimizer optimizeTemplate suite hit
"Blob is not defined" because of this). Save originals in
beforeEach and restore in afterEach instead.
Full test suite goes from 61 fails → 0 fails (8695 pass).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments