Socket
Book a DemoInstallSign in
Socket

@pnpm/modules-yaml

Package Overview
Dependencies
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/modules-yaml

Reads/writes `node_modules/.modules.yaml`

Source
npmnpm
Version
1000.3.4
Version published
Maintainers
2
Created
Source

@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

Keywords

pnpm

FAQs

Package last updated on 23 Jul 2025

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