From 969987be85385336a89aa71e229dd2ed3f72635e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 19 Apr 2018 08:56:11 +0200 Subject: [PATCH] feat: merge update-v8 in the project (#235) * feat: merge update-v8 in the project * move to git-node --- components/git/v8.js | 96 +++ docs/git-node.md | 55 ++ lib/update-v8/backport.js | 126 ++++ lib/update-v8/commitUpdate.js | 28 + lib/update-v8/common.js | 38 ++ lib/update-v8/constants.js | 75 +++ lib/update-v8/gypfiles.js | 60 ++ lib/update-v8/index.js | 40 ++ lib/update-v8/majorUpdate.js | 160 +++++ lib/update-v8/minorUpdate.js | 88 +++ lib/update-v8/updateV8Clone.js | 45 ++ lib/update-v8/updateVersionNumbers.js | 109 ++++ lib/update-v8/util.js | 31 + package-lock.json | 891 ++++++++++++++++++++------ package.json | 5 +- 15 files changed, 1652 insertions(+), 195 deletions(-) create mode 100644 components/git/v8.js create mode 100644 lib/update-v8/backport.js create mode 100644 lib/update-v8/commitUpdate.js create mode 100644 lib/update-v8/common.js create mode 100644 lib/update-v8/constants.js create mode 100644 lib/update-v8/gypfiles.js create mode 100644 lib/update-v8/index.js create mode 100644 lib/update-v8/majorUpdate.js create mode 100644 lib/update-v8/minorUpdate.js create mode 100644 lib/update-v8/updateV8Clone.js create mode 100644 lib/update-v8/updateVersionNumbers.js create mode 100644 lib/update-v8/util.js diff --git a/components/git/v8.js b/components/git/v8.js new file mode 100644 index 00000000..cf8f1143 --- /dev/null +++ b/components/git/v8.js @@ -0,0 +1,96 @@ +'use strict'; + +const path = require('path'); + +const execa = require('execa'); +const logSymbols = require('log-symbols'); + +const updateV8 = require('../../lib/update-v8'); +const constants = require('../../lib/update-v8/constants'); +const common = require('../../lib/update-v8/common'); + +module.exports = { + command: 'v8 [major|minor|backport]', + describe: 'Update or patch the V8 engine', + builder: (yargs) => { + yargs + .command({ + command: 'major', + desc: 'Do a major upgrade. Replaces the whole deps/v8 directory', + handler: main, + builder: (yargs) => { + yargs.option('branch', { + describe: 'Branch of the V8 repository to use for the upgrade', + default: 'lkgr' + }); + } + }) + .command({ + command: 'minor', + desc: 'Do a minor patch of the current V8 version', + handler: main + }) + .command({ + command: 'backport ', + desc: 'Backport a single commit from the V8 repository', + handler: main, + builder: (yargs) => { + yargs.option('bump', { + describe: 'Bump V8 embedder version number or patch version', + default: true + }); + } + }) + .demandCommand(1, 'Please provide a valid command') + .option('node-dir', { + describe: 'Directory of a Node.js clone', + default: process.cwd() + }) + .option('base-dir', { + describe: 'Directory where V8 should be cloned', + default: constants.defaultBaseDir + }) + .option('verbose', { + describe: 'Enable verbose output', + boolean: true, + default: false + }); + }, + handler: main +}; + +function main(argv) { + const options = Object.assign({}, argv); + options.nodeDir = path.resolve(options.nodeDir); + options.baseDir = path.resolve(options.baseDir); + options.v8CloneDir = path.join(options.baseDir, 'v8'); + + options.execGitNode = function execGitNode(...args) { + return execa('git', args, { cwd: options.nodeDir }); + }; + options.execGitV8 = function execGitV8(...args) { + return execa('git', args, { cwd: options.v8CloneDir }); + }; + + Promise.resolve() + .then(async() => { + await common.checkCwd(options); + const kind = argv._[0]; + options[kind] = true; + switch (kind) { + case 'minor': + return updateV8.minor(options); + case 'major': + return updateV8.major(options); + case 'backport': + return updateV8.backport(options); + } + }) + .catch((err) => { + console.error( + logSymbols.error, + options.verbose ? err.stack : err.message + ); + process.exitCode = 1; + }); +} diff --git a/docs/git-node.md b/docs/git-node.md index 509ca46a..d12a12af 100644 --- a/docs/git-node.md +++ b/docs/git-node.md @@ -54,6 +54,7 @@ Commands: new one for a pull request git-node metadata Retrieves metadata for a PR and validates them against nodejs/node PR rules + git-node v8 [major|minor|backport] Update or patch the V8 engine Options: --version Show version number [boolean] @@ -145,3 +146,57 @@ If you are using `git bash` and having trouble with output use current known issues with git bash: - git bash Lacks colors. - git bash output duplicates metadata. + +### `git node v8` + +Update or patch the V8 engine. +This tool will maintain a clone of the V8 repository in `~/.update-v8/v8`. + +#### `git node v8 major` + +* Replaces `deps/v8` with a newer major version. +* Resets the embedder version number to `-node.0`. +* Updates `NODE_MODULE_VERSION` according to the V8 version. + +##### Options + +###### `--branch=branchName` + +Branch of the V8 repository to use for the upgrade. +Defaults to `lkgr`. + +#### `git node v8 minor` + +Compare current V8 version with latest upstream of the same major. Applies a +patch if necessary. +If the `git apply` command fails, a patch file will be written in the Node.js +clone directory. + +#### `git node v8 backport ` + +Fetches and applies the patch corresponding to `sha`. Increments the V8 +embedder version number or patch version and commits the changes. +If the `git apply` command fails, a patch file will be written in the Node.js +clone directory. + +##### Options + +###### `--no-bump` + +Set this flag to skip bumping the V8 embedder version number or patch version. + +#### General options + +##### `--node-dir=/path/to/node` + +Specify the path to the Node.js git repository. +Defaults to current working directory. + +##### `--base-dir=/path/to/base/dir` + +Specify the path where V8 the clone will be maintained. +Defaults to `~/.update-v8`. + +##### `--verbose` + +Enable verbose output. diff --git a/lib/update-v8/backport.js b/lib/update-v8/backport.js new file mode 100644 index 00000000..bbd47a1b --- /dev/null +++ b/lib/update-v8/backport.js @@ -0,0 +1,126 @@ +'use strict'; + +const path = require('path'); + +const execa = require('execa'); +const fs = require('fs-extra'); +const Listr = require('listr'); + +const common = require('./common'); + +exports.doBackport = function doBackport(options) { + const todo = [common.getCurrentV8Version(), generatePatch(), applyPatch()]; + if (options.bump !== false) { + if (options.nodeMajorVersion < 9) { + todo.push(incrementV8Version()); + } else { + todo.push(incrementEmbedderVersion()); + } + } + return { + title: 'V8 commit backport', + task: () => { + return new Listr(todo); + } + }; +}; + +exports.commitBackport = function commitBackport() { + return { + title: 'Commit patch', + task: async(ctx) => { + const messageTitle = `deps: cherry-pick ${ctx.sha.substring( + 0, + 7 + )} from upstream V8`; + const indentedMessage = ctx.message.replace(/\n/g, '\n '); + const messageBody = + 'Original commit message:\n\n' + + ` ${indentedMessage}\n\n` + + `Refs: https://github.com/v8/v8/commit/${ctx.sha}`; + + await ctx.execGitNode('add', 'deps/v8'); + await ctx.execGitNode('commit', '-m', messageTitle, '-m', messageBody); + } + }; +}; + +function generatePatch() { + return { + title: 'Generate patch', + task: async(ctx) => { + const sha = ctx.sha; + if (!sha || sha.length !== 40) { + throw new Error( + '--sha option is required and must be 40 characters long' + ); + } + try { + const [patch, message] = await Promise.all([ + ctx.execGitV8('format-patch', '--stdout', `${sha}^..${sha}`), + ctx.execGitV8('log', '--format=%B', '-n', '1', sha) + ]); + ctx.patch = patch.stdout; + ctx.message = message.stdout; + } catch (e) { + throw new Error(e.stderr); + } + } + }; +} + +function applyPatch() { + return { + title: 'Apply patch to deps/v8', + task: async(ctx) => { + const patch = ctx.patch; + try { + await execa('git', ['apply', '-3', '--directory=deps/v8'], { + cwd: ctx.nodeDir, + input: patch + }); + } catch (e) { + const file = path.join(ctx.nodeDir, `${ctx.sha}.diff`); + await fs.writeFile(file, ctx.patch); + throw new Error( + `Could not apply patch.\n${e}\nDiff was stored in ${file}` + ); + } + } + }; +} + +function incrementV8Version() { + return { + title: 'Increment V8 version', + task: async(ctx) => { + const incremented = ctx.currentVersion[3] + 1; + const versionHPath = `${ctx.nodeDir}/deps/v8/include/v8-version.h`; + let versionH = await fs.readFile(versionHPath, 'utf8'); + versionH = versionH.replace( + /V8_PATCH_LEVEL (\d+)/, + `V8_PATCH_LEVEL ${incremented}` + ); + await fs.writeFile(versionHPath, versionH); + } + }; +} + +const embedderRegex = /'v8_embedder_string': '-node\.(\d+)'/; +function incrementEmbedderVersion() { + return { + title: 'Increment embedder version number', + task: async(ctx) => { + const commonGypiPath = path.join(ctx.nodeDir, 'common.gypi'); + const commonGypi = await fs.readFile(commonGypiPath, 'utf8'); + const embedderValue = parseInt(embedderRegex.exec(commonGypi)[1], 10); + const embedderString = `'v8_embedder_string': '-node.${embedderValue + + 1}'`; + await fs.writeFile( + commonGypiPath, + commonGypi.replace(embedderRegex, embedderString) + ); + await ctx.execGitNode('add', 'common.gypi'); + } + }; +} diff --git a/lib/update-v8/commitUpdate.js b/lib/update-v8/commitUpdate.js new file mode 100644 index 00000000..a4ac77f2 --- /dev/null +++ b/lib/update-v8/commitUpdate.js @@ -0,0 +1,28 @@ +'use strict'; + +const util = require('./util'); + +module.exports = function() { + return { + title: 'Commit V8 update', + task: async(ctx) => { + const newV8Version = util.getNodeV8Version(ctx.nodeDir).join('.'); + await ctx.execGitNode('add', 'deps/v8'); + const moreArgs = []; + let message; + if (ctx.minor) { + const prev = ctx.currentVersion.join('.'); + const next = ctx.latestVersion.join('.'); + moreArgs.push( + '-m', + `Refs: https://github.com/v8/v8/compare/${prev}...${next}` + ); + message = `deps: patch V8 to ${newV8Version}`; + } else { + message = `deps: update V8 to ${newV8Version}`; + } + await ctx.execGitNode('commit', '-m', message, ...moreArgs); + }, + skip: (ctx) => ctx.skipped + }; +}; diff --git a/lib/update-v8/common.js b/lib/update-v8/common.js new file mode 100644 index 00000000..78b425eb --- /dev/null +++ b/lib/update-v8/common.js @@ -0,0 +1,38 @@ +'use strict'; + +const path = require('path'); + +const fs = require('fs-extra'); + +const util = require('./util'); + +exports.getCurrentV8Version = function getCurrentV8Version() { + return { + title: 'Get current V8 version', + task: (ctx) => { + ctx.currentVersion = util.getNodeV8Version(ctx.nodeDir); + } + }; +}; + +exports.checkCwd = async function checkCwd(ctx) { + let isNode = false; + try { + const nodeVersion = await fs.readFile( + path.join(ctx.nodeDir, 'src/node_version.h') + ); + const match = /#define NODE_MAJOR_VERSION (\d+)/.exec(nodeVersion); + if (match) { + isNode = true; + ctx.nodeMajorVersion = parseInt(match[1], 10); + } + } catch (e) { + // ignore + } + if (!isNode) { + throw new Error( + 'This does not seem to be the Node.js repository.\n' + + `node-dir: ${ctx.nodeDir}` + ); + } +}; diff --git a/lib/update-v8/constants.js b/lib/update-v8/constants.js new file mode 100644 index 00000000..3d33ff0a --- /dev/null +++ b/lib/update-v8/constants.js @@ -0,0 +1,75 @@ +'use strict'; + +const homedir = require('os').homedir(); +const path = require('path'); + +const chromiumGit = 'https://chromium.googlesource.com'; + +exports.defaultBaseDir = path.join(homedir, '.update-v8'); +exports.chromiumGit = chromiumGit; + +exports.v8Git = `${chromiumGit}/v8/v8.git`; + +const gtestReplace = `/testing/gtest/* +!/testing/gtest/include +/testing/gtest/include/* +!/testing/gtest/include/gtest +/testing/gtest/include/gtest/* +!/testing/gtest/include/gtest/gtest_prod.h`; + +const googleTestReplace = `/third_party/googletest/src/* +!/third_party/googletest/src/googletest +/third_party/googletest/src/googletest/* +!/third_party/googletest/src/googletest/include +/third_party/googletest/src/googletest/include/* +!/third_party/googletest/src/googletest/include/gtest +/third_party/googletest/src/googletest/include/gtest/* +!/third_party/googletest/src/googletest/include/gtest/gtest_prod.h`; + +exports.v8Deps = [ + { + name: 'trace_event', + repo: 'v8/base/trace_event/common', + path: 'base/trace_event/common', + gitignore: { + match: '/base\n', + replace: '' + }, + since: 55 + }, + { + name: 'gtest', + repo: 'v8/testing/gtest', + path: 'testing/gtest', + gitignore: { + match: '/testing/gtest', + replace: gtestReplace + }, + since: 55, + until: 66 + }, + { + name: 'jinja2', + repo: 'v8/third_party/jinja2', + path: 'third_party/jinja2', + gitignore: '!/third_party/jinja2', + since: 56 + }, + { + name: 'markupsafe', + repo: 'v8/third_party/markupsafe', + path: 'third_party/markupsafe', + gitignore: '!/third_party/markupsafe', + since: 56 + }, + { + name: 'googletest', + repo: 'v8/third_party/googletest/src', + path: 'third_party/googletest/src', + gitignore: { + match: '/third_party/googletest/src', + replace: googleTestReplace + }, + since: 67 + } +]; diff --git a/lib/update-v8/gypfiles.js b/lib/update-v8/gypfiles.js new file mode 100644 index 00000000..93dd32a0 --- /dev/null +++ b/lib/update-v8/gypfiles.js @@ -0,0 +1,60 @@ +'use strict'; + +const path = require('path'); + +const fs = require('fs-extra'); + +function nodeOwnsGypfiles(ctx) { + if (ctx.currentVersion[0] === 6 && ctx.currentVersion[1] < 6) { + return false; + } + return true; +} + +function v8HasGypfiles(ctx) { + return ctx.newVersion[0] === 6 && ctx.newVersion[1] < 6; +} + +function moveGypfilesOut() { + return { + title: 'Move gypfiles out', + task: (ctx) => { + return fs.move( + path.join(ctx.nodeDir, 'deps/v8/gypfiles'), + path.join(ctx.nodeDir, 'deps/v8-gypfiles') + ); + }, + skip: (ctx) => v8HasGypfiles(ctx) || !nodeOwnsGypfiles(ctx) + }; +} + +function moveGypfilesIn() { + return { + title: 'Move gypfiles in', + task: (ctx) => { + return fs.move( + path.join(ctx.nodeDir, 'deps/v8-gypfiles'), + path.join(ctx.nodeDir, 'deps/v8/gypfiles') + ); + }, + skip: (ctx) => v8HasGypfiles(ctx) || !nodeOwnsGypfiles(ctx) + }; +} + +function updateGypfiles() { + return { + title: 'Update gypfiles', + task: async(ctx) => { + // TODO(targos) Update v8.gyp based on BUILD.gn. + // This is currently done manually. + return null; + }, + skip: (ctx) => v8HasGypfiles(ctx) + }; +} + +module.exports = { + moveGypfilesOut, + moveGypfilesIn, + updateGypfiles +}; diff --git a/lib/update-v8/index.js b/lib/update-v8/index.js new file mode 100644 index 00000000..58bcc785 --- /dev/null +++ b/lib/update-v8/index.js @@ -0,0 +1,40 @@ +'use strict'; + +const Listr = require('listr'); + +const backport = require('./backport'); +const updateVersionNumbers = require('./updateVersionNumbers'); +const commitUpdate = require('./commitUpdate'); +const majorUpdate = require('./majorUpdate'); +const minorUpdate = require('./minorUpdate'); +const updateV8Clone = require('./updateV8Clone'); + +exports.major = function(options) { + const tasks = new Listr( + [updateV8Clone(), majorUpdate(), commitUpdate(), updateVersionNumbers()], + getOptions(options) + ); + return tasks.run(options); +}; + +exports.minor = function(options) { + const tasks = new Listr( + [updateV8Clone(), minorUpdate(), commitUpdate()], + getOptions(options) + ); + return tasks.run(options); +}; + +exports.backport = function(options) { + const tasks = new Listr( + [updateV8Clone(), backport.doBackport(options), backport.commitBackport()], + getOptions(options) + ); + return tasks.run(options); +}; + +function getOptions(opts) { + return { + renderer: opts.verbose ? 'verbose' : 'default' + }; +} diff --git a/lib/update-v8/majorUpdate.js b/lib/update-v8/majorUpdate.js new file mode 100644 index 00000000..9eb62a79 --- /dev/null +++ b/lib/update-v8/majorUpdate.js @@ -0,0 +1,160 @@ +'use strict'; + +const path = require('path'); + +const execa = require('execa'); +const fs = require('fs-extra'); +const Listr = require('listr'); +const mkdirp = require('mkdirp'); + +const common = require('./common'); +const util = require('./util'); +const { + moveGypfilesOut, + moveGypfilesIn, + updateGypfiles +} = require('./gypfiles'); +const { chromiumGit } = require('./constants'); + +module.exports = function() { + return { + title: 'Major V8 update', + task: () => { + return new Listr([ + common.getCurrentV8Version(), + checkoutBranch(), + moveGypfilesOut(), + removeDepsV8(), + cloneLocalV8(), + removeDepsV8Git(), + updateV8Deps(), + moveGypfilesIn(), + updateGypfiles() + ]); + } + }; +}; + +const versionReg = /^\d+(\.\d+)+$/; +function checkoutBranch() { + return { + title: 'Checkout V8 branch', + task: async(ctx) => { + let version = ctx.branch; + await ctx.execGitV8('checkout', 'origin/master'); + if (!versionReg.test(version)) { + // try to get the latest tag + const res = await ctx.execGitV8( + 'tag', + '--contains', + `origin/${version}`, + '--sort', + 'version:refname' + ); + const tags = res.stdout.split('\n'); + const lastTag = tags[tags.length - 1]; + if (lastTag) version = lastTag; + if (version.split('.').length === 3) { + // Prerelease versions are branched and 'lkgr' does not include + // the version commit + ctx.branch = version; + } + } + if (version === ctx.currentVersion.join('.')) { + throw new Error(`Current version is already ${version}`); + } + ctx.newVersion = version.split('.').map((s) => parseInt(s, 10)); + try { + await ctx.execGitV8('branch', '-D', ctx.branch); + } catch (e) { + // ignore + } + await ctx.execGitV8('branch', ctx.branch, `origin/${ctx.branch}`); + } + }; +} + +function removeDepsV8() { + return { + title: 'Remove deps/v8', + task: (ctx) => fs.remove(path.join(ctx.nodeDir, 'deps/v8')) + }; +} + +function cloneLocalV8() { + return { + title: 'Clone branch to deps/v8', + task: (ctx) => + execa('git', ['clone', '-b', ctx.branch, ctx.v8CloneDir, 'deps/v8'], { + cwd: ctx.nodeDir + }) + }; +} + +function removeDepsV8Git() { + return { + title: 'Remove deps/v8/.git', + task: (ctx) => fs.remove(path.join(ctx.nodeDir, 'deps/v8/.git')) + }; +} + +function updateV8Deps() { + return { + title: 'Update V8 DEPS', + task: async(ctx) => { + const newV8Version = util.getNodeV8Version(ctx.nodeDir); + const deps = util.getV8Deps(newV8Version); + if (deps.length === 0) return; + /* eslint-disable no-await-in-loop */ + for (const dep of deps) { + if (dep.gitignore) { + if (typeof dep.gitignore === 'string') { + await addToGitignore(ctx.nodeDir, dep.gitignore); + } else { + await replaceGitignore(ctx.nodeDir, dep.gitignore); + } + } + const [repo, commit] = await readDeps(ctx.nodeDir, dep.repo); + const thePath = path.join(ctx.nodeDir, 'deps/v8', dep.path); + await fetchFromGit(thePath, repo, commit); + } + /* eslint-enable */ + } + }; +} + +async function addToGitignore(nodeDir, value) { + const gitignorePath = path.join(nodeDir, 'deps/v8/.gitignore'); + await fs.appendFile(gitignorePath, `${value}\n`); +} + +async function replaceGitignore(nodeDir, options) { + const gitignorePath = path.join(nodeDir, 'deps/v8/.gitignore'); + let gitignore = await fs.readFile(gitignorePath, 'utf8'); + gitignore = gitignore.replace(options.match, options.replace); + await fs.writeFile(gitignorePath, gitignore); +} + +async function readDeps(nodeDir, depName) { + const depsStr = await fs.readFile(path.join(nodeDir, 'deps/v8/DEPS'), 'utf8'); + const start = depsStr.indexOf('deps = {'); + const end = depsStr.indexOf('\n}', start) + 2; + const Var = () => chromiumGit; // eslint-disable-line no-unused-vars + let deps; + eval(depsStr.substring(start, end)); // eslint-disable-line no-eval + const dep = deps[depName]; + return dep.split('@'); +} + +async function fetchFromGit(cwd, repo, commit) { + mkdirp.sync(cwd); + await exec('init'); + await exec('remote', 'add', 'origin', repo); + await exec('fetch', 'origin', commit); + await exec('reset', '--hard', 'FETCH_HEAD'); + await fs.remove(path.join(cwd, '.git')); + + function exec(...options) { + return execa('git', options, { cwd }); + } +} diff --git a/lib/update-v8/minorUpdate.js b/lib/update-v8/minorUpdate.js new file mode 100644 index 00000000..6190f389 --- /dev/null +++ b/lib/update-v8/minorUpdate.js @@ -0,0 +1,88 @@ +'use strict'; + +const path = require('path'); + +const execa = require('execa'); +const fs = require('fs-extra'); +const Listr = require('listr'); + +const common = require('./common'); + +module.exports = function() { + return { + title: 'Minor V8 update', + task: () => { + return new Listr([ + common.getCurrentV8Version(), + getLatestV8Version(), + minorUpdate() + ]); + } + }; +}; + +function getLatestV8Version() { + return { + title: 'Get latest V8 version', + task: async(ctx) => { + const currentV8Tag = ctx.currentVersion.slice(0, 3).join('.'); + let tags = await execa.stdout('git', ['tag', '-l', `${currentV8Tag}.*`], { + cwd: ctx.v8CloneDir + }); + tags = toSortedArray(tags); + ctx.latestVersion = tags[0]; + } + }; +} + +function minorUpdate() { + return { + title: 'Do minor update', + task: (ctx, task) => { + if (ctx.latestVersion.length === 3) { + throw new Error('minor update can only be done on release branches'); + } + const latestStr = ctx.latestVersion.join('.'); + task.title = `Do minor update to ${latestStr}`; + return doMinorUpdate(ctx, latestStr); + }, + skip: (ctx) => { + if (ctx.currentVersion[3] >= ctx.latestVersion[3]) { + ctx.skipped = 'V8 is up-to-date'; + return ctx.skipped; + } + return false; + } + }; +} + +async function doMinorUpdate(ctx, latestStr) { + const currentStr = ctx.currentVersion.join('.'); + const diff = await execa.stdout( + 'git', + ['format-patch', '--stdout', `${currentStr}...${latestStr}`], + { cwd: ctx.v8CloneDir } + ); + try { + await execa('git', ['apply', '--directory', 'deps/v8'], { + cwd: ctx.nodeDir, + input: diff + }); + } catch (e) { + const file = path.join(ctx.nodeDir, `${latestStr}.diff`); + await fs.writeFile(file, diff); + throw new Error(`Could not apply patch.\n${e}\nDiff was stored in ${file}`); + } +} + +function toSortedArray(tags) { + return tags + .split(/[\r\n]+/) + .filter((tag) => tag !== '') + .map((tag) => tag.split('.')) + .sort(sortVersions); +} + +function sortVersions(v1, v2) { + return v2[3] - v1[3]; +} diff --git a/lib/update-v8/updateV8Clone.js b/lib/update-v8/updateV8Clone.js new file mode 100644 index 00000000..bea268fd --- /dev/null +++ b/lib/update-v8/updateV8Clone.js @@ -0,0 +1,45 @@ +'use strict'; + +const execa = require('execa'); +const Listr = require('listr'); +const mkdirp = require('mkdirp'); + +const { v8Git } = require('./constants'); + +module.exports = function() { + return { + title: 'Update local V8 clone', + task: () => { + return new Listr([fetchOrigin(), createClone()]); + } + }; +}; + +function fetchOrigin() { + return { + title: 'Fetch V8', + task: async(ctx, task) => { + try { + await execa('git', ['fetch', 'origin'], { cwd: ctx.v8CloneDir }); + } catch (e) { + if (e.code === 'ENOENT') { + ctx.shouldClone = true; + task.skip('V8 clone not present, create it.'); + } else { + throw e; + } + } + } + }; +} + +function createClone() { + return { + title: 'Clone V8', + task: (ctx) => { + mkdirp.sync(ctx.baseDir); + return execa('git', ['clone', v8Git], { cwd: ctx.baseDir }); + }, + enabled: (ctx) => ctx.shouldClone + }; +} diff --git a/lib/update-v8/updateVersionNumbers.js b/lib/update-v8/updateVersionNumbers.js new file mode 100644 index 00000000..70c9c83b --- /dev/null +++ b/lib/update-v8/updateVersionNumbers.js @@ -0,0 +1,109 @@ +'use strict'; + +const path = require('path'); + +const fs = require('fs-extra'); +const Listr = require('listr'); + +const util = require('./util'); + +module.exports = function() { + return { + title: 'Update version numbers', + task: () => { + return new Listr([resetEmbedderString(), bumpNodeModule()]); + } + }; +}; + +function bumpNodeModule() { + return { + title: 'Bump NODE_MODULE_VERSION', + task: async(ctx, task) => { + const v8Version = util.getNodeV8Version(ctx.nodeDir); + const currentModuleVersion = getModuleVersion(ctx.nodeDir); + const newModuleVersion = translateV8ToModuleVersion(v8Version); + if (currentModuleVersion === newModuleVersion) { + task.skip('version is the same'); + return; + } + updateModuleVersion(ctx.nodeDir, newModuleVersion, v8Version); + await ctx.execGitNode('add', 'src/node_version.h'); + await ctx.execGitNode( + 'commit', + '-m', + getCommitTitle(newModuleVersion), + '-m', + getCommitBody(v8Version) + ); + } + }; +} + +function getModuleVersion(nodeDir) { + const nodeVersionH = fs.readFileSync(`${nodeDir}/src/node_version.h`, 'utf8'); + const version = /NODE_MODULE_VERSION (\d+)/.exec(nodeVersionH)[1]; + return parseInt(version, 10); +} + +const v8VerReg = / * V8 \d+\.\d+: \d+/g; +function updateModuleVersion(nodeDir, newVersion, v8Version) { + const path = `${nodeDir}/src/node_version.h`; + let nodeVersionH = fs.readFileSync(path, 'utf8'); + nodeVersionH = nodeVersionH.replace( + /NODE_MODULE_VERSION \d+/, + `NODE_MODULE_VERSION ${newVersion}` + ); + let index = -1; + while (v8VerReg.exec(nodeVersionH)) index = v8VerReg.lastIndex; + nodeVersionH = `${nodeVersionH.substring(0, index)}\n * V8 ${v8Version[0]}.${ + v8Version[1] + }: ${newVersion}${nodeVersionH.substring(index)}`; + fs.writeFileSync(path, nodeVersionH); +} + +function translateV8ToModuleVersion(v8Version) { + return parseInt(String(v8Version[0]) + String(v8Version[1]), 10) - 3; +} + +function getCommitTitle(moduleVersion) { + return `src: update NODE_MODULE_VERSION to ${moduleVersion}`; +} + +function getCommitBody(v8Version) { + return `Major V8 updates are usually API/ABI incompatible with previous +versions. This commit adapts NODE_MODULE_VERSION for V8 ${v8Version[0]}.${ + v8Version[1] +}. + +Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md`; +} + +const embedderRegex = /'v8_embedder_string': '-node\.(\d+)'/; +const embedderString = "'v8_embedder_string': '-node.0'"; +function resetEmbedderString() { + return { + title: 'Reset V8 embedder version string', + task: async(ctx, task) => { + const commonGypiPath = path.join(ctx.nodeDir, 'common.gypi'); + const commonGypi = await fs.readFile(commonGypiPath, 'utf8'); + const embedderValue = embedderRegex.exec(commonGypi)[1]; + if (embedderValue !== '0') { + await fs.writeFile( + commonGypiPath, + commonGypi.replace(embedderRegex, embedderString) + ); + await ctx.execGitNode('add', 'common.gypi'); + await ctx.execGitNode( + 'commit', + '-m', + 'build: reset embedder string to "-node.0"' + ); + } else { + return task.skip('Embedder version is already 0'); + } + return null; + }, + skip: (ctx) => ctx.nodeMajorVersion < 9 + }; +} diff --git a/lib/update-v8/util.js b/lib/update-v8/util.js new file mode 100644 index 00000000..5ff4caa9 --- /dev/null +++ b/lib/update-v8/util.js @@ -0,0 +1,31 @@ +'use strict'; + +const fs = require('fs'); + +const constants = require('./constants'); + +exports.getNodeV8Version = function getNodeV8Version(cwd) { + try { + const v8VersionH = fs.readFileSync( + `${cwd}/deps/v8/include/v8-version.h`, + 'utf8' + ); + const major = parseInt(/V8_MAJOR_VERSION (\d+)/.exec(v8VersionH)[1], 10); + const minor = parseInt(/V8_MINOR_VERSION (\d+)/.exec(v8VersionH)[1], 10); + const build = parseInt(/V8_BUILD_NUMBER (\d+)/.exec(v8VersionH)[1], 10); + const patch = parseInt(/V8_PATCH_LEVEL (\d+)/.exec(v8VersionH)[1], 10); + if (patch === 0) return [major, minor, build]; + else return [major, minor, build, patch]; + } catch (e) { + throw new Error('Could not find V8 version'); + } +}; + +exports.getV8Deps = function getV8Deps(version) { + const major = version[0]; + const minor = version[1]; + const number = major * 10 + minor; + return constants.v8Deps.filter( + (dep) => dep.since <= number && (dep.until || Infinity) >= number + ); +}; diff --git a/package-lock.json b/package-lock.json index acbe1df7..e0c9ead0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,9 @@ } }, "@types/node": { - "version": "9.4.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.4.7.tgz", - "integrity": "sha512-4Ba90mWNx8ddbafuyGGwjkZMigi+AWfYLSDCpovwsE63ia8w93r3oJ8PIAQc3y8U+XHcnMOHPIzNe3o438Ywcw==" + "version": "9.6.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.4.tgz", + "integrity": "sha512-Awg4BcUYiZtNKoveGOu654JVPt11V/KIC77iBz8NweyoOAZpz5rUJfPDwwD+ajfTs2HndbTCEB8IuLfX9m/mmw==" }, "abbrev": { "version": "1.1.1", @@ -75,10 +75,9 @@ "dev": true }, "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", - "dev": true + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" }, "ansi-regex": { "version": "2.1.1", @@ -93,6 +92,11 @@ "color-convert": "1.9.1" } }, + "any-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.2.0.tgz", + "integrity": "sha1-xnhwBYADV5AJCD9UrAq6+1wz0kI=" + }, "application-config": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/application-config/-/application-config-1.0.1.tgz", @@ -180,9 +184,9 @@ "dev": true }, "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", "dev": true }, "babel-code-frame": { @@ -318,7 +322,7 @@ "integrity": "sha1-UTTQd5hPcSpU2tPL9i3ijc5BbKg=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "deep-equal": "1.0.1", "espurify": "1.7.0", "estraverse": "4.2.0" @@ -392,17 +396,26 @@ "dev": true }, "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "requires": { - "restore-cursor": "2.0.0" + "restore-cursor": "1.0.1" } }, "cli-spinners": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.1.0.tgz", - "integrity": "sha1-8YR7FohE2RemceudFH499JfJDQY=" + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", + "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=" + }, + "cli-truncate": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", + "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", + "requires": { + "slice-ansi": "0.0.4", + "string-width": "1.0.2" + } }, "cli-width": { "version": "2.2.0", @@ -425,6 +438,20 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -498,7 +525,7 @@ "requires": { "buffer-from": "1.0.0", "inherits": "2.0.3", - "readable-stream": "2.3.5", + "readable-stream": "2.3.6", "typedarray": "0.0.6" } }, @@ -515,9 +542,9 @@ "dev": true }, "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=", + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", + "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=", "dev": true }, "core-util-is": { @@ -561,11 +588,13 @@ } }, "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "requires": { - "lru-cache": "4.1.2", + "nice-try": "1.0.4", + "path-key": "2.0.1", + "semver": "5.5.0", "shebang-command": "1.2.0", "which": "1.3.0" } @@ -601,7 +630,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.41" + "es5-ext": "0.10.42" } }, "dashdash": { @@ -621,6 +650,11 @@ } } }, + "date-fns": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", + "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==" + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -665,7 +699,7 @@ "requires": { "globby": "5.0.0", "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", "object-assign": "4.1.1", "pify": "2.3.0", "pinkie-promise": "2.0.1", @@ -784,20 +818,25 @@ "jsbn": "0.1.1" } }, + "elegant-spinner": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=" + }, "empower": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/empower/-/empower-1.2.3.tgz", "integrity": "sha1-bw2nNEf07dg4/sXGAxOoi6XLhSs=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "empower-core": "0.6.2" } }, "empower-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/empower-assert/-/empower-assert-1.0.1.tgz", - "integrity": "sha1-MeMQq8BluqfDoEh+a+W7zGXzwd4=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/empower-assert/-/empower-assert-1.1.0.tgz", + "integrity": "sha512-Ylck0Q6p8y/LpNzYeBccaxAPm2ZyuqBgErgZpO9KT0HuQWF0sJckBKCLmgS1/DEXEiyBi9XtYh3clZm5cAdARw==", "dev": true, "requires": { "estraverse": "4.2.0" @@ -810,7 +849,7 @@ "dev": true, "requires": { "call-signature": "0.0.2", - "core-js": "2.5.3" + "core-js": "2.5.5" } }, "entities": { @@ -828,9 +867,9 @@ } }, "es5-ext": { - "version": "0.10.41", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.41.tgz", - "integrity": "sha512-MYK02wXfwTMie5TEJWPolgOsXEmz7wKCQaGzgmRjZOoV6VLG8I5dSv2bn6AOClXhK64gnSQTQ9W9MKvx87J4gw==", + "version": "0.10.42", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", + "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", "dev": true, "requires": { "es6-iterator": "2.0.3", @@ -845,7 +884,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41", + "es5-ext": "0.10.42", "es6-symbol": "3.1.1" } }, @@ -856,7 +895,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41", + "es5-ext": "0.10.42", "es6-iterator": "2.0.3", "es6-set": "0.1.5", "es6-symbol": "3.1.1", @@ -870,7 +909,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41", + "es5-ext": "0.10.42", "es6-iterator": "2.0.3", "es6-symbol": "3.1.1", "event-emitter": "0.3.5" @@ -883,7 +922,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41" + "es5-ext": "0.10.42" } }, "es6-weak-map": { @@ -893,7 +932,7 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41", + "es5-ext": "0.10.42", "es6-iterator": "2.0.3", "es6-symbol": "3.1.1" } @@ -955,9 +994,9 @@ } }, "eslint": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.0.tgz", - "integrity": "sha512-r83L5CuqaocDvfwdojbz68b6tCUk8KJkqfppO+gmSAQqYCzTr0bCSMu6A6yFCLKG65j5eKcKUw4Cw4Yl4gfWkg==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", + "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", "dev": true, "requires": { "ajv": "5.5.2", @@ -970,12 +1009,12 @@ "eslint-scope": "3.7.1", "eslint-visitor-keys": "1.0.0", "espree": "3.5.4", - "esquery": "1.0.0", + "esquery": "1.0.1", "esutils": "2.0.2", "file-entry-cache": "2.0.0", "functional-red-black-tree": "1.0.1", "glob": "7.1.2", - "globals": "11.3.0", + "globals": "11.4.0", "ignore": "3.3.7", "imurmurhash": "0.1.4", "inquirer": "3.3.0", @@ -991,7 +1030,7 @@ "path-is-inside": "1.0.2", "pluralize": "7.0.0", "progress": "2.0.0", - "regexpp": "1.0.1", + "regexpp": "1.1.0", "require-uncached": "1.0.3", "semver": "5.5.0", "strip-ansi": "4.0.0", @@ -1018,6 +1057,17 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -1042,7 +1092,7 @@ "dev": true, "requires": { "debug": "2.6.9", - "resolve": "1.6.0" + "resolve": "1.7.1" }, "dependencies": { "debug": { @@ -1057,9 +1107,9 @@ } }, "eslint-module-utils": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz", - "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", + "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", "dev": true, "requires": { "debug": "2.6.9", @@ -1078,21 +1128,21 @@ } }, "eslint-plugin-import": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.9.0.tgz", - "integrity": "sha1-JgAu+/ylmJtyiKwEdQi9JPIXsWk=", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.11.0.tgz", + "integrity": "sha1-Fa7qN6Z0mdhI6OmBgG1GJ7VQOBY=", "dev": true, "requires": { - "builtin-modules": "1.1.1", "contains-path": "0.1.0", "debug": "2.6.9", "doctrine": "1.5.0", "eslint-import-resolver-node": "0.3.2", - "eslint-module-utils": "2.1.1", + "eslint-module-utils": "2.2.0", "has": "1.0.1", "lodash": "4.17.5", "minimatch": "3.0.4", - "read-pkg-up": "2.0.0" + "read-pkg-up": "2.0.0", + "resolve": "1.7.1" }, "dependencies": { "debug": { @@ -1124,7 +1174,7 @@ "requires": { "ignore": "3.3.7", "minimatch": "3.0.4", - "resolve": "1.6.0", + "resolve": "1.7.1", "semver": "5.3.0" }, "dependencies": { @@ -1209,7 +1259,7 @@ "integrity": "sha1-oXt+zFnTDheeK+9z+0E3cEyzMbU=", "dev": true, "requires": { - "is-url": "1.2.3", + "is-url": "1.2.4", "path-is-absolute": "1.0.1", "source-map": "0.5.7", "xtend": "4.0.1" @@ -1232,7 +1282,7 @@ "acorn": "5.5.3", "acorn-es7-plugin": "1.1.7", "convert-source-map": "1.5.1", - "empower-assert": "1.0.1", + "empower-assert": "1.1.0", "escodegen": "1.9.1", "espower": "2.1.0", "estraverse": "4.2.0", @@ -1264,13 +1314,13 @@ "integrity": "sha1-HFz2y8zDLm9jk4C9T5kfq5up0iY=", "dev": true, "requires": { - "core-js": "2.5.3" + "core-js": "2.5.5" } }, "esquery": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", - "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { "estraverse": "4.2.0" @@ -1304,15 +1354,15 @@ "dev": true, "requires": { "d": "1.0.0", - "es5-ext": "0.10.41" + "es5-ext": "0.10.42" } }, "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", + "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", "requires": { - "cross-spawn": "5.1.0", + "cross-spawn": "6.0.5", "get-stream": "3.0.0", "is-stream": "1.1.0", "npm-run-path": "2.0.2", @@ -1321,6 +1371,11 @@ "strip-eof": "1.0.0" } }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" + }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", @@ -1328,13 +1383,13 @@ "dev": true }, "external-editor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", - "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { "chardet": "0.4.2", - "iconv-lite": "0.4.19", + "iconv-lite": "0.4.21", "tmp": "0.0.33" } }, @@ -1423,6 +1478,16 @@ "mime-types": "2.1.18" } }, + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1507,9 +1572,9 @@ } }, "globals": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", - "integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.4.0.tgz", + "integrity": "sha512-Dyzmifil8n/TmSqYDEXbm+C8yitzJQqQIlJQLNRMwa+BOUJpRC19pyVeN12JAjt61xonvXjtff+hJruTRXn5HA==", "dev": true }, "globby": { @@ -1529,8 +1594,7 @@ "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "growl": { "version": "1.10.3", @@ -1621,7 +1685,7 @@ "domutils": "1.5.1", "entities": "1.1.1", "inherits": "2.0.3", - "readable-stream": "2.3.5" + "readable-stream": "2.3.6" } }, "http-signature": { @@ -1645,10 +1709,13 @@ } }, "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "dev": true, + "requires": { + "safer-buffer": "2.1.2" + } }, "ignore": { "version": "3.3.7", @@ -1662,6 +1729,14 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "requires": { + "repeating": "2.0.1" + } + }, "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", @@ -1688,11 +1763,11 @@ "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { - "ansi-escapes": "3.0.0", + "ansi-escapes": "3.1.0", "chalk": "2.3.2", "cli-cursor": "2.1.0", "cli-width": "2.2.0", - "external-editor": "2.1.0", + "external-editor": "2.2.0", "figures": "2.0.0", "lodash": "4.17.5", "mute-stream": "0.0.7", @@ -1704,12 +1779,62 @@ "through": "2.3.8" }, "dependencies": { + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "dev": true + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "1.2.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -1750,10 +1875,29 @@ "builtin-modules": "1.1.1" } }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "1.0.1" + } + }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", + "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", + "requires": { + "symbol-observable": "0.2.4" + } }, "is-path-cwd": { "version": "1.0.0", @@ -1762,9 +1906,9 @@ "dev": true }, "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "dev": true, "requires": { "is-path-inside": "1.0.1" @@ -1782,8 +1926,7 @@ "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" }, "is-resolvable": { "version": "1.1.0", @@ -1803,9 +1946,9 @@ "dev": true }, "is-url": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.3.tgz", - "integrity": "sha512-vmOHLvzbcnsdFz8wQPXj1lgI5SE8AUlUGMenzuZzRFjoReb1WB+pLt9GrIo7BTker+aTcwrjTDle7odioWeqyw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", "dev": true }, "isarray": { @@ -1880,6 +2023,14 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "4.1.11" + } + }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", @@ -1930,6 +2081,176 @@ "type-check": "0.3.2" } }, + "listr": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/listr/-/listr-0.13.0.tgz", + "integrity": "sha1-ILsLowuuZg7oTMBQPfS+PVYjiH0=", + "requires": { + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "figures": "1.7.0", + "indent-string": "2.1.0", + "is-observable": "0.2.0", + "is-promise": "2.1.0", + "is-stream": "1.1.0", + "listr-silent-renderer": "1.1.1", + "listr-update-renderer": "0.4.0", + "listr-verbose-renderer": "0.4.1", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "ora": "0.2.3", + "p-map": "1.2.0", + "rxjs": "5.5.10", + "stream-to-observable": "0.2.0", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "ora": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz", + "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", + "requires": { + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-spinners": "0.1.2", + "object-assign": "4.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "listr-silent-renderer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=" + }, + "listr-update-renderer": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz", + "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", + "requires": { + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "elegant-spinner": "1.0.1", + "figures": "1.7.0", + "indent-string": "3.2.0", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "listr-verbose-renderer": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", + "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", + "requires": { + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "date-fns": "1.29.0", + "figures": "1.7.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -1963,11 +2284,44 @@ "dev": true }, "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", "requires": { - "chalk": "2.3.2" + "chalk": "1.1.3" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "log-update": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", + "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", + "requires": { + "ansi-escapes": "1.4.0", + "cli-cursor": "1.0.2" } }, "lolex": { @@ -2121,6 +2475,11 @@ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, + "nice-try": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==" + }, "nise": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/nise/-/nise-1.3.2.tgz", @@ -2135,9 +2494,9 @@ } }, "node-fetch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.1.tgz", - "integrity": "sha1-NpynC4L1DIZJYQSmx3bSdPTkotQ=" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", + "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" }, "nopt": { "version": "3.0.6", @@ -4960,8 +5319,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-keys": { "version": "1.0.11", @@ -4978,12 +5336,9 @@ } }, "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "1.2.0" - } + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" }, "optionator": { "version": "0.8.2", @@ -5006,8 +5361,48 @@ "requires": { "chalk": "2.3.2", "cli-cursor": "2.1.0", - "cli-spinners": "1.1.0", + "cli-spinners": "1.3.1", "log-symbols": "2.2.0" + }, + "dependencies": { + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "requires": { + "restore-cursor": "2.0.0" + } + }, + "cli-spinners": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz", + "integrity": "sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==" + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "requires": { + "chalk": "2.3.2" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "requires": { + "mimic-fn": "1.2.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + } } }, "os-locale": { @@ -5018,6 +5413,32 @@ "execa": "0.7.0", "lcid": "1.0.0", "mem": "1.1.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + } } }, "os-tmpdir": { @@ -5047,6 +5468,11 @@ "p-limit": "1.2.0" } }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" + }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", @@ -5066,7 +5492,7 @@ "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", "requires": { - "@types/node": "9.4.7" + "@types/node": "9.6.4" } }, "path-exists": { @@ -5186,9 +5612,9 @@ "dev": true }, "power-assert": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.4.4.tgz", - "integrity": "sha1-kpXqdDcZb1pgH95CDwQmMRhtdRc=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/power-assert/-/power-assert-1.5.0.tgz", + "integrity": "sha512-WaWSw+Ts283o6dzxW1BxIxoaHok7aSSGx4SaR6dW62Pk31ynv9DERDieuZpPYv5XaJ+H+zdcOaJQ+PvlasAOVw==", "dev": true, "requires": { "define-properties": "1.1.2", @@ -5204,7 +5630,7 @@ "integrity": "sha1-7bo1LT7YpgMRTWZyZazOYNaJzN8=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "power-assert-context-traversal": "1.1.1" } }, @@ -5216,7 +5642,7 @@ "requires": { "acorn": "4.0.13", "acorn-es7-plugin": "1.1.7", - "core-js": "2.5.3", + "core-js": "2.5.5", "espurify": "1.7.0", "estraverse": "4.2.0" }, @@ -5235,7 +5661,7 @@ "integrity": "sha1-iMq8oNE7Y1nwfT0+ivppkmRXftk=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "estraverse": "4.2.0" } }, @@ -5245,7 +5671,7 @@ "integrity": "sha1-XcEl7VCj37HdomwZNH879Y7CiEo=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "power-assert-context-formatter": "1.1.1", "power-assert-context-reducer-ast": "1.1.2", "power-assert-renderer-assertion": "1.1.1", @@ -5276,7 +5702,7 @@ "integrity": "sha1-10Odl9hRVr5OMKAPL7WnJRTOPAg=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "diff-match-patch": "1.0.0", "power-assert-renderer-base": "1.1.1", "stringifier": "1.3.0", @@ -5289,7 +5715,7 @@ "integrity": "sha1-ZV+PcRk1qbbVQbhjJ2VHF8Y3qYY=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "power-assert-renderer-base": "1.1.1", "power-assert-util-string-width": "1.1.1", "stringifier": "1.3.0" @@ -5377,25 +5803,33 @@ } }, "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", "isarray": "1.0.0", "process-nextick-args": "2.0.0", "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", + "string_decoder": "1.1.1", "util-deprecate": "1.0.2" } }, "regexpp": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.0.1.tgz", - "integrity": "sha512-8Ph721maXiOYSLtaDGKVmDn5wdsNaF6Px85qFNeMPQq0r8K5Y10tgP6YuR65Ws35n4DvzFcCxEnRNBIXQunzLw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", "dev": true }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "1.0.2" + } + }, "request": { "version": "2.81.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", @@ -5403,7 +5837,7 @@ "dev": true, "requires": { "aws-sign2": "0.6.0", - "aws4": "1.6.0", + "aws4": "1.7.0", "caseless": "0.12.0", "combined-stream": "1.0.6", "extend": "3.0.1", @@ -5447,9 +5881,9 @@ } }, "resolve": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.6.0.tgz", - "integrity": "sha512-mw7JQNu5ExIkcw4LPih0owX/TZXjD/ZUF/ZQ/pDnkw3ZKhDcZZw5klmBlj6gVMwjQ3Pz5Jgu7F3d0jcDVuEWdw==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, "requires": { "path-parse": "1.0.5" @@ -5462,12 +5896,12 @@ "dev": true }, "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" + "exit-hook": "1.1.1", + "onetime": "1.1.0" } }, "rimraf": { @@ -5502,11 +5936,32 @@ "rx-lite": "4.0.8" } }, + "rxjs": { + "version": "5.5.10", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.10.tgz", + "integrity": "sha512-SRjimIDUHJkon+2hFo7xnvNC4ZEHGzCRwh9P7nzX3zPkCGFEg/tuElrNR7L/rZMagnK2JeH2jQwPRpmyXyLB6A==", + "requires": { + "symbol-observable": "1.0.1" + }, + "dependencies": { + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" + } + } + }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "samsam": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", @@ -5516,8 +5971,7 @@ "semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" }, "set-blocking": { "version": "2.0.0", @@ -5543,9 +5997,9 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "sinon": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.4.8.tgz", - "integrity": "sha512-EWZf/D5BN/BbDFPmwY2abw6wgELVmk361self+lcwEmVw0WWUxURp2S/YoDB2WG/xurFVzKQglMARweYRWM6Hw==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.5.0.tgz", + "integrity": "sha512-trdx+mB0VBBgoYucy6a9L7/jfQOmvGeaKZT4OOJ+lPAtI8623xyGr8wLiE4eojzBS8G9yXbhx42GHUOVLr4X2w==", "dev": true, "requires": { "@sinonjs/formatio": "2.0.0", @@ -5558,13 +6012,9 @@ } }, "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0" - } + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" }, "sntp": { "version": "1.0.9", @@ -5661,34 +6111,28 @@ } } }, + "stream-to-observable": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.2.0.tgz", + "integrity": "sha1-WdbqOT2HwsDdrBCqDVYbxrpvDhA=", + "requires": { + "any-observable": "0.2.0" + } + }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - } + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { "safe-buffer": "5.1.1" } @@ -5699,7 +6143,7 @@ "integrity": "sha1-3vGDQvaTPbDy2/yaoCF1tEjBeVk=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.5", "traverse": "0.6.6", "type-name": "2.0.2" } @@ -5743,6 +6187,11 @@ "has-flag": "3.0.0" } }, + "symbol-observable": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", + "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=" + }, "table": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", @@ -5768,6 +6217,46 @@ "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } } } }, @@ -5899,6 +6388,11 @@ "object-keys": "1.0.11" } }, + "universalify": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", + "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" + }, "urlgrey": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz", @@ -5971,26 +6465,6 @@ "requires": { "string-width": "1.0.2", "strip-ansi": "3.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } } }, "wrappy": { @@ -6039,6 +6513,35 @@ "which-module": "2.0.0", "y18n": "3.2.1", "yargs-parser": "8.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + } } }, "yargs-parser": { diff --git a/package.json b/package.json index cd01f1c8..4cf5224e 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "Utilities for Node.js core collaborators", "bin": { "get-metadata": "./bin/get-metadata", - "ncu-config": "./bin/ncu-config", "git-node": "./bin/git-node", + "ncu-config": "./bin/ncu-config", "ncu-team": "./bin/ncu-team" }, "scripts": { @@ -33,8 +33,11 @@ "chalk": "^2.3.1", "cheerio": "^1.0.0-rc.2", "core-validate-commit": "^3.5.0", + "execa": "^0.10.0", "figures": "^2.0.0", + "fs-extra": "^5.0.0", "ghauth": "^3.2.1", + "listr": "^0.13.0", "mkdirp": "^0.5.1", "node-fetch": "^2.1.1", "ora": "^1.3.0",