From 35f26708f7ce2a56e0babad507ede15407d3e7dd Mon Sep 17 00:00:00 2001 From: Alicia Lopez Date: Sat, 30 Oct 2021 21:32:02 -0700 Subject: [PATCH] chore: resolve all npm install warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces listr with listr2 and updates mocha. `npm install` no longer reports audit issues on install. Co-authored-by: Author: Michaƫl Zasso --- lib/update-v8/applyNodeChanges.js | 2 +- lib/update-v8/backport.js | 15 ++++++++------- lib/update-v8/index.js | 2 +- lib/update-v8/majorUpdate.js | 2 +- lib/update-v8/minorUpdate.js | 2 +- lib/update-v8/updateV8Clone.js | 2 +- lib/update-v8/updateVersionNumbers.js | 2 +- package.json | 5 ++--- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/update-v8/applyNodeChanges.js b/lib/update-v8/applyNodeChanges.js index 1e39f28..10683af 100644 --- a/lib/update-v8/applyNodeChanges.js +++ b/lib/update-v8/applyNodeChanges.js @@ -3,7 +3,7 @@ const path = require('path'); const fs = require('fs-extra'); -const Listr = require('listr'); +const { Listr } = require('listr2'); const { getNodeV8Version, diff --git a/lib/update-v8/backport.js b/lib/update-v8/backport.js index ee002c6..ebdcaf0 100644 --- a/lib/update-v8/backport.js +++ b/lib/update-v8/backport.js @@ -4,8 +4,7 @@ const path = require('path'); const fs = require('fs-extra'); const inquirer = require('inquirer'); -const Listr = require('listr'); -const input = require('listr-input'); +const { Listr } = require('listr2'); const { shortSha } = require('../utils'); @@ -156,10 +155,10 @@ function generatePatches() { function applyPatches() { return { title: 'Apply patches to deps/v8', - task: async(ctx) => { + task: async(ctx, task) => { const { patches } = ctx; for (const patch of patches) { - await applyPatch(ctx, patch); + await applyPatch(ctx, task, patch); } } }; @@ -181,7 +180,7 @@ function applyPatchTask(patch) { const todo = [ { title: 'Apply patch', - task: (ctx) => applyPatch(ctx, patch) + task: (ctx, task) => applyPatch(ctx, task, patch) } ]; if (ctx.bump !== false) { @@ -197,7 +196,7 @@ function applyPatchTask(patch) { }; } -async function applyPatch(ctx, patch) { +async function applyPatch(ctx, task, patch) { try { await ctx.execGitNode( 'apply', @@ -206,7 +205,9 @@ async function applyPatch(ctx, patch) { ); } catch (e) { patch.hadConflicts = true; - return input("Resolve merge conflicts and enter 'RESOLVED'", { + return task.prompt({ + type: 'input', + message: "Resolve merge conflicts and enter 'RESOLVED'", validate: value => value.toUpperCase() === 'RESOLVED' }); } diff --git a/lib/update-v8/index.js b/lib/update-v8/index.js index 5d36102..ab8d1ab 100644 --- a/lib/update-v8/index.js +++ b/lib/update-v8/index.js @@ -1,6 +1,6 @@ 'use strict'; -const Listr = require('listr'); +const { Listr } = require('listr2'); const backport = require('./backport'); const updateVersionNumbers = require('./updateVersionNumbers'); diff --git a/lib/update-v8/majorUpdate.js b/lib/update-v8/majorUpdate.js index 2ae055e..a017cb1 100644 --- a/lib/update-v8/majorUpdate.js +++ b/lib/update-v8/majorUpdate.js @@ -4,7 +4,7 @@ const path = require('path'); const execa = require('execa'); const fs = require('fs-extra'); -const Listr = require('listr'); +const { Listr } = require('listr2'); const common = require('./common'); const { diff --git a/lib/update-v8/minorUpdate.js b/lib/update-v8/minorUpdate.js index a370b93..69337e4 100644 --- a/lib/update-v8/minorUpdate.js +++ b/lib/update-v8/minorUpdate.js @@ -4,7 +4,7 @@ const path = require('path'); const execa = require('execa'); const fs = require('fs-extra'); -const Listr = require('listr'); +const { Listr } = require('listr2'); const common = require('./common'); diff --git a/lib/update-v8/updateV8Clone.js b/lib/update-v8/updateV8Clone.js index 9ccd72a..10669b7 100644 --- a/lib/update-v8/updateV8Clone.js +++ b/lib/update-v8/updateV8Clone.js @@ -1,7 +1,7 @@ 'use strict'; const execa = require('execa'); -const Listr = require('listr'); +const { Listr } = require('listr2'); const fs = require('fs-extra'); const { v8Git } = require('./constants'); diff --git a/lib/update-v8/updateVersionNumbers.js b/lib/update-v8/updateVersionNumbers.js index b55105e..8b171cf 100644 --- a/lib/update-v8/updateVersionNumbers.js +++ b/lib/update-v8/updateVersionNumbers.js @@ -3,7 +3,7 @@ const path = require('path'); const fs = require('fs-extra'); -const Listr = require('listr'); +const { Listr } = require('listr2'); const util = require('./util'); diff --git a/package.json b/package.json index 48b4dce..052e3c6 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,7 @@ "fs-extra": "^9.1.0", "ghauth": "^4.0.0", "inquirer": "^7.3.3", - "listr": "^0.14.3", - "listr-input": "^0.2.1", + "listr2": "^3.13.1", "lodash": "^4.17.21", "log-symbols": "^4.1.0", "node-fetch": "^2.6.1", @@ -62,7 +61,7 @@ "eslint-plugin-promise": "^4.3.1", "eslint-plugin-standard": "^4.1.0", "intelli-espower-loader": "^1.0.1", - "mocha": "^8.3.0", + "mocha": "^9.1.3", "nyc": "^15.1.0", "power-assert": "^1.6.1", "sinon": "^9.2.4"