mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
chore: add fallow config and fix high-signal findings
Configure fallow via .fallowrc.jsonc so its analysis reflects this repo's
real entry surface, then fix the genuine issues it found.
Fallow noise reduction (601 → 276 dead-code findings):
- Ignore docs/, test fixtures, skill test-corpora, registry/, examples/
- Declare worker entry points loaded dynamically by file path
(pngDecodeBlitWorker.ts, shaderTransitionWorker.ts)
- Declare runtime IIFE entry (core/src/runtime/entry.ts) built outside the
import graph by build-hyperframes-runtime-artifact.ts
- Declare bun:test files in producer + aws-lambda as test entries
- Ignore dynamically-resolved deps: tsup external (puppeteer-core, esbuild,
giget), peer/static-file (gsap in player perf tests), workspace deps
hoisted by bun (happy-dom, @hyperframes/*), and @fontsource/* packages
read via readFileSync in generate-font-data.ts
Extract inline build:fonts scripts:
- packages/{cli,producer}/package.json had multi-line `node -e ...` blobs
containing braces that fallow mis-parsed as glob alternate groups. Moved
to dedicated build-fonts.mjs scripts.
Fix duplicate exports:
- Remove dead FileIcon alias in studio/SystemIcons.tsx (FileTreeIcons.tsx
has the real, used one)
- Consolidate ValidationResult: drop the identical duplicate in
gsapParser.ts; both parsers now import from core.types
- Suppress intentional namespace patterns (per-namespace ML manager
exports; CLI per-command 'examples' convention; fileServer.ts test-only
isPathInside which has different symlink semantics from utils/paths.ts)
Break circular dep (studio/components/editor):
- manualEditsDom.ts re-exported clearStudioPathOffset / clearStudioRotation
/ clearStudioBoxSize from manualEditsSnapshot.ts, which imports four
helpers from manualEditsDom.ts — back-edge cycle
- Re-export moved to manualEdits.ts (the package-public barrel) where the
rest of the snapshot re-exports already live; underlying files now form
a clean DAG
Remove genuinely unused deps:
- studio: motion (no imports anywhere), codemirror (umbrella package; the
@codemirror/* sub-packages are used directly)
- cli: mime-types (plus its only consumer src/utils/mime.ts, which was a
hardcoded mime table that didn't use the package), and its now-stale
tsup external entry
Verified: typecheck across core/cli/producer/studio is clean, oxlint
+ oxfmt pass, manualEdits.test.ts (18 tests) and core parser tests (69
tests) still pass.
Deferred follow-ups (real findings, separate PRs):
- 8 circular deps in producer/services/render/stages/ — renderOrchestrator
↔ captureHdr* / captureStage / extractVideosStage form a hub cycle
- ~14 unused files in producer/src/services/ that look like dead
re-export shims to @hyperframes/engine, but aren't in the public
exports map — need to confirm no deep-import consumers before deletion
- waveform.ts complexity hotspot
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/fallow-rs/fallow/main/config-schema.json",
|
||||
"entry": [
|
||||
"packages/producer/src/**/*.test.ts",
|
||||
"packages/aws-lambda/src/**/*.test.ts",
|
||||
"packages/producer/src/regression-harness.ts",
|
||||
"packages/producer/src/regression-harness-distributed.test.ts",
|
||||
"packages/producer/src/regression-harness-lambda-local.ts",
|
||||
"packages/producer/src/transparency-test.ts",
|
||||
"packages/producer/src/parity-harness.ts",
|
||||
"packages/producer/src/parity-fixtures.ts",
|
||||
"packages/producer/src/perf-gate.ts",
|
||||
"packages/producer/src/runtime-conformance.ts",
|
||||
"packages/producer/src/benchmark.ts",
|
||||
"packages/producer/scripts/generate-font-data.ts",
|
||||
"packages/cli/scripts/generate-font-data.ts",
|
||||
"packages/engine/scripts/test-fitTextFontSize-browser.ts",
|
||||
"packages/aws-lambda/scripts/*.ts",
|
||||
// Built as standalone IIFE for the browser-side sandbox runtime;
|
||||
// referenced by file path (not import) in build-hyperframes-runtime-artifact.ts.
|
||||
"packages/core/src/runtime/entry.ts",
|
||||
// Worker entry points loaded dynamically by their *Pool.ts companions.
|
||||
"packages/producer/src/services/pngDecodeBlitWorker.ts",
|
||||
"packages/producer/src/services/shaderTransitionWorker.ts",
|
||||
"scripts/*.{ts,mjs,js}",
|
||||
"scripts/*/run.mjs"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"docs/**",
|
||||
"packages/producer/tests/**",
|
||||
"packages/player/tests/**",
|
||||
"packages/engine/tests/**",
|
||||
"skills/**/test-corpus/**",
|
||||
"skills/**/scripts/**",
|
||||
"registry/**",
|
||||
"examples/**",
|
||||
".github/workflows/fixtures/**"
|
||||
],
|
||||
"ignoreExports": [
|
||||
// CLI command files: every command exports a const `examples` per the
|
||||
// convention documented in CLAUDE.md. This is a namespace barrel, not a
|
||||
// collision.
|
||||
{ "file": "packages/cli/src/commands/*.ts", "exports": ["examples"] },
|
||||
// Independent ML model managers each declare their own DEFAULT_MODEL /
|
||||
// MODELS_DIR / ensureModel for their model namespace.
|
||||
{
|
||||
"file": "packages/cli/src/{background-removal,tts,whisper}/manager.ts",
|
||||
"exports": ["DEFAULT_MODEL", "MODELS_DIR", "ensureModel"]
|
||||
},
|
||||
// `isPathInside` is documented as exported-for-tests only in fileServer.ts;
|
||||
// it has different semantics (symlink resolution) from utils/paths.ts.
|
||||
{
|
||||
"file": "packages/producer/src/services/fileServer.ts",
|
||||
"exports": ["isPathInside"]
|
||||
}
|
||||
],
|
||||
"ignoreDependencies": [
|
||||
// Runtime/dynamic deps not visible to static analysis: tsup `external`,
|
||||
// dynamic require() resolution, peer/static-file consumption in tests,
|
||||
// and bun-hoisted workspace devDeps (e.g. happy-dom in root package.json
|
||||
// resolves for every workspace, so workspaces don't redeclare it).
|
||||
"puppeteer",
|
||||
"puppeteer-core",
|
||||
"esbuild",
|
||||
"giget",
|
||||
"gsap",
|
||||
"happy-dom",
|
||||
"ffmpeg-static",
|
||||
"ffprobe-static",
|
||||
"@hyperframes/core",
|
||||
"@hyperframes/studio",
|
||||
"@hyperframes/producer",
|
||||
"@fontsource/archivo-black",
|
||||
"@fontsource/eb-garamond",
|
||||
"@fontsource/ibm-plex-mono",
|
||||
"@fontsource/inter",
|
||||
"@fontsource/jetbrains-mono",
|
||||
"@fontsource/league-gothic",
|
||||
"@fontsource/montserrat",
|
||||
"@fontsource/nunito",
|
||||
"@fontsource/oswald",
|
||||
"@fontsource/outfit",
|
||||
"@fontsource/space-mono",
|
||||
"@fontsource/lato",
|
||||
"@fontsource/noto-sans-jp",
|
||||
"@fontsource/open-sans",
|
||||
"@fontsource/playfair-display",
|
||||
"@fontsource/poppins",
|
||||
"@fontsource/roboto",
|
||||
"@fontsource/source-code-pro"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user