From 68b8959b67ca29d2cba93ac2a9de89e21ac57f34 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Sat, 3 Feb 2018 11:16:17 -0800 Subject: [PATCH] fix: updated to use new config --- bin/run | 2 +- package.json | 25 ++--- src/commands/plugins/index.ts | 39 ++++---- src/commands/plugins/install.ts | 30 +++--- src/commands/plugins/uninstall.ts | 2 +- src/commands/plugins/update.ts | 16 +++ src/index.ts | 1 + src/load.ts | 11 --- src/manifest.ts | 38 -------- src/plugins.ts | 141 +++++++++++++++++++-------- src/yarn.ts | 11 +-- test/commands/plugins/index.test.ts | 25 ++--- test/test.ts | 18 ++-- yarn.lock | 145 ++++++++++++++++++++++------ 14 files changed, 307 insertions(+), 197 deletions(-) create mode 100644 src/commands/plugins/update.ts create mode 100644 src/index.ts delete mode 100644 src/load.ts delete mode 100644 src/manifest.ts diff --git a/bin/run b/bin/run index 4f66d3b5..ac4d489f 100755 --- a/bin/run +++ b/bin/run @@ -1,3 +1,3 @@ #!/usr/bin/env node -require('@anycli/engine').run() +require('@anycli/command').run() diff --git a/package.json b/package.json index 6b3113f1..36755bc2 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "author": "Jeff Dickey @jdxcode", "anycli": { "commands": "./lib/commands", - "plugins": "./lib/load", "pluginScope": "heroku-cli", "devPlugins": [ "@anycli/plugin-version", @@ -14,40 +13,44 @@ }, "bugs": "https://github.com/anycli/plugin-plugins/issues", "dependencies": { - "@anycli/command": "^0.3.7", - "@anycli/manifest-file": "^0.3.8", + "@anycli/command": "^1.2.2", "@heroku-cli/color": "^1.1.3", "chalk": "^2.3.0", "cli-ux": "^3.3.13", "debug": "^3.1.0", "fs-extra": "^5.0.0", "http-call": "^5.0.2", + "load-json-file": "^4.0.0", "lodash": "^4.17.4", "npm-run-path": "^2.0.2", + "semver": "^5.5.0", "tslib": "^1.9.0", "yarn": "^1.3.2" }, "devDependencies": { - "@anycli/config": "^0.3.0", + "@anycli/config": "^1.0.16", "@anycli/dev-cli": "^0.1.3", - "@anycli/engine": "^0.3.1", - "@anycli/plugin-help": "^0.4.5", - "@anycli/plugin-version": "^0.1.30", - "@anycli/test": "^0.10.3", - "@anycli/tslint": "^0.2.2", + "@anycli/engine": "^0.3.6", + "@anycli/plugin-help": "^0.5.0", + "@anycli/plugin-version": "^0.1.31", + "@anycli/test": "^0.10.8", + "@anycli/tslint": "^0.2.5", "@types/chai": "^4.1.2", "@types/fs-extra": "^5.0.0", + "@types/load-json-file": "^2.0.7", "@types/lodash": "^4.14.100", "@types/mocha": "^2.2.48", "@types/nock": "^9.1.2", "@types/node": "^9.4.0", "@types/node-notifier": "^0.0.28", "@types/read-pkg": "^3.0.0", + "@types/semver": "^5.5.0", "@types/supports-color": "^3.1.0", "chai": "^4.1.2", "concurrently": "^3.5.1", - "eslint": "^4.16.0", - "eslint-config-anycli": "^1.3.1", + "eslint": "^4.17.0", + "eslint-config-anycli": "^1.3.2", + "fancy-test": "^0.6.10", "mocha": "^5.0.0", "ts-node": "^4.1.0", "typescript": "^2.7.1" diff --git a/src/commands/plugins/index.ts b/src/commands/plugins/index.ts index 94a6fddb..c9c61ae7 100644 --- a/src/commands/plugins/index.ts +++ b/src/commands/plugins/index.ts @@ -5,41 +5,36 @@ import * as _ from 'lodash' import Plugins from '../../plugins' +export default class PluginsIndex extends Command { + static flags = { + core: flags.boolean({description: 'show core plugins'}) + } + static description = 'list installed plugins' + static examples = [`<% let examplePlugins = { 'heroku-ci': {version: '1.8.0'}, 'heroku-cli-status': {version: '3.0.10', type: 'link'}, 'heroku-fork': {version: '4.1.22'}, } -let bin = 'heroku' -const g = global as any -if (g.anycli && g.anycli.config) { - const config = g.anycli.config - bin = config - let pjson = config.pjson.anycli || config.pjson['cli-engine'] - if (pjson.help && pjson.help.plugins) { - examplePlugins = pjson.help.plugins - } -} -const examplePluginsHelp = Object.entries(examplePlugins).map(([name, p]: [string, any]) => ` ${name} ${p.version}`) +const examplePluginsHelp = Object.entries(examplePlugins).map(([name, p]: [string, any]) => \` \${name} \${p.version}\`) + +%>Example: + $ <%- config.bin> plugins +<%- examplePluginsHelp.join('\n') %> +`] -export default class PluginsIndex extends Command { - static flags = { - core: flags.boolean({description: 'show core plugins'}) - } - static description = 'list installed plugins' - static help = `Example: - $ ${bin} plugins -${examplePluginsHelp.join('\n')} -` plugins = new Plugins(this.config) options = parse(this.argv, PluginsIndex) async run() { - let plugins = this.config.engine!.plugins + let plugins = this.config.plugins _.sortBy(plugins, 'name') - if (!this.options.flags.core) plugins = plugins.filter(p => p.type !== 'core' && p.type !== 'dev') + if (!this.options.flags.core) { + plugins = plugins.filter(p => p.type !== 'core' && p.type !== 'dev') + } if (!plugins.length) { cli.info('no plugins installed') + return } for (let plugin of plugins) { let output = `${this.plugins.friendlyName(plugin.name)} ${color.dim(plugin.version)}` diff --git a/src/commands/plugins/install.ts b/src/commands/plugins/install.ts index 58fbbc6e..dda21151 100644 --- a/src/commands/plugins/install.ts +++ b/src/commands/plugins/install.ts @@ -4,25 +4,25 @@ import cli from 'cli-ux' import Plugins from '../../plugins' -let examplePlugin = 'heroku-production-status' -let bin = 'heroku' -const g = global as any -if (g.anycli && g.anycli.config) { - const config = g.anycli.config - bin = config.bin - let pjson = config.pjson.anycli || config.pjson['cli-engine'] - if (pjson.help && pjson.help.plugins) { - examplePlugin = Object.keys(pjson.help.plugins)[0] - } -} +// let examplePlugin = 'heroku-production-status' +// let bin = 'heroku' +// const g = global as any +// if (g.anycli && g.anycli.config) { +// const config = g.anycli.config +// bin = config.bin +// let pjson = config.pjson.anycli || config.pjson['cli-engine'] +// if (pjson.help && pjson.help.plugins) { +// examplePlugin = Object.keys(pjson.help.plugins)[0] +// } +// } export default class PluginsInstall extends Command { static description = 'installs a plugin into the CLI' static usage = 'plugins:install PLUGIN...' - static help = ` - Example: - $ ${bin} plugins:install ${examplePlugin} - ` + static examples = [` +Example: + $ <%= config.bin %> plugins:install \${examplePlugin} +`] static strict = false static args = [{name: 'plugin', description: 'plugin to install', required: true}] diff --git a/src/commands/plugins/uninstall.ts b/src/commands/plugins/uninstall.ts index eb3768c7..df9c4a08 100644 --- a/src/commands/plugins/uninstall.ts +++ b/src/commands/plugins/uninstall.ts @@ -38,7 +38,7 @@ export default class PluginsUninstall extends Command { cli.warn(`${friendly} is not installed`) continue } - await this.plugins.uninstall(unfriendly) + await this.plugins.uninstall(unfriendly.name) cli.action.stop() } } diff --git a/src/commands/plugins/update.ts b/src/commands/plugins/update.ts new file mode 100644 index 00000000..b09f39fe --- /dev/null +++ b/src/commands/plugins/update.ts @@ -0,0 +1,16 @@ +import {Command, parse} from '@anycli/command' + +import Plugins from '../../plugins' + +export default class PluginsUpdate extends Command { + static topic = 'plugins' + static command = 'update' + static description = 'update installed plugins' + + options = parse(this.argv, PluginsUpdate) + plugins = new Plugins(this.config) + + async run() { + await this.plugins.update() + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..f9c03499 --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +export * from './plugins' diff --git a/src/load.ts b/src/load.ts deleted file mode 100644 index 608437e7..00000000 --- a/src/load.ts +++ /dev/null @@ -1,11 +0,0 @@ -import {IConfig, IPlugin} from '@anycli/config' - -import Plugins from './plugins' - -export default async function (config: IConfig) { - const plugins = new Plugins(config) - const list = await plugins.list() - return list.map(([name, {tag}]) => ({name, root: plugins.userPluginPath(name), tag, type: 'user'})) -} - -export {IPlugin} diff --git a/src/manifest.ts b/src/manifest.ts deleted file mode 100644 index 00d93755..00000000 --- a/src/manifest.ts +++ /dev/null @@ -1,38 +0,0 @@ -import ManifestFile from '@anycli/manifest-file' - -export interface File { - manifest: { - plugins: { - [name: string]: { - tag: string - } - } - } -} - -export default class Manifest extends ManifestFile { - writeOptions = {spaces: 2} - - constructor(file: string) { - super(['@anycli/plugins', file].join(':'), file) - } - - async list(): Promise { - return (await this.get('plugins')) || {} as any - } - - async add(name: string, tag: string) { - this.debug(`adding ${name}@${tag}`) - const plugins = await this.list() - plugins[name] = {tag} - await this.set(['plugins', plugins]) - } - - async remove(name: string) { - this.debug(`removing ${name}`) - const plugins = await this.list() - if (!plugins[name]) return this.debug('not found in manifest') - delete plugins[name] - await this.set(['plugins', plugins]) - } -} diff --git a/src/plugins.ts b/src/plugins.ts index 64f6cc60..65c37d3c 100644 --- a/src/plugins.ts +++ b/src/plugins.ts @@ -1,59 +1,115 @@ -import {IConfig, read} from '@anycli/config' -import {cli} from 'cli-ux' +import * as Config from '@anycli/config' +import cli from 'cli-ux' import * as fs from 'fs-extra' import HTTP from 'http-call' +import loadJSON = require('load-json-file') +import * as _ from 'lodash' import * as path from 'path' +import * as semver from 'semver' -import Manifest from './manifest' import Yarn from './yarn' +const initPJSON: Config.PJSON.User = {private: true, anycli: {schema: 1, plugins: []}, dependencies: {}} + export default class Plugins { readonly yarn: Yarn - private readonly manifest: Manifest private readonly debug: any - constructor(public config: IConfig) { - this.manifest = new Manifest(path.join(this.config.dataDir, 'plugins', 'user.json')) - this.yarn = new Yarn({config, cwd: this.userPluginsDir}) + constructor(public config: Config.IConfig) { + this.yarn = new Yarn({config, cwd: this.config.dataDir}) this.debug = require('debug')('@anycli/plugins') } + async pjson(): Promise { + try { + const pjson: Config.PJSON = await loadJSON(this.pjsonPath) + return { + ...initPJSON, + anycli: { + ...initPJSON.anycli, + ...pjson.anycli, + }, + dependencies: {}, + ...pjson, + } + } catch (err) { + this.debug(err) + if (err.code !== 'ENOENT') cli.warn(err) + return initPJSON + } + } + async list() { - const plugins = await this.manifest.list() - return Object.entries(plugins) + const pjson = await this.pjson() + return this.normalizePlugins(pjson.anycli.plugins) } async install(name: string, tag = 'latest') { try { + const range = semver.validRange(tag) const unfriendly = this.unfriendlyName(name) - if (unfriendly) { - let version = await this.fetchVersionFromNPM({name: unfriendly, tag}) - if (version) name = unfriendly + if (unfriendly && await this.npmHasPackage(unfriendly)) { + name = unfriendly } await this.createPJSON() await this.yarn.exec(['add', `${name}@${tag}`]) - await this.loadPlugin(name, tag) - // if (!plugin.commands.length) throw new Error('no commands found in plugin') - await this.manifest.add(name, tag) + // const plugin = await this.loadPlugin(name, range || tag) + // if (!plugin.valid) { + // throw new Error('no commands found in plugin') + // } + await this.add({name, tag: range || tag, type: 'user'}) } catch (err) { await this.uninstall(name).catch(err => this.debug(err)) throw err } } + async add(plugin: Config.PJSON.PluginTypes) { + const pjson = await this.pjson() + pjson.anycli.plugins = _.uniq([...pjson.anycli.plugins || [], plugin]) + await this.savePJSON(pjson) + } + + async remove(name: string) { + const pjson = await this.pjson() + if (pjson.dependencies) delete pjson.dependencies[name] + pjson.anycli.plugins = _(this.normalizePlugins(pjson.anycli.plugins)) + .filter(p => p.name !== name) + .value() + await this.savePJSON(pjson) + } + async uninstall(name: string) { - await this.manifest.remove(name) try { await this.yarn.exec(['remove', name]) - } catch (err) { - cli.warn(err) + } finally { + await this.remove(name) } } - async hasPlugin(name: string): Promise { + async update() { + const plugins = await this.list() + if (plugins.length === 0) return + cli.action.start(`${this.config.name}: Updating plugins`) + await this.yarn.exec(['add', ...plugins + .filter((p): p is Config.PJSON.PluginTypes.User => p.type === 'user') + .map(p => `${p.name}@${p.tag}`) + ]) + cli.action.stop() + } + + async hasPlugin(name: string) { const list = await this.list() - const plugin = list.find(([n]) => this.friendlyName(n) === this.friendlyName(name)) - if (plugin) return plugin[0] + return list.find(p => this.friendlyName(p.name) === this.friendlyName(name)) + } + + async yarnNodeVersion(): Promise { + try { + let f = await loadJSON(path.join(this.config.dataDir, 'node_modules', '.yarn-integrity')) + return f.nodeVersion + } catch (err) { + if (err.code !== 'ENOENT') cli.warn(err) + } } unfriendlyName(name: string): string | undefined { @@ -71,36 +127,43 @@ export default class Plugins { return match[1] } - userPluginPath(name: string): string { - return path.join(this.userPluginsDir, 'node_modules', name) - } - - private async loadPlugin(name: string, _: string) { - const config = await read({root: this.userPluginPath(name)}) - return this.config.engine!.load(config) - // return this.config.engine!.load(config, {resetCache: true}) - } + // private async loadPlugin(plugin: Config.PJSON.PluginTypes) { + // return Config.load({...plugin as any, root: this.config.dataDir}) + // } private async createPJSON() { if (!await fs.pathExists(this.pjsonPath)) { - await fs.outputJSON(this.pjsonPath, {private: true, anycli: {schema: 1}}, {spaces: 2}) + await this.savePJSON(initPJSON) } } - private get userPluginsDir() { - return path.join(this.config.dataDir, 'plugins') - } private get pjsonPath() { - return path.join(this.userPluginsDir, 'package.json') + return path.join(this.config.dataDir, 'package.json') } - private async fetchVersionFromNPM(plugin: {name: string, tag: string}): Promise { + private async npmHasPackage(name: string): Promise { try { - let url = `${this.config.npmRegistry}/-/package/${plugin.name.replace('/', '%2f')}/dist-tags` - const {body: pkg} = await HTTP.get(url) - return pkg[plugin.tag] + let url = `${this.config.npmRegistry}/-/package/${name.replace('/', '%2f')}/dist-tags` + await HTTP.get(url) + return true } catch (err) { this.debug(err) + return false } } + + private async savePJSON(pjson: Config.PJSON.User) { + pjson.anycli.plugins = this.normalizePlugins(pjson.anycli.plugins) + await fs.outputJSON(this.pjsonPath, pjson, {spaces: 2}) + } + + private normalizePlugins(input: Config.PJSON.User['anycli']['plugins']) { + let plugins = (input || []).map(p => { + if (typeof p === 'string') { + return {name: p, type: 'user', tag: 'latest'} as Config.PJSON.PluginTypes.User + } else return p + }) + plugins = _.uniqWith(plugins, (a, b) => a.name === b.name || (a.type === 'link' && b.type === 'link' && a.root === b.root)) + return plugins + } } diff --git a/src/yarn.ts b/src/yarn.ts index 3572b763..ddaa282c 100644 --- a/src/yarn.ts +++ b/src/yarn.ts @@ -1,5 +1,4 @@ import {IConfig} from '@anycli/config' -import * as fs from 'fs-extra' import * as path from 'path' const debug = require('debug')('cli:yarn') @@ -41,7 +40,6 @@ export default class Yarn { } async exec(args: string[] = []): Promise { - if (args.length !== 0) await this.checkForYarnLock() if (args[0] !== 'run') { const cacheDir = path.join(this.config.cacheDir, 'yarn') args = [ @@ -49,6 +47,8 @@ export default class Yarn { '--non-interactive', `--mutex=file:${path.join(this.cwd, 'yarn.lock')}`, `--preferred-cache-folder=${cacheDir}`, + '--check-files', + // '--no-lockfile', ...this.proxyArgs(), ] if (this.config.npmRegistry) { @@ -78,13 +78,6 @@ export default class Yarn { } } - async checkForYarnLock() { - // add yarn lockfile if it does not exist - if (this.cwd && !await fs.pathExists(path.join(this.cwd, 'yarn.lock'))) { - await this.exec() - } - } - proxyArgs(): string[] { let args = [] let http = process.env.http_proxy || process.env.HTTP_PROXY diff --git a/test/commands/plugins/index.test.ts b/test/commands/plugins/index.test.ts index d5004cee..c01d1766 100644 --- a/test/commands/plugins/index.test.ts +++ b/test/commands/plugins/index.test.ts @@ -2,32 +2,35 @@ import {expect, test} from '../../test' describe('command', () => { test - .command(['plugins:install', 'status']) + .command(['plugins:install', 'status'], {resetConfig: true}) .stdout() - .command(['plugins']) + .command(['plugins'], {resetConfig: true}) .do(output => expect(output.stdout).to.contain('status ')) .stdout() - .command(['status']) + .command(['status'], {resetConfig: true}) .do(output => expect(output.stdout).to.contain('No known issues at this time')) .command(['plugins:uninstall', '@heroku-cli/plugin-status']) .stdout() - .command(['plugins']) + .command(['plugins'], {resetConfig: true}) .do(output => expect(output.stdout).to.equal('no plugins installed\n')) .it('installs and uninstalls status') test - .command(['plugins:install', '@heroku-cli/plugin-status']) + .command(['plugins:install', '@heroku-cli/plugin-status'], {resetConfig: true}) .stdout() - .command(['plugins']) + .command(['plugins'], {resetConfig: true}) .do(output => expect(output.stdout).to.contain('status ')) .stdout() - .command(['status']) + .command(['status'], {resetConfig: true}) .do(output => expect(output.stdout).to.contain('No known issues at this time')) - .command(['plugins:uninstall', 'status']) + .it('installs @heroku-cli/plugin-status') + + test + .command(['plugins:install', 'heroku-debug@beta'], {resetConfig: true}) .stdout() - .command(['plugins']) - .do(output => expect(output.stdout).to.equal('no plugins installed\n')) - .it('installs and uninstalls @heroku-cli/plugin-status') + .command(['plugins'], {resetConfig: true}) + .do(output => expect(output.stdout).to.match(/heroku-debug \d+\.\d+\.\d+-beta \(beta\)/)) + .it('installs @heroku-cli/plugin-status@beta') test .skip() diff --git a/test/test.ts b/test/test.ts index 31d0880b..a5b12cd5 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,21 +1,15 @@ -import {IConfig, IEngine, read} from '@anycli/config' -import {expect, FancyTypes, NockScope, test as base} from '@anycli/test' +import * as Config from '@anycli/config' +import * as Fancy from '@anycli/test' import * as fs from 'fs-extra' -export const test = base +export const test = Fancy.test .finally(async () => { - const config = await read({root: __dirname}) + const config = await Config.load() await Promise.all([ - fs.remove(config.cacheDir), + // fs.remove(config.cacheDir), fs.remove(config.configDir), fs.remove(config.dataDir), ]) }) -export { - IEngine, - expect, - IConfig, - FancyTypes, - NockScope, -} +export {expect} from 'fancy-test' diff --git a/yarn.lock b/yarn.lock index 66a6dd76..9c350a27 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,6 +22,38 @@ lodash "^4.17.4" tslib "^1.9.0" +"@anycli/command@^0.3.8": + version "0.3.10" + resolved "https://registry.npmjs.org/@anycli/command/-/command-0.3.10.tgz#bf0707628fb93066f0f043c76d9073411458d1e8" + dependencies: + "@anycli/parser" "^3.0.4" + cli-ux "^3.3.13" + debug "^3.1.0" + lodash "^4.17.4" + tslib "^1.9.0" + +"@anycli/command@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@anycli/command/-/command-1.2.0.tgz#10692132c097e620f6ff5e9560fb1b6921ae146a" + dependencies: + "@anycli/parser" "^3.2.1" + cli-ux "^3.3.13" + debug "^3.1.0" + fs-extra "^5.0.0" + load-json-file "^4.0.0" + lodash "^4.17.4" + +"@anycli/command@^1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@anycli/command/-/command-1.2.2.tgz#1969bc3df292256e2eb0481c48eace0387cd6484" + dependencies: + "@anycli/parser" "^3.2.1" + cli-ux "^3.3.13" + debug "^3.1.0" + fs-extra "^5.0.0" + load-json-file "^4.0.0" + lodash "^4.17.4" + "@anycli/config@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@anycli/config/-/config-0.3.0.tgz#a0938488e7afc507d69ec13a8e52c71aaecc08ea" @@ -33,6 +65,19 @@ lodash "^4.17.4" read-pkg "^3.0.0" +"@anycli/config@^1.0.16": + version "1.0.16" + resolved "https://registry.yarnpkg.com/@anycli/config/-/config-1.0.16.tgz#dc21f8487655fee9b225acfbda65cd2939f997cf" + dependencies: + cli-ux "^3.3.13" + debug "^3.1.0" + fs-extra "^5.0.0" + fs-extra-debug "^1.0.4" + globby "^7.1.1" + load-json-file "^4.0.0" + lodash "^4.17.4" + read-pkg "^3.0.0" + "@anycli/dev-cli@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@anycli/dev-cli/-/dev-cli-0.1.3.tgz#bd3d1229d17c2f61176f872923d4841a539a0cb3" @@ -46,7 +91,7 @@ cli-ux "^3.3.13" fs-extra "^5.0.0" -"@anycli/engine@^0.3.0", "@anycli/engine@^0.3.1": +"@anycli/engine@^0.3.0": version "0.3.1" resolved "https://registry.yarnpkg.com/@anycli/engine/-/engine-0.3.1.tgz#c352d9cc73e66759ddc88c72da2907f1e1a0d553" dependencies: @@ -58,6 +103,19 @@ lodash "^4.17.4" semver "^5.5.0" +"@anycli/engine@^0.3.6": + version "0.3.6" + resolved "https://registry.npmjs.org/@anycli/engine/-/engine-0.3.6.tgz#827c6af42183572565e69f698937a5c171321fc0" + dependencies: + "@anycli/manifest-file" "^0.3.9" + cli-ux "^3.3.13" + debug "^3.1.0" + fs-extra "^5.0.0" + fs-extra-debug "^1.0.4" + globby "^7.1.1" + lodash "^4.17.4" + semver "^5.5.0" + "@anycli/manifest-file@^0.3.8": version "0.3.8" resolved "https://registry.yarnpkg.com/@anycli/manifest-file/-/manifest-file-0.3.8.tgz#d175a27e1d2009a14080c7e8dd808c1c856de468" @@ -69,6 +127,17 @@ lodash "^4.17.4" proper-lockfile "^3.0.2" +"@anycli/manifest-file@^0.3.9": + version "0.3.9" + resolved "https://registry.npmjs.org/@anycli/manifest-file/-/manifest-file-0.3.9.tgz#d39ab157c0cd9a15471ef8bfd36654c2c4b01730" + dependencies: + cli-ux "^3.3.13" + debug "^3.1.0" + fs-extra "^5.0.0" + load-json-file "^4.0.0" + lodash "^4.17.4" + proper-lockfile "^3.0.2" + "@anycli/parser@^3.0.4": version "3.0.4" resolved "https://registry.yarnpkg.com/@anycli/parser/-/parser-3.0.4.tgz#8714c4f73134625fe3781b9e2b5aa0ebb5685a82" @@ -77,6 +146,14 @@ chalk "^2.3.0" lodash "^4.17.4" +"@anycli/parser@^3.2.1": + version "3.2.1" + resolved "https://registry.yarnpkg.com/@anycli/parser/-/parser-3.2.1.tgz#89fe1c37f8792d6c1cba7d1c4ec2fb42b290ce05" + dependencies: + "@anycli/screen" "^0.0.3" + chalk "^2.3.0" + lodash "^4.17.4" + "@anycli/plugin-help@^0.4.0": version "0.4.1" resolved "https://registry.yarnpkg.com/@anycli/plugin-help/-/plugin-help-0.4.1.tgz#ee8aaaa8cf611f77d10725a6f5e27163e4ff95c4" @@ -91,11 +168,11 @@ widest-line "^2.0.0" wrap-ansi "^3.0.1" -"@anycli/plugin-help@^0.4.5": - version "0.4.5" - resolved "https://registry.npmjs.org/@anycli/plugin-help/-/plugin-help-0.4.5.tgz#1d4693bd55a1c892aa80a0cb53039ae953814b47" +"@anycli/plugin-help@^0.5.0": + version "0.5.0" + resolved "https://registry.npmjs.org/@anycli/plugin-help/-/plugin-help-0.5.0.tgz#90090c054277ee3e5b8a7df87dcc85a0e2fdf493" dependencies: - "@anycli/command" "^0.3.7" + "@anycli/command" "^0.3.8" "@anycli/screen" "^0.0.3" chalk "^2.3.0" cli-ux "^3.3.13" @@ -121,27 +198,27 @@ "@anycli/command" "^0.3.5" cli-ux "^3.3.12" -"@anycli/plugin-version@^0.1.30": - version "0.1.30" - resolved "https://registry.npmjs.org/@anycli/plugin-version/-/plugin-version-0.1.30.tgz#0c80e4c856f4a3249a5d56b4c9d553b20c514198" +"@anycli/plugin-version@^0.1.31": + version "0.1.31" + resolved "https://registry.yarnpkg.com/@anycli/plugin-version/-/plugin-version-0.1.31.tgz#77efb89cd7905ae1d0d6c104322d369412fa63c7" dependencies: - "@anycli/command" "^0.3.7" + "@anycli/command" "^1.2.0" cli-ux "^3.3.13" "@anycli/screen@^0.0.3": version "0.0.3" resolved "https://registry.yarnpkg.com/@anycli/screen/-/screen-0.0.3.tgz#f0afd970c3ed725702948a45a874ede1fdd9362e" -"@anycli/test@^0.10.3": - version "0.10.3" - resolved "https://registry.yarnpkg.com/@anycli/test/-/test-0.10.3.tgz#f0179c6407f7a4a71893bd1ded95a0669b20ea31" +"@anycli/test@^0.10.8": + version "0.10.8" + resolved "https://registry.yarnpkg.com/@anycli/test/-/test-0.10.8.tgz#cc3405991eea72fcc6b213c8589a57e88f9f5bbf" dependencies: - fancy-test "^0.6.6" + fancy-test "^0.6.10" lodash "^4.17.4" -"@anycli/tslint@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@anycli/tslint/-/tslint-0.2.2.tgz#46e899f58019600fc6a7191e7fde47d6b4513df1" +"@anycli/tslint@^0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@anycli/tslint/-/tslint-0.2.5.tgz#63feeb981b11f36326e0cb745c62f51d55c2ed67" dependencies: tslint "^5.9.1" tslint-xo "^0.6.0" @@ -169,6 +246,10 @@ dependencies: "@types/node" "*" +"@types/load-json-file@^2.0.7": + version "2.0.7" + resolved "https://registry.npmjs.org/@types/load-json-file/-/load-json-file-2.0.7.tgz#c887826f5230b7507d5230994d26315c6776be06" + "@types/lodash@^4.14.100": version "4.14.100" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.100.tgz#f353dd9d3a9785638b6cb8023e6639097bd31969" @@ -203,6 +284,10 @@ dependencies: "@types/normalize-package-data" "*" +"@types/semver@^5.5.0": + version "5.5.0" + resolved "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" + "@types/strip-bom@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/strip-bom/-/strip-bom-3.0.0.tgz#14a8ec3956c2e81edb7520790aecf21c290aebd2" @@ -619,9 +704,9 @@ eslint-ast-utils@^1.0.0: lodash.get "^4.4.2" lodash.zip "^4.2.0" -eslint-config-anycli@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/eslint-config-anycli/-/eslint-config-anycli-1.3.1.tgz#e05fefcdbdffdd3e74069dac5252a8bc70ae7eb2" +eslint-config-anycli@^1.3.2: + version "1.3.2" + resolved "https://registry.npmjs.org/eslint-config-anycli/-/eslint-config-anycli-1.3.2.tgz#0f28e63a8ae93d490623cdcd89eeafcb7635b082" dependencies: eslint-config-xo-space "^0.17.0" eslint-plugin-mocha "^4.11.0" @@ -676,9 +761,9 @@ eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@^4.16.0: - version "4.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.16.0.tgz#934ada9e98715e1d7bbfd6f6f0519ed2fab35cc1" +eslint@^4.17.0: + version "4.17.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.17.0.tgz#dc24bb51ede48df629be7031c71d9dc0ee4f3ddf" dependencies: ajv "^5.3.0" babel-code-frame "^6.22.0" @@ -770,9 +855,9 @@ extract-stack@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-1.0.0.tgz#b97acaf9441eea2332529624b732fc5a1c8165fa" -fancy-test@^0.6.6: - version "0.6.6" - resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-0.6.6.tgz#cda1afbf57ea2fb05291edbff34c0bbc2600d956" +fancy-test@^0.6.10: + version "0.6.10" + resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-0.6.10.tgz#39001bcb117b7067c851dc58da6236a08a49e267" dependencies: lodash "^4.17.4" stdout-stderr "^0.1.6" @@ -811,6 +896,12 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" +fs-extra-debug@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/fs-extra-debug/-/fs-extra-debug-1.0.4.tgz#5efa3bd2a7ef6753fa79cfd810aab36445fa4788" + dependencies: + debug "^3.1.0" + fs-extra@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" @@ -1071,7 +1162,7 @@ levn@^0.3.0, levn@~0.3.0: load-json-file@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" dependencies: graceful-fs "^4.1.2" parse-json "^4.0.0" @@ -1402,7 +1493,7 @@ safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: "semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + resolved "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" semver@5.3.0: version "5.3.0"