Parses qunitx upgrade's arguments. A bare 0.34.2 (or v0.34.2) pins the version, the same
as --version=0.34.2.
Runs qunitx upgrade.
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.
-
allowSelfUpgrade: boolean
Whether qunitx may run another tool's installer on the user's behalf. Defaults to true unless
QUNITX_NO_SELF_UPGRADEis set — for a locked-down image, a CI box, or anywhere the answer to "may this process install things" is no. Blocked,upgradeprints the command it would have run and exits 1, which is what it did before it could run anything. -
apply: (plan: Install.InstallPlan) => Promise<string[]>
The installer. Defaults to Install.apply.
-
arch: string
Architecture used for asset selection. Defaults to the host's.
-
channel: Channel.InstallChannel
The install channel. Defaults to Channel.detect.
-
console: Console
Where the command's output goes. Defaults to the process streams.
-
currentVersion: string
The version considered installed. Defaults to this package's.
-
find: (version?: string) => Promise<Release.Release>
The release lookup. Defaults to Release.find.
-
platform: NodeJS.Platform
Platform used for asset selection. Defaults to the host's.
-
spawn: (argv: string[]) => Promise<Process.SpawnResult>
Runs another tool's installer. Defaults to Process.spawn.
What qunitx upgrade's argv asked for.
-
check: boolean
Report only: no download, no replace.
-
force: boolean
Replace even when the requested version is the one already running.
-
help: boolean
Print usage and stop.
-
version: string
The pinned version, without its
v. Absent means "the latest release". -
writeManifest: boolean
Bump the declared range in the project's manifest instead of refusing outright.
An argument this command will not accept.
Usage
import * as mod from "lib/commands/upgrade/index.ts";