interface AffectedMetafile

Subset of esbuild's Metafile shape that we actually read. Defined locally so this module doesn't import the heavy esbuild package — it only parses a JSON file that esbuild produced earlier.

const metafile: AffectedMetafile = {
  inputs: { 'test/a-test.ts': { imports: [{ path: 'lib/util.ts' }] }, 'lib/util.ts': {} },
};

Properties

inputs: Record<string, { imports?: Array<{ path: string; }>; }>

Every input file esbuild visited, keyed by path relative to esbuild's cwd.

Usage

import { type AffectedMetafile } from "lib/utils/get-changed-files.ts";