diff --git a/lockfile/lockfile-types/src/index.ts b/lockfile/lockfile-types/src/index.ts index f300f50f91c..43a1d465967 100644 --- a/lockfile/lockfile-types/src/index.ts +++ b/lockfile/lockfile-types/src/index.ts @@ -11,6 +11,7 @@ export interface Lockfile { importers: Record lockfileVersion: number | string time?: Record + catalogs?: CatalogSnapshots packages?: PackageSnapshots neverBuiltDependencies?: string[] onlyBuiltDependencies?: string[] @@ -33,6 +34,7 @@ export interface LockfileV6 { importers: Record lockfileVersion: number | string time?: Record + catalogs?: CatalogSnapshots packages?: PackageSnapshots neverBuiltDependencies?: string[] onlyBuiltDependencies?: string[] @@ -137,3 +139,13 @@ export type PackageBin = string | { [name: string]: string } * } */ export type ResolvedDependencies = Record + +export interface CatalogSnapshots { + default?: { [dependencyName: string]: ResolvedCatalogEntry } + [catalogName: string]: { [dependencyName: string]: ResolvedCatalogEntry } | undefined +} + +export interface ResolvedCatalogEntry { + readonly specifier: string + readonly version: string +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 38bd1a751ed..09e45ab7c1e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2144,6 +2144,9 @@ importers: lockfile/lockfile-types: dependencies: + '@pnpm/catalog-types': + specifier: workspace:* + version: link:../../catalogs/catalog-types '@pnpm/types': specifier: workspace:* version: link:../../packages/types