Reads/writes `node_modules/.modules.yaml`
pnpm add @pnpm/modules-yaml
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`)
Reads .modules.yaml
from the specified directory.
Writes a .modules.yaml
file to the specified directory.
MIT