import type { Lockfile, PackageSnapshot, ProjectSnapshot } from '.'; import type { DependenciesMeta } from '@pnpm/types'; export type LockfileFile = Omit & Partial & Partial>; export type LockfileFileV9 = Omit & Partial & Partial> & { packages?: Record>; snapshots?: Record>; }; /** * Similar to the current Lockfile importers format (lockfile version 5.4 at * time of writing), but specifiers are moved to each ResolvedDependencies block * instead of being declared on its own dictionary. * * This is an experiment to reduce one flavor of merge conflicts in lockfiles. * For more info: https://github.com/pnpm/pnpm/issues/4725. */ export interface InlineSpecifiersLockfile extends Omit { lockfileVersion: string; importers?: Record; } /** * Similar to the current ProjectSnapshot interface, but omits the "specifiers" * field in favor of inlining each specifier next to its version resolution in * dependency blocks. */ export type InlineSpecifiersProjectSnapshot = Omit & { dependencies?: InlineSpecifiersResolvedDependencies; devDependencies?: InlineSpecifiersResolvedDependencies; optionalDependencies?: InlineSpecifiersResolvedDependencies; dependenciesMeta?: DependenciesMeta; }; export interface InlineSpecifiersResolvedDependencies { [depName: string]: SpecifierAndResolution; } export interface SpecifierAndResolution { specifier: string; version: string; }