@yarnpkg/plugin-essentials 3.2.2 → 3.3.0
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.js +25 -14
- package/lib/commands/dedupe.js +1 -1
- package/lib/commands/install.js +1 -1
- package/lib/commands/plugin/import/sources.d.ts +1 -1
- package/lib/commands/remove.js +1 -1
- package/lib/commands/set/version/sources.d.ts +1 -1
- package/lib/commands/set/version.d.ts +1 -1
- package/lib/commands/set/version.js +26 -22
- package/lib/commands/up.js +1 -1
- package/lib/commands/workspace.js +1 -4
- package/lib/commands/workspaces/list.d.ts +1 -0
- package/lib/commands/workspaces/list.js +7 -0
- package/lib/dedupeUtils.d.ts +2 -2
- package/lib/dedupeUtils.js +1 -1
- package/lib/suggestUtils.d.ts +3 -3
- package/lib/suggestUtils.js +5 -5
- package/package.json +8 -8
package/lib/commands/add.js
CHANGED
|
@@ -84,21 +84,24 @@ class AddCommand extends cli_1.BaseCommand {
|
|
|
84
84
|
throw new clipanion_1.UsageError(`It seems you are trying to add a package using a ${core_1.formatUtils.pretty(configuration, `${unsupportedPrefix[0]}...`, core_1.FormatType.RANGE)} url; we now require package names to be explicitly specified.\nTry running the command again with the package name prefixed: ${core_1.formatUtils.pretty(configuration, `yarn add`, core_1.FormatType.CODE)} ${core_1.formatUtils.pretty(configuration, core_3.structUtils.makeDescriptor(core_3.structUtils.makeIdent(null, `my-package`), `${unsupportedPrefix[0]}...`), core_1.FormatType.DESCRIPTOR)}`);
|
|
85
85
|
if (!request)
|
|
86
86
|
throw new clipanion_1.UsageError(`The ${core_1.formatUtils.pretty(configuration, pseudoDescriptor, core_1.FormatType.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);
|
|
87
|
-
const
|
|
87
|
+
const targetList = suggestTargetList(workspace, request, {
|
|
88
88
|
dev: this.dev,
|
|
89
89
|
peer: this.peer,
|
|
90
90
|
preferDev: this.preferDev,
|
|
91
91
|
optional: this.optional,
|
|
92
92
|
});
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
const results = await Promise.all(targetList.map(async (target) => {
|
|
94
|
+
const suggestedDescriptors = await suggestUtils.getSuggestedDescriptors(request, { project, workspace, cache, target, modifier, strategies, maxResults });
|
|
95
|
+
return { request, suggestedDescriptors, target };
|
|
96
|
+
}));
|
|
97
|
+
return results;
|
|
98
|
+
})).then(results => results.flat());
|
|
96
99
|
const checkReport = await core_1.LightReport.start({
|
|
97
100
|
configuration,
|
|
98
101
|
stdout: this.context.stdout,
|
|
99
102
|
suggestInstall: false,
|
|
100
103
|
}, async (report) => {
|
|
101
|
-
for (const
|
|
104
|
+
for (const { request, suggestedDescriptors: { suggestions, rejections } } of allSuggestions) {
|
|
102
105
|
const nonNullSuggestions = suggestions.filter(suggestion => {
|
|
103
106
|
return suggestion.descriptor !== null;
|
|
104
107
|
});
|
|
@@ -120,7 +123,7 @@ class AddCommand extends cli_1.BaseCommand {
|
|
|
120
123
|
let askedQuestions = false;
|
|
121
124
|
const afterWorkspaceDependencyAdditionList = [];
|
|
122
125
|
const afterWorkspaceDependencyReplacementList = [];
|
|
123
|
-
for (const
|
|
126
|
+
for (const { suggestedDescriptors: { suggestions }, target } of allSuggestions) {
|
|
124
127
|
let selected;
|
|
125
128
|
const nonNullSuggestions = suggestions.filter(suggestion => {
|
|
126
129
|
return suggestion.descriptor !== null;
|
|
@@ -231,7 +234,7 @@ AddCommand.usage = clipanion_1.Command.Usage({
|
|
|
231
234
|
|
|
232
235
|
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
|
|
233
236
|
|
|
234
|
-
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the
|
|
237
|
+
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
|
|
235
238
|
|
|
236
239
|
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
|
|
237
240
|
|
|
@@ -257,7 +260,7 @@ AddCommand.usage = clipanion_1.Command.Usage({
|
|
|
257
260
|
`$0 add lodash-es@lodash/lodash#es`,
|
|
258
261
|
]],
|
|
259
262
|
});
|
|
260
|
-
function
|
|
263
|
+
function suggestTargetList(workspace, ident, { dev, peer, preferDev, optional }) {
|
|
261
264
|
const hasRegular = workspace.manifest[suggestUtils.Target.REGULAR].has(ident.identHash);
|
|
262
265
|
const hasDev = workspace.manifest[suggestUtils.Target.DEVELOPMENT].has(ident.identHash);
|
|
263
266
|
const hasPeer = workspace.manifest[suggestUtils.Target.PEER].has(ident.identHash);
|
|
@@ -271,13 +274,21 @@ function suggestTarget(workspace, ident, { dev, peer, preferDev, optional }) {
|
|
|
271
274
|
throw new clipanion_1.UsageError(`Package "${core_3.structUtils.prettyIdent(workspace.project.configuration, ident)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);
|
|
272
275
|
if ((dev || preferDev) && optional)
|
|
273
276
|
throw new clipanion_1.UsageError(`Package "${core_3.structUtils.prettyIdent(workspace.project.configuration, ident)}" cannot simultaneously be a dev dependency and an optional dependency`);
|
|
277
|
+
// When the program executes this line, the command is expected to be legal
|
|
278
|
+
const targetList = [];
|
|
274
279
|
if (peer)
|
|
275
|
-
|
|
280
|
+
targetList.push(suggestUtils.Target.PEER);
|
|
276
281
|
if (dev || preferDev)
|
|
277
|
-
|
|
278
|
-
if (
|
|
279
|
-
|
|
282
|
+
targetList.push(suggestUtils.Target.DEVELOPMENT);
|
|
283
|
+
if (optional)
|
|
284
|
+
targetList.push(suggestUtils.Target.REGULAR);
|
|
285
|
+
// The user explicitly define the targets
|
|
286
|
+
if (targetList.length > 0)
|
|
287
|
+
return targetList;
|
|
288
|
+
// The user does not define the targets, find it from the `workspace.manifest`
|
|
280
289
|
if (hasDev)
|
|
281
|
-
return suggestUtils.Target.DEVELOPMENT;
|
|
282
|
-
|
|
290
|
+
return [suggestUtils.Target.DEVELOPMENT];
|
|
291
|
+
if (hasPeer)
|
|
292
|
+
return [suggestUtils.Target.PEER];
|
|
293
|
+
return [suggestUtils.Target.REGULAR];
|
|
283
294
|
}
|
package/lib/commands/dedupe.js
CHANGED
|
@@ -91,7 +91,7 @@ DedupeCommand.usage = clipanion_1.Command.Usage({
|
|
|
91
91
|
|
|
92
92
|
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
|
|
93
93
|
|
|
94
|
-
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the
|
|
94
|
+
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
|
|
95
95
|
|
|
96
96
|
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
|
|
97
97
|
|
package/lib/commands/install.js
CHANGED
|
@@ -276,7 +276,7 @@ YarnCommand.usage = clipanion_1.Command.Usage({
|
|
|
276
276
|
|
|
277
277
|
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
|
|
278
278
|
|
|
279
|
-
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the
|
|
279
|
+
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
|
|
280
280
|
|
|
281
281
|
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
|
|
282
282
|
`,
|
|
@@ -14,7 +14,7 @@ export default class PluginDlSourcesCommand extends BaseCommand {
|
|
|
14
14
|
name: string;
|
|
15
15
|
execute(): Promise<1 | 0>;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type BuildAndSavePluginsSpec = {
|
|
18
18
|
context: CommandContext;
|
|
19
19
|
noMinify: boolean;
|
|
20
20
|
};
|
package/lib/commands/remove.js
CHANGED
|
@@ -114,7 +114,7 @@ RemoveCommand.usage = clipanion_1.Command.Usage({
|
|
|
114
114
|
|
|
115
115
|
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
|
|
116
116
|
|
|
117
|
-
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the
|
|
117
|
+
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
|
|
118
118
|
|
|
119
119
|
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
|
|
120
120
|
|
|
@@ -19,7 +19,7 @@ export declare function runWorkflow(workflow: Array<Array<string>>, { configurat
|
|
|
19
19
|
context: CommandContext;
|
|
20
20
|
target: PortablePath;
|
|
21
21
|
}): Promise<void>;
|
|
22
|
-
export
|
|
22
|
+
export type PrepareSpec = {
|
|
23
23
|
branch: string;
|
|
24
24
|
context: CommandContext;
|
|
25
25
|
force: boolean;
|
|
@@ -18,9 +18,17 @@ class SetVersionCommand extends cli_1.BaseCommand {
|
|
|
18
18
|
this.version = clipanion_1.Option.String();
|
|
19
19
|
}
|
|
20
20
|
async execute() {
|
|
21
|
+
var _a;
|
|
21
22
|
const configuration = await core_1.Configuration.find(this.context.cwd, this.context.plugins);
|
|
22
|
-
if (configuration.get(`yarnPath`)
|
|
23
|
-
|
|
23
|
+
if (this.onlyIfNeeded && configuration.get(`yarnPath`)) {
|
|
24
|
+
const yarnPathSource = configuration.sources.get(`yarnPath`);
|
|
25
|
+
if (!yarnPathSource)
|
|
26
|
+
throw new Error(`Assertion failed: Expected 'yarnPath' to have a source`);
|
|
27
|
+
const projectCwd = (_a = configuration.projectCwd) !== null && _a !== void 0 ? _a : configuration.startingCwd;
|
|
28
|
+
if (fslib_1.ppath.contains(projectCwd, yarnPathSource)) {
|
|
29
|
+
return 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
24
32
|
const getBundlePath = () => {
|
|
25
33
|
if (typeof core_1.YarnVersion === `undefined`)
|
|
26
34
|
throw new clipanion_1.UsageError(`The --install flag can only be used without explicit version specifier from the Yarn CLI`);
|
|
@@ -34,7 +42,7 @@ class SetVersionCommand extends cli_1.BaseCommand {
|
|
|
34
42
|
else if (this.version === `canary`)
|
|
35
43
|
bundleUrl = `https://repo.yarnpkg.com/${await resolveTag(configuration, `canary`)}/packages/yarnpkg-cli/bin/yarn.js`;
|
|
36
44
|
else if (this.version === `classic`)
|
|
37
|
-
bundleUrl = `https://
|
|
45
|
+
bundleUrl = `https://classic.yarnpkg.com/latest.js`;
|
|
38
46
|
else if (this.version.match(/^https?:/))
|
|
39
47
|
bundleUrl = this.version;
|
|
40
48
|
else if (this.version.match(/^\.{0,2}[\\/]/) || fslib_1.npath.isAbsolute(this.version))
|
|
@@ -159,28 +167,24 @@ async function setVersion(configuration, bundleVersion, bundleBuffer, { report }
|
|
|
159
167
|
const absolutePath = fslib_1.ppath.resolve(releaseFolder, `yarn-${bundleVersion}.cjs`);
|
|
160
168
|
const displayPath = fslib_1.ppath.relative(configuration.startingCwd, absolutePath);
|
|
161
169
|
const projectPath = fslib_1.ppath.relative(projectCwd, absolutePath);
|
|
162
|
-
const yarnPath = configuration.get(`yarnPath`);
|
|
163
|
-
const updateConfig = yarnPath === null || yarnPath.startsWith(`${releaseFolder}/`);
|
|
164
170
|
report.reportInfo(core_1.MessageName.UNNAMED, `Saving the new release in ${core_2.formatUtils.pretty(configuration, displayPath, `magenta`)}`);
|
|
165
171
|
await fslib_1.xfs.removePromise(fslib_1.ppath.dirname(absolutePath));
|
|
166
172
|
await fslib_1.xfs.mkdirPromise(fslib_1.ppath.dirname(absolutePath), { recursive: true });
|
|
167
173
|
await fslib_1.xfs.writeFilePromise(absolutePath, bundleBuffer, { mode: 0o755 });
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
});
|
|
184
|
-
}
|
|
174
|
+
await core_1.Configuration.updateConfiguration(projectCwd, {
|
|
175
|
+
yarnPath: projectPath,
|
|
176
|
+
});
|
|
177
|
+
const manifest = (await core_1.Manifest.tryFind(projectCwd)) || new core_1.Manifest();
|
|
178
|
+
manifest.packageManager = `yarn@${bundleVersion && core_2.miscUtils.isTaggedYarnVersion(bundleVersion)
|
|
179
|
+
? bundleVersion
|
|
180
|
+
// If the version isn't tagged, we use the latest stable version as the wrapper
|
|
181
|
+
: await resolveTag(configuration, `stable`)}`;
|
|
182
|
+
const data = {};
|
|
183
|
+
manifest.exportTo(data);
|
|
184
|
+
const path = fslib_1.ppath.join(projectCwd, core_1.Manifest.fileName);
|
|
185
|
+
const content = `${JSON.stringify(data, null, manifest.indent)}\n`;
|
|
186
|
+
await fslib_1.xfs.changeFilePromise(path, content, {
|
|
187
|
+
automaticNewlines: true,
|
|
188
|
+
});
|
|
185
189
|
}
|
|
186
190
|
exports.setVersion = setVersion;
|
package/lib/commands/up.js
CHANGED
|
@@ -252,7 +252,7 @@ UpCommand.usage = clipanion_1.Command.Usage({
|
|
|
252
252
|
|
|
253
253
|
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
|
|
254
254
|
|
|
255
|
-
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the
|
|
255
|
+
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
|
|
256
256
|
|
|
257
257
|
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
|
|
258
258
|
|
|
@@ -18,10 +18,7 @@ class WorkspaceCommand extends cli_1.BaseCommand {
|
|
|
18
18
|
if (!cwdWorkspace)
|
|
19
19
|
throw new cli_1.WorkspaceRequiredError(project.cwd, this.context.cwd);
|
|
20
20
|
const candidates = project.workspaces;
|
|
21
|
-
const candidatesByName = new Map(candidates.map((workspace)
|
|
22
|
-
const ident = core_2.structUtils.convertToIdent(workspace.locator);
|
|
23
|
-
return [core_2.structUtils.stringifyIdent(ident), workspace];
|
|
24
|
-
}));
|
|
21
|
+
const candidatesByName = new Map(candidates.map(workspace => [core_2.structUtils.stringifyIdent(workspace.locator), workspace]));
|
|
25
22
|
const workspace = candidatesByName.get(this.workspaceName);
|
|
26
23
|
if (workspace === undefined) {
|
|
27
24
|
const otherNames = Array.from(candidatesByName.keys()).sort();
|
|
@@ -15,6 +15,9 @@ class WorkspacesListCommand extends cli_1.BaseCommand {
|
|
|
15
15
|
this.recursive = clipanion_1.Option.Boolean(`-R,--recursive`, false, {
|
|
16
16
|
description: `Find packages via dependencies/devDependencies instead of using the workspaces field`,
|
|
17
17
|
});
|
|
18
|
+
this.noPrivate = clipanion_1.Option.Boolean(`--no-private`, {
|
|
19
|
+
description: `Exclude workspaces that have the private field set to true`,
|
|
20
|
+
});
|
|
18
21
|
this.verbose = clipanion_1.Option.Boolean(`-v,--verbose`, false, {
|
|
19
22
|
description: `Also return the cross-dependencies between workspaces`,
|
|
20
23
|
});
|
|
@@ -40,6 +43,8 @@ class WorkspacesListCommand extends cli_1.BaseCommand {
|
|
|
40
43
|
workspaces.add(dependent);
|
|
41
44
|
for (const workspace of workspaces) {
|
|
42
45
|
const { manifest } = workspace;
|
|
46
|
+
if (manifest.private && this.noPrivate)
|
|
47
|
+
continue;
|
|
43
48
|
let extra;
|
|
44
49
|
if (this.verbose) {
|
|
45
50
|
const workspaceDependencies = new Set();
|
|
@@ -93,6 +98,8 @@ WorkspacesListCommand.usage = clipanion_1.Command.Usage({
|
|
|
93
98
|
|
|
94
99
|
- If \`-R,--recursive\` is set, Yarn will find workspaces to run the command on by recursively evaluating \`dependencies\` and \`devDependencies\` fields, instead of looking at the \`workspaces\` fields.
|
|
95
100
|
|
|
101
|
+
- If \`--no-private\` is set, Yarn will not list any workspaces that have the \`private\` field set to \`true\`.
|
|
102
|
+
|
|
96
103
|
- If both the \`-v,--verbose\` and \`--json\` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).
|
|
97
104
|
`,
|
|
98
105
|
});
|
package/lib/dedupeUtils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Project, ResolveOptions, Resolver, Descriptor, Package, Report, Cache } from '@yarnpkg/core';
|
|
2
2
|
import { Fetcher, FetchOptions } from '@yarnpkg/core';
|
|
3
|
-
export
|
|
3
|
+
export type Algorithm = (project: Project, patterns: Array<string>, opts: {
|
|
4
4
|
resolver: Resolver;
|
|
5
5
|
resolveOptions: ResolveOptions;
|
|
6
6
|
fetcher: Fetcher;
|
|
@@ -21,7 +21,7 @@ export declare enum Strategy {
|
|
|
21
21
|
HIGHEST = "highest"
|
|
22
22
|
}
|
|
23
23
|
export declare const acceptedStrategies: Set<Strategy.HIGHEST>;
|
|
24
|
-
export
|
|
24
|
+
export type DedupeOptions = {
|
|
25
25
|
strategy: Strategy;
|
|
26
26
|
patterns: Array<string>;
|
|
27
27
|
cache: Cache;
|
package/lib/dedupeUtils.js
CHANGED
|
@@ -93,7 +93,7 @@ async function dedupe(project, { strategy, patterns, cache, report }) {
|
|
|
93
93
|
const algorithm = DEDUPE_ALGORITHMS[strategy];
|
|
94
94
|
const dedupePromises = await algorithm(project, patterns, { resolver, resolveOptions, fetcher, fetchOptions });
|
|
95
95
|
const progress = core_1.Report.progressViaCounter(dedupePromises.length);
|
|
96
|
-
report.reportProgress(progress);
|
|
96
|
+
await report.reportProgress(progress);
|
|
97
97
|
let dedupedPackageCount = 0;
|
|
98
98
|
await Promise.all(dedupePromises.map(dedupePromise => dedupePromise
|
|
99
99
|
.then(dedupe => {
|
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
|
};
|
package/lib/suggestUtils.js
CHANGED
|
@@ -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
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yarnpkg/plugin-essentials",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"license": "BSD-2-Clause",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@yarnpkg/fslib": "^2.
|
|
7
|
+
"@yarnpkg/fslib": "^2.9.0",
|
|
8
8
|
"@yarnpkg/json-proxy": "^2.1.1",
|
|
9
9
|
"@yarnpkg/parsers": "^2.5.1",
|
|
10
10
|
"ci-info": "^3.2.0",
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
"typanion": "^3.3.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@yarnpkg/cli": "^3.
|
|
21
|
-
"@yarnpkg/core": "^3.
|
|
22
|
-
"@yarnpkg/plugin-git": "^2.6.
|
|
20
|
+
"@yarnpkg/cli": "^3.3.0",
|
|
21
|
+
"@yarnpkg/core": "^3.3.0",
|
|
22
|
+
"@yarnpkg/plugin-git": "^2.6.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/lodash": "^4.14.136",
|
|
26
26
|
"@types/micromatch": "^4.0.1",
|
|
27
27
|
"@types/semver": "^7.1.0",
|
|
28
28
|
"@types/treeify": "^1.0.0",
|
|
29
|
-
"@yarnpkg/cli": "^3.
|
|
30
|
-
"@yarnpkg/core": "^3.
|
|
31
|
-
"@yarnpkg/plugin-git": "^2.6.
|
|
29
|
+
"@yarnpkg/cli": "^3.3.0",
|
|
30
|
+
"@yarnpkg/core": "^3.3.0",
|
|
31
|
+
"@yarnpkg/plugin-git": "^2.6.3"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|