@yarnpkg/plugin-essentials 3.2.0-rc.7 → 3.2.0-rc.8

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.
@@ -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({
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@yarnpkg/plugin-essentials",
3
- "version": "3.2.0-rc.7",
3
+ "version": "3.2.0-rc.8",
4
4
  "license": "BSD-2-Clause",
5
5
  "main": "./lib/index.js",
6
6
  "dependencies": {
7
- "@yarnpkg/fslib": "^2.6.1-rc.4",
7
+ "@yarnpkg/fslib": "^2.6.1-rc.5",
8
8
  "@yarnpkg/json-proxy": "^2.1.1",
9
- "@yarnpkg/parsers": "^2.5.0-rc.7",
9
+ "@yarnpkg/parsers": "^2.5.0-rc.8",
10
10
  "ci-info": "^3.2.0",
11
11
  "clipanion": "^3.2.0-rc.4",
12
12
  "enquirer": "^2.3.6",
@@ -17,18 +17,18 @@
17
17
  "typanion": "^3.3.0"
18
18
  },
19
19
  "peerDependencies": {
20
- "@yarnpkg/cli": "^3.2.0-rc.9",
21
- "@yarnpkg/core": "^3.2.0-rc.9",
22
- "@yarnpkg/plugin-git": "^2.6.0-rc.9"
20
+ "@yarnpkg/cli": "^3.2.0-rc.10",
21
+ "@yarnpkg/core": "^3.2.0-rc.10",
22
+ "@yarnpkg/plugin-git": "^2.6.0-rc.10"
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.2.0-rc.9",
30
- "@yarnpkg/core": "^3.2.0-rc.9",
31
- "@yarnpkg/plugin-git": "^2.6.0-rc.9"
29
+ "@yarnpkg/cli": "^3.2.0-rc.10",
30
+ "@yarnpkg/core": "^3.2.0-rc.10",
31
+ "@yarnpkg/plugin-git": "^2.6.0-rc.10"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",