@pnpm/modules-yaml
TypeScript icon, indicating that this package has built-in type declarations

1000.0.0 • Public • Published

@pnpm/modules-yaml

Reads/writes `node_modules/.modules.yaml`

npm version

Installation

pnpm add @pnpm/modules-yaml

Usage

import {write, read} from '@pnpm/modules-yaml'

await write('node_modules', {
  hoistedAliases: {},
  layoutVersion: 1,
  packageManager: 'pnpm@1.0.0',
  pendingBuilds: [],
  shamefullyFlatten: false,
  skipped: [],
  storeDir: '/home/user/.pnpm-store',
})

const modulesYaml = await read(`node_modules`)

API

read(pathToDir): Promise<ModulesObject>

Reads .modules.yaml from the specified directory.

write(pathToDir, ModulesObject): Promise<void>

Writes a .modules.yaml file to the specified directory.

License

MIT

Package Sidebar

Install

npm i @pnpm/modules-yaml

Weekly Downloads

16,577

Version

1000.0.0

License

MIT

Unpacked Size

12.2 kB

Total Files

6

Last publish

Collaborators

  • pnpmuser
  • zkochan