Skip to content

Commit

Permalink
chore: resolve all npm install warnings
Browse files Browse the repository at this point in the history
Replaces listr with listr2 and updates mocha. `npm install` no longer
reports audit issues on install.

Co-authored-by: Author: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
Alicia Lopez and targos committed Nov 3, 2021
1 parent 1d46ddc commit 35f2670
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/update-v8/applyNodeChanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const path = require('path');

const fs = require('fs-extra');
const Listr = require('listr');
const { Listr } = require('listr2');

const {
getNodeV8Version,
Expand Down
15 changes: 8 additions & 7 deletions lib/update-v8/backport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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);
}
}
};
Expand All @@ -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) {
Expand All @@ -197,7 +196,7 @@ function applyPatchTask(patch) {
};
}

async function applyPatch(ctx, patch) {
async function applyPatch(ctx, task, patch) {
try {
await ctx.execGitNode(
'apply',
Expand All @@ -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'
});
}
Expand Down
2 changes: 1 addition & 1 deletion lib/update-v8/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const Listr = require('listr');
const { Listr } = require('listr2');

const backport = require('./backport');
const updateVersionNumbers = require('./updateVersionNumbers');
Expand Down
2 changes: 1 addition & 1 deletion lib/update-v8/majorUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion lib/update-v8/minorUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion lib/update-v8/updateV8Clone.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
2 changes: 1 addition & 1 deletion lib/update-v8/updateVersionNumbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down

0 comments on commit 35f2670

Please sign in to comment.