mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-27 11:31:45 -04:00
Instead of a separate pnpm-lock.env.yaml file, the env lockfile (configDependencies and packageManagerDependencies) is now stored as the first YAML document in pnpm-lock.yaml, separated by `---`. The combined file starts with `---\n` when an env document is present, allowing pnpm to check just the first 4 bytes to know whether the file contains an env document. Reading uses streaming I/O that stops as soon as the document separator is found, avoiding parsing of the full lockfile. Writing preserves both documents: when the env lockfile is updated the main lockfile portion is kept, and vice versa.
@pnpm/assert-project
Utils for testing projects that use pnpm
Installation
pnpm install -D @pnpm/assert-project
Usage
import test = require('tape')
import { assertProject } from '@pnpm/assert-project'
test('...', async t => {
// ...
const project = assertProject(t, pathToProject)
project.has('foo')
// Test fails if project has no foo in node_modules
})
License
MIT