Files
pnpm/installing/modules-yaml
Zoltan Kochan aa93759d9b chore(release): drop eslint from lib prepublishOnly (#11320)
Library packages had `prepublishOnly: pn compile`, which expands to
`tsgo --build && pn lint --fix`. During `pn release` that runs eslint
against ~150 packages for no benefit — the code has already been linted
in CI and the release flow's upfront compile has already built dist/.
Switch lib prepublishOnly to a bare `tsgo --build` so the safety-net
compile stays but the per-package eslint cost is gone.
2026-04-21 01:18:03 +02:00
..
2026-04-16 01:18:55 +02:00

@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