@yarnpkg/plugin-essentials 4.0.0-rc.5 → 4.0.0-rc.50
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/commands/add.d.ts +1 -1
- package/lib/commands/add.js +34 -25
- package/lib/commands/bin.d.ts +1 -1
- package/lib/commands/bin.js +1 -1
- package/lib/commands/cache/clean.d.ts +1 -1
- package/lib/commands/cache/clean.js +1 -1
- package/lib/commands/config/get.d.ts +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/set.d.ts +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/unset.d.ts +1 -1
- package/lib/commands/config/unset.js +1 -1
- package/lib/commands/config.d.ts +1 -1
- package/lib/commands/config.js +1 -1
- package/lib/commands/dedupe.d.ts +1 -1
- package/lib/commands/dedupe.js +7 -8
- package/lib/commands/entries/clipanion.js +1 -1
- package/lib/commands/entries/help.js +1 -1
- package/lib/commands/entries/version.js +1 -1
- package/lib/commands/exec.js +1 -1
- package/lib/commands/explain/peerRequirements.d.ts +2 -2
- package/lib/commands/explain/peerRequirements.js +4 -6
- package/lib/commands/explain.js +1 -1
- package/lib/commands/info.js +8 -12
- package/lib/commands/install.d.ts +1 -1
- package/lib/commands/install.js +188 -107
- package/lib/commands/link.d.ts +2 -2
- package/lib/commands/link.js +36 -32
- package/lib/commands/node.js +1 -1
- package/lib/commands/plugin/check.d.ts +8 -0
- package/lib/commands/plugin/check.js +61 -0
- package/lib/commands/plugin/import/sources.d.ts +3 -3
- package/lib/commands/plugin/import/sources.js +5 -5
- package/lib/commands/plugin/import.d.ts +5 -4
- package/lib/commands/plugin/import.js +15 -28
- package/lib/commands/plugin/list.d.ts +2 -2
- package/lib/commands/plugin/list.js +5 -6
- package/lib/commands/plugin/remove.d.ts +1 -1
- package/lib/commands/plugin/remove.js +14 -13
- package/lib/commands/plugin/runtime.d.ts +2 -2
- package/lib/commands/plugin/runtime.js +4 -4
- package/lib/commands/rebuild.d.ts +2 -2
- package/lib/commands/rebuild.js +10 -10
- package/lib/commands/remove.d.ts +1 -1
- package/lib/commands/remove.js +7 -8
- package/lib/commands/run.js +1 -1
- package/lib/commands/runIndex.d.ts +2 -2
- package/lib/commands/runIndex.js +3 -3
- package/lib/commands/set/resolution.d.ts +1 -1
- package/lib/commands/set/resolution.js +4 -6
- package/lib/commands/set/version/sources.d.ts +3 -2
- package/lib/commands/set/version/sources.js +21 -12
- package/lib/commands/set/version.d.ts +2 -3
- package/lib/commands/set/version.js +20 -16
- package/lib/commands/unlink.d.ts +1 -1
- package/lib/commands/unlink.js +7 -8
- package/lib/commands/up.d.ts +3 -3
- package/lib/commands/up.js +19 -17
- package/lib/commands/why.js +5 -13
- package/lib/commands/workspace.js +2 -5
- package/lib/commands/workspaces/list.d.ts +2 -1
- package/lib/commands/workspaces/list.js +8 -1
- package/lib/dedupeUtils.d.ts +3 -3
- package/lib/dedupeUtils.js +3 -5
- package/lib/index.d.ts +76 -1
- package/lib/index.js +40 -1
- package/lib/suggestUtils.d.ts +4 -4
- package/lib/suggestUtils.js +10 -10
- package/package.json +23 -17
package/lib/suggestUtils.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Cache, DescriptorHash, Descriptor, Ident, Locator, Project, Workspace } from '@yarnpkg/core';
|
|
2
2
|
import { PortablePath } from '@yarnpkg/fslib';
|
|
3
|
-
export
|
|
3
|
+
export type Suggestion = {
|
|
4
4
|
descriptor: Descriptor;
|
|
5
5
|
name: string;
|
|
6
6
|
reason: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type NullableSuggestion = {
|
|
9
9
|
descriptor: Descriptor | null;
|
|
10
10
|
name: string;
|
|
11
11
|
reason: string;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type Results = {
|
|
14
14
|
suggestions: Array<NullableSuggestion>;
|
|
15
15
|
rejections: Array<Error>;
|
|
16
16
|
};
|
|
@@ -88,7 +88,7 @@ export declare function getSuggestedDescriptors(request: Descriptor, { project,
|
|
|
88
88
|
strategies: Array<Strategy>;
|
|
89
89
|
maxResults?: number;
|
|
90
90
|
}): Promise<Results>;
|
|
91
|
-
export
|
|
91
|
+
export type FetchDescriptorFromOptions = {
|
|
92
92
|
project: Project;
|
|
93
93
|
cache: Cache;
|
|
94
94
|
workspace: Workspace;
|
package/lib/suggestUtils.js
CHANGED
|
@@ -12,19 +12,19 @@ var Target;
|
|
|
12
12
|
Target["REGULAR"] = "dependencies";
|
|
13
13
|
Target["DEVELOPMENT"] = "devDependencies";
|
|
14
14
|
Target["PEER"] = "peerDependencies";
|
|
15
|
-
})(Target
|
|
15
|
+
})(Target || (exports.Target = Target = {}));
|
|
16
16
|
var Modifier;
|
|
17
17
|
(function (Modifier) {
|
|
18
18
|
Modifier["CARET"] = "^";
|
|
19
19
|
Modifier["TILDE"] = "~";
|
|
20
20
|
Modifier["EXACT"] = "";
|
|
21
|
-
})(Modifier
|
|
21
|
+
})(Modifier || (exports.Modifier = Modifier = {}));
|
|
22
22
|
var WorkspaceModifier;
|
|
23
23
|
(function (WorkspaceModifier) {
|
|
24
24
|
WorkspaceModifier["CARET"] = "^";
|
|
25
25
|
WorkspaceModifier["TILDE"] = "~";
|
|
26
26
|
WorkspaceModifier["EXACT"] = "*";
|
|
27
|
-
})(WorkspaceModifier
|
|
27
|
+
})(WorkspaceModifier || (exports.WorkspaceModifier = WorkspaceModifier = {}));
|
|
28
28
|
var Strategy;
|
|
29
29
|
(function (Strategy) {
|
|
30
30
|
/**
|
|
@@ -52,7 +52,7 @@ var Strategy;
|
|
|
52
52
|
* versions of the package that are already within our cache.
|
|
53
53
|
*/
|
|
54
54
|
Strategy["CACHE"] = "cache";
|
|
55
|
-
})(Strategy
|
|
55
|
+
})(Strategy || (exports.Strategy = Strategy = {}));
|
|
56
56
|
function getModifier(flags, project) {
|
|
57
57
|
if (flags.exact)
|
|
58
58
|
return Modifier.EXACT;
|
|
@@ -109,7 +109,7 @@ async function findProjectDescriptors(ident, { project, target }) {
|
|
|
109
109
|
if (target === Target.PEER) {
|
|
110
110
|
const peerDescriptor = workspace.manifest.peerDependencies.get(ident.identHash);
|
|
111
111
|
if (peerDescriptor !== undefined) {
|
|
112
|
-
getDescriptorEntry(peerDescriptor).locators.push(workspace.
|
|
112
|
+
getDescriptorEntry(peerDescriptor).locators.push(workspace.anchoredLocator);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
else {
|
|
@@ -117,18 +117,18 @@ async function findProjectDescriptors(ident, { project, target }) {
|
|
|
117
117
|
const developmentDescriptor = workspace.manifest.devDependencies.get(ident.identHash);
|
|
118
118
|
if (target === Target.DEVELOPMENT) {
|
|
119
119
|
if (developmentDescriptor !== undefined) {
|
|
120
|
-
getDescriptorEntry(developmentDescriptor).locators.push(workspace.
|
|
120
|
+
getDescriptorEntry(developmentDescriptor).locators.push(workspace.anchoredLocator);
|
|
121
121
|
}
|
|
122
122
|
else if (regularDescriptor !== undefined) {
|
|
123
|
-
getDescriptorEntry(regularDescriptor).locators.push(workspace.
|
|
123
|
+
getDescriptorEntry(regularDescriptor).locators.push(workspace.anchoredLocator);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
else {
|
|
127
127
|
if (regularDescriptor !== undefined) {
|
|
128
|
-
getDescriptorEntry(regularDescriptor).locators.push(workspace.
|
|
128
|
+
getDescriptorEntry(regularDescriptor).locators.push(workspace.anchoredLocator);
|
|
129
129
|
}
|
|
130
130
|
else if (developmentDescriptor !== undefined) {
|
|
131
|
-
getDescriptorEntry(developmentDescriptor).locators.push(workspace.
|
|
131
|
+
getDescriptorEntry(developmentDescriptor).locators.push(workspace.anchoredLocator);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -310,7 +310,7 @@ async function fetchDescriptorFrom(ident, range, { project, cache, workspace, pr
|
|
|
310
310
|
const report = new core_1.ThrowReport();
|
|
311
311
|
const fetcher = project.configuration.makeFetcher();
|
|
312
312
|
const resolver = project.configuration.makeResolver();
|
|
313
|
-
const fetchOptions = { project, fetcher, cache, checksums: project.storedChecksums, report, cacheOptions: { skipIntegrityCheck: true }
|
|
313
|
+
const fetchOptions = { project, fetcher, cache, checksums: project.storedChecksums, report, cacheOptions: { skipIntegrityCheck: true } };
|
|
314
314
|
const resolveOptions = { ...fetchOptions, resolver, fetchOptions };
|
|
315
315
|
// The descriptor has to be bound for the resolvers that need a parent locator. (e.g. FileResolver)
|
|
316
316
|
// If we didn't bind it, `yarn add ./folder` wouldn't work.
|
package/package.json
CHANGED
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yarnpkg/plugin-essentials",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.50",
|
|
4
|
+
"stableVersion": "3.3.0",
|
|
4
5
|
"license": "BSD-2-Clause",
|
|
5
6
|
"main": "./lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./lib/index.js",
|
|
9
|
+
"./package.json": "./package.json"
|
|
10
|
+
},
|
|
6
11
|
"dependencies": {
|
|
7
|
-
"@yarnpkg/fslib": "^3.0.0-rc.
|
|
8
|
-
"@yarnpkg/parsers": "^3.0.0-rc.
|
|
12
|
+
"@yarnpkg/fslib": "^3.0.0-rc.50",
|
|
13
|
+
"@yarnpkg/parsers": "^3.0.0-rc.50",
|
|
9
14
|
"ci-info": "^3.2.0",
|
|
10
|
-
"clipanion": "^
|
|
15
|
+
"clipanion": "^4.0.0-rc.2",
|
|
11
16
|
"enquirer": "^2.3.6",
|
|
12
17
|
"lodash": "^4.17.15",
|
|
13
18
|
"micromatch": "^4.0.2",
|
|
14
19
|
"semver": "^7.1.2",
|
|
15
|
-
"tslib": "^
|
|
16
|
-
"typanion": "^3.
|
|
20
|
+
"tslib": "^2.4.0",
|
|
21
|
+
"typanion": "^3.14.0"
|
|
17
22
|
},
|
|
18
23
|
"peerDependencies": {
|
|
19
|
-
"@yarnpkg/cli": "^4.0.0-rc.
|
|
20
|
-
"@yarnpkg/core": "^4.0.0-rc.
|
|
21
|
-
"@yarnpkg/plugin-git": "^3.0.0-rc.
|
|
24
|
+
"@yarnpkg/cli": "^4.0.0-rc.50",
|
|
25
|
+
"@yarnpkg/core": "^4.0.0-rc.50",
|
|
26
|
+
"@yarnpkg/plugin-git": "^3.0.0-rc.50"
|
|
22
27
|
},
|
|
23
28
|
"devDependencies": {
|
|
24
29
|
"@types/lodash": "^4.14.136",
|
|
25
30
|
"@types/micromatch": "^4.0.1",
|
|
26
31
|
"@types/semver": "^7.1.0",
|
|
27
|
-
"@yarnpkg/cli": "^4.0.0-rc.
|
|
28
|
-
"@yarnpkg/core": "^4.0.0-rc.
|
|
29
|
-
"@yarnpkg/plugin-git": "^3.0.0-rc.
|
|
32
|
+
"@yarnpkg/cli": "^4.0.0-rc.50",
|
|
33
|
+
"@yarnpkg/core": "^4.0.0-rc.50",
|
|
34
|
+
"@yarnpkg/plugin-git": "^3.0.0-rc.50"
|
|
30
35
|
},
|
|
31
36
|
"repository": {
|
|
32
37
|
"type": "git",
|
|
@@ -39,14 +44,15 @@
|
|
|
39
44
|
},
|
|
40
45
|
"publishConfig": {
|
|
41
46
|
"main": "./lib/index.js",
|
|
42
|
-
"
|
|
47
|
+
"exports": {
|
|
48
|
+
".": "./lib/index.js",
|
|
49
|
+
"./package.json": "./package.json"
|
|
50
|
+
}
|
|
43
51
|
},
|
|
44
52
|
"files": [
|
|
45
53
|
"/lib/**/*"
|
|
46
54
|
],
|
|
47
55
|
"engines": {
|
|
48
|
-
"node": ">=
|
|
49
|
-
}
|
|
50
|
-
"stableVersion": "3.2.0",
|
|
51
|
-
"typings": "./lib/index.d.ts"
|
|
56
|
+
"node": ">=18.12.0"
|
|
57
|
+
}
|
|
52
58
|
}
|