mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-27 18:46:18 -04:00
Reorganize the monorepo's top-level domain directories for clarity: - pkg-manager/ split into: - installing/ (core, headless, client, resolve-dependencies, etc.) - installing/linking/ (hoist, direct-dep-linker, modules-cleaner, etc.) - bins/ (link-bins, package-bins, remove-bins) - completion/ merged into cli/ - dedupe/ moved to installing/dedupe/ - env/ renamed to engine/ with subdomains: - engine/runtime/ (node.fetcher, node.resolver, plugin-commands-env, etc.) - engine/pm/ (plugin-commands-setup, plugin-commands-self-updater) - env.path moved to shell/ - tools/ and runtime/ dissolved - reviewing/ and lockfile audit packages moved to deps/: - deps/inspection/ (list, outdated, dependencies-hierarchy) - deps/compliance/ (audit, licenses, sbom) - registry/ moved to resolving/registry/ - semver/peer-range moved to deps/ - network/fetching-types moved to fetching/ - packages/ slimmed down, moving packages to proper domains: - calc-dep-state, dependency-path -> deps/ - parse-wanted-dependency -> resolving/ - git-utils -> network/ - naming-cases -> text/ - make-dedicated-lockfile -> lockfile/ - render-peer-issues -> installing/ - plugin-commands-doctor -> cli/ - plugin-commands-init -> workspace/ Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import path from 'node:path'
|
|
|
|
import { readWantedLockfile } from '@pnpm/lockfile.fs'
|
|
import { fixtures } from '@pnpm/test-fixtures'
|
|
import { safeExeca as execa } from 'execa'
|
|
|
|
import { makeDedicatedLockfile } from '../lib/index.js'
|
|
|
|
const f = fixtures(import.meta.dirname)
|
|
const pnpmBin = path.join(import.meta.dirname, '../../../pnpm/bin/pnpm.mjs')
|
|
|
|
test('makeDedicatedLockfile()', async () => {
|
|
const tmp = f.prepare('fixture')
|
|
await execa('node', [
|
|
pnpmBin,
|
|
'--config.store-dir=store',
|
|
'--config.cache-dir=cache',
|
|
'install',
|
|
'--no-frozen-lockfile',
|
|
'--no-prefer-frozen-lockfile',
|
|
'--force',
|
|
], { cwd: tmp })
|
|
const projectDir = path.join(tmp, 'packages/is-negative')
|
|
await makeDedicatedLockfile(tmp, projectDir)
|
|
|
|
const lockfile = await readWantedLockfile(projectDir, { ignoreIncompatible: false })
|
|
// The next assertion started failing from pnpm v10.6.3
|
|
// expect(Object.keys(lockfile?.importers ?? {})).toStrictEqual(['.', 'example'])
|
|
expect(Object.keys(lockfile?.packages ?? {}).sort()).toStrictEqual([
|
|
'is-positive@1.0.0',
|
|
'lodash@1.0.0',
|
|
'ramda@0.26.0',
|
|
'request@2.0.0',
|
|
])
|
|
})
|