0.1.1 • Published 4 years ago

yarnlock-registry-validator v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

yarnlock registry validator

CI Build

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

Installation

yarn global add yarnlock-registry-validator

Usage

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

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.

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's yarnlock-origin-changer.