Skip to content
Latchkey

Pinning the Biome Version in CI

Pinning the exact Biome version and matching the $schema URL keeps formatting and lint results reproducible across runs and machines.

Biome formatting and rules evolve between releases. An unpinned version means a runner image refresh can reformat the codebase or surface new diagnostics out of nowhere.

What it does

Pinning installs one exact Biome version everywhere so the same input produces the same output. The biome.json $schema URL embeds a version too; keeping it equal to the installed package version means config keys validate against the right schema.

Common usage

Terminal
# install an exact version
npm install --save-dev --save-exact @biomejs/biome@2.0.0
# run the pinned binary in CI
npx @biomejs/biome ci ./src

Options

PracticeWhat it does
--save-exactWrite an exact version (no ^) to package.json
@biomejs/biome@<x.y.z>Install a specific Biome release
$schema .../<x.y.z>/schema.jsonMatch the schema URL to the installed version
lockfileCommit the lockfile so installs are reproducible

In CI

Pin with --save-exact and commit the lockfile so every runner installs the identical binary. Bump Biome deliberately in its own PR, run biome check --write once to absorb any formatting changes, and review the diff, rather than letting a caret range upgrade silently.

Common errors in CI

An unpinned ^ range can pull a newer minor that reformats files or flags new diagnostics, failing a build that touched none of that code. A $schema version ahead of or behind the installed binary makes valid keys read as "unknown key". Keep the package version, lockfile, and $schema URL in agreement.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →