From 86c34f10344a905fd51dd580860640e44930dfe9 Mon Sep 17 00:00:00 2001 From: Duarte Amorim Date: Mon, 26 Feb 2018 18:05:53 +0000 Subject: [PATCH] feat: print commit message when the message is invalid When using the CLI, if the message is invalid we lose all its content (using a custom message in VIM mode), which might be a little frustrating when we a have a long commit body. This feature prints the full message when there are linting errors. Closes #222 --- @commitlint/cli/src/cli.js | 8 +- @commitlint/cli/src/cli.test.js | 19 ++ @commitlint/lint/src/index.js | 15 +- @commitlint/lint/src/index.test.js | 40 ++++ yarn.lock | 358 ++++++++++++++++++++++++++--- 5 files changed, 408 insertions(+), 32 deletions(-) diff --git a/@commitlint/cli/src/cli.js b/@commitlint/cli/src/cli.js index 3df2149cdd..947b0d1572 100755 --- a/@commitlint/cli/src/cli.js +++ b/@commitlint/cli/src/cli.js @@ -114,11 +114,13 @@ async function main(options) { messages.map(async message => { const report = await lint(message, loaded.rules, opts); const formatted = format(report, {color: flags.color}); + const input = + report.errors.length > 0 + ? `\n${report.input}\n` + : message.split('\n')[0]; if (!flags.quiet) { - console.log( - `${fmt.grey('⧗')} input: ${fmt.bold(message.split('\n')[0])}` - ); + console.log(`${fmt.grey('⧗')} input: ${fmt.bold(input)}`); console.log(formatted.join('\n')); } diff --git a/@commitlint/cli/src/cli.test.js b/@commitlint/cli/src/cli.test.js index 4f54be168b..f335672af6 100644 --- a/@commitlint/cli/src/cli.test.js +++ b/@commitlint/cli/src/cli.test.js @@ -196,6 +196,25 @@ test('should handle linting with issue prefixes', async t => { t.is(actual.code, 0); }); +test('should print full commit message when input from stdin fails', async t => { + const cwd = await git.bootstrap('fixtures/simple'); + const input = 'foo: bar\n\nFoo bar bizz buzz.\n\nCloses #123.'; + const actual = await cli([], {cwd})(input); + + t.true(actual.stdout.includes(input)); + t.is(actual.code, 1); +}); + +test('should not print full commit message when input succeeds', async t => { + const cwd = await git.bootstrap('fixtures/empty'); + const message = 'foo: bar\n\nFoo bar bizz buzz.\n\nCloses #123.'; + const actual = await cli([], {cwd})(message); + + t.false(actual.stdout.includes(message)); + t.true(actual.stdout.includes(message.split('\n')[0])); + t.is(actual.code, 0); +}); + async function writePkg(payload, options) { const pkgPath = path.join(options.cwd, 'package.json'); const pkg = JSON.parse(await sander.readFile(pkgPath)); diff --git a/@commitlint/lint/src/index.js b/@commitlint/lint/src/index.js index 5987f91fff..e87027e3c6 100644 --- a/@commitlint/lint/src/index.js +++ b/@commitlint/lint/src/index.js @@ -4,13 +4,23 @@ import parse from '@commitlint/parse'; import implementations from '@commitlint/rules'; import entries from 'lodash.topairs'; +const buildCommitMesage = ({header, body, footer}) => { + let message = header; + + message = body ? `${message}\n\n${body}` : message; + message = footer ? `${message}\n\n${footer}` : message; + + return message; +}; + export default async (message, rules = {}, opts = {}) => { // Found a wildcard match, skip if (isIgnored(message)) { return { valid: true, errors: [], - warnings: [] + warnings: [], + input: message }; } @@ -133,6 +143,7 @@ export default async (message, rules = {}, opts = {}) => { return { valid, errors, - warnings + warnings, + input: buildCommitMesage(parsed) }; }; diff --git a/@commitlint/lint/src/index.test.js b/@commitlint/lint/src/index.test.js index d8794cca14..bdb6afa1f0 100644 --- a/@commitlint/lint/src/index.test.js +++ b/@commitlint/lint/src/index.test.js @@ -35,6 +35,7 @@ test('positive on ignored message and broken rule', async t => { 'type-empty': [2, 'never'] }); t.true(actual.valid); + t.is(actual.input, 'Revert "some bogus commit"'); }); test('positive on stub message and opts', async t => { @@ -182,3 +183,42 @@ test('fails for custom issue prefix', async t => { t.false(report.valid); }); + +test('returns original message only with commit header', async t => { + const message = 'foo: bar'; + const report = await lint(message); + + t.is(report.input, message); +}); + +test('returns original message with commit header and body', async t => { + const message = 'foo: bar/n/nFoo bar bizz buzz.'; + const report = await lint(message); + + t.is(report.input, message); +}); + +test('returns original message with commit header, body and footer', async t => { + const message = 'foo: bar/n/nFoo bar bizz buzz./n/nCloses #1'; + const report = await lint(message); + + t.is(report.input, message); +}); + +test('returns original message with commit header, body and footer, parsing comments', async t => { + const expected = 'foo: bar/n/nFoo bar bizz buzz./n/nCloses #1'; + const message = `${expected}\n\n# Some comment to ignore`; + const report = await lint( + message, + { + 'references-empty': [2, 'never'] + }, + { + parserOpts: { + commentChar: '#' + } + } + ); + + t.is(report.input, expected); +}); diff --git a/yarn.lock b/yarn.lock index 1df4c242a1..164cc11cbe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -53,15 +53,6 @@ imurmurhash "^0.1.4" slide "^1.1.5" -"@commitlint/test@6.1.2": - version "6.1.2" - resolved "https://registry.npmjs.org/@commitlint/test/-/test-6.1.2.tgz#4f4a9dcd49721a8fa2411512898fa60d2b035241" - dependencies: - "@commitlint/utils" "^6.1.2" - "@marionebl/sander" "0.6.1" - execa "0.9.0" - pkg-dir "2.0.0" - "@concordance/react@^1.0.0": version "1.0.0" resolved "https://registry.npmjs.org/@concordance/react/-/react-1.0.0.tgz#fcf3cad020e5121bfd1c61d05bc3516aac25f734" @@ -112,6 +103,10 @@ acorn@^3.0.4: version "3.3.0" resolved "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" +acorn@^5.4.0: + version "5.4.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz#fdc58d9d17f4a4e98d102ded826a9b9759125102" + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -128,11 +123,15 @@ agentkeepalive@^3.3.0: dependencies: humanize-ms "^1.2.1" +ajv-keywords@^1.0.0: + version "1.5.1" + resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + ajv-keywords@^2.1.0: version "2.1.1" resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" -ajv@^4.9.1: +ajv@^4.7.0, ajv@^4.9.1: version "4.11.8" resolved "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: @@ -2119,6 +2118,13 @@ cross-env@5.1.1: cross-spawn "^5.1.0" is-windows "^1.0.0" +cross-spawn@^4.0.0: + version "4.0.2" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -2164,6 +2170,12 @@ cz-conventional-changelog@1.2.0: right-pad "^1.0.1" word-wrap "^1.0.3" +d@1: + version "1.0.0" + resolved "https://registry.npmjs.org/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + dargs@^4.0.1: version "4.1.0" resolved "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" @@ -2197,7 +2209,7 @@ dateformat@^1.0.11, dateformat@^1.0.12: get-stdin "^4.0.1" meow "^3.3.0" -debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.4.1, debug@^2.6.8: +debug@2, debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.3.3, debug@^2.4.1, debug@^2.6.8: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -2236,6 +2248,12 @@ dedent@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" +deep-assign@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/deep-assign/-/deep-assign-1.0.0.tgz#b092743be8427dc621ea0067cdec7e70dd19f37b" + dependencies: + is-obj "^1.0.0" + deep-equal@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" @@ -2394,7 +2412,7 @@ doctrine@1.5.0: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^2.1.0: +doctrine@^2.0.0, doctrine@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" dependencies: @@ -2514,10 +2532,36 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.39" + resolved "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.39.tgz#fca21b67559277ca4ac1a1ed7048b107b6f76d87" + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.1" + es6-error@^4.0.1, es6-error@^4.0.2: version "4.0.2" resolved "https://registry.npmjs.org/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98" +es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + es6-promise@^4.0.3: version "4.1.1" resolved "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" @@ -2528,6 +2572,32 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -2536,6 +2606,15 @@ escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^ version "1.0.5" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + eslint-ast-utils@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz#3d58ba557801cfb1c941d68131ee9f8c34bd1586" @@ -2549,11 +2628,15 @@ eslint-config-prettier@2.9.0, eslint-config-prettier@^2.9.0: dependencies: get-stdin "^5.0.1" +eslint-config-xo@^0.18.0: + version "0.18.2" + resolved "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.18.2.tgz#0a157120875619929e735ffd6b185c41e8a187af" + eslint-config-xo@^0.20.0: version "0.20.1" resolved "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.20.1.tgz#ad04db35e62bacedcf7b7e8a76388364a78d616d" -eslint-formatter-pretty@^1.3.0: +eslint-formatter-pretty@^1.0.0, eslint-formatter-pretty@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-1.3.0.tgz#985d9e41c1f8475f4a090c5dbd2dfcf2821d607e" dependencies: @@ -2577,7 +2660,7 @@ eslint-module-utils@^2.1.1: debug "^2.6.8" pkg-dir "^1.0.0" -eslint-plugin-ava@^4.5.0: +eslint-plugin-ava@^4.2.0, eslint-plugin-ava@^4.5.0: version "4.5.1" resolved "https://registry.npmjs.org/eslint-plugin-ava/-/eslint-plugin-ava-4.5.1.tgz#a51b89a306dfd5b2f91185e283837aeade6f9e5c" dependencies: @@ -2590,7 +2673,7 @@ eslint-plugin-ava@^4.5.0: multimatch "^2.1.0" pkg-up "^2.0.0" -eslint-plugin-import@^2.8.0: +eslint-plugin-import@^2.0.0, eslint-plugin-import@^2.8.0: version "2.9.0" resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.9.0.tgz#26002efbfca5989b7288ac047508bd24f217b169" dependencies: @@ -2605,7 +2688,7 @@ eslint-plugin-import@^2.8.0: minimatch "^3.0.3" read-pkg-up "^2.0.0" -eslint-plugin-no-use-extend-native@^0.3.12: +eslint-plugin-no-use-extend-native@^0.3.12, eslint-plugin-no-use-extend-native@^0.3.2: version "0.3.12" resolved "https://registry.npmjs.org/eslint-plugin-no-use-extend-native/-/eslint-plugin-no-use-extend-native-0.3.12.tgz#3ad9a00c2df23b5d7f7f6be91550985a4ab701ea" dependencies: @@ -2630,10 +2713,20 @@ eslint-plugin-prettier@^2.6.0: fast-diff "^1.1.1" jest-docblock "^21.0.0" -eslint-plugin-promise@^3.6.0: +eslint-plugin-promise@^3.4.0, eslint-plugin-promise@^3.6.0: version "3.6.0" resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.6.0.tgz#54b7658c8f454813dc2a870aff8152ec4969ba75" +eslint-plugin-unicorn@^2.1.0: + version "2.1.2" + resolved "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-2.1.2.tgz#99dffe9f4773b04bc39356a7febd64dd700274bc" + dependencies: + import-modules "^1.1.0" + lodash.camelcase "^4.1.1" + lodash.kebabcase "^4.0.1" + lodash.snakecase "^4.0.1" + lodash.upperfirst "^4.2.0" + eslint-plugin-unicorn@^4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-4.0.2.tgz#845de915e7a975f15779466fc92cc01973bbf103" @@ -2700,6 +2793,46 @@ eslint@4.18.1, eslint@^4.17.0: table "^4.0.1" text-table "~0.2.0" +eslint@^3.18.0: + version "3.19.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.5.2" + debug "^2.1.1" + doctrine "^2.0.0" + escope "^3.6.0" + espree "^3.4.0" + esquery "^1.0.0" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.0.3" + globals "^9.14.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~2.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + espower-location-detector@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/espower-location-detector/-/espower-location-detector-1.0.0.tgz#a17b7ecc59d30e179e2bef73fb4137704cb331b5" @@ -2716,6 +2849,13 @@ espree@^3.1.3, espree@^3.5.2: acorn "^5.2.1" acorn-jsx "^3.0.0" +espree@^3.4.0: + version "3.5.3" + resolved "https://registry.npmjs.org/espree/-/espree-3.5.3.tgz#931e0af64e7fbbed26b050a29daad1fc64799fa6" + dependencies: + acorn "^5.4.0" + acorn-jsx "^3.0.0" + esprima@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" @@ -2739,7 +2879,7 @@ esrecurse@^4.1.0: estraverse "^4.1.0" object-assign "^4.0.1" -estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -2751,6 +2891,13 @@ etag@~1.8.1: version "1.8.1" resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + execa@0.9.0, execa@^0.9.0: version "0.9.0" resolved "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" @@ -2763,6 +2910,18 @@ execa@0.9.0, execa@^0.9.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^0.5.0: + version "0.5.1" + resolved "https://registry.npmjs.org/execa/-/execa-0.5.1.tgz#de3fb85cb8d6e91c85bcbceb164581785cb57b36" + dependencies: + cross-spawn "^4.0.0" + get-stream "^2.2.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + execa@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" @@ -3207,6 +3366,16 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + genfun@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/genfun/-/genfun-4.0.1.tgz#ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1" @@ -3243,7 +3412,7 @@ get-set-props@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/get-set-props/-/get-set-props-0.1.0.tgz#998475c178445686d0b32246da5df8dbcfbe8ea3" -get-stdin@5.0.1, get-stdin@^5.0.1: +get-stdin@5.0.1, get-stdin@^5.0.0, get-stdin@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" @@ -3251,6 +3420,13 @@ get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" +get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -3377,7 +3553,7 @@ globals@^11.0.1: version "11.0.1" resolved "https://registry.npmjs.org/globals/-/globals-11.0.1.tgz#12a87bb010e5154396acc535e1e43fc753b0e5e8" -globals@^9.18.0: +globals@^9.14.0, globals@^9.18.0: version "9.18.0" resolved "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -3692,7 +3868,7 @@ ignore-by-default@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" -ignore@^3.3.3, ignore@^3.3.5, ignore@^3.3.6: +ignore@^3.2.0, ignore@^3.2.6, ignore@^3.3.3, ignore@^3.3.5, ignore@^3.3.6: version "3.3.7" resolved "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" @@ -3799,6 +3975,24 @@ inquirer@1.2.3: strip-ansi "^3.0.0" through "^2.3.6" +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + inquirer@^3.0.6, inquirer@^3.2.2: version "3.3.0" resolved "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" @@ -4006,6 +4200,20 @@ is-js-type@^2.0.0: dependencies: js-types "^1.0.0" +is-my-ip-valid@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" + +is-my-json-valid@^2.10.0: + version "2.17.2" + resolved "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz#6b2103a288e94ef3de5cf15d29dd85fc4b78d65c" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + is-my-ip-valid "^1.0.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + is-npm@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" @@ -4087,6 +4295,10 @@ is-promise@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + is-proto-prop@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-proto-prop/-/is-proto-prop-1.0.0.tgz#b3951f95c089924fb5d4fcda6542ab3e83e2b220" @@ -4271,7 +4483,7 @@ js-types@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/js-types/-/js-types-1.0.0.tgz#d242e6494ed572ad3c92809fc8bed7f7687cbf03" -js-yaml@^3.8.2, js-yaml@^3.9.0, js-yaml@^3.9.1: +js-yaml@^3.5.1, js-yaml@^3.8.2, js-yaml@^3.9.0, js-yaml@^3.9.1: version "3.10.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" dependencies: @@ -4306,7 +4518,7 @@ json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" -json-stable-stringify@^1.0.1: +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" dependencies: @@ -4340,6 +4552,10 @@ jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -4664,7 +4880,7 @@ lodash.includes@4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" -lodash.isequal@^4.5.0: +lodash.isequal@^4.4.0, lodash.isequal@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" @@ -4890,7 +5106,7 @@ mem@^1.1.0: dependencies: mimic-fn "^1.0.0" -meow@3.7.0, meow@^3.3.0, meow@^3.7.0: +meow@3.7.0, meow@^3.3.0, meow@^3.4.2, meow@^3.7.0: version "3.7.0" resolved "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" dependencies: @@ -5852,6 +6068,10 @@ plur@^2.0.0, plur@^2.1.2: dependencies: irregular-plurals "^1.0.0" +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + pluralize@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" @@ -5917,6 +6137,10 @@ process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + progress@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" @@ -6338,7 +6562,7 @@ require-precompiled@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/require-precompiled/-/require-precompiled-0.1.0.tgz#5a1b52eb70ebed43eb982e974c85ab59571e56fa" -require-uncached@^1.0.3: +require-uncached@^1.0.2, require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" dependencies: @@ -6630,6 +6854,14 @@ shelljs@0.7.6: interpret "^1.0.0" rechoir "^0.6.2" +shelljs@^0.7.5: + version "0.7.8" + resolved "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -6709,6 +6941,12 @@ socks@^1.1.10: ip "^1.1.4" smart-buffer "^1.0.13" +sort-keys@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + dependencies: + is-plain-obj "^1.0.0" + sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -7020,6 +7258,17 @@ symbol-observable@^1.0.1, symbol-observable@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" +table@^3.7.8: + version "3.8.3" + resolved "https://registry.npmjs.org/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + table@^4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" @@ -7404,6 +7653,12 @@ user-home@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -7570,7 +7825,7 @@ write-file-atomic@~2.1.0: imurmurhash "^0.1.4" slide "^1.1.5" -write-json-file@^2.2.0: +write-json-file@^2.0.0, write-json-file@^2.2.0: version "2.3.0" resolved "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" dependencies: @@ -7581,6 +7836,13 @@ write-json-file@^2.2.0: sort-keys "^2.0.0" write-file-atomic "^2.0.0" +write-pkg@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/write-pkg/-/write-pkg-2.1.0.tgz#353aa44c39c48c21440f5c08ce6abd46141c9c08" + dependencies: + sort-keys "^1.1.2" + write-json-file "^2.0.0" + write-pkg@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9" @@ -7611,6 +7873,18 @@ xdg-basedir@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" +xo-init@^0.5.0: + version "0.5.0" + resolved "https://registry.npmjs.org/xo-init/-/xo-init-0.5.0.tgz#8e28dec79676cc5e042fde5fd8f710e2646b0e36" + dependencies: + arrify "^1.0.0" + execa "^0.5.0" + minimist "^1.1.3" + path-exists "^3.0.0" + read-pkg-up "^2.0.0" + the-argv "^1.0.0" + write-pkg "^2.0.0" + xo-init@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/xo-init/-/xo-init-0.7.0.tgz#634b4789e366b4f87f747ef0cee1a99ce273aa15" @@ -7624,6 +7898,36 @@ xo-init@^0.7.0: the-argv "^1.0.0" write-pkg "^3.1.0" +xo@0.18.2: + version "0.18.2" + resolved "https://registry.npmjs.org/xo/-/xo-0.18.2.tgz#92a42eb02a4fb149dfea5518021914f5aac84ff0" + dependencies: + arrify "^1.0.0" + debug "^2.2.0" + deep-assign "^1.0.0" + eslint "^3.18.0" + eslint-config-xo "^0.18.0" + eslint-formatter-pretty "^1.0.0" + eslint-plugin-ava "^4.2.0" + eslint-plugin-import "^2.0.0" + eslint-plugin-no-use-extend-native "^0.3.2" + eslint-plugin-promise "^3.4.0" + eslint-plugin-unicorn "^2.1.0" + get-stdin "^5.0.0" + globby "^6.0.0" + has-flag "^2.0.0" + ignore "^3.2.6" + lodash.isequal "^4.4.0" + meow "^3.4.2" + multimatch "^2.1.0" + path-exists "^3.0.0" + pkg-conf "^2.0.0" + resolve-cwd "^1.0.0" + resolve-from "^2.0.0" + slash "^1.0.0" + update-notifier "^2.1.0" + xo-init "^0.5.0" + xo@0.20.3: version "0.20.3" resolved "https://registry.npmjs.org/xo/-/xo-0.20.3.tgz#6fb1597b5e361fd561535bbf84cf97eefaac5d80"