@pnpm/lockfile.types
Advanced tools
Comparing version 1000.0.0 to 1001.0.0
@@ -9,37 +9,59 @@ import { type PatchFile } from '@pnpm/patching.types'; | ||
peersSuffixMaxLength?: number; | ||
injectWorkspacePackages?: boolean; | ||
} | ||
export interface Lockfile { | ||
importers: Record<ProjectId, ProjectSnapshot>; | ||
export interface LockfileBase { | ||
catalogs?: CatalogSnapshots; | ||
ignoredOptionalDependencies?: string[]; | ||
lockfileVersion: string; | ||
time?: Record<string, string>; | ||
catalogs?: CatalogSnapshots; | ||
packages?: PackageSnapshots; | ||
overrides?: Record<string, string>; | ||
packageExtensionsChecksum?: string; | ||
ignoredOptionalDependencies?: string[]; | ||
patchedDependencies?: Record<string, PatchFile>; | ||
pnpmfileChecksum?: string; | ||
settings?: LockfileSettings; | ||
} | ||
export interface LockfileV9 { | ||
importers: Record<string, ProjectSnapshot>; | ||
lockfileVersion: string; | ||
time?: Record<string, string>; | ||
snapshots?: Record<string, PackageSnapshotV7>; | ||
packages?: Record<string, PackageInfo>; | ||
neverBuiltDependencies?: string[]; | ||
onlyBuiltDependencies?: string[]; | ||
overrides?: Record<string, string>; | ||
packageExtensionsChecksum?: string; | ||
patchedDependencies?: Record<string, PatchFile>; | ||
settings?: LockfileSettings; | ||
} | ||
export interface ProjectSnapshot { | ||
specifiers: ResolvedDependencies; | ||
export interface LockfileObject extends LockfileBase { | ||
importers: Record<ProjectId, ProjectSnapshot>; | ||
packages?: PackageSnapshots; | ||
} | ||
export interface LockfilePackageSnapshot { | ||
optional?: true; | ||
dependencies?: ResolvedDependencies; | ||
optionalDependencies?: ResolvedDependencies; | ||
devDependencies?: ResolvedDependencies; | ||
transitivePeerDependencies?: string[]; | ||
} | ||
export interface LockfilePackageInfo { | ||
id?: string; | ||
patched?: true; | ||
hasBin?: true; | ||
name?: string; | ||
version?: string; | ||
resolution: LockfileResolution; | ||
peerDependencies?: { | ||
[name: string]: string; | ||
}; | ||
peerDependenciesMeta?: { | ||
[name: string]: { | ||
optional: true; | ||
}; | ||
}; | ||
bundledDependencies?: string[] | boolean; | ||
engines?: Record<string, string> & { | ||
node: string; | ||
}; | ||
os?: string[]; | ||
cpu?: string[]; | ||
libc?: string[]; | ||
deprecated?: string; | ||
} | ||
export interface ProjectSnapshotBase { | ||
dependenciesMeta?: DependenciesMeta; | ||
publishDirectory?: string; | ||
} | ||
export interface ProjectSnapshot extends ProjectSnapshotBase { | ||
specifiers: ResolvedDependencies; | ||
dependencies?: ResolvedDependencies; | ||
optionalDependencies?: ResolvedDependencies; | ||
devDependencies?: ResolvedDependencies; | ||
} | ||
export type ResolvedDependenciesOfImporters = Record<string, { | ||
@@ -81,32 +103,3 @@ version: string; | ||
}; | ||
export type PackageSnapshotV7 = Pick<PackageSnapshot, 'optional' | 'dependencies' | 'optionalDependencies' | 'transitivePeerDependencies'>; | ||
export type PackageInfo = Pick<PackageSnapshot, 'id' | 'patched' | 'hasBin' | 'name' | 'version' | 'resolution' | 'peerDependencies' | 'peerDependenciesMeta' | 'bundledDependencies' | 'engines' | 'cpu' | 'os' | 'libc' | 'deprecated'>; | ||
export interface PackageSnapshot { | ||
id?: string; | ||
optional?: true; | ||
patched?: true; | ||
hasBin?: true; | ||
name?: string; | ||
version?: string; | ||
resolution: LockfileResolution; | ||
dependencies?: ResolvedDependencies; | ||
optionalDependencies?: ResolvedDependencies; | ||
peerDependencies?: { | ||
[name: string]: string; | ||
}; | ||
peerDependenciesMeta?: { | ||
[name: string]: { | ||
optional: true; | ||
}; | ||
}; | ||
transitivePeerDependencies?: string[]; | ||
bundledDependencies?: string[] | boolean; | ||
engines?: Record<string, string> & { | ||
node: string; | ||
}; | ||
os?: string[]; | ||
cpu?: string[]; | ||
libc?: string[]; | ||
deprecated?: string; | ||
} | ||
export type PackageSnapshot = LockfilePackageInfo & LockfilePackageSnapshot; | ||
export interface Dependencies { | ||
@@ -113,0 +106,0 @@ [name: string]: string; |
@@ -1,19 +0,6 @@ | ||
import type { Lockfile, PackageSnapshot, ProjectSnapshot } from '.'; | ||
import type { DependenciesMeta } from '@pnpm/types'; | ||
export type LockfileFile = Omit<InlineSpecifiersLockfile, 'importers'> & Partial<InlineSpecifiersProjectSnapshot> & Partial<Pick<InlineSpecifiersLockfile, 'importers'>>; | ||
export type LockfileFileV9 = Omit<InlineSpecifiersLockfile, 'importers' | 'packages'> & Partial<InlineSpecifiersProjectSnapshot> & Partial<Pick<InlineSpecifiersLockfile, 'importers'>> & { | ||
packages?: Record<string, Pick<PackageSnapshot, 'resolution' | 'engines' | 'cpu' | 'os' | 'hasBin' | 'name' | 'version' | 'bundledDependencies' | 'peerDependencies' | 'peerDependenciesMeta' | 'deprecated'>>; | ||
snapshots?: Record<string, Pick<PackageSnapshot, 'dependencies' | 'optionalDependencies' | 'patched' | 'optional' | 'transitivePeerDependencies' | 'id'>>; | ||
}; | ||
/** | ||
* 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<Lockfile, 'lockfileVersion' | 'importers'> { | ||
lockfileVersion: string; | ||
importers?: Record<string, InlineSpecifiersProjectSnapshot>; | ||
import { type LockfileBase, type LockfilePackageInfo, type LockfilePackageSnapshot, type ProjectSnapshotBase } from '.'; | ||
export interface LockfileFile extends LockfileBase { | ||
importers?: Record<string, LockfileFileProjectSnapshot>; | ||
packages?: Record<string, LockfilePackageInfo>; | ||
snapshots?: Record<string, LockfilePackageSnapshot>; | ||
} | ||
@@ -25,9 +12,8 @@ /** | ||
*/ | ||
export type InlineSpecifiersProjectSnapshot = Omit<ProjectSnapshot, 'dependencies' | 'devDependencies' | 'optionalDependencies' | 'dependenciesMeta' | 'specifiers'> & { | ||
dependencies?: InlineSpecifiersResolvedDependencies; | ||
devDependencies?: InlineSpecifiersResolvedDependencies; | ||
optionalDependencies?: InlineSpecifiersResolvedDependencies; | ||
dependenciesMeta?: DependenciesMeta; | ||
}; | ||
export interface InlineSpecifiersResolvedDependencies { | ||
export interface LockfileFileProjectSnapshot extends ProjectSnapshotBase { | ||
dependencies?: LockfileFileProjectResolvedDependencies; | ||
devDependencies?: LockfileFileProjectResolvedDependencies; | ||
optionalDependencies?: LockfileFileProjectResolvedDependencies; | ||
} | ||
export interface LockfileFileProjectResolvedDependencies { | ||
[depName: string]: SpecifierAndResolution; | ||
@@ -34,0 +20,0 @@ } |
{ | ||
"name": "@pnpm/lockfile.types", | ||
"version": "1000.0.0", | ||
"version": "1001.0.0", | ||
"description": "Types for the pnpm-lock.yaml lockfile", | ||
@@ -28,7 +28,7 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@pnpm/types": "1000.0.0", | ||
"@pnpm/patching.types": "1000.0.0" | ||
"@pnpm/patching.types": "1000.0.0", | ||
"@pnpm/types": "1000.0.0" | ||
}, | ||
"devDependencies": { | ||
"@pnpm/lockfile.types": "1000.0.0" | ||
"@pnpm/lockfile.types": "1001.0.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "exports": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8033
176