fix(core): move lottieReadiness out of src/runtime so it ships in dist#861
Open
terencecho wants to merge 1 commit into
Open
fix(core): move lottieReadiness out of src/runtime so it ships in dist#861terencecho wants to merge 1 commit into
terencecho wants to merge 1 commit into
Conversation
The "./runtime/lottie-readiness" subpath export claimed to point at
./dist/runtime/adapters/lottieReadiness.js, but the published 0.6.6 and
0.6.7 tarballs never contained that file. Reason: packages/core/tsconfig.json
excludes "src/runtime" (those files run in a browser context and are
bundled separately into the IIFE artifact), so tsc never emitted the
compiled output. Consumers that import the subpath — most notably
@hyperframes/studio's Player.tsx — fail to resolve the module and the
build breaks at the consumer site.
lottieReadiness.ts is a pure helper: takes `unknown`, returns `boolean`,
no DOM or `window` access. It doesn't belong under src/runtime/ in the
first place — that's why the runtime-exclude rule rightly caught it.
Move it to src/lottieReadiness.ts so the standard library build picks
it up. The subpath export name stays "./runtime/lottie-readiness" so
existing consumers (studio) don't need a code change; only the exports
map's underlying file path moves to ./dist/lottieReadiness.{js,d.ts}.
- mv src/runtime/adapters/lottieReadiness.{ts,test.ts} -> src/
- update src/runtime/adapters/lottie.ts re-export path
- update package.json + publishConfig.exports to point at new dist path
Verified: full core test suite passes (862/862), dist now contains
lottieReadiness.{js,d.ts}, studio typechecks against the moved file.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
"./runtime/lottie-readiness"subpath export in@hyperframes/coreclaims to ship at./dist/runtime/adapters/lottieReadiness.js, but that file is missing from the published 0.6.6 and 0.6.7 tarballs. Consumers that import the subpath — most notably@hyperframes/studio'sPlayer.tsx— fail to resolve the module and break downstream builds (e.g. Next.js/Turbopack).Root cause
packages/core/tsconfig.jsonexcludessrc/runtime(those files run in a browser context and are bundled separately into the IIFE artifact). Since nothing in the included tree importslottieReadiness.ts, tsc never emits a compiled output, and the file silently goes missing from the publish.Fix
lottieReadiness.tsis a pure helper — takesunknown, returnsboolean, no DOM/windowdependencies. It doesn't belong insrc/runtime/in the first place; the runtime-exclude rule rightly caught it. Move it tosrc/lottieReadiness.tsso the standard library build picks it up.The subpath export name stays
"./runtime/lottie-readiness"— only the exports map's underlying file path changes — so existing consumers (studio) don't need any code change.Changes
mv src/runtime/adapters/lottieReadiness.{ts,test.ts}->src/src/runtime/adapters/lottie.tsre-export pathpackage.json+publishConfig.exportsto point at the new dist path (./dist/lottieReadiness.{js,d.ts})Test plan
pnpm typecheck(core) — cleanbun run build(core) —dist/lottieReadiness.{js,d.ts}now presentbunx vitest run(core) — 862/862 passingbun run typecheck(studio) — clean, resolves moved file via subpath exportdist/lottieReadiness.js🤖 Generated with Claude Code