@yarnpkg/plugin-essentials 4.0.0-rc.11 → 4.0.0-rc.15

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.
@@ -86,9 +86,9 @@ class AddCommand extends cli_1.BaseCommand {
86
86
  : core_3.structUtils.tryParseDescriptor(pseudoDescriptor);
87
87
  const unsupportedPrefix = pseudoDescriptor.match(/^(https?:|git@github)/);
88
88
  if (unsupportedPrefix)
89
- 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)}`);
89
+ 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.formatUtils.Type.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.formatUtils.Type.CODE)} ${core_1.formatUtils.pretty(configuration, core_3.structUtils.makeDescriptor(core_3.structUtils.makeIdent(null, `my-package`), `${unsupportedPrefix[0]}...`), core_1.formatUtils.Type.DESCRIPTOR)}`);
90
90
  if (!request)
91
- 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?`);
91
+ throw new clipanion_1.UsageError(`The ${core_1.formatUtils.pretty(configuration, pseudoDescriptor, core_1.formatUtils.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);
92
92
  const target = suggestTarget(workspace, request, {
93
93
  dev: this.dev,
94
94
  peer: this.peer,
@@ -160,7 +160,7 @@ class InfoCommand extends cli_1.BaseCommand {
160
160
  const infoTreeChildren = {};
161
161
  const infoTree = { children: infoTreeChildren };
162
162
  const fetcher = configuration.makeFetcher();
163
- const fetcherOptions = { project, fetcher, cache, checksums: project.storedChecksums, report: new core_1.ThrowReport(), cacheOptions: { skipIntegrityCheck: true }, skipIntegrityCheck: true };
163
+ const fetcherOptions = { project, fetcher, cache, checksums: project.storedChecksums, report: new core_1.ThrowReport(), cacheOptions: { skipIntegrityCheck: true } };
164
164
  const builtinInfoBuilders = [
165
165
  // Manifest fields
166
166
  async (pkg, extra, registerData) => {
@@ -1,5 +1,4 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { BaseCommand } from '@yarnpkg/cli';
4
3
  import { Project, Report } from '@yarnpkg/core';
5
4
  import { Usage } from 'clipanion';
@@ -89,7 +89,7 @@ class RemoveCommand extends cli_1.BaseCommand {
89
89
  ? `any`
90
90
  : `this`;
91
91
  if (unreferencedPatterns.length > 0)
92
- throw new clipanion_1.UsageError(`${patterns} ${core_1.formatUtils.prettyList(configuration, unreferencedPatterns, core_1.FormatType.CODE)} ${dont} match any packages referenced by ${which} workspace`);
92
+ throw new clipanion_1.UsageError(`${patterns} ${core_1.formatUtils.prettyList(configuration, unreferencedPatterns, core_1.formatUtils.Type.CODE)} ${dont} match any packages referenced by ${which} workspace`);
93
93
  if (hasChanged) {
94
94
  await configuration.triggerMultipleHooks((hooks) => hooks.afterWorkspaceDependencyRemoval, afterWorkspaceDependencyRemovalList);
95
95
  const report = await core_2.StreamReport.start({
@@ -1,5 +1,4 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { BaseCommand } from '@yarnpkg/cli';
4
3
  import { Configuration, Report } from '@yarnpkg/core';
5
4
  import { Usage } from 'clipanion';
@@ -61,11 +61,11 @@ class SetVersionCommand extends cli_1.BaseCommand {
61
61
  const fetchBuffer = async () => {
62
62
  const filePrefix = `file://`;
63
63
  if (bundleRef.url.startsWith(filePrefix)) {
64
- report.reportInfo(core_1.MessageName.UNNAMED, `Retrieving ${core_2.formatUtils.pretty(configuration, bundleRef.url, core_1.FormatType.PATH)}`);
64
+ report.reportInfo(core_1.MessageName.UNNAMED, `Retrieving ${core_2.formatUtils.pretty(configuration, bundleRef.url, core_2.formatUtils.Type.PATH)}`);
65
65
  return await fslib_1.xfs.readFilePromise(bundleRef.url.slice(filePrefix.length));
66
66
  }
67
67
  else {
68
- report.reportInfo(core_1.MessageName.UNNAMED, `Downloading ${core_2.formatUtils.pretty(configuration, bundleRef.url, core_1.FormatType.URL)}`);
68
+ report.reportInfo(core_1.MessageName.UNNAMED, `Downloading ${core_2.formatUtils.pretty(configuration, bundleRef.url, core_2.formatUtils.Type.URL)}`);
69
69
  return await core_2.httpUtils.get(bundleRef.url, { configuration });
70
70
  }
71
71
  };
@@ -140,9 +140,9 @@ class UpCommand extends cli_1.BaseCommand {
140
140
  }
141
141
  }
142
142
  if (unreferencedPatterns.length > 1)
143
- throw new clipanion_1.UsageError(`Patterns ${core_3.formatUtils.prettyList(configuration, unreferencedPatterns, core_3.FormatType.CODE)} don't match any packages referenced by any workspace`);
143
+ throw new clipanion_1.UsageError(`Patterns ${core_3.formatUtils.prettyList(configuration, unreferencedPatterns, core_3.formatUtils.Type.CODE)} don't match any packages referenced by any workspace`);
144
144
  if (unreferencedPatterns.length > 0)
145
- throw new clipanion_1.UsageError(`Pattern ${core_3.formatUtils.prettyList(configuration, unreferencedPatterns, core_3.FormatType.CODE)} doesn't match any packages referenced by any workspace`);
145
+ throw new clipanion_1.UsageError(`Pattern ${core_3.formatUtils.prettyList(configuration, unreferencedPatterns, core_3.formatUtils.Type.CODE)} doesn't match any packages referenced by any workspace`);
146
146
  const allSuggestions = await Promise.all(allSuggestionsPromises);
147
147
  const checkReport = await core_3.LightReport.start({
148
148
  configuration,
@@ -109,7 +109,6 @@ async function dedupe(project, { strategy, patterns, cache, report }) {
109
109
  fetcher,
110
110
  project,
111
111
  report: throwReport,
112
- skipIntegrityCheck: true,
113
112
  cacheOptions: {
114
113
  skipIntegrityCheck: true,
115
114
  },
@@ -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 }, 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,32 @@
1
1
  {
2
2
  "name": "@yarnpkg/plugin-essentials",
3
- "version": "4.0.0-rc.11",
3
+ "version": "4.0.0-rc.15",
4
4
  "license": "BSD-2-Clause",
5
5
  "main": "./lib/index.js",
6
6
  "dependencies": {
7
- "@yarnpkg/fslib": "^3.0.0-rc.11",
8
- "@yarnpkg/parsers": "^3.0.0-rc.11",
7
+ "@yarnpkg/fslib": "^3.0.0-rc.15",
8
+ "@yarnpkg/parsers": "^3.0.0-rc.15",
9
9
  "ci-info": "^3.2.0",
10
10
  "clipanion": "^3.2.0-rc.10",
11
11
  "enquirer": "^2.3.6",
12
12
  "lodash": "^4.17.15",
13
13
  "micromatch": "^4.0.2",
14
14
  "semver": "^7.1.2",
15
- "tslib": "^1.13.0",
15
+ "tslib": "^2.4.0",
16
16
  "typanion": "^3.3.0"
17
17
  },
18
18
  "peerDependencies": {
19
- "@yarnpkg/cli": "^4.0.0-rc.11",
20
- "@yarnpkg/core": "^4.0.0-rc.11",
21
- "@yarnpkg/plugin-git": "^3.0.0-rc.11"
19
+ "@yarnpkg/cli": "^4.0.0-rc.15",
20
+ "@yarnpkg/core": "^4.0.0-rc.15",
21
+ "@yarnpkg/plugin-git": "^3.0.0-rc.15"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/lodash": "^4.14.136",
25
25
  "@types/micromatch": "^4.0.1",
26
26
  "@types/semver": "^7.1.0",
27
- "@yarnpkg/cli": "^4.0.0-rc.11",
28
- "@yarnpkg/core": "^4.0.0-rc.11",
29
- "@yarnpkg/plugin-git": "^3.0.0-rc.11"
27
+ "@yarnpkg/cli": "^4.0.0-rc.15",
28
+ "@yarnpkg/core": "^4.0.0-rc.15",
29
+ "@yarnpkg/plugin-git": "^3.0.0-rc.15"
30
30
  },
31
31
  "repository": {
32
32
  "type": "git",