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). to use instead of the shipped one.

ParameterTypeDescription
versionstring
[opts]object
[opts.default=false]boolean
[opts.unverified=false]booleanAllow downloading without a
[opts.lockfile]stringAddress of a workspace-owned lockfile

Returns: object Target handle for this biome toolchain.

biomeGenLockfiles()

biomeGenLockfiles(version, opts = {})

The [GEN_LOCKFILES] root for a biome toolchain version. This is a separate function from biomeToolchain(). biomeToolchain() returns a frozen tool() handle. A frozen object cannot hold an extra property.

ParameterTypeDescription
[version]string
[opts]object
[opts.lockfile]stringAddress override for the generated lockfile.

Returns: object { [GEN_LOCKFILES]: ... }.

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.

resolveBiomeToolchainVersion()

resolveBiomeToolchainVersion(version)

Resolve an explicit or default biome toolchain version.

ParameterTypeDescription
[version]string

Returns: string|null

biomeGraphTool()

biomeGraphTool(version)

Return a graph-native Biome tool. The legacy declaration API still owns default-version and lockfile-generation policy during this migration.

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