Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions lib/update-v8/applyNodeChanges.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import path from 'node:path';

import Enquirer from 'enquirer';
import { Listr } from 'listr2';

import {
Expand All @@ -23,11 +22,7 @@ export default function applyNodeChanges() {
task: async(ctx) => {
const v8Version = await getNodeV8Version(ctx.nodeDir);
const list = filterForVersion(nodeChanges, v8Version);
return new Listr(list.map((change) => change.task()), {
injectWrapper: {
enquirer: new Enquirer()
}
});
return new Listr(list.map((change) => change.task()));
}
};
}
Expand Down
22 changes: 5 additions & 17 deletions lib/update-v8/backport.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
promises as fs
} from 'node:fs';

import Enquirer from 'enquirer';
import inquirer from 'inquirer';
import { Listr } from 'listr2';
import { ListrEnquirerPromptAdapter } from '@listr2/prompt-adapter-enquirer';

import { shortSha } from '../utils.js';

Expand Down Expand Up @@ -51,11 +51,7 @@ export function doBackport(options) {
return {
title: 'V8 commit backport',
task: () => {
return new Listr(todo, {
injectWrapper: {
enquirer: new Enquirer()
}
});
return new Listr(todo);
}
};
};
Expand Down Expand Up @@ -169,11 +165,7 @@ function applyAndCommitPatches() {
return {
title: 'Apply and commit patches to deps/v8',
task: (ctx) => {
return new Listr(ctx.patches.map(applyPatchTask), {
injectWrapper: {
enquirer: new Enquirer()
}
});
return new Listr(ctx.patches.map(applyPatchTask));
}
};
}
Expand All @@ -196,11 +188,7 @@ function applyPatchTask(patch) {
}
}
todo.push(commitPatch(patch));
return new Listr(todo, {
injectWrapper: {
enquirer: new Enquirer()
}
});
return new Listr(todo);
}
};
}
Expand All @@ -214,7 +202,7 @@ async function applyPatch(ctx, task, patch) {
);
} catch (e) {
patch.hadConflicts = true;
return task.prompt({
return task.prompt(ListrEnquirerPromptAdapter).run({
type: 'input',
message: "Resolve merge conflicts and enter 'RESOLVED'",
validate: value => value.toUpperCase() === 'RESOLVED'
Expand Down
6 changes: 1 addition & 5 deletions lib/update-v8/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Enquirer from 'enquirer';
import { Listr } from 'listr2';

import { checkOptions, doBackport } from './backport.js';
Expand Down Expand Up @@ -48,9 +47,6 @@ export async function backport(options) {
*/
function getOptions(opts) {
return {
renderer: opts.verbose ? 'verbose' : 'default',
injectWrapper: {
enquirer: new Enquirer()
}
renderer: opts.verbose ? 'verbose' : 'default'
};
}
7 changes: 1 addition & 6 deletions lib/update-v8/majorUpdate.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import path from 'node:path';
import { promises as fs } from 'node:fs';

import Enquirer from 'enquirer';
import { Listr } from 'listr2';

import { getCurrentV8Version } from './common.js';
Expand Down Expand Up @@ -30,11 +29,7 @@ export default function majorUpdate() {
addDepsV8(),
updateV8Deps(),
applyNodeChanges()
], {
injectWrapper: {
enquirer: new Enquirer()
}
});
]);
}
};
};
Expand Down
7 changes: 1 addition & 6 deletions lib/update-v8/minorUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { spawn } from 'node:child_process';
import path from 'node:path';
import { promises as fs } from 'node:fs';

import Enquirer from 'enquirer';
import { Listr } from 'listr2';

import { getCurrentV8Version } from './common.js';
Expand All @@ -17,11 +16,7 @@ export default function minorUpdate() {
getCurrentV8Version(),
getLatestV8Version(),
doMinorUpdate()
], {
injectWrapper: {
enquirer: new Enquirer()
}
});
]);
}
};
};
Expand Down
7 changes: 1 addition & 6 deletions lib/update-v8/updateV8Clone.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { promises as fs } from 'node:fs';

import Enquirer from 'enquirer';
import { Listr } from 'listr2';

import { v8Git } from './constants.js';
Expand All @@ -10,11 +9,7 @@ export default function updateV8Clone() {
return {
title: 'Update local V8 clone',
task: () => {
return new Listr([fetchOrigin(), createClone()], {
injectWrapper: {
enquirer: new Enquirer()
}
});
return new Listr([fetchOrigin(), createClone()]);
}
};
};
Expand Down
7 changes: 1 addition & 6 deletions lib/update-v8/updateVersionNumbers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import path from 'node:path';
import { promises as fs } from 'node:fs';

import Enquirer from 'enquirer';
import { Listr } from 'listr2';

import { getNodeV8Version } from './util.js';
Expand All @@ -10,11 +9,7 @@ export default function updateVersionNumbers() {
return {
title: 'Update version numbers',
task: () => {
return new Listr([resetEmbedderString(), bumpNodeModule()], {
injectWrapper: {
enquirer: new Enquirer()
}
});
return new Listr([resetEmbedderString(), bumpNodeModule()]);
}
};
};
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,36 @@
],
"license": "MIT",
"dependencies": {
"@listr2/prompt-adapter-enquirer": "^1.0.1",
"@node-core/caritat": "^1.2.0",
"@pkgjs/nv": "^0.2.1",
"branch-diff": "^2.1.4",
"chalk": "^5.3.0",
"changelog-maker": "^3.2.4",
"@pkgjs/nv": "^0.2.1",
"cheerio": "^1.0.0-rc.12",
"clipboardy": "^3.0.0",
"core-validate-commit": "^4.0.0",
"enquirer": "^2.4.1",
"figures": "^5.0.0",
"ghauth": "^5.0.1",
"inquirer": "^9.2.10",
"inquirer": "^9.2.11",
"js-yaml": "^4.1.0",
"listr2": "^6.6.1",
"listr2": "^7.0.1",
"lodash": "^4.17.21",
"log-symbols": "^5.1.0",
"ora": "^7.0.1",
"replace-in-file": "^7.0.1",
"undici": "^5.23.0",
"which": "^3.0.1",
"undici": "^5.25.2",
"which": "^4.0.0",
"yargs": "^17.7.2"
},
"devDependencies": {
"@reporters/github": "^1.5.2",
"c8": "^8.0.1",
"eslint": "^8.47.0",
"eslint": "^8.50.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-n": "^16.0.2",
"eslint-plugin-n": "^16.1.0",
"eslint-plugin-promise": "^6.1.1",
"sinon": "^15.2.0"
"sinon": "^16.0.0"
}
}