# @yarnpkg/lockfile

> The parser/stringifier for Yarn lockfiles.

Latest version **1.1.0** (published 2018-09-10) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install @yarnpkg/lockfile
pnpm add @yarnpkg/lockfile
yarn add @yarnpkg/lockfile
bun add @yarnpkg/lockfile
```

## Health

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

Positive: has types package; no vulnerabilities; popular repo.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-09-10 |
| First published | 2017-08-22 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | separate (@types/yarnpkg__lockfile) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 273.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 41478 |
| Maintainers | arcanis, bestander, cpojer, daniel15, sebmck |
| Keywords | yarn, yarnpkg, lockfile, dependency, npm |

## Links

- npm: https://www.npmjs.com/package/@yarnpkg/lockfile
- Repository: https://github.com/yarnpkg/yarn/blob/master/packages/lockfile
- npm.io page: https://npm.io/package/@yarnpkg/lockfile

## Recent versions

- 1.1.0 (latest) — 2018-09-10
- 1.0.2 — 2018-06-11
- 1.0.1 — 2018-05-11
- 1.0.0 — 2017-08-22

## README

# yarn-lockfile

Parse and/or write `yarn.lock` files

## Usage Examples

```js
const fs = require('fs');
const lockfile = require('@yarnpkg/lockfile');
// or (es6)
import fs from 'fs';
import * as lockfile from '@yarnpkg/lockfile';

let file = fs.readFileSync('yarn.lock', 'utf8');
let json = lockfile.parse(file);

console.log(json);

let fileAgain = lockfile.stringify(json);

console.log(fileAgain);
```

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