Socket
Book a DemoInstallSign in
Socket

@biomejs/version-utils

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@biomejs/version-utils

This library provides helper functions to detect the version of Biome from the dependencies of a given project.

latest
Source
npmnpm
Version
0.4.0
Version published
Weekly downloads
93
-53.03%
Maintainers
0
Weekly downloads
 
Created
Source

Version utils

This library provides helper functions to detect the version of Biome from the dependencies of a given project.

[!WARNING] This is an internal library, and semver is not guaranteed to be followed, so depend on it at your own risk.

Installation

npm install @biomejs/version-utils

Usage

Detecting from dependencies

To detect the version of Biome from the dependencies of a given project, use the detectFromDependencies helper function. This function will look for the version of Biome in the dependencies of the lockfile for the project, and fall back to the package.json file if no lockfile is found, or if it cannot be read.

import { detectFromDependencies } from '@biomejs/version-utils';

const version = detectFromDependencies('/path/to/project');

[!TIP] The lockfiles of the following package managers are supported:

  • npm (package-lock.json)
  • pnpm (pnpm-lock.yaml)
  • yarn (yarn.lock)

Bun's lockfile is binary and cannot be easily read, so we fall back to the package.json file for Bun projects.

License

Copyright © 2024, Nicolas Hedger. Released under the MIT License.

Keywords

biome

FAQs

Package last updated on 03 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts