@oclif/core 1.3.4 → 1.3.5

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.3.5](https://github.com/oclif/core/compare/v1.3.4...v1.3.5) (2022-02-25)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * print valid flag values in error message when using `exactlyOne` ([#349](https://github.com/oclif/core/issues/349)) ([ddcaeb2](https://github.com/oclif/core/commit/ddcaeb2f9b690d9b92dd0ac4937b6399f606adfa))
11
+
5
12
  ### [1.3.4](https://github.com/oclif/core/compare/v1.3.3...v1.3.4) (2022-02-11)
6
13
 
7
14
 
@@ -30,6 +30,7 @@ function validate(parse) {
30
30
  }
31
31
  }
32
32
  function validateAcrossFlags(flag) {
33
+ var _a;
33
34
  const intersection = Object.entries(parse.input.flags)
34
35
  .map(entry => entry[0]) // array of flag names
35
36
  .filter(flagName => parse.output.flags[flagName] !== undefined) // with values
@@ -37,8 +38,8 @@ function validate(parse) {
37
38
  if (intersection.length === 0) {
38
39
  // the command's exactlyOne may or may not include itself, so we'll use Set to add + de-dupe
39
40
  throw new errors_1.CLIError(`Exactly one of the following must be provided: ${[
40
- ...new Set(...flag.exactlyOne || [], flag.name),
41
- ].join(',')}`);
41
+ ...new Set((_a = flag.exactlyOne) === null || _a === void 0 ? void 0 : _a.map(flag => `--${flag}`)),
42
+ ].join(', ')}`);
42
43
  }
43
44
  }
44
45
  function validateFlags() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "1.3.4",
4
+ "version": "1.3.5",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {