UNPKG

2.62 kBTypeScriptView Raw
1import { DepGraph } from '@snyk/dep-graph';
2export declare type PackageJsonBase = {
3 name: string;
4 version: string;
5 dependencies?: Record<string, string>;
6 devDependencies?: Record<string, string>;
7 optionalDependencies?: Record<string, string>;
8 peerDependencies?: Record<string, string>;
9 resolutions?: Record<string, string>;
10 overrides?: Overrides;
11 pnpm?: {
12 overrides?: Overrides;
13 };
14};
15export declare type Overrides = string | {
16 [key: string]: Overrides;
17};
18export declare type PkgIdentifier = string;
19export declare type NormalisedPkgs = Record<PkgIdentifier, {
20 version: string;
21 dependencies: Record<string, string>;
22 optionalDependencies: Record<string, string>;
23}>;
24export declare type DepGraphBuildOptions = {
25 includeDevDeps: boolean;
26 includeOptionalDeps: boolean;
27 strictOutOfSync: boolean;
28 includePeerDeps?: boolean;
29};
30export declare type LockFileParseOptions = {
31 includeOptionalDeps: boolean;
32};
33export declare type ProjectParseOptions = DepGraphBuildOptions & LockFileParseOptions & {
34 pruneCycles: boolean;
35};
36export declare type YarnLockV2WorkspaceArgs = {
37 isWorkspacePkg: boolean;
38 isRoot: boolean;
39 rootResolutions: Record<string, string>;
40};
41export declare type YarnLockV2ProjectParseOptions = {
42 includeDevDeps: boolean;
43 includeOptionalDeps: boolean;
44 strictOutOfSync: boolean;
45 pruneWithinTopLevelDeps: boolean;
46};
47export declare type PruneLevel = 'cycles' | 'withinTopLevelDeps' | 'none';
48export declare type YarnLockV1ProjectParseOptions = {
49 includeDevDeps: boolean;
50 includeOptionalDeps: boolean;
51 includePeerDeps: boolean;
52 strictOutOfSync: boolean;
53 pruneLevel: PruneLevel;
54};
55export declare type Yarn1DepGraphBuildOptions = {
56 includeDevDeps: boolean;
57 includeOptionalDeps: boolean;
58 includePeerDeps: boolean;
59 strictOutOfSync: boolean;
60 pruneWithinTopLevelDeps: boolean;
61};
62export declare type PnpmWorkspaceArgs = {
63 isWorkspace: boolean;
64 projectsVersionMap: Record<string, PnpmProject>;
65};
66export declare type PnpmProject = {
67 name: string;
68 version: string;
69};
70export declare type PnpmProjectParseOptions = {
71 includeDevDeps: boolean;
72 includePeerDeps?: boolean;
73 includeOptionalDeps: boolean;
74 strictOutOfSync: boolean;
75 pruneWithinTopLevelDeps: boolean;
76};
77declare type NodePkgManagers = 'npm' | 'yarn' | 'pnpm';
78export declare type ScannedNodeProject = {
79 packageManager: NodePkgManagers;
80 targetFile: string;
81 depGraph: DepGraph;
82 plugin: {
83 name: string;
84 runtime: string;
85 };
86};
87export {};