diff --git a/@commitlint/core/fixtures/global-install/commitlint.config.js b/@commitlint/core/fixtures/global-install/commitlint.config.js new file mode 100644 index 0000000000..c72ec22805 --- /dev/null +++ b/@commitlint/core/fixtures/global-install/commitlint.config.js @@ -0,0 +1,3 @@ +module.exports = { + extends: ['@commitlint/config-angular'] +}; diff --git a/@commitlint/core/fixtures/missing-install/commitlint.config.js b/@commitlint/core/fixtures/missing-install/commitlint.config.js new file mode 100644 index 0000000000..c72ec22805 --- /dev/null +++ b/@commitlint/core/fixtures/missing-install/commitlint.config.js @@ -0,0 +1,3 @@ +module.exports = { + extends: ['@commitlint/config-angular'] +}; diff --git a/@commitlint/core/package.json b/@commitlint/core/package.json index 5531bd6479..d4a26bb40e 100644 --- a/@commitlint/core/package.json +++ b/@commitlint/core/package.json @@ -92,7 +92,9 @@ "find-up": "^2.1.0", "lodash": "^4.17.4", "path-exists": "^3.0.0", + "require-uncached": "^1.0.3", "resolve-from": "^3.0.0", + "resolve-global": "^0.1.0", "semver": "^5.3.0" } } diff --git a/@commitlint/core/src/library/resolve-extends.js b/@commitlint/core/src/library/resolve-extends.js index bc5d6563af..2e0593a399 100644 --- a/@commitlint/core/src/library/resolve-extends.js +++ b/@commitlint/core/src/library/resolve-extends.js @@ -1,4 +1,6 @@ +import 'resolve-global'; // eslint-disable-line import/no-unassigned-import import path from 'path'; +import requireUncached from 'require-uncached'; import resolveFrom from 'resolve-from'; import {merge, omit} from 'lodash'; @@ -38,12 +40,18 @@ function loadExtends(config = {}, context = {}) { const ctx = merge({}, context, {cwd}); // Resolve parser preset if none was present before - if (!context.parserPreset && typeof c === 'object' && typeof c.parserPreset === 'string') { + if ( + !context.parserPreset && + typeof c === 'object' && + typeof c.parserPreset === 'string' + ) { const resolvedParserPreset = resolveFrom(cwd, c.parserPreset); const parserPreset = { name: c.parserPreset, - path: `./${path.relative(process.cwd(), resolvedParserPreset)}`.split(path.sep).join('/'), + path: `./${path.relative(process.cwd(), resolvedParserPreset)}` + .split(path.sep) + .join('/'), opts: require(resolvedParserPreset) }; @@ -79,5 +87,21 @@ function resolveConfig(raw, context = {}) { } function resolveId(id, context = {}) { - return resolveFrom(context.cwd || process.cwd(), id); + const cwd = context.cwd || process.cwd(); + const localPath = resolveFrom.silent(cwd, id); + + if (typeof localPath === 'string') { + return localPath; + } + + const resolveGlobal = requireUncached('resolve-global'); + const globalPath = resolveGlobal.silent(id); + + if (typeof globalPath === 'string') { + return globalPath; + } + + const err = new Error(`Cannot find module "${id}" from "${cwd}"`); + err.code = 'MODULE_NOT_FOUND'; + throw err; } diff --git a/@commitlint/core/src/library/resolve-extends.test.js b/@commitlint/core/src/library/resolve-extends.test.js index 2e05c6ee50..0eb90d2a85 100644 --- a/@commitlint/core/src/library/resolve-extends.test.js +++ b/@commitlint/core/src/library/resolve-extends.test.js @@ -1,4 +1,7 @@ import test from 'ava'; +import execa from 'execa'; +import {fix} from '@commitlint/test'; +import * as sander from '@marionebl/sander'; import resolveExtends from './resolve-extends'; const id = id => id; @@ -14,6 +17,50 @@ test('returns an equivalent object as passed in', t => { t.deepEqual(actual, expected); }); +test.serial('falls back to global install', async t => { + const prev = process.env.PREFIX; + + const cwd = await fix.bootstrap('fixtures/global-install'); + const prefix = `${cwd}/commitlint-npm-packages`; + + const npm = args => execa('npm', args, {cwd}); + + await sander.mkdir(cwd, 'commitlint-npm-packages'); + + process.env.PREFIX = prefix; + + await npm([ + 'install', + '--global', + '@commitlint/config-angular', + '--prefix', + prefix + ]); + + const expected = {extends: ['@commitlint/config-angular']}; + t.notThrows(() => resolveExtends(expected)); + + process.env.PREFIX = prev; +}); + +test.serial('fails for missing extends', async t => { + const prev = process.env.PREFIX; + + const cwd = await fix.bootstrap('fixtures/missing-install'); + const prefix = `${cwd}/commitlint-npm-packages`; + + process.env.PREFIX = prefix; + + const input = {extends: ['@commitlint/foo-bar']}; + + t.throws( + () => resolveExtends(input, {cwd}), + /Cannot find module "@commitlint\/foo-bar" from/ + ); + + process.env.PREFIX = prev; +}); + test('uses empty prefix by default', t => { const input = {extends: ['extender-name']}; diff --git a/@packages/test/src/git.js b/@packages/test/src/git.js index c2e1950ff7..cc331802de 100644 --- a/@packages/test/src/git.js +++ b/@packages/test/src/git.js @@ -36,6 +36,7 @@ async function setup(cwd) { try { await execa('git', ['config', 'user.name', 'ava'], {cwd}); await execa('git', ['config', 'user.email', 'test@example.com'], {cwd}); + await execa('git', ['config', 'commit.gpgsign', 'false'], {cwd}); } catch (err) { console.warn(`git config in ${cwd} failed`, err.message); } diff --git a/yarn.lock b/yarn.lock index db138f8910..78e9f96e6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -110,7 +110,7 @@ acorn-jsx@^3.0.0: dependencies: acorn "^3.0.4" -acorn@>=2.5.2, acorn@^5.1.1: +acorn@>=2.5.2, acorn@^5.2.1: version "5.2.1" resolved "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz#317ac7821826c22c702d66189ab8359675f135d7" @@ -153,7 +153,7 @@ ajv@^4.7.0, ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.1.0, ajv@^5.2.0, ajv@^5.2.3: +ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: version "5.3.0" resolved "https://registry.npmjs.org/ajv/-/ajv-5.3.0.tgz#4414ff74a50879c208ee5fdc826e32c303549eda" dependencies: @@ -347,8 +347,8 @@ async@^1.0.0, async@^1.4.0, async@^1.5.0: resolved "https://registry.npmjs.org/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" async@^2.1.4: - version "2.5.0" - resolved "https://registry.npmjs.org/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" + version "2.6.0" + resolved "https://registry.npmjs.org/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" dependencies: lodash "^4.14.0" @@ -1164,8 +1164,8 @@ bcrypt-pbkdf@^1.0.0: tweetnacl "^0.14.3" binary-extensions@^1.0.0: - version "1.10.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" + version "1.11.0" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" bl@^1.0.0: version "1.2.1" @@ -1243,10 +1243,10 @@ braces@^1.8.2: repeat-element "^1.1.2" browserslist@^2.1.2: - version "2.7.0" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-2.7.0.tgz#dc375dc70048fec3d989042a35022342902eff00" + version "2.9.0" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-2.9.0.tgz#706aca15c53be15610f466e348cbfa0c00a6a379" dependencies: - caniuse-lite "^1.0.30000757" + caniuse-lite "^1.0.30000760" electron-to-chromium "^1.3.27" buf-compare@^1.0.0: @@ -1265,6 +1265,24 @@ byline@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" +cacache@^10.0.0: + version "10.0.1" + resolved "https://registry.npmjs.org/cacache/-/cacache-10.0.1.tgz#3e05f6e616117d9b54665b1b20c8aeb93ea5d36f" + dependencies: + bluebird "^3.5.0" + chownr "^1.0.1" + glob "^7.1.2" + graceful-fs "^4.1.11" + lru-cache "^4.1.1" + mississippi "^1.3.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.1" + ssri "^5.0.0" + unique-filename "^1.1.0" + y18n "^3.2.1" + cacache@^9.2.9: version "9.3.0" resolved "https://registry.npmjs.org/cacache/-/cacache-9.3.0.tgz#9cd58f2dd0b8c8cacf685b7067b416d6d3cf9db1" @@ -1365,9 +1383,9 @@ camelcase@^4.0.0, camelcase@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" -caniuse-lite@^1.0.30000757: - version "1.0.30000758" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000758.tgz#e261140076651049cf6891ed4bc649b5c8c26c69" +caniuse-lite@^1.0.30000760: + version "1.0.30000766" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000766.tgz#8a095cc5eb9923c27008ce4d0db23e65a3e28843" capture-stack-trace@^1.0.0: version "1.0.0" @@ -1420,6 +1438,10 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" +chardet@^0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/chardet/-/chardet-0.4.0.tgz#0bbe1355ac44d7a3ed4a925707c4ef70f8190f6c" + chokidar@^1.4.2, chokidar@^1.6.1, chokidar@^1.7.0: version "1.7.0" resolved "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" @@ -1440,8 +1462,8 @@ chownr@^1.0.1, chownr@~1.0.1: resolved "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" ci-info@^1.0.0: - version "1.1.1" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-1.1.1.tgz#47b44df118c48d2597b56d342e7e25791060171a" + version "1.1.2" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" circular-json@^0.3.1: version "0.3.3" @@ -1526,8 +1548,8 @@ cliui@^3.2.0: wrap-ansi "^2.0.0" clone@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + version "1.0.3" + resolved "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f" cmd-shim@^2.0.2, cmd-shim@~2.0.2: version "2.0.2" @@ -1557,8 +1579,8 @@ code-point-at@^1.0.0: resolved "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" color-convert@^1.9.0: - version "1.9.0" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + version "1.9.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" dependencies: color-name "^1.1.1" @@ -1736,46 +1758,46 @@ contains-path@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" -conventional-changelog-angular@^1.3.3, conventional-changelog-angular@^1.5.1: - version "1.5.1" - resolved "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.5.1.tgz#974e73aa1c39c392e4364f2952bd9a62904e9ea3" +conventional-changelog-angular@^1.3.3, conventional-changelog-angular@^1.5.2: + version "1.5.2" + resolved "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.5.2.tgz#2b38f665fe9c5920af1a2f82f547f4babe6de57c" dependencies: compare-func "^1.3.1" q "^1.4.1" -conventional-changelog-atom@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz#d40a9b297961b53c745e5d1718fd1a3379f6a92f" +conventional-changelog-atom@^0.1.2: + version "0.1.2" + resolved "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.1.2.tgz#12595ad5267a6937c34cf900281b1c65198a4c63" dependencies: q "^1.4.1" conventional-changelog-cli@^1.3.2: - version "1.3.4" - resolved "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-1.3.4.tgz#38f7ff7ac7bca92ea110897ea08b473f2055a27c" + version "1.3.5" + resolved "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-1.3.5.tgz#46c51496216b7406588883defa6fac589e9bb31e" dependencies: add-stream "^1.0.0" - conventional-changelog "^1.1.6" + conventional-changelog "^1.1.7" lodash "^4.1.0" meow "^3.7.0" tempfile "^1.1.1" -conventional-changelog-codemirror@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.0.tgz#3cc925955f3b14402827b15168049821972d9459" +conventional-changelog-codemirror@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.1.tgz#299a4f7147baf350e6c8158fc54954a291c5cc09" dependencies: q "^1.4.1" -conventional-changelog-core@^1.9.2: - version "1.9.2" - resolved "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-1.9.2.tgz#a09b6b959161671ff45b93cc9efb0444e7c845c0" +conventional-changelog-core@^1.9.3: + version "1.9.3" + resolved "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-1.9.3.tgz#2899fe779389a329f0ec4b2746c36ddefb98da2d" dependencies: - conventional-changelog-writer "^2.0.1" - conventional-commits-parser "^2.0.0" + conventional-changelog-writer "^2.0.2" + conventional-commits-parser "^2.0.1" dateformat "^1.0.12" get-pkg-repo "^1.0.0" - git-raw-commits "^1.2.0" + git-raw-commits "^1.3.0" git-remote-origin-url "^2.0.0" - git-semver-tags "^1.2.2" + git-semver-tags "^1.2.3" lodash "^4.0.0" normalize-package-data "^2.3.5" q "^1.4.1" @@ -1783,21 +1805,21 @@ conventional-changelog-core@^1.9.2: read-pkg-up "^1.0.1" through2 "^2.0.0" -conventional-changelog-ember@^0.2.8: - version "0.2.8" - resolved "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.2.8.tgz#65e686da83d23b67133d1f853908c87f948035c0" +conventional-changelog-ember@^0.2.9: + version "0.2.9" + resolved "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.2.9.tgz#8ec73cc054e3ab064667fb1feb52fe8ef1b16438" dependencies: q "^1.4.1" -conventional-changelog-eslint@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.0.tgz#b4b9b5dc09417844d87c7bcfb16bdcc686c4b1c1" +conventional-changelog-eslint@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.1.tgz#2c2a11beb216f80649ba72834180293b687c0662" dependencies: q "^1.4.1" -conventional-changelog-express@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.2.0.tgz#8d666ad41b10ebf964a4602062ddd2e00deb518d" +conventional-changelog-express@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.2.1.tgz#838d9e1e6c9099703b150b9c19aa2d781742bd6c" dependencies: q "^1.4.1" @@ -1813,19 +1835,19 @@ conventional-changelog-jscs@^0.1.0: dependencies: q "^1.4.1" -conventional-changelog-jshint@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.0.tgz#63ad7aec66cd1ae559bafe80348c4657a6eb1872" +conventional-changelog-jshint@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.1.tgz#86139bb3ac99899f2b177e9617e09b37d99bcf3a" dependencies: compare-func "^1.3.1" q "^1.4.1" -conventional-changelog-writer@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-2.0.1.tgz#47c10d0faba526b78d194389d1e931d09ee62372" +conventional-changelog-writer@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-2.0.2.tgz#b5857ded1b001daf9a78b9cd40926f45c134949b" dependencies: compare-func "^1.3.1" - conventional-commits-filter "^1.0.0" + conventional-commits-filter "^1.1.0" dateformat "^1.0.11" handlebars "^4.0.2" json-stringify-safe "^5.0.1" @@ -1835,35 +1857,35 @@ conventional-changelog-writer@^2.0.1: split "^1.0.0" through2 "^2.0.0" -conventional-changelog@^1.1.6: - version "1.1.6" - resolved "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.6.tgz#ebd9b1ab63766c715f903f654626b6b1c0da7762" - dependencies: - conventional-changelog-angular "^1.5.1" - conventional-changelog-atom "^0.1.1" - conventional-changelog-codemirror "^0.2.0" - conventional-changelog-core "^1.9.2" - conventional-changelog-ember "^0.2.8" - conventional-changelog-eslint "^0.2.0" - conventional-changelog-express "^0.2.0" +conventional-changelog@^1.1.7: + version "1.1.7" + resolved "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.7.tgz#9151a62b1d8edb2d82711dabf5b7cf71041f82b1" + dependencies: + conventional-changelog-angular "^1.5.2" + conventional-changelog-atom "^0.1.2" + conventional-changelog-codemirror "^0.2.1" + conventional-changelog-core "^1.9.3" + conventional-changelog-ember "^0.2.9" + conventional-changelog-eslint "^0.2.1" + conventional-changelog-express "^0.2.1" conventional-changelog-jquery "^0.1.0" conventional-changelog-jscs "^0.1.0" - conventional-changelog-jshint "^0.2.0" + conventional-changelog-jshint "^0.2.1" conventional-commit-types@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-2.2.0.tgz#5db95739d6c212acbe7b6f656a11b940baa68946" -conventional-commits-filter@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz#6fc2a659372bc3f2339cf9ffff7e1b0344b93039" +conventional-commits-filter@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.0.tgz#1fc29af30b5edab76f54e229c411b0c663d0f9eb" dependencies: is-subset "^0.1.1" modify-values "^1.0.0" -conventional-commits-parser@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447" +conventional-commits-parser@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.0.1.tgz#1f15ce6b844f7ca41495c8190c0833c30b8b1693" dependencies: JSONStream "^1.0.4" is-text-path "^1.0.0" @@ -1874,14 +1896,14 @@ conventional-commits-parser@^2.0.0: trim-off-newlines "^1.0.0" conventional-recommended-bump@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-1.0.2.tgz#31856443ab6f9453a1827650e7cc15ec28769645" + version "1.0.3" + resolved "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-1.0.3.tgz#472b69b1b8f09c5c4ed40fe28a41e63cc04bd736" dependencies: concat-stream "^1.4.10" - conventional-commits-filter "^1.0.0" - conventional-commits-parser "^2.0.0" - git-raw-commits "^1.2.0" - git-semver-tags "^1.2.2" + conventional-commits-filter "^1.1.0" + conventional-commits-parser "^2.0.1" + git-raw-commits "^1.3.0" + git-semver-tags "^1.2.3" meow "^3.3.0" object-assign "^4.0.1" @@ -2071,7 +2093,7 @@ debug@^3.0.1, debug@^3.1.0: dependencies: ms "2.0.0" -debuglog@^1.0.1: +debuglog@*, debuglog@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -2247,16 +2269,16 @@ docsify-cli@^4.1.8: yargs "^7.0.2" docsify-server-renderer@^4.1.9: - version "4.5.0" - resolved "https://registry.npmjs.org/docsify-server-renderer/-/docsify-server-renderer-4.5.0.tgz#f05758dbe82789a5f05f4232ed1b0dcbffd7d0f6" + version "4.5.3" + resolved "https://registry.npmjs.org/docsify-server-renderer/-/docsify-server-renderer-4.5.3.tgz#062df846ba258ec1f07cc71141a971ccabb863b0" dependencies: debug "^2.6.8" node-fetch "^1.7.0" resolve-pathname "^2.1.0" docsify@>=3: - version "4.5.0" - resolved "https://registry.npmjs.org/docsify/-/docsify-4.5.0.tgz#fc1c15b9b2e47d2df829e2cfc767906c70d8c1ae" + version "4.5.3" + resolved "https://registry.npmjs.org/docsify/-/docsify-4.5.3.tgz#08295179414a22dadcdbfeae6bde3c2b5a64101d" dependencies: marked "^0.3.6" medium-zoom "^0.2.0" @@ -2604,10 +2626,10 @@ eslint@^3.18.0: user-home "^2.0.0" eslint@^4.8.0: - version "4.10.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-4.10.0.tgz#f25d0d7955c81968c2309aa5c9a229e045176bb7" + version "4.11.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-4.11.0.tgz#39a8c82bc0a3783adf5a39fa27fdd9d36fac9a34" dependencies: - ajv "^5.2.0" + ajv "^5.3.0" babel-code-frame "^6.22.0" chalk "^2.1.0" concat-stream "^1.6.0" @@ -2615,7 +2637,7 @@ eslint@^4.8.0: debug "^3.0.1" doctrine "^2.0.0" eslint-scope "^3.7.1" - espree "^3.5.1" + espree "^3.5.2" esquery "^1.0.0" estraverse "^4.2.0" esutils "^2.0.2" @@ -2628,7 +2650,7 @@ eslint@^4.8.0: inquirer "^3.0.6" is-resolvable "^1.0.0" js-yaml "^3.9.1" - json-stable-stringify "^1.0.1" + json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" lodash "^4.17.4" minimatch "^3.0.2" @@ -2654,11 +2676,11 @@ espower-location-detector@^1.0.0: source-map "^0.5.0" xtend "^4.0.0" -espree@^3.1.3, espree@^3.4.0, espree@^3.5.1: - version "3.5.1" - resolved "https://registry.npmjs.org/espree/-/espree-3.5.1.tgz#0c988b8ab46db53100a1954ae4ba995ddd27d87e" +espree@^3.1.3, espree@^3.4.0, espree@^3.5.2: + version "3.5.2" + resolved "https://registry.npmjs.org/espree/-/espree-3.5.2.tgz#756ada8b979e9dcfcdb30aad8d1a9304a905e1ca" dependencies: - acorn "^5.1.1" + acorn "^5.2.1" acorn-jsx "^3.0.0" esprima@^4.0.0: @@ -2786,11 +2808,11 @@ external-editor@^1.1.0: tmp "^0.0.29" external-editor@^2.0.4: - version "2.0.5" - resolved "https://registry.npmjs.org/external-editor/-/external-editor-2.0.5.tgz#52c249a3981b9ba187c7cacf5beb50bf1d91a6bc" + version "2.1.0" + resolved "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" dependencies: + chardet "^0.4.0" iconv-lite "^0.4.17" - jschardet "^1.4.2" tmp "^0.0.33" extglob@^0.3.1: @@ -3036,8 +3058,8 @@ fs-extra@^4.0.1: universalify "^0.1.0" fs-readdir-recursive@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" + version "1.1.0" + resolved "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" fs-vacuum@~1.2.10: version "1.2.10" @@ -3061,11 +3083,11 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" fsevents@^1.0.0: - version "1.1.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" + version "1.1.3" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" dependencies: nan "^2.3.0" - node-pre-gyp "^0.6.36" + node-pre-gyp "^0.6.39" fstream-ignore@^1.0.0, fstream-ignore@^1.0.5: version "1.0.5" @@ -3187,9 +3209,9 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -git-raw-commits@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.2.0.tgz#0f3a8bfd99ae0f2d8b9224d58892975e9a52d03c" +git-raw-commits@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.0.tgz#0bc8596e90d5ffe736f7f5546bd2d12f73abaac6" dependencies: dargs "^4.0.1" lodash.template "^4.0.2" @@ -3204,9 +3226,9 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-semver-tags@^1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.2.2.tgz#a2139be1bf6e337e125f3eb8bb8fc6f5d4d6445f" +git-semver-tags@^1.2.3: + version "1.2.3" + resolved "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.2.3.tgz#188b453882bf9d7a23afd31baba537dab7388d5d" dependencies: meow "^3.3.0" semver "^5.0.1" @@ -3270,8 +3292,8 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, gl path-is-absolute "^1.0.0" global-dirs@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.0.tgz#10d34039e0df04272e262cf24224f7209434df4f" + version "0.1.1" + resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" dependencies: ini "^1.3.4" @@ -3486,7 +3508,7 @@ hosted-git-info@^2.1.4, hosted-git-info@^2.4.2, hosted-git-info@^2.5.0, hosted-g version "2.5.0" resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" -http-cache-semantics@^3.7.3: +http-cache-semantics@^3.8.0: version "3.8.0" resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.0.tgz#1e3ce248730e189ac692a6697b9e3fdea2ff8da3" @@ -3522,7 +3544,7 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-proxy-agent@^2.0.0: +https-proxy-agent@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.1.0.tgz#1391bee7fd66aeabc0df2a1fa90f58954f43e443" dependencies: @@ -3599,7 +3621,7 @@ import-modules@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/import-modules/-/import-modules-1.1.0.tgz#748db79c5cc42bb9701efab424f894e72600e9dc" -imurmurhash@^0.1.4: +imurmurhash@*, imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -4154,10 +4176,6 @@ jsbn@~0.1.0: version "0.1.1" resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" -jschardet@^1.4.2: - version "1.6.0" - resolved "https://registry.npmjs.org/jschardet/-/jschardet-1.6.0.tgz#c7d1a71edcff2839db2f9ec30fc5d5ebd3c1a678" - jsesc@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" @@ -4178,6 +4196,10 @@ json-schema@0.2.3: version "0.2.3" resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" +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.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" @@ -4460,6 +4482,10 @@ lockfile@~1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/lockfile/-/lockfile-1.0.3.tgz#2638fc39a0331e9cac1a04b71799931c9c50df79" +lodash._baseindexof@*: + version "3.1.0" + resolved "https://registry.npmjs.org/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" + lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.npmjs.org/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" @@ -4467,10 +4493,28 @@ lodash._baseuniq@~4.6.0: lodash._createset "~4.0.0" lodash._root "~3.0.0" +lodash._bindcallback@*: + version "3.0.1" + resolved "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" + +lodash._cacheindexof@*: + version "3.0.2" + resolved "https://registry.npmjs.org/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" + +lodash._createcache@*: + version "3.1.2" + resolved "https://registry.npmjs.org/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" + dependencies: + lodash._getnative "^3.0.0" + lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.npmjs.org/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" +lodash._getnative@*, lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -4527,6 +4571,10 @@ lodash.merge@^4.6.0: version "4.6.0" resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" +lodash.restparam@*: + version "3.6.1" + resolved "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + lodash.snakecase@^4.0.1: version "4.1.1" resolved "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" @@ -4626,20 +4674,20 @@ make-dir@^1.0.0: pify "^3.0.0" make-fetch-happen@^2.4.13: - version "2.5.0" - resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.5.0.tgz#08c22d499f4f30111addba79fe87c98cf01b6bc8" + version "2.6.0" + resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.6.0.tgz#8474aa52198f6b1ae4f3094c04e8370d35ea8a38" dependencies: agentkeepalive "^3.3.0" - cacache "^9.2.9" - http-cache-semantics "^3.7.3" + cacache "^10.0.0" + http-cache-semantics "^3.8.0" http-proxy-agent "^2.0.0" - https-proxy-agent "^2.0.0" + https-proxy-agent "^2.1.0" lru-cache "^4.1.1" mississippi "^1.2.0" - node-fetch-npm "^2.0.1" + node-fetch-npm "^2.0.2" promise-retry "^1.1.1" - socks-proxy-agent "^3.0.0" - ssri "^4.1.6" + socks-proxy-agent "^3.0.1" + ssri "^5.0.0" map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" @@ -4800,8 +4848,8 @@ modify-values@^1.0.0: resolved "https://registry.npmjs.org/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2" moment@^2.18.1, moment@^2.6.0: - version "2.19.1" - resolved "https://registry.npmjs.org/moment/-/moment-2.19.1.tgz#56da1a2d1cbf01d38b7e1afc31c10bcfa1929167" + version "2.19.2" + resolved "https://registry.npmjs.org/moment/-/moment-2.19.2.tgz#8a7f774c95a64550b4c7ebd496683908f9419dbe" move-concurrently@^1.0.1, move-concurrently@~1.0.1: version "1.0.1" @@ -4848,8 +4896,8 @@ mute-stream@0.0.7, mute-stream@~0.0.4: resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" nan@^2.3.0: - version "2.7.0" - resolved "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" + version "2.8.0" + resolved "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" natural-compare@^1.4.0: version "1.4.0" @@ -4861,7 +4909,7 @@ nested-error-stacks@^2.0.0: dependencies: inherits "~2.0.1" -node-fetch-npm@^2.0.1: +node-fetch-npm@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz#7258c9046182dca345b4208eda918daf33697ff7" dependencies: @@ -4898,7 +4946,7 @@ node-localstorage@^0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/node-localstorage/-/node-localstorage-0.6.0.tgz#45a0601c6932dfde6644a23361f1be173c75d3af" -node-pre-gyp@^0.6.36: +node-pre-gyp@^0.6.39: version "0.6.39" resolved "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" dependencies: @@ -5593,8 +5641,8 @@ preserve@^0.2.0: resolved "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" prettier@^1.5.2: - version "1.7.4" - resolved "https://registry.npmjs.org/prettier/-/prettier-1.7.4.tgz#5e8624ae9363c80f95ec644584ecdf55d74f93fa" + version "1.8.2" + resolved "https://registry.npmjs.org/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8" pretty-format@^18.1.0: version "18.1.0" @@ -5624,8 +5672,8 @@ pretty-ms@^2.0.0: plur "^1.0.0" prismjs@^1.6.0: - version "1.8.3" - resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.8.3.tgz#4a3d140be5f2614a8987ca2330733a40d8ad207b" + version "1.8.4" + resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.8.4.tgz#573cc7a14c2c06566e1eca20d813f5ae55db80d2" optionalDependencies: clipboard "^1.5.5" @@ -5685,8 +5733,8 @@ pseudomap@^1.0.2: resolved "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" pump@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz#3b3ee6512f94f0e575538c17995f9f16990a5d51" + version "1.0.3" + resolved "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" dependencies: end-of-stream "^1.1.0" once "^1.3.1" @@ -5839,7 +5887,7 @@ readable-stream@~1.1.10: isarray "0.0.1" string_decoder "~0.10.x" -readdir-scoped-modules@^1.0.0: +readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" dependencies: @@ -6077,6 +6125,12 @@ resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" +resolve-global@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/resolve-global/-/resolve-global-0.1.0.tgz#8fb02cfd5b7db20118e886311f15af95bd15fbd9" + dependencies: + global-dirs "^0.1.0" + resolve-pathname@^2.1.0: version "2.2.0" resolved "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" @@ -6323,7 +6377,7 @@ sntp@2.x.x: dependencies: hoek "4.x.x" -socks-proxy-agent@^3.0.0: +socks-proxy-agent@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz#2eae7cf8e2a82d34565761539a7f9718c5617659" dependencies: @@ -6448,6 +6502,12 @@ ssri@^4.1.2, ssri@^4.1.6, ssri@~4.1.6: dependencies: safe-buffer "^5.1.0" +ssri@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/ssri/-/ssri-5.0.0.tgz#13c19390b606c821f2a10d02b351c1729b94d8cf" + dependencies: + safe-buffer "^5.1.0" + stack-utils@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" @@ -6669,8 +6729,8 @@ tar-pack@^3.4.0: uid-number "^0.0.6" tar-stream@^1.1.2, tar-stream@^1.5.4: - version "1.5.4" - resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.4.tgz#36549cf04ed1aee9b2a30c0143252238daf94016" + version "1.5.5" + resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.5.tgz#5cad84779f45c83b1f2508d96b09d88c7218af55" dependencies: bl "^1.0.0" end-of-stream "^1.0.0" @@ -7002,7 +7062,7 @@ v8flags@^2.1.1: dependencies: user-home "^1.1.1" -validate-npm-package-license@^3.0.1: +validate-npm-package-license@*, validate-npm-package-license@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" dependencies: @@ -7174,8 +7234,8 @@ write@^0.2.1: mkdirp "^0.5.1" ws@^1.1.1: - version "1.1.4" - resolved "https://registry.npmjs.org/ws/-/ws-1.1.4.tgz#57f40d036832e5f5055662a397c4de76ed66bf61" + version "1.1.5" + resolved "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" dependencies: options ">=0.0.5" ultron "1.0.x" @@ -7310,5 +7370,5 @@ yargs@~3.10.0: window-size "0.1.0" yarn@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/yarn/-/yarn-1.2.1.tgz#0d628dc01438881a1663a6f83cbf7ac5db7a75fc" + version "1.3.2" + resolved "https://registry.npmjs.org/yarn/-/yarn-1.3.2.tgz#5939762581b5b4ddcd3418c0f6be42df3aee195f"