# lerna-utils

> Util functions for leveraging lerna

Latest version **1.2.0** (published 2021-12-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install lerna-utils
pnpm add lerna-utils
yarn add lerna-utils
bun add lerna-utils
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2021-12-07 |
| First published | 2019-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | David Daniel |
| Maintainers | davidedaniel |
| Keywords | lerna, utils, bin, scripts, getUpdatedPackages |

## Links

- npm: https://www.npmjs.com/package/lerna-utils
- Repository: https://github.com/DavideDaniel/oss-projects
- Homepage: https://github.com/DavideDaniel/oss-projects#readme
- Issues: https://github.com/DavideDaniel/oss-projects/issues
- npm.io page: https://npm.io/package/lerna-utils

## Dependencies (1)

- [execa](https://npm.io/package/execa.md) ^0.8.0

## Recent versions

- 1.2.0 (latest) — 2021-12-07
- 1.2.0-alpha.45961092 (canary) — 2019-10-11
- 1.1.3 — 2020-09-15
- 1.1.2 — 2020-09-15
- 1.1.1 — 2019-06-21
- 1.1.0 — 2019-06-21

## README

### lerna-utils

* * *

[![CircleCI](https://circleci.com/gh/DavideDaniel/oss-projects/tree/master.svg?style=svg)](https://circleci.com/gh/DavideDaniel/oss-projects/tree/master)

#### Install

```bash
$ npm install lerna-utils --save-dev
# or
$ yarn add lerna-utils -D
```

## Documentation

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

#### Table of Contents

-   [get-updated-packages](#get-updated-packages)
    -   [Parameters](#parameters)
-   [exports](#exports)
    -   [Parameters](#parameters-1)
-   [check-stderr](#check-stderr)
    -   [Parameters](#parameters-2)

### get-updated-packages

this version is specific to lerna 2.0 range and is a way to use lerna's output for updated --json and resolve or reject a list of packages

#### Parameters

-   `logger` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** any logger to log stdout/stderr (optional, default `console`)

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** promise that resolves list of updated packages only

### exports

this version is specific to lerna 3.0 range and is a way to use lerna's output for updated --json and resolve or reject a list of packages

#### Parameters

-   `logger` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** a logging object with info method to log results (optional, default `console`)

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** promise that resolves list of updated packages only

### check-stderr

evaluates the stdout from an error that might happen while publishing. We want only relevant errors rejecting.

#### Parameters

-   `str` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the stdout string that lets us check lerna --json safely and respond with appropriate exit code for jenkins
-   `regex` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** a regex to test the string
-   `logger` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** a logging object with info method to log results (optional, default `console`)

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** an evaluated str from stderr

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