mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 14:50:02 +00:00
refactor: drop unused exports detected by fallow auto-fix
Run `fallow fix --auto-fixable` to remove `export` keywords from symbols fallow's reachability analysis identifies as unused. Keeps only the cases where the symbol is still referenced internally in its own file (so removing `export` doesn't surface a new oxlint `no-unused-vars` error). Result: fallow dead-code findings drop from 276 → 208 (68 fewer unused exports), with no behavior change — each symbol is still defined and used exactly the same way within its file. Reverted ~20 files where fallow's auto-fix would have created cascading "declared but never used" lint errors — those are cases where the symbol isn't used at all, and properly cleaning them up means deleting the declaration, not just dropping `export`. Better to land that as a separate, narrower PR rather than mixing it into a mechanical de-export. Also reverted four false positives where fallow missed real consumers: - `captureCost.ts` (renderOrchestrator has two separate import blocks from the same module; fallow only saw the first) - `propertyPanelHelpers.ts`, `domEditingLayers.ts` (real internal uses fallow's reachability missed) - `render.ts` (functions imported via `await import()` dynamic import, which fallow's static analysis doesn't follow) Test plan: bun run --filter '*' typecheck (clean), oxlint + oxfmt clean, cli/core/studio/engine vitest suites pass (335 + 917 + 576 + 605 tests).
This commit is contained in:
@@ -39,7 +39,7 @@ const EPSILON = 0.001; // Tolerance for floating-point timing comparisons
|
||||
* Parse HTML and extract all elements with timing attributes.
|
||||
* Includes <video>, <audio>, and <div data-composition-src>.
|
||||
*/
|
||||
export function extractTimedElements(html: string): CompiledElement[] {
|
||||
function extractTimedElements(html: string): CompiledElement[] {
|
||||
const elements: CompiledElement[] = [];
|
||||
|
||||
// Extract video elements
|
||||
|
||||
@@ -73,7 +73,7 @@ export async function readFfmpegVersion(): Promise<string> {
|
||||
}
|
||||
|
||||
/** Test-only: clear the cached ffmpeg version so a fresh probe runs. */
|
||||
export function _resetFfmpegVersionCacheForTests(): void {
|
||||
function _resetFfmpegVersionCacheForTests(): void {
|
||||
cachedFfmpegVersion = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import { join, extname, resolve, sep } from "node:path";
|
||||
import { injectScriptsAtHeadStart, injectScriptsIntoHtml } from "@hyperframes/core/compiler";
|
||||
import { getVerifiedHyperframeRuntimeSource } from "./hyperframeRuntimeLoader.js";
|
||||
|
||||
export { injectScriptsAtHeadStart, injectScriptsIntoHtml };
|
||||
export { injectScriptsAtHeadStart };
|
||||
|
||||
type PathModuleLike = {
|
||||
resolve: (...segments: string[]) => string;
|
||||
|
||||
@@ -116,7 +116,6 @@ export interface FreezePlanResult {
|
||||
* `../runtimeEnvSnapshot.ts` — chunk workers re-apply the snapshot during
|
||||
* boot, so it needs to be importable without dragging in the freeze pipeline.
|
||||
*/
|
||||
export { RUNTIME_ENV_PREFIXES, snapshotRuntimeEnv } from "../runtimeEnvSnapshot.js";
|
||||
|
||||
/** The relative path inside `<planDir>/` to the compiled HTML. */
|
||||
const COMPILED_INDEX_RELATIVE_PATH = "compiled/index.html";
|
||||
|
||||
Reference in New Issue
Block a user