-
Notifications
You must be signed in to change notification settings - Fork 37
/
types.ts
53 lines (46 loc) · 1.25 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
export type Dependencies = { [key in string]: string };
export type LockDependency = {
version: string;
dependencies?: Dependencies;
};
export type ParsedLock = {
type: "success" | "merge" | "conflict";
object: {
[key in string]: LockDependency;
};
};
export interface PnpmLockFile {
packages: { [name: string]: any };
}
export interface NpmWorkspacesInfo {
version: string;
workspaces: { packages: string[] };
}
export interface NpmSymlinkInfo {
resolved: string; // Where the package is resolved from.
link: boolean; // A flag to indicate that this is a symbolic link.
integrity?: "sha512" | "sha1";
dev?: boolean;
optional?: boolean;
devOptional?: boolean;
dependencies?: { [key: string]: LockDependency };
}
export interface NpmLockFile {
name: string;
version: string;
lockfileVersion?: 1 | 2 | 3; // 1: v5, v6; 2: backwards compatible v7; 3: non-backwards compatible v7
requires?: boolean;
packages?: {
""?: NpmWorkspacesInfo; // Monorepo root
} & { [key: string]: NpmSymlinkInfo | LockDependency };
dependencies?: { [key: string]: LockDependency };
}
export interface BerryLockFile {
__metadata: any;
[key: string]: {
version: string;
dependencies: {
[dependency: string]: string;
};
};
}