rules/js/biome/toolchain.js

Developer reference: this page includes exported implementation details. BUILD authors should prefer the User API reference.

BIOME_TOOL

const BIOME_TOOL

Undocumented.

biomeArtifactName()

biomeArtifactName(plat)

Return the biome release asset filename for a platform. biome ships one bare, uncompressed executable per platform — no archive to extract.

ParameterTypeDescription
plat{ os: string, arch: string }

Returns: string

biomeDownloadUrl()

biomeDownloadUrl(version, plat)

Return the biome release download URL for a version and platform. biome tags releases as @biomejs/biome@X.Y.Z, not a bare vX.Y.Z like node/pnpm — verified against the real release tag.

ParameterTypeDescription
versionstring
plat{ os: string, arch: string }

Returns: string

biomeCacheKey()

biomeCacheKey(version, plat)

Return the named-cache key for a biome toolchain version and platform.

ParameterTypeDescription
versionstring
plat{ os: string, arch: string }

Returns: string

biomeSupportedPlatforms()

biomeSupportedPlatforms()

Undocumented.

BiomeToolchain (implementation class)

class BiomeToolchain

Implementation class. BUILD files should use biomeToolchain().

Undocumented.

biomeToolchain()

biomeToolchain(version, opts = {})

Declare a biome toolchain version and optionally set it as the default. matching lockfile entry (warns instead of failing).

ParameterTypeDescription
versionstring
[opts]object
[opts.default=false]boolean
[opts.unverified=false]booleanAllow downloading without a

Returns: object Target handle for this biome toolchain.

installBiomeToolchain()

installBiomeToolchain(version, source)

Install a local biome executable into the named cache.

ParameterTypeDescription
versionstring
sourcestringPath to the biome executable.

Returns: string|null Local path to the cached toolchain directory.

acquireBiomeToolchain

const acquireBiomeToolchain

Acquire a biome toolchain, downloading and caching it if not already installed in the named cache.

ParameterTypeDescription
versionstring

Returns: Promise<string> Local path to the toolchain directory (containing biome).

resolveBiomeToolchainVersion()

resolveBiomeToolchainVersion(version)

Resolve an explicit or default biome toolchain version.

ParameterTypeDescription
[version]string

Returns: string|null

defaultBiomeToolchainVersion()

defaultBiomeToolchainVersion()

Return the currently configured default biome toolchain version.

Returns: string|null

defaultBiomeToolchain()

defaultBiomeToolchain()

Return the currently configured default biome toolchain target handle.

Returns: object|null