@oclif/command
Advanced tools
Comparing version 1.7.0 to 1.8.0
@@ -0,1 +1,10 @@ | ||
# [1.8.0](https://github.com/oclif/command/compare/v1.7.0...v1.8.0) (2020-08-03) | ||
### Features | ||
* support src/command/index cmd ([#141](https://github.com/oclif/command/issues/141)) ([90ac072](https://github.com/oclif/command/commit/90ac07256b3d43577a8db7df0cfadb49e5925a4c)) | ||
# [1.7.0](https://github.com/oclif/command/compare/v1.6.1...v1.7.0) (2020-06-29) | ||
@@ -2,0 +11,0 @@ |
@@ -5,2 +5,3 @@ "use strict"; | ||
const plugin_help_1 = require("@oclif/plugin-help"); | ||
const ROOT_INDEX_CMD_ID = ''; | ||
class Main extends _1.Command { | ||
@@ -16,3 +17,3 @@ static run(argv = process.argv.slice(2), options) { | ||
async run() { | ||
const [id, ...argv] = this.argv; | ||
let [id, ...argv] = this.argv; | ||
this.parse(Object.assign({ strict: false, '--': false }, this.ctor)); | ||
@@ -23,2 +24,6 @@ if (!this.config.findCommand(id)) { | ||
return this._help(); | ||
if (this.config.findCommand(ROOT_INDEX_CMD_ID)) { | ||
id = ROOT_INDEX_CMD_ID; | ||
argv = this.argv; | ||
} | ||
} | ||
@@ -32,3 +37,3 @@ await this.config.runCommand(id, argv); | ||
return true; | ||
if (this.argv.length === 0) | ||
if (this.argv.length === 0 && !this.config.findCommand(ROOT_INDEX_CMD_ID)) | ||
return true; | ||
@@ -35,0 +40,0 @@ for (const arg of this.argv) { |
{ | ||
"name": "@oclif/command", | ||
"description": "oclif base command", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -13,3 +13,3 @@ "bugs": "https://github.com/oclif/command/issues", | ||
"debug": "^4.1.1", | ||
"semver": "^5.6.0" | ||
"semver": "^7.3.2" | ||
}, | ||
@@ -19,3 +19,3 @@ "devDependencies": { | ||
"@types/chai": "^4.1.7", | ||
"@types/mocha": "^7.0.2", | ||
"@types/mocha": "^8.0.0", | ||
"@types/node": "^14.0.14", | ||
@@ -30,3 +30,3 @@ "@types/semver": "^7.3.1", | ||
"fancy-test": "^1.4.3", | ||
"globby": "^9.0.0", | ||
"globby": "^11.0.1", | ||
"mocha": "^6.0.2", | ||
@@ -33,0 +33,0 @@ "sinon": "^9.0.1", |
60046
477
- Removedsemver@5.7.2(transitive)
Updatedsemver@^7.3.2