@pnpm/lockfile.types 1000.0.0 → 1001.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +44 -51
- package/lib/lockfileFileTypes.d.ts +11 -25
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -6,41 +6,63 @@ export interface LockfileSettings {
|
|
|
6
6
|
autoInstallPeers?: boolean;
|
|
7
7
|
excludeLinksFromLockfile?: boolean;
|
|
8
8
|
peersSuffixMaxLength?: number;
|
|
9
|
+
injectWorkspacePackages?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export interface
|
|
11
|
-
importers: Record<ProjectId, ProjectSnapshot>;
|
|
12
|
-
lockfileVersion: string;
|
|
13
|
-
time?: Record<string, string>;
|
|
11
|
+
export interface LockfileBase {
|
|
14
12
|
catalogs?: CatalogSnapshots;
|
|
15
|
-
packages?: PackageSnapshots;
|
|
16
|
-
overrides?: Record<string, string>;
|
|
17
|
-
packageExtensionsChecksum?: string;
|
|
18
13
|
ignoredOptionalDependencies?: string[];
|
|
19
|
-
patchedDependencies?: Record<string, PatchFile>;
|
|
20
|
-
pnpmfileChecksum?: string;
|
|
21
|
-
settings?: LockfileSettings;
|
|
22
|
-
}
|
|
23
|
-
export interface LockfileV9 {
|
|
24
|
-
importers: Record<string, ProjectSnapshot>;
|
|
25
14
|
lockfileVersion: string;
|
|
26
|
-
time?: Record<string, string>;
|
|
27
|
-
snapshots?: Record<string, PackageSnapshotV7>;
|
|
28
|
-
packages?: Record<string, PackageInfo>;
|
|
29
|
-
neverBuiltDependencies?: string[];
|
|
30
|
-
onlyBuiltDependencies?: string[];
|
|
31
15
|
overrides?: Record<string, string>;
|
|
32
16
|
packageExtensionsChecksum?: string;
|
|
33
17
|
patchedDependencies?: Record<string, PatchFile>;
|
|
18
|
+
pnpmfileChecksum?: string;
|
|
34
19
|
settings?: LockfileSettings;
|
|
20
|
+
time?: Record<string, string>;
|
|
35
21
|
}
|
|
36
|
-
export interface
|
|
37
|
-
|
|
22
|
+
export interface LockfileObject extends LockfileBase {
|
|
23
|
+
importers: Record<ProjectId, ProjectSnapshot>;
|
|
24
|
+
packages?: PackageSnapshots;
|
|
25
|
+
}
|
|
26
|
+
export interface LockfilePackageSnapshot {
|
|
27
|
+
optional?: true;
|
|
38
28
|
dependencies?: ResolvedDependencies;
|
|
39
29
|
optionalDependencies?: ResolvedDependencies;
|
|
40
|
-
|
|
30
|
+
transitivePeerDependencies?: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface LockfilePackageInfo {
|
|
33
|
+
id?: string;
|
|
34
|
+
patched?: true;
|
|
35
|
+
hasBin?: true;
|
|
36
|
+
name?: string;
|
|
37
|
+
version?: string;
|
|
38
|
+
resolution: LockfileResolution;
|
|
39
|
+
peerDependencies?: {
|
|
40
|
+
[name: string]: string;
|
|
41
|
+
};
|
|
42
|
+
peerDependenciesMeta?: {
|
|
43
|
+
[name: string]: {
|
|
44
|
+
optional: true;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
bundledDependencies?: string[] | boolean;
|
|
48
|
+
engines?: Record<string, string> & {
|
|
49
|
+
node: string;
|
|
50
|
+
};
|
|
51
|
+
os?: string[];
|
|
52
|
+
cpu?: string[];
|
|
53
|
+
libc?: string[];
|
|
54
|
+
deprecated?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface ProjectSnapshotBase {
|
|
41
57
|
dependenciesMeta?: DependenciesMeta;
|
|
42
58
|
publishDirectory?: string;
|
|
43
59
|
}
|
|
60
|
+
export interface ProjectSnapshot extends ProjectSnapshotBase {
|
|
61
|
+
specifiers: ResolvedDependencies;
|
|
62
|
+
dependencies?: ResolvedDependencies;
|
|
63
|
+
optionalDependencies?: ResolvedDependencies;
|
|
64
|
+
devDependencies?: ResolvedDependencies;
|
|
65
|
+
}
|
|
44
66
|
export type ResolvedDependenciesOfImporters = Record<string, {
|
|
45
67
|
version: string;
|
|
46
68
|
specifier: string;
|
|
@@ -77,36 +99,7 @@ export type Resolution = TarballResolution | GitRepositoryResolution | Directory
|
|
|
77
99
|
export type LockfileResolution = Resolution | {
|
|
78
100
|
integrity: string;
|
|
79
101
|
};
|
|
80
|
-
export type
|
|
81
|
-
export type PackageInfo = Pick<PackageSnapshot, 'id' | 'patched' | 'hasBin' | 'name' | 'version' | 'resolution' | 'peerDependencies' | 'peerDependenciesMeta' | 'bundledDependencies' | 'engines' | 'cpu' | 'os' | 'libc' | 'deprecated'>;
|
|
82
|
-
export interface PackageSnapshot {
|
|
83
|
-
id?: string;
|
|
84
|
-
optional?: true;
|
|
85
|
-
patched?: true;
|
|
86
|
-
hasBin?: true;
|
|
87
|
-
name?: string;
|
|
88
|
-
version?: string;
|
|
89
|
-
resolution: LockfileResolution;
|
|
90
|
-
dependencies?: ResolvedDependencies;
|
|
91
|
-
optionalDependencies?: ResolvedDependencies;
|
|
92
|
-
peerDependencies?: {
|
|
93
|
-
[name: string]: string;
|
|
94
|
-
};
|
|
95
|
-
peerDependenciesMeta?: {
|
|
96
|
-
[name: string]: {
|
|
97
|
-
optional: true;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
transitivePeerDependencies?: string[];
|
|
101
|
-
bundledDependencies?: string[] | boolean;
|
|
102
|
-
engines?: Record<string, string> & {
|
|
103
|
-
node: string;
|
|
104
|
-
};
|
|
105
|
-
os?: string[];
|
|
106
|
-
cpu?: string[];
|
|
107
|
-
libc?: string[];
|
|
108
|
-
deprecated?: string;
|
|
109
|
-
}
|
|
102
|
+
export type PackageSnapshot = LockfilePackageInfo & LockfilePackageSnapshot;
|
|
110
103
|
export interface Dependencies {
|
|
111
104
|
[name: string]: string;
|
|
112
105
|
}
|
|
@@ -1,34 +1,20 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
snapshots?: Record<string, Pick<PackageSnapshot, 'dependencies' | 'optionalDependencies' | 'patched' | 'optional' | 'transitivePeerDependencies' | 'id'>>;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Similar to the current Lockfile importers format (lockfile version 5.4 at
|
|
10
|
-
* time of writing), but specifiers are moved to each ResolvedDependencies block
|
|
11
|
-
* instead of being declared on its own dictionary.
|
|
12
|
-
*
|
|
13
|
-
* This is an experiment to reduce one flavor of merge conflicts in lockfiles.
|
|
14
|
-
* For more info: https://github.com/pnpm/pnpm/issues/4725.
|
|
15
|
-
*/
|
|
16
|
-
export interface InlineSpecifiersLockfile extends Omit<Lockfile, 'lockfileVersion' | 'importers'> {
|
|
17
|
-
lockfileVersion: string;
|
|
18
|
-
importers?: Record<string, InlineSpecifiersProjectSnapshot>;
|
|
1
|
+
import { type LockfileBase, type LockfilePackageInfo, type LockfilePackageSnapshot, type ProjectSnapshotBase } from '.';
|
|
2
|
+
export interface LockfileFile extends LockfileBase {
|
|
3
|
+
importers?: Record<string, LockfileFileProjectSnapshot>;
|
|
4
|
+
packages?: Record<string, LockfilePackageInfo>;
|
|
5
|
+
snapshots?: Record<string, LockfilePackageSnapshot>;
|
|
19
6
|
}
|
|
20
7
|
/**
|
|
21
8
|
* Similar to the current ProjectSnapshot interface, but omits the "specifiers"
|
|
22
9
|
* field in favor of inlining each specifier next to its version resolution in
|
|
23
10
|
* dependency blocks.
|
|
24
11
|
*/
|
|
25
|
-
export
|
|
26
|
-
dependencies?:
|
|
27
|
-
devDependencies?:
|
|
28
|
-
optionalDependencies?:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export interface InlineSpecifiersResolvedDependencies {
|
|
12
|
+
export interface LockfileFileProjectSnapshot extends ProjectSnapshotBase {
|
|
13
|
+
dependencies?: LockfileFileProjectResolvedDependencies;
|
|
14
|
+
devDependencies?: LockfileFileProjectResolvedDependencies;
|
|
15
|
+
optionalDependencies?: LockfileFileProjectResolvedDependencies;
|
|
16
|
+
}
|
|
17
|
+
export interface LockfileFileProjectResolvedDependencies {
|
|
32
18
|
[depName: string]: SpecifierAndResolution;
|
|
33
19
|
}
|
|
34
20
|
export interface SpecifierAndResolution {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/lockfile.types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1001.0.1",
|
|
4
4
|
"description": "Types for the pnpm-lock.yaml lockfile",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"homepage": "https://github.com/pnpm/pnpm/blob/main/lockfile/types#readme",
|
|
26
26
|
"funding": "https://opencollective.com/pnpm",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@pnpm/types": "1000.
|
|
28
|
+
"@pnpm/types": "1000.1.0",
|
|
29
29
|
"@pnpm/patching.types": "1000.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@pnpm/lockfile.types": "
|
|
32
|
+
"@pnpm/lockfile.types": "1001.0.1"
|
|
33
33
|
},
|
|
34
34
|
"exports": {
|
|
35
35
|
".": "./lib/index.js"
|