@yarnpkg/plugin-essentials 3.1.0 → 3.2.0-rc.12

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.
@@ -7,8 +7,8 @@ const core_2 = require("@yarnpkg/core");
7
7
  const core_3 = require("@yarnpkg/core");
8
8
  const clipanion_1 = require("clipanion");
9
9
  const enquirer_1 = require("enquirer");
10
- const t = (0, tslib_1.__importStar)(require("typanion"));
11
- const suggestUtils = (0, tslib_1.__importStar)(require("../suggestUtils"));
10
+ const t = tslib_1.__importStar(require("typanion"));
11
+ const suggestUtils = tslib_1.__importStar(require("../suggestUtils"));
12
12
  // eslint-disable-next-line arca/no-default-export
13
13
  class AddCommand extends cli_1.BaseCommand {
14
14
  constructor() {
@@ -78,7 +78,12 @@ class AddCommand extends cli_1.BaseCommand {
78
78
  const allSuggestions = await Promise.all(this.packages.map(async (pseudoDescriptor) => {
79
79
  const request = pseudoDescriptor.match(/^\.{0,2}\//)
80
80
  ? await suggestUtils.extractDescriptorFromPath(pseudoDescriptor, { cwd: this.context.cwd, workspace })
81
- : core_3.structUtils.parseDescriptor(pseudoDescriptor);
81
+ : core_3.structUtils.tryParseDescriptor(pseudoDescriptor);
82
+ const unsupportedPrefix = pseudoDescriptor.match(/^(https?:|git@github)/);
83
+ if (unsupportedPrefix)
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
+ if (!request)
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?`);
82
87
  const target = suggestTarget(workspace, request, {
83
88
  dev: this.dev,
84
89
  peer: this.peer,
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
4
4
  const cli_1 = require("@yarnpkg/cli");
5
5
  const core_1 = require("@yarnpkg/core");
6
6
  const clipanion_1 = require("clipanion");
7
- const get_1 = (0, tslib_1.__importDefault)(require("lodash/get"));
7
+ const get_1 = tslib_1.__importDefault(require("lodash/get"));
8
8
  const util_1 = require("util");
9
9
  // eslint-disable-next-line arca/no-default-export
10
10
  class ConfigGetCommand extends cli_1.BaseCommand {
@@ -4,9 +4,9 @@ const tslib_1 = require("tslib");
4
4
  const cli_1 = require("@yarnpkg/cli");
5
5
  const core_1 = require("@yarnpkg/core");
6
6
  const clipanion_1 = require("clipanion");
7
- const cloneDeep_1 = (0, tslib_1.__importDefault)(require("lodash/cloneDeep"));
8
- const get_1 = (0, tslib_1.__importDefault)(require("lodash/get"));
9
- const set_1 = (0, tslib_1.__importDefault)(require("lodash/set"));
7
+ const cloneDeep_1 = tslib_1.__importDefault(require("lodash/cloneDeep"));
8
+ const get_1 = tslib_1.__importDefault(require("lodash/get"));
9
+ const set_1 = tslib_1.__importDefault(require("lodash/set"));
10
10
  const util_1 = require("util");
11
11
  // eslint-disable-next-line arca/no-default-export
12
12
  class ConfigSetCommand extends cli_1.BaseCommand {
@@ -4,9 +4,9 @@ const tslib_1 = require("tslib");
4
4
  const cli_1 = require("@yarnpkg/cli");
5
5
  const core_1 = require("@yarnpkg/core");
6
6
  const clipanion_1 = require("clipanion");
7
- const cloneDeep_1 = (0, tslib_1.__importDefault)(require("lodash/cloneDeep"));
8
- const has_1 = (0, tslib_1.__importDefault)(require("lodash/has"));
9
- const unset_1 = (0, tslib_1.__importDefault)(require("lodash/unset"));
7
+ const cloneDeep_1 = tslib_1.__importDefault(require("lodash/cloneDeep"));
8
+ const has_1 = tslib_1.__importDefault(require("lodash/has"));
9
+ const unset_1 = tslib_1.__importDefault(require("lodash/unset"));
10
10
  // eslint-disable-next-line arca/no-default-export
11
11
  class ConfigUnsetCommand extends cli_1.BaseCommand {
12
12
  constructor() {
@@ -17,8 +17,8 @@ const tslib_1 = require("tslib");
17
17
  const cli_1 = require("@yarnpkg/cli");
18
18
  const core_1 = require("@yarnpkg/core");
19
19
  const clipanion_1 = require("clipanion");
20
- const t = (0, tslib_1.__importStar)(require("typanion"));
21
- const dedupeUtils = (0, tslib_1.__importStar)(require("../dedupeUtils"));
20
+ const t = tslib_1.__importStar(require("typanion"));
21
+ const dedupeUtils = tslib_1.__importStar(require("../dedupeUtils"));
22
22
  // eslint-disable-next-line arca/no-default-export
23
23
  class DedupeCommand extends cli_1.BaseCommand {
24
24
  constructor() {
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const cli_1 = require("@yarnpkg/cli");
6
6
  const core_1 = require("@yarnpkg/core");
7
7
  const clipanion_1 = require("clipanion");
8
- const t = (0, tslib_1.__importStar)(require("typanion"));
8
+ const t = tslib_1.__importStar(require("typanion"));
9
9
  // eslint-disable-next-line arca/no-default-export
10
10
  class ExplainPeerRequirementsCommand extends cli_1.BaseCommand {
11
11
  constructor() {
@@ -0,0 +1,10 @@
1
+ import { BaseCommand } from '@yarnpkg/cli';
2
+ import { Configuration } from '@yarnpkg/core';
3
+ export declare function getErrorCodeDetails(configuration: Configuration): Promise<Map<string, string>>;
4
+ export default class ExplainCommand extends BaseCommand {
5
+ static paths: string[][];
6
+ static usage: import("clipanion").Usage;
7
+ code: string | undefined;
8
+ json: boolean;
9
+ execute(): Promise<void>;
10
+ }
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getErrorCodeDetails = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const cli_1 = require("@yarnpkg/cli");
6
+ const core_1 = require("@yarnpkg/core");
7
+ const clipanion_1 = require("clipanion");
8
+ const t = tslib_1.__importStar(require("typanion"));
9
+ const version_1 = require("./set/version");
10
+ function getCodeName(code) {
11
+ return core_1.MessageName[(0, core_1.parseMessageName)(code)];
12
+ }
13
+ const ERROR_CODE_DOC_REGEXP = /## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;
14
+ async function getErrorCodeDetails(configuration) {
15
+ const version = core_1.miscUtils.isTaggedYarnVersion(core_1.YarnVersion)
16
+ ? core_1.YarnVersion
17
+ : await (0, version_1.resolveTag)(configuration, `canary`);
18
+ const errorCodesUrl = `https://repo.yarnpkg.com/${version}/packages/gatsby/content/advanced/error-codes.md`;
19
+ const raw = await core_1.httpUtils.get(errorCodesUrl, { configuration });
20
+ return new Map(Array.from(raw.toString().matchAll(ERROR_CODE_DOC_REGEXP), ({ groups }) => {
21
+ if (!groups)
22
+ throw new Error(`Assertion failed: Expected the match to have been successful`);
23
+ const expectedName = getCodeName(groups.code);
24
+ if (groups.name !== expectedName)
25
+ throw new Error(`Assertion failed: Invalid error code data: Expected "${groups.name}" to be named "${expectedName}"`);
26
+ return [groups.code, groups.details];
27
+ }));
28
+ }
29
+ exports.getErrorCodeDetails = getErrorCodeDetails;
30
+ // eslint-disable-next-line arca/no-default-export
31
+ class ExplainCommand extends cli_1.BaseCommand {
32
+ constructor() {
33
+ super(...arguments);
34
+ this.code = clipanion_1.Option.String({
35
+ required: false,
36
+ validator: t.applyCascade(t.isString(), [
37
+ t.matchesRegExp(/^YN[0-9]{4}$/),
38
+ ]),
39
+ });
40
+ this.json = clipanion_1.Option.Boolean(`--json`, false, {
41
+ description: `Format the output as an NDJSON stream`,
42
+ });
43
+ }
44
+ async execute() {
45
+ const configuration = await core_1.Configuration.find(this.context.cwd, this.context.plugins);
46
+ if (typeof this.code !== `undefined`) {
47
+ const name = getCodeName(this.code);
48
+ const prettyName = core_1.formatUtils.pretty(configuration, name, core_1.formatUtils.Type.CODE);
49
+ const header = this.cli.format().header(`${this.code} - ${prettyName}`);
50
+ const errorCodeDetails = await getErrorCodeDetails(configuration);
51
+ const details = errorCodeDetails.get(this.code);
52
+ const content = typeof details !== `undefined`
53
+ ? core_1.formatUtils.jsonOrPretty(this.json, configuration, core_1.formatUtils.tuple(core_1.formatUtils.Type.MARKDOWN, {
54
+ text: details,
55
+ format: this.cli.format(),
56
+ paragraphs: true,
57
+ }))
58
+ : `This error code does not have a description.\n\nYou can help us by editing this page on GitHub 🙂:\n${core_1.formatUtils.jsonOrPretty(this.json, configuration, core_1.formatUtils.tuple(core_1.formatUtils.Type.URL, `https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/advanced/error-codes.md`))}\n`;
59
+ if (this.json) {
60
+ this.context.stdout.write(`${JSON.stringify({ code: this.code, name, details: content })}\n`);
61
+ }
62
+ else {
63
+ this.context.stdout.write(`${header}\n\n${content}\n`);
64
+ }
65
+ }
66
+ else {
67
+ const tree = {
68
+ children: core_1.miscUtils.mapAndFilter(Object.entries(core_1.MessageName), ([key, value]) => {
69
+ if (Number.isNaN(Number(key)))
70
+ return core_1.miscUtils.mapAndFilter.skip;
71
+ return {
72
+ label: (0, core_1.stringifyMessageName)(Number(key)),
73
+ value: core_1.formatUtils.tuple(core_1.formatUtils.Type.CODE, value),
74
+ };
75
+ }),
76
+ };
77
+ core_1.treeUtils.emitTree(tree, { configuration, stdout: this.context.stdout, json: this.json });
78
+ }
79
+ }
80
+ }
81
+ exports.default = ExplainCommand;
82
+ ExplainCommand.paths = [
83
+ [`explain`],
84
+ ];
85
+ ExplainCommand.usage = clipanion_1.Command.Usage({
86
+ description: `explain an error code`,
87
+ details: `
88
+ When the code argument is specified, this command prints its name and its details.
89
+
90
+ When used without arguments, this command lists all error codes and their names.
91
+ `,
92
+ examples: [[
93
+ `Explain an error code`,
94
+ `$0 explain YN0006`,
95
+ ], [
96
+ `List all error codes`,
97
+ `$0 explain`,
98
+ ]],
99
+ });
@@ -5,7 +5,7 @@ const cli_1 = require("@yarnpkg/cli");
5
5
  const core_1 = require("@yarnpkg/core");
6
6
  const fslib_1 = require("@yarnpkg/fslib");
7
7
  const clipanion_1 = require("clipanion");
8
- const micromatch_1 = (0, tslib_1.__importDefault)(require("micromatch"));
8
+ const micromatch_1 = tslib_1.__importDefault(require("micromatch"));
9
9
  // eslint-disable-next-line arca/no-default-export
10
10
  class InfoCommand extends cli_1.BaseCommand {
11
11
  constructor() {
@@ -5,9 +5,9 @@ const cli_1 = require("@yarnpkg/cli");
5
5
  const core_1 = require("@yarnpkg/core");
6
6
  const fslib_1 = require("@yarnpkg/fslib");
7
7
  const parsers_1 = require("@yarnpkg/parsers");
8
- const ci_info_1 = (0, tslib_1.__importDefault)(require("ci-info"));
8
+ const ci_info_1 = tslib_1.__importDefault(require("ci-info"));
9
9
  const clipanion_1 = require("clipanion");
10
- const t = (0, tslib_1.__importStar)(require("typanion"));
10
+ const t = tslib_1.__importStar(require("typanion"));
11
11
  // eslint-disable-next-line arca/no-default-export
12
12
  class YarnCommand extends cli_1.BaseCommand {
13
13
  constructor() {
@@ -154,7 +154,11 @@ class YarnCommand extends cli_1.BaseCommand {
154
154
  return exitCode;
155
155
  }
156
156
  }
157
- const immutable = (_a = this.immutable) !== null && _a !== void 0 ? _a : configuration.get(`enableImmutableInstalls`);
157
+ const updateMode = this.mode === core_1.InstallMode.UpdateLockfile;
158
+ if (updateMode && (this.immutable || this.immutableCache))
159
+ throw new clipanion_1.UsageError(`${core_1.formatUtils.pretty(configuration, `--immutable`, core_1.formatUtils.Type.CODE)} and ${core_1.formatUtils.pretty(configuration, `--immutable-cache`, core_1.formatUtils.Type.CODE)} cannot be used with ${core_1.formatUtils.pretty(configuration, `--mode=update-lockfile`, core_1.formatUtils.Type.CODE)}`);
160
+ const immutable = ((_a = this.immutable) !== null && _a !== void 0 ? _a : configuration.get(`enableImmutableInstalls`)) && !updateMode;
161
+ const immutableCache = this.immutableCache && !updateMode;
158
162
  if (configuration.projectCwd !== null) {
159
163
  const fixReport = await core_1.StreamReport.start({
160
164
  configuration,
@@ -218,7 +222,7 @@ class YarnCommand extends cli_1.BaseCommand {
218
222
  }
219
223
  }
220
224
  const { project, workspace } = await core_1.Project.find(configuration, this.context.cwd);
221
- const cache = await core_1.Cache.find(configuration, { immutable: this.immutableCache, check: this.checkCache });
225
+ const cache = await core_1.Cache.find(configuration, { immutable: immutableCache, check: this.checkCache });
222
226
  if (!workspace)
223
227
  throw new cli_1.WorkspaceRequiredError(project.cwd, this.context.cwd);
224
228
  await project.restoreInstallState({
@@ -7,7 +7,7 @@ const core_1 = require("@yarnpkg/core");
7
7
  const core_2 = require("@yarnpkg/core");
8
8
  const fslib_1 = require("@yarnpkg/fslib");
9
9
  const clipanion_1 = require("clipanion");
10
- const semver_1 = (0, tslib_1.__importDefault)(require("semver"));
10
+ const semver_1 = tslib_1.__importDefault(require("semver"));
11
11
  const url_1 = require("url");
12
12
  const vm_1 = require("vm");
13
13
  const list_1 = require("./list");
@@ -6,9 +6,9 @@ const core_1 = require("@yarnpkg/core");
6
6
  const core_2 = require("@yarnpkg/core");
7
7
  const core_3 = require("@yarnpkg/core");
8
8
  const clipanion_1 = require("clipanion");
9
- const micromatch_1 = (0, tslib_1.__importDefault)(require("micromatch"));
10
- const t = (0, tslib_1.__importStar)(require("typanion"));
11
- const suggestUtils = (0, tslib_1.__importStar)(require("../suggestUtils"));
9
+ const micromatch_1 = tslib_1.__importDefault(require("micromatch"));
10
+ const t = tslib_1.__importStar(require("typanion"));
11
+ const suggestUtils = tslib_1.__importStar(require("../suggestUtils"));
12
12
  // eslint-disable-next-line arca/no-default-export
13
13
  class RemoveCommand extends cli_1.BaseCommand {
14
14
  constructor() {
@@ -21,11 +21,11 @@ function getBranchRef(branch) {
21
21
  const cloneWorkflow = ({ repository, branch }, target) => [
22
22
  [`git`, `init`, fslib_1.npath.fromPortablePath(target)],
23
23
  [`git`, `remote`, `add`, `origin`, repository],
24
- [`git`, `fetch`, `origin`, getBranchRef(branch)],
24
+ [`git`, `fetch`, `origin`, `--depth=1`, getBranchRef(branch)],
25
25
  [`git`, `reset`, `--hard`, `FETCH_HEAD`],
26
26
  ];
27
27
  const updateWorkflow = ({ branch }) => [
28
- [`git`, `fetch`, `origin`, getBranchRef(branch), `--force`],
28
+ [`git`, `fetch`, `origin`, `--depth=1`, getBranchRef(branch), `--force`],
29
29
  [`git`, `reset`, `--hard`, `FETCH_HEAD`],
30
30
  [`git`, `clean`, `-dfx`],
31
31
  ];
@@ -7,7 +7,7 @@ const core_1 = require("@yarnpkg/core");
7
7
  const core_2 = require("@yarnpkg/core");
8
8
  const fslib_1 = require("@yarnpkg/fslib");
9
9
  const clipanion_1 = require("clipanion");
10
- const semver_1 = (0, tslib_1.__importDefault)(require("semver"));
10
+ const semver_1 = tslib_1.__importDefault(require("semver"));
11
11
  // eslint-disable-next-line arca/no-default-export
12
12
  class SetVersionCommand extends cli_1.BaseCommand {
13
13
  constructor() {
@@ -165,8 +165,10 @@ async function setVersion(configuration, bundleVersion, bundleBuffer, { report }
165
165
  yarnPath: projectPath,
166
166
  });
167
167
  const manifest = (await core_1.Manifest.tryFind(projectCwd)) || new core_1.Manifest();
168
- if (bundleVersion && core_2.miscUtils.isTaggedYarnVersion(bundleVersion))
169
- manifest.packageManager = `yarn@${bundleVersion}`;
168
+ manifest.packageManager = `yarn@${bundleVersion && core_2.miscUtils.isTaggedYarnVersion(bundleVersion)
169
+ ? bundleVersion
170
+ // If the version isn't tagged, we use the latest stable version as the wrapper
171
+ : await resolveTag(configuration, `stable`)}`;
170
172
  const data = {};
171
173
  manifest.exportTo(data);
172
174
  const path = fslib_1.ppath.join(projectCwd, core_1.Manifest.fileName);
@@ -5,7 +5,7 @@ const cli_1 = require("@yarnpkg/cli");
5
5
  const core_1 = require("@yarnpkg/core");
6
6
  const fslib_1 = require("@yarnpkg/fslib");
7
7
  const clipanion_1 = require("clipanion");
8
- const micromatch_1 = (0, tslib_1.__importDefault)(require("micromatch"));
8
+ const micromatch_1 = tslib_1.__importDefault(require("micromatch"));
9
9
  // eslint-disable-next-line arca/no-default-export
10
10
  class UnlinkCommand extends cli_1.BaseCommand {
11
11
  constructor() {
@@ -7,9 +7,9 @@ const core_2 = require("@yarnpkg/core");
7
7
  const core_3 = require("@yarnpkg/core");
8
8
  const clipanion_1 = require("clipanion");
9
9
  const enquirer_1 = require("enquirer");
10
- const micromatch_1 = (0, tslib_1.__importDefault)(require("micromatch"));
11
- const t = (0, tslib_1.__importStar)(require("typanion"));
12
- const suggestUtils = (0, tslib_1.__importStar)(require("../suggestUtils"));
10
+ const micromatch_1 = tslib_1.__importDefault(require("micromatch"));
11
+ const t = tslib_1.__importStar(require("typanion"));
12
+ const suggestUtils = tslib_1.__importStar(require("../suggestUtils"));
13
13
  // eslint-disable-next-line arca/no-default-export
14
14
  class UpCommand extends cli_1.BaseCommand {
15
15
  constructor() {
@@ -4,7 +4,7 @@ exports.dedupe = exports.acceptedStrategies = exports.Strategy = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const core_1 = require("@yarnpkg/core");
6
6
  const core_2 = require("@yarnpkg/core");
7
- const micromatch_1 = (0, tslib_1.__importDefault)(require("micromatch"));
7
+ const micromatch_1 = tslib_1.__importDefault(require("micromatch"));
8
8
  var Strategy;
9
9
  (function (Strategy) {
10
10
  /**
package/lib/index.d.ts CHANGED
@@ -4,9 +4,36 @@ import * as dedupeUtils from './dedupeUtils';
4
4
  import * as suggestUtils from './suggestUtils';
5
5
  export { dedupeUtils, suggestUtils, };
6
6
  export interface Hooks {
7
+ /**
8
+ * Called when a new dependency is added to a workspace. Note that this hook
9
+ * is only called by the CLI commands like `yarn add` - manually adding the
10
+ * dependencies into the manifest and running `yarn install` won't trigger
11
+ * it.
12
+ */
7
13
  afterWorkspaceDependencyAddition?: (workspace: Workspace, target: suggestUtils.Target, descriptor: Descriptor, strategies: Array<suggestUtils.Strategy>) => Promise<void>;
14
+ /**
15
+ * Called when a dependency range is replaced inside a workspace. Note that
16
+ * this hook is only called by the CLI commands like `yarn add` - manually
17
+ * updating the dependencies from the manifest and running `yarn install`
18
+ * won't trigger it.
19
+ */
8
20
  afterWorkspaceDependencyReplacement?: (workspace: Workspace, target: suggestUtils.Target, fromDescriptor: Descriptor, toDescriptor: Descriptor) => Promise<void>;
21
+ /**
22
+ * Called when a dependency range is removed from a workspace. Note that
23
+ * this hook is only called by the CLI commands like `yarn remove` - manually
24
+ * removing the dependencies from the manifest and running `yarn install`
25
+ * won't trigger it.
26
+ */
9
27
  afterWorkspaceDependencyRemoval?: (workspace: Workspace, target: suggestUtils.Target, descriptor: Descriptor) => Promise<void>;
28
+ /**
29
+ * Called by `yarn info`. The `extra` field is the set of parameters passed
30
+ * to the `-X,--extra` flag. Calling `registerData` will add a new set of
31
+ * data that will be added to the package information.
32
+ *
33
+ * For instance, an "audit" plugin could check in `extra` whether the user
34
+ * requested audit information (via `-X audit`), and call `registerData`
35
+ * with those information (retrieved dynamically) if they did.
36
+ */
10
37
  fetchPackageInfo?: (pkg: Package, extra: Set<string>, registerData: (namespace: string, data: Array<formatUtils.Tuple> | {
11
38
  [key: string]: formatUtils.Tuple | undefined;
12
39
  }) => void) => Promise<void>;
package/lib/index.js CHANGED
@@ -4,44 +4,45 @@ exports.suggestUtils = exports.dedupeUtils = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const core_1 = require("@yarnpkg/core");
6
6
  const ci_info_1 = require("ci-info");
7
- const add_1 = (0, tslib_1.__importDefault)(require("./commands/add"));
8
- const bin_1 = (0, tslib_1.__importDefault)(require("./commands/bin"));
9
- const clean_1 = (0, tslib_1.__importDefault)(require("./commands/cache/clean"));
10
- const get_1 = (0, tslib_1.__importDefault)(require("./commands/config/get"));
11
- const set_1 = (0, tslib_1.__importDefault)(require("./commands/config/set"));
12
- const unset_1 = (0, tslib_1.__importDefault)(require("./commands/config/unset"));
13
- const config_1 = (0, tslib_1.__importDefault)(require("./commands/config"));
14
- const dedupe_1 = (0, tslib_1.__importDefault)(require("./commands/dedupe"));
15
- const clipanion_1 = (0, tslib_1.__importDefault)(require("./commands/entries/clipanion"));
16
- const help_1 = (0, tslib_1.__importDefault)(require("./commands/entries/help"));
17
- const run_1 = (0, tslib_1.__importDefault)(require("./commands/entries/run"));
18
- const version_1 = (0, tslib_1.__importDefault)(require("./commands/entries/version"));
19
- const exec_1 = (0, tslib_1.__importDefault)(require("./commands/exec"));
20
- const peerRequirements_1 = (0, tslib_1.__importDefault)(require("./commands/explain/peerRequirements"));
21
- const info_1 = (0, tslib_1.__importDefault)(require("./commands/info"));
22
- const install_1 = (0, tslib_1.__importDefault)(require("./commands/install"));
23
- const link_1 = (0, tslib_1.__importDefault)(require("./commands/link"));
24
- const node_1 = (0, tslib_1.__importDefault)(require("./commands/node"));
25
- const sources_1 = (0, tslib_1.__importDefault)(require("./commands/plugin/import/sources"));
26
- const import_1 = (0, tslib_1.__importDefault)(require("./commands/plugin/import"));
27
- const list_1 = (0, tslib_1.__importDefault)(require("./commands/plugin/list"));
28
- const remove_1 = (0, tslib_1.__importDefault)(require("./commands/plugin/remove"));
29
- const runtime_1 = (0, tslib_1.__importDefault)(require("./commands/plugin/runtime"));
30
- const rebuild_1 = (0, tslib_1.__importDefault)(require("./commands/rebuild"));
31
- const remove_2 = (0, tslib_1.__importDefault)(require("./commands/remove"));
32
- const runIndex_1 = (0, tslib_1.__importDefault)(require("./commands/runIndex"));
33
- const run_2 = (0, tslib_1.__importDefault)(require("./commands/run"));
34
- const resolution_1 = (0, tslib_1.__importDefault)(require("./commands/set/resolution"));
35
- const sources_2 = (0, tslib_1.__importDefault)(require("./commands/set/version/sources"));
36
- const version_2 = (0, tslib_1.__importDefault)(require("./commands/set/version"));
37
- const unlink_1 = (0, tslib_1.__importDefault)(require("./commands/unlink"));
38
- const up_1 = (0, tslib_1.__importDefault)(require("./commands/up"));
39
- const why_1 = (0, tslib_1.__importDefault)(require("./commands/why"));
40
- const list_2 = (0, tslib_1.__importDefault)(require("./commands/workspaces/list"));
41
- const workspace_1 = (0, tslib_1.__importDefault)(require("./commands/workspace"));
42
- const dedupeUtils = (0, tslib_1.__importStar)(require("./dedupeUtils"));
7
+ const add_1 = tslib_1.__importDefault(require("./commands/add"));
8
+ const bin_1 = tslib_1.__importDefault(require("./commands/bin"));
9
+ const clean_1 = tslib_1.__importDefault(require("./commands/cache/clean"));
10
+ const get_1 = tslib_1.__importDefault(require("./commands/config/get"));
11
+ const set_1 = tslib_1.__importDefault(require("./commands/config/set"));
12
+ const unset_1 = tslib_1.__importDefault(require("./commands/config/unset"));
13
+ const config_1 = tslib_1.__importDefault(require("./commands/config"));
14
+ const dedupe_1 = tslib_1.__importDefault(require("./commands/dedupe"));
15
+ const clipanion_1 = tslib_1.__importDefault(require("./commands/entries/clipanion"));
16
+ const help_1 = tslib_1.__importDefault(require("./commands/entries/help"));
17
+ const run_1 = tslib_1.__importDefault(require("./commands/entries/run"));
18
+ const version_1 = tslib_1.__importDefault(require("./commands/entries/version"));
19
+ const exec_1 = tslib_1.__importDefault(require("./commands/exec"));
20
+ const peerRequirements_1 = tslib_1.__importDefault(require("./commands/explain/peerRequirements"));
21
+ const explain_1 = tslib_1.__importDefault(require("./commands/explain"));
22
+ const info_1 = tslib_1.__importDefault(require("./commands/info"));
23
+ const install_1 = tslib_1.__importDefault(require("./commands/install"));
24
+ const link_1 = tslib_1.__importDefault(require("./commands/link"));
25
+ const node_1 = tslib_1.__importDefault(require("./commands/node"));
26
+ const sources_1 = tslib_1.__importDefault(require("./commands/plugin/import/sources"));
27
+ const import_1 = tslib_1.__importDefault(require("./commands/plugin/import"));
28
+ const list_1 = tslib_1.__importDefault(require("./commands/plugin/list"));
29
+ const remove_1 = tslib_1.__importDefault(require("./commands/plugin/remove"));
30
+ const runtime_1 = tslib_1.__importDefault(require("./commands/plugin/runtime"));
31
+ const rebuild_1 = tslib_1.__importDefault(require("./commands/rebuild"));
32
+ const remove_2 = tslib_1.__importDefault(require("./commands/remove"));
33
+ const runIndex_1 = tslib_1.__importDefault(require("./commands/runIndex"));
34
+ const run_2 = tslib_1.__importDefault(require("./commands/run"));
35
+ const resolution_1 = tslib_1.__importDefault(require("./commands/set/resolution"));
36
+ const sources_2 = tslib_1.__importDefault(require("./commands/set/version/sources"));
37
+ const version_2 = tslib_1.__importDefault(require("./commands/set/version"));
38
+ const unlink_1 = tslib_1.__importDefault(require("./commands/unlink"));
39
+ const up_1 = tslib_1.__importDefault(require("./commands/up"));
40
+ const why_1 = tslib_1.__importDefault(require("./commands/why"));
41
+ const list_2 = tslib_1.__importDefault(require("./commands/workspaces/list"));
42
+ const workspace_1 = tslib_1.__importDefault(require("./commands/workspace"));
43
+ const dedupeUtils = tslib_1.__importStar(require("./dedupeUtils"));
43
44
  exports.dedupeUtils = dedupeUtils;
44
- const suggestUtils = (0, tslib_1.__importStar)(require("./suggestUtils"));
45
+ const suggestUtils = tslib_1.__importStar(require("./suggestUtils"));
45
46
  exports.suggestUtils = suggestUtils;
46
47
  const plugin = {
47
48
  configuration: {
@@ -76,6 +77,7 @@ const plugin = {
76
77
  dedupe_1.default,
77
78
  exec_1.default,
78
79
  peerRequirements_1.default,
80
+ explain_1.default,
79
81
  info_1.default,
80
82
  install_1.default,
81
83
  link_1.default,
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const core_1 = require("@yarnpkg/core");
6
6
  const core_2 = require("@yarnpkg/core");
7
7
  const fslib_1 = require("@yarnpkg/fslib");
8
- const semver_1 = (0, tslib_1.__importDefault)(require("semver"));
8
+ const semver_1 = tslib_1.__importDefault(require("semver"));
9
9
  const WORKSPACE_PROTOCOL = `workspace:`;
10
10
  var Target;
11
11
  (function (Target) {
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@yarnpkg/plugin-essentials",
3
- "version": "3.1.0",
3
+ "version": "3.2.0-rc.12",
4
4
  "license": "BSD-2-Clause",
5
5
  "main": "./lib/index.js",
6
6
  "dependencies": {
7
- "@yarnpkg/fslib": "^2.6.0",
7
+ "@yarnpkg/fslib": "^2.6.1-rc.9",
8
8
  "@yarnpkg/json-proxy": "^2.1.1",
9
- "@yarnpkg/parsers": "^2.4.1",
9
+ "@yarnpkg/parsers": "^2.5.0-rc.12",
10
10
  "ci-info": "^3.2.0",
11
- "clipanion": "^3.0.1",
11
+ "clipanion": "^3.2.0-rc.4",
12
12
  "enquirer": "^2.3.6",
13
13
  "lodash": "^4.17.15",
14
14
  "micromatch": "^4.0.2",
@@ -17,18 +17,18 @@
17
17
  "typanion": "^3.3.0"
18
18
  },
19
19
  "peerDependencies": {
20
- "@yarnpkg/cli": "^3.1.0",
21
- "@yarnpkg/core": "^3.1.0",
22
- "@yarnpkg/plugin-git": "^2.5.0"
20
+ "@yarnpkg/cli": "^3.2.0-rc.14",
21
+ "@yarnpkg/core": "^3.2.0-rc.14",
22
+ "@yarnpkg/plugin-git": "^2.6.0-rc.14"
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.1.0",
30
- "@yarnpkg/core": "^3.1.0",
31
- "@yarnpkg/plugin-git": "^2.5.0"
29
+ "@yarnpkg/cli": "^3.2.0-rc.14",
30
+ "@yarnpkg/core": "^3.2.0-rc.14",
31
+ "@yarnpkg/plugin-git": "^2.6.0-rc.14"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",
@@ -49,5 +49,6 @@
49
49
  "engines": {
50
50
  "node": ">=12 <14 || 14.2 - 14.9 || >14.10.0"
51
51
  },
52
+ "stableVersion": "3.1.0",
52
53
  "typings": "./lib/index.d.ts"
53
54
  }