mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-28 20:11:48 -04:00
* refactor: store link values before converting to references * fix: use .sort() without localeCompare https://github.com/pnpm/pnpm/pull/8128#discussion_r1614031566 > Nit, but you probably just want to call sort without a comparison > function; these are already strings and locale compare is not a good > comparison for anything but human readable strings since it will > differ on different people's machines based on their language setting. > I've hit this too many times before for code gen. * feat: configure meta-updater to write test/tsconfig.json files * fix: relative imports for __typings__ * chore: `pnpm run meta-updater` * fix: explicitly use test/tsconfig.json for ts-jest
@pnpm/modules-yaml
Reads/writes `node_modules/.modules.yaml`
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