Skip to content

fix(ci): build @hyperframes/lint before core in Test and Studio jobs#1769

Closed
WaterrrForever wants to merge 1 commit into
mainfrom
fix/ci-build-lint-before-core
Closed

fix(ci): build @hyperframes/lint before core in Test and Studio jobs#1769
WaterrrForever wants to merge 1 commit into
mainfrom
fix/ci-build-lint-before-core

Conversation

@WaterrrForever

Copy link
Copy Markdown
Collaborator

Summary

main has been red on every PR since #1756 (the @hyperframes/lint extraction). The Test and Studio: load smoke CI jobs pre-build the wrong dependency set before packages/core, so loading core's compiled dist fails at test / dev-server time.

Root cause

#1756 made @hyperframes/lint a runtime dependency of core: packages/core/src/compiler/staticGuard.ts does import { lintHyperframeHtml } from "@hyperframes/lint". The lint package's exports resolve the node condition to ./dist/index.js (only bun/import use src), so when CI runs Node against core's built dist, @hyperframes/lint/dist/ must exist.

But both jobs pre-build only @hyperframes/{parsers,studio-server} before core — lint is never built — so:

ERR_MODULE_NOT_FOUND: Cannot find module .../@hyperframes/lint/dist/index.js
  imported from .../packages/core/dist/compiler/staticGuard.js
  • Test (bun run --filter '!@hyperframes/producer' test) — @hyperframes/studio test crashes loading core's dist.
  • Studio: load smoke — studio's vite.config.ts (loaded by Node) imports core → same crash; dev server never starts.

The Build and Windows jobs were never affected — they run the full bun run build (which includes lint). The SDK job pre-builds parsers+core only and passes (its path never loads staticGuard), so it's left untouched.

Fix

Build the canonical pre-core dependency set — @hyperframes/{parsers,lint,studio-server}, the same glob the root build script uses — in both jobs, so the set can't silently drift again the next time a package is extracted from core.

-      - run: bun run --filter '@hyperframes/parsers' build
-      - run: bun run --filter '@hyperframes/studio-server' build
+      - run: bun run --filter '@hyperframes/{parsers,lint,studio-server}' build
       - run: bun run --cwd packages/core build

Test plan

🤖 Generated with Claude Code

The lint extraction (#1756) made @hyperframes/lint a runtime dependency of
core — core's compiled compiler/staticGuard.js imports it via the package's
"node" export condition (./dist/index.js). But the `Test` and `Studio: load
smoke` jobs pre-build only @hyperframes/{parsers,studio-server} before
packages/core, so loading core's dist at test / dev-server time fails with:

  ERR_MODULE_NOT_FOUND: Cannot find module .../@hyperframes/lint/dist/index.js
  imported from .../packages/core/dist/compiler/staticGuard.js

main has been red on every PR since #1756 as a result. Build the canonical
pre-core dep set @hyperframes/{parsers,lint,studio-server} (the same glob the
root `build` script uses) in both jobs so the set can't drift again when
another package is extracted. The SDK job is left as-is — it builds
parsers+core only and passes (its path never loads staticGuard).

Reproduced locally: removing packages/lint/dist reproduces the exact
ERR_MODULE_NOT_FOUND; building lint resolves it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@WaterrrForever

Copy link
Copy Markdown
Collaborator Author

Folding this CI fix into #1768 instead of a separate PR — closing.

@WaterrrForever WaterrrForever deleted the fix/ci-build-lint-before-core branch June 27, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant