# yarn-local

> Helper scripts for managing yarn when checked into repositories.

Latest version **1.1.0** (published 2019-12-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install yarn-local
pnpm add yarn-local
yarn add yarn-local
bun add yarn-local
```

Provides the command `yarn-local`.

## 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.1.0 |
| Published | 2019-12-03 |
| First published | 2018-11-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Gustav Nikolaj |
| Maintainers | gustavnikolaj |
| Keywords | yarn |

## Links

- npm: https://www.npmjs.com/package/yarn-local
- Repository: https://github.com/gustavnikolaj/yarn-local
- Homepage: https://github.com/gustavnikolaj/yarn-local#readme
- Issues: https://github.com/gustavnikolaj/yarn-local/issues
- npm.io page: https://npm.io/package/yarn-local

## Dependencies (4)

- [esm](https://npm.io/package/esm.md) ^3.2.5
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.3.0
- [@gustavnikolaj/async-main-wrap](https://npm.io/package/@gustavnikolaj/async-main-wrap.md) ^3.0.1

## Recent versions

- 1.1.0 (latest) — 2019-12-03
- 1.0.3 — 2019-02-19
- 1.0.2 — 2019-02-19
- 1.0.1 — 2019-02-01
- 1.0.0 — 2018-11-22

## README

# yarn-local

Helper scripts for managing yarn when checked into repositories.

## Why use a checked-in version of yarn

Excerpt from the yarn docs:

> ```
> yarn-path "./bin/yarn"
> ```
>
> Instructs yarn to defer to another Yarn binary for execution. Useful if you
> want to bundle Yarn into your repository and have everyone use the same
> version for consistency. This was introduced in Yarn 1.0, so all developers
> must have Yarn = 1.0 installed.

## Why yarn-local

This script will when you first invoke it in a repository without a locally
installed yarn:

1. Setup the necessary configuration in .yarnrc
2. Download the latest version of yarn and save it to a file in your repo.

On subsequent invocations it will just check if there is a newer version of yarn
than the one you have checked in, and if so, do the necessary update including
downloading the new version of yarn.

## Installation

```
$ npm i -g @gustavnikolaj/yarn-local
$ yarn global add @gustavnikolaj/yarn-local
```

Or you can just invoke the binary with [npx](https://www.npmjs.com/package/npx).
The benefit of doing this is that you don't have to install the package
globally.

```
$ npx yarn-local
```

## Usage

Given that this is a single purpose script and that we can tell what needs to be
done by just looking at the current repository, there is no arguments to pass.
Just invoke the script in the right directory.

```
$ yarn-local
```

Or if using npx:

```
$ npx yarn-local
```

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