Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lerna/describe-ref

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lerna/describe-ref

Parse git describe output for lerna-related tags

  • 5.0.0-alpha.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created

What is @lerna/describe-ref?

@lerna/describe-ref is a utility package that helps in describing the current Git reference in a Lerna-managed monorepo. It provides information about the current Git branch, tag, or commit, which can be useful for versioning and release management in monorepos.

What are @lerna/describe-ref's main functionalities?

Describe the current Git reference

This feature allows you to get a description of the current Git reference, including branch name, tag, or commit hash. The `describeRef` function returns an object with details about the current Git state.

const { describeRef } = require('@lerna/describe-ref');

async function getGitRef() {
  const ref = await describeRef();
  console.log(ref);
}

getGitRef();

Custom base ref

This feature allows you to specify a custom base reference to compare against. The `describeRef` function can take an options object where you can set the `baseRef` to a specific branch or tag.

const { describeRef } = require('@lerna/describe-ref');

async function getCustomBaseRef(baseRef) {
  const ref = await describeRef({ baseRef });
  console.log(ref);
}

getCustomBaseRef('main');

Include distance from base ref

This feature includes the distance (number of commits) from the base reference in the description. The `includeDistance` option can be set to `true` to get this additional information.

const { describeRef } = require('@lerna/describe-ref');

async function getRefWithDistance() {
  const ref = await describeRef({ includeDistance: true });
  console.log(ref);
}

getRefWithDistance();

Other packages similar to @lerna/describe-ref

Keywords

FAQs

Package last updated on 24 May 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc