# yarnlock-registry-validator

> Validates unique registry origin in yarn.lock

Latest version **0.1.1** (published 2020-06-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install yarnlock-registry-validator
pnpm add yarnlock-registry-validator
yarn add yarnlock-registry-validator
bun add yarnlock-registry-validator
```

Provides the command `yarnlock-registry-validator`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2020-06-12 |
| First published | 2020-06-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 787.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Steve Calvert |
| Maintainers | scalvert |

## Links

- npm: https://www.npmjs.com/package/yarnlock-registry-validator
- Repository: https://github.com/scalvert/yarnlock-registry-validator
- Homepage: https://github.com/scalvert/yarnlock-registry-validator#readme
- Issues: https://github.com/scalvert/yarnlock-registry-validator/issues
- npm.io page: https://npm.io/package/yarnlock-registry-validator

## Dependencies (2)

- [whatwg-url](https://npm.io/package/whatwg-url.md) ^7.0.0
- [@yarnpkg/lockfile](https://npm.io/package/@yarnpkg/lockfile.md) ^1.1.0

## Recent versions

- 0.1.1 (latest) — 2020-06-12
- 0.1.0 — 2020-06-12

## README

## yarnlock registry validator

![CI Build](https://github.com/scalvert/yarnlock-registry-validator/workflows/CI%20Build/badge.svg)

A simple CLI that validates a yarn.lock contains a unique registry origin.

### Installation

```sh
yarn global add yarnlock-registry-validator
```

### Usage

The following command will ensure that there's only one, unique registry origin in the provided lockfile.

```sh
yarnlock-registry-validator ./yarn.lock

# Valid:
# yarnlock-registry-validator: The "./fixtures/yarn.lock" lockfile was valid and contains only one, unique registry origin: https://registry.yarnpkg.com

# Invalid:
# yarnlock-registry-validator: The "./fixtures/invalid-yarn.lock" lockfile was invalid and contained multiple registry origins: https://registry.yarnpkg.com, https://registry.npmjs.org
```

You can also pass a `registry` argument, which will validate the presence of a single, specific registry.

```sh
yarnlock-registry-validator ./yarn.lock https://registry.yarnpkg.com

# Valid:
# yarnlock-registry-validator: The "./fixtures/yarn.lock" lockfile was valid and contains only one, unique registry origin: https://registry.yarnpkg.com

# Invalid:
# yarnlock-registry-validator: The "./fixtures/invalid-yarn.lock" lockfile was invalid and contained multiple registry origins: https://registry.yarnpkg.com, https://registry.npmjs.org
```

### Attribution

This package is heavily inspired by [Stefan Penner](https://github.com/stefanpenner)'s [yarnlock-origin-changer](https://github.com/stefanpenner/yarnlock-origin-changer).

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