@oclif/core 3.21.0 → 3.21.1

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.
@@ -225,7 +225,7 @@ class Parser {
225
225
  }
226
226
  }
227
227
  for (const token of tokens) {
228
- if (args[token.arg])
228
+ if (args[token.arg] !== undefined)
229
229
  continue;
230
230
  argv.push(token.input);
231
231
  }
@@ -34,7 +34,8 @@ async function validate(parse) {
34
34
  parse,
35
35
  });
36
36
  }
37
- if (arg.required && !parse.output.args[name] && parse.output.args[name] !== 0) {
37
+ // Only add if it's required and undefined. Allow falsy values like empty strings and 0.
38
+ if (arg.required && parse.output.args[name] === undefined) {
38
39
  missingRequiredArgs.push(arg);
39
40
  }
40
41
  }
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": "3.21.0",
4
+ "version": "3.21.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -64,7 +64,7 @@
64
64
  "commitlint": "^17.8.1",
65
65
  "cross-env": "^7.0.3",
66
66
  "eslint": "^8.57.0",
67
- "eslint-config-oclif": "^5.0.2",
67
+ "eslint-config-oclif": "^5.0.4",
68
68
  "eslint-config-oclif-typescript": "^3.0.48",
69
69
  "eslint-config-prettier": "^9.1.0",
70
70
  "fancy-test": "^3.0.11",