# @lerna/describe-ref

> Parse git describe output for lerna-related tags

Latest version **6.4.1** (published 2023-01-12) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @lerna/describe-ref
pnpm add @lerna/describe-ref
yarn add @lerna/describe-ref
bun add @lerna/describe-ref
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 6.4.1 |
| Published | 2023-01-12 |
| First published | 2018-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^14.15.0 \|\| >=16.0.0 |
| Dependencies | 2 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Daniel Stockman |
| Maintainers | jameshenry, nrwlowner |
| Keywords | lerna, utils, git, describe |

## Links

- npm: https://www.npmjs.com/package/@lerna/describe-ref
- Repository: https://github.com/lerna/lerna
- Homepage: https://lerna.js.org
- Issues: https://github.com/lerna/lerna/issues
- npm.io page: https://npm.io/package/@lerna/describe-ref

## Dependencies (2)

- [npmlog](https://npm.io/package/npmlog.md) ^6.0.2
- [@lerna/child-process](https://npm.io/package/@lerna/child-process.md) 6.4.1

## Recent versions

- 6.4.1 (latest) — 2023-01-12
- 6.3.1-beta.8 (next) — 2022-12-27
- 6.4.0 — 2023-01-05
- 6.3.1-beta.7 — 2022-12-27
- 6.3.1-beta.6 — 2022-12-27
- 6.3.1-beta.5 — 2022-12-27
- 6.3.1-beta.3 — 2022-12-27
- 6.3.1-beta.2 — 2022-12-27
- 6.3.1-beta.1 — 2022-12-27
- 6.3.1-beta.0 — 2022-12-26
- 6.3.0 — 2022-12-26
- 6.2.0 — 2022-12-13
- 6.1.0 — 2022-11-29
- 6.0.3 — 2022-11-07
- 6.0.2 — 2022-11-02
- … 46 more at https://npm.io/package/@lerna/describe-ref/versions

## README

# `@lerna/describe-ref`

> Parse [git describe][] output for lerna-related tags

## Usage

```js
const { describe } = require("@lerna/describe-ref");

(async () => {
  const { lastTagName, lastVersion, refCount, sha, isDirty } = await describe();
})();

// values listed here are their defaults
const options = {
  cwd: process.cwd(),
  // pass a glob to match tag name, e.g. "v*.*.*"
  match: undefined,
  // if true, omit --first-parent option
  includeMergedTags: false,
};

const { lastTagName, lastVersion, refCount, sha, isDirty } = describe.sync(options);

const result = describe.parse("v1.0.0-5-gdeadbeef");
// { lastTagName, lastVersion, refCount, sha, isDirty }
```

Install [lerna](https://www.npmjs.com/package/lerna) for access to the `lerna` CLI.

[git describe]: https://git-scm.com/docs/git-describe

---
_Source: https://npm.io/package/@lerna/describe-ref · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
