The seams run reaches the world through: the channel it believes it is, the release lookup,
the installer, and where its text goes. Every one defaults to the real thing.
import type { UpgradeDeps } from './index.ts'; const deps: UpgradeDeps = { channel: { kind: 'source', entry: '/repo/cli.ts' } }; deps.channel?.kind; // 'source' — refuses without a single network call
channel: Channel.InstallChannel
The install channel. Defaults to Channel.detect.
currentVersion: string
The version considered installed. Defaults to this package's.
find: (version?: string) => Promise<Release.Release>
The release lookup. Defaults to Release.find.
apply: (plan: Install.InstallPlan) => Promise<string[]>
The installer. Defaults to Install.apply.
platform: NodeJS.Platform
Platform used for asset selection. Defaults to the host's.
arch: string
Architecture used for asset selection. Defaults to the host's.
spawn: (argv: string[]) => Promise<Process.SpawnResult>
Runs another tool's installer. Defaults to Process.spawn.
allowSelfUpgrade: boolean
Whether qunitx may run another tool's installer on the user's behalf. Defaults to true unless
QUNITX_NO_SELF_UPGRADE is set — for a locked-down image, a CI box, or anywhere the answer to
"may this process install things" is no. Blocked, upgrade prints the command it would have
run and exits 1, which is what it did before it could run anything.