@yarnpkg/nm 4.0.0-rc.21 → 4.0.0-rc.23
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/buildNodeModulesTree.d.ts +6 -6
- package/lib/hoist.d.ts +5 -5
- package/package.json +4 -4
|
@@ -10,10 +10,10 @@ export declare enum NodeModulesHoistingLimits {
|
|
|
10
10
|
DEPENDENCIES = "dependencies",
|
|
11
11
|
NONE = "none"
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type NodeModulesBaseNode = {
|
|
14
14
|
dirList: Set<Filename>;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type NodeModulesPackageNode = {
|
|
17
17
|
locator: LocatorKey;
|
|
18
18
|
target: PortablePath;
|
|
19
19
|
linkType: LinkType;
|
|
@@ -30,8 +30,8 @@ export declare type NodeModulesPackageNode = {
|
|
|
30
30
|
* /home/user/project/node_modules/foo -> {target: '/home/user/project/.yarn/.cache/foo.zip/node_modules/foo', linkType: 'HARD'}
|
|
31
31
|
* /home/user/project/node_modules/bar -> {target: '/home/user/project/packages/bar', linkType: 'SOFT'}
|
|
32
32
|
*/
|
|
33
|
-
export
|
|
34
|
-
export
|
|
33
|
+
export type NodeModulesTree = Map<PortablePath, NodeModulesBaseNode | NodeModulesPackageNode>;
|
|
34
|
+
export type NodeModulesTreeErrors = Array<{
|
|
35
35
|
messageName: MessageName;
|
|
36
36
|
text: string;
|
|
37
37
|
}>;
|
|
@@ -43,7 +43,7 @@ export interface NodeModulesTreeOptions {
|
|
|
43
43
|
project?: Project;
|
|
44
44
|
}
|
|
45
45
|
/** Package locator key for usage inside maps */
|
|
46
|
-
|
|
46
|
+
type LocatorKey = string;
|
|
47
47
|
/**
|
|
48
48
|
* Returns path to archive, if package location is inside the archive.
|
|
49
49
|
*
|
|
@@ -65,7 +65,7 @@ export declare const buildNodeModulesTree: (pnp: PnpApi, options: NodeModulesTre
|
|
|
65
65
|
errors: NodeModulesTreeErrors;
|
|
66
66
|
preserveSymlinksRequired: boolean;
|
|
67
67
|
};
|
|
68
|
-
export
|
|
68
|
+
export type NodeModulesLocatorMap = Map<LocatorKey, {
|
|
69
69
|
target: PortablePath;
|
|
70
70
|
linkType: LinkType;
|
|
71
71
|
locations: Array<PortablePath>;
|
package/lib/hoist.d.ts
CHANGED
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
* the next node as current tree root and run the algorithm again
|
|
46
46
|
* until you run out of candidates for current tree root.
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
type PackageName = string;
|
|
49
49
|
export declare enum HoisterDependencyKind {
|
|
50
50
|
REGULAR = 0,
|
|
51
51
|
WORKSPACE = 1,
|
|
52
52
|
EXTERNAL_SOFT_LINK = 2
|
|
53
53
|
}
|
|
54
|
-
export
|
|
54
|
+
export type HoisterTree = {
|
|
55
55
|
name: PackageName;
|
|
56
56
|
identName: PackageName;
|
|
57
57
|
reference: string;
|
|
@@ -60,13 +60,13 @@ export declare type HoisterTree = {
|
|
|
60
60
|
hoistPriority?: number;
|
|
61
61
|
dependencyKind?: HoisterDependencyKind;
|
|
62
62
|
};
|
|
63
|
-
export
|
|
63
|
+
export type HoisterResult = {
|
|
64
64
|
name: PackageName;
|
|
65
65
|
identName: PackageName;
|
|
66
66
|
references: Set<string>;
|
|
67
67
|
dependencies: Set<HoisterResult>;
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
type Locator = string;
|
|
70
70
|
declare enum DebugLevel {
|
|
71
71
|
NONE = -1,
|
|
72
72
|
PERF = 0,
|
|
@@ -74,7 +74,7 @@ declare enum DebugLevel {
|
|
|
74
74
|
REASONS = 2,
|
|
75
75
|
INTENSIVE_CHECK = 9
|
|
76
76
|
}
|
|
77
|
-
export
|
|
77
|
+
export type HoistOptions = {
|
|
78
78
|
/** Runs self-checks after hoisting is finished */
|
|
79
79
|
check?: boolean;
|
|
80
80
|
/** Debug level */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yarnpkg/nm",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.23",
|
|
4
4
|
"license": "BSD-2-Clause",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@yarnpkg/core": "^4.0.0-rc.
|
|
13
|
-
"@yarnpkg/fslib": "^3.0.0-rc.
|
|
12
|
+
"@yarnpkg/core": "^4.0.0-rc.23",
|
|
13
|
+
"@yarnpkg/fslib": "^3.0.0-rc.23"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@yarnpkg/pnp": "^4.0.0-rc.
|
|
16
|
+
"@yarnpkg/pnp": "^4.0.0-rc.23"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"postpack": "rm -rf lib",
|