Skip to content

fix: publish Node-compatible package entrypoints#1622

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/published-dist-manifests
Jun 21, 2026
Merged

fix: publish Node-compatible package entrypoints#1622
miguel-heygen merged 1 commit into
mainfrom
fix/published-dist-manifests

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

Fixes #1621 by making the published HyperFrames packages importable from plain Node package consumers instead of exposing monorepo-only source entrypoints.

Why

The issue is real. @hyperframes/engine@0.6.119 publishes a manifest whose main, types, and exports point at src/*.ts. A clean Node import therefore fails before user code runs because Node does not execute TypeScript package entrypoints.

Fixing that manifest exposed the next layer of the same packaging root cause: @hyperframes/core already publishes dist, but its emitted ESM used extensionless relative imports such as ./slideshow/parseSlideshow and dotted basenames such as ./core.types. Those are not Node-resolvable in ESM either.

How

  • Add publishConfig and files for @hyperframes/engine so packed npm metadata points at compiled dist entrypoints.
  • Add a post-tsc core build step that rewrites compiled relative ESM imports to Node-resolvable .js paths, including dotted basenames like core.types.
  • Build packageable Studio library entrypoints for @hyperframes/studio and @hyperframes/studio/tailwind-preset, while sharing the Tailwind preset with the app config to avoid drift.
  • Harden verify:packed-manifests so it now packs every public workspace and rejects:
    • leftover workspace: refs in packed manifests
    • packed manifest entrypoints that expose src/*.ts
    • packed manifest entrypoints that point at missing files
    • packed JavaScript with Node-incompatible relative ESM imports

Test plan

  • PATH=/home/ubuntu/.nvm/versions/node/v22.22.2/bin:$PATH bun run build
  • PATH=/home/ubuntu/.nvm/versions/node/v22.22.2/bin:$PATH bun run verify:packed-manifests
  • Clean temp-project smoke: pnpm pack local core, player, sdk, engine, and studio tarballs, install them into an empty npm project, and import:
    • @hyperframes/core
    • @hyperframes/core/slideshow
    • @hyperframes/engine
    • @hyperframes/engine/alpha-blit
    • @hyperframes/engine/shader-transitions
    • @hyperframes/studio/tailwind-preset
    • @hyperframes/studio
  • Pre-commit hook: lint, format, fallow, typecheck

Compound Engineering
Codex

@miguel-heygen miguel-heygen changed the title Fix published package entrypoints for Node consumers fix: publish Node-compatible package entrypoints Jun 21, 2026
@miguel-heygen miguel-heygen merged commit 2612b9b into main Jun 21, 2026
60 of 65 checks passed
@miguel-heygen miguel-heygen deleted the fix/published-dist-manifests branch June 21, 2026 14:49
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.

Published packages point main/exports to src/*.ts — not importable from plain Node

1 participant