Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

@pnpm/modules-yaml

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/modules-yaml

Reads/writes `node_modules/.modules.yaml`


Version published
Weekly downloads
15K
decreased by-4.45%
Maintainers
2
Weekly downloads
 
Created

@pnpm/modules-yaml

Reads/writes `node_modules/.modules.yaml`

npm version

Installation

<pnpm|npm|yarn> 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

FAQs

Package last updated on 30 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts