function bundleCacheKey
bundleCacheKey(
opts: esbuild.BuildOptions,
files: string[]
): string

Cache key for the daemon/watch incremental esbuild context. Single source of truth for what makes two builds interchangeable: file set + every BuildOption that varies between runs. Items intentionally NOT keyed: plugins (daemon shuts down on package.json mtime change; the prepended qunitxRuntimePlugin is static and deterministic), nodePaths (cwd-bound, daemon stays in cwd), and the hardcoded literals (bundle, keepNames, legalComments, jsx, sourcemap, footer, logLevel). When adding a new variable BuildOption, extend this function — that is the contract enforced by the unit suite.

bundleCacheKey({ outfile: 'tmp/tests.js', target: ['chrome120'] }, ['/proj/test/a-test.ts']);
// '{"files":["/proj/test/a-test.ts"],"outfile":"tmp/tests.js","target":["chrome120"]}'

Parameters

opts: esbuild.BuildOptions
files: string[]

Return Type

string

Usage

import { bundleCacheKey } from "lib/commands/test/tests-in-browser.ts";