Skip to content

Commit a74c0aa

Browse files
authored
chore: update dependencies (#738)
- Update the `listr2` and `which` dependencies and the `sinon` developer dependency to their new major versions. - Update all other dependencies and developer dependencies to their latest versions.
1 parent ccb1fec commit a74c0aa

File tree

8 files changed

+20
-61
lines changed

8 files changed

+20
-61
lines changed

lib/update-v8/applyNodeChanges.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import path from 'node:path';
22

3-
import Enquirer from 'enquirer';
43
import { Listr } from 'listr2';
54

65
import {
@@ -23,11 +22,7 @@ export default function applyNodeChanges() {
2322
task: async(ctx) => {
2423
const v8Version = await getNodeV8Version(ctx.nodeDir);
2524
const list = filterForVersion(nodeChanges, v8Version);
26-
return new Listr(list.map((change) => change.task()), {
27-
injectWrapper: {
28-
enquirer: new Enquirer()
29-
}
30-
});
25+
return new Listr(list.map((change) => change.task()));
3126
}
3227
};
3328
}

lib/update-v8/backport.js

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import {
33
promises as fs
44
} from 'node:fs';
55

6-
import Enquirer from 'enquirer';
76
import inquirer from 'inquirer';
87
import { Listr } from 'listr2';
8+
import { ListrEnquirerPromptAdapter } from '@listr2/prompt-adapter-enquirer';
99

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

@@ -51,11 +51,7 @@ export function doBackport(options) {
5151
return {
5252
title: 'V8 commit backport',
5353
task: () => {
54-
return new Listr(todo, {
55-
injectWrapper: {
56-
enquirer: new Enquirer()
57-
}
58-
});
54+
return new Listr(todo);
5955
}
6056
};
6157
};
@@ -169,11 +165,7 @@ function applyAndCommitPatches() {
169165
return {
170166
title: 'Apply and commit patches to deps/v8',
171167
task: (ctx) => {
172-
return new Listr(ctx.patches.map(applyPatchTask), {
173-
injectWrapper: {
174-
enquirer: new Enquirer()
175-
}
176-
});
168+
return new Listr(ctx.patches.map(applyPatchTask));
177169
}
178170
};
179171
}
@@ -196,11 +188,7 @@ function applyPatchTask(patch) {
196188
}
197189
}
198190
todo.push(commitPatch(patch));
199-
return new Listr(todo, {
200-
injectWrapper: {
201-
enquirer: new Enquirer()
202-
}
203-
});
191+
return new Listr(todo);
204192
}
205193
};
206194
}
@@ -214,7 +202,7 @@ async function applyPatch(ctx, task, patch) {
214202
);
215203
} catch (e) {
216204
patch.hadConflicts = true;
217-
return task.prompt({
205+
return task.prompt(ListrEnquirerPromptAdapter).run({
218206
type: 'input',
219207
message: "Resolve merge conflicts and enter 'RESOLVED'",
220208
validate: value => value.toUpperCase() === 'RESOLVED'

lib/update-v8/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Enquirer from 'enquirer';
21
import { Listr } from 'listr2';
32

43
import { checkOptions, doBackport } from './backport.js';
@@ -48,9 +47,6 @@ export async function backport(options) {
4847
*/
4948
function getOptions(opts) {
5049
return {
51-
renderer: opts.verbose ? 'verbose' : 'default',
52-
injectWrapper: {
53-
enquirer: new Enquirer()
54-
}
50+
renderer: opts.verbose ? 'verbose' : 'default'
5551
};
5652
}

lib/update-v8/majorUpdate.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import path from 'node:path';
22
import { promises as fs } from 'node:fs';
33

4-
import Enquirer from 'enquirer';
54
import { Listr } from 'listr2';
65

76
import { getCurrentV8Version } from './common.js';
@@ -30,11 +29,7 @@ export default function majorUpdate() {
3029
addDepsV8(),
3130
updateV8Deps(),
3231
applyNodeChanges()
33-
], {
34-
injectWrapper: {
35-
enquirer: new Enquirer()
36-
}
37-
});
32+
]);
3833
}
3934
};
4035
};

lib/update-v8/minorUpdate.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { spawn } from 'node:child_process';
22
import path from 'node:path';
33
import { promises as fs } from 'node:fs';
44

5-
import Enquirer from 'enquirer';
65
import { Listr } from 'listr2';
76

87
import { getCurrentV8Version } from './common.js';
@@ -17,11 +16,7 @@ export default function minorUpdate() {
1716
getCurrentV8Version(),
1817
getLatestV8Version(),
1918
doMinorUpdate()
20-
], {
21-
injectWrapper: {
22-
enquirer: new Enquirer()
23-
}
24-
});
19+
]);
2520
}
2621
};
2722
};

lib/update-v8/updateV8Clone.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { promises as fs } from 'node:fs';
22

3-
import Enquirer from 'enquirer';
43
import { Listr } from 'listr2';
54

65
import { v8Git } from './constants.js';
@@ -10,11 +9,7 @@ export default function updateV8Clone() {
109
return {
1110
title: 'Update local V8 clone',
1211
task: () => {
13-
return new Listr([fetchOrigin(), createClone()], {
14-
injectWrapper: {
15-
enquirer: new Enquirer()
16-
}
17-
});
12+
return new Listr([fetchOrigin(), createClone()]);
1813
}
1914
};
2015
};

lib/update-v8/updateVersionNumbers.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import path from 'node:path';
22
import { promises as fs } from 'node:fs';
33

4-
import Enquirer from 'enquirer';
54
import { Listr } from 'listr2';
65

76
import { getNodeV8Version } from './util.js';
@@ -10,11 +9,7 @@ export default function updateVersionNumbers() {
109
return {
1110
title: 'Update version numbers',
1211
task: () => {
13-
return new Listr([resetEmbedderString(), bumpNodeModule()], {
14-
injectWrapper: {
15-
enquirer: new Enquirer()
16-
}
17-
});
12+
return new Listr([resetEmbedderString(), bumpNodeModule()]);
1813
}
1914
};
2015
};

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,36 +34,36 @@
3434
],
3535
"license": "MIT",
3636
"dependencies": {
37+
"@listr2/prompt-adapter-enquirer": "^1.0.1",
3738
"@node-core/caritat": "^1.2.0",
39+
"@pkgjs/nv": "^0.2.1",
3840
"branch-diff": "^2.1.4",
3941
"chalk": "^5.3.0",
4042
"changelog-maker": "^3.2.4",
41-
"@pkgjs/nv": "^0.2.1",
4243
"cheerio": "^1.0.0-rc.12",
4344
"clipboardy": "^3.0.0",
4445
"core-validate-commit": "^4.0.0",
45-
"enquirer": "^2.4.1",
4646
"figures": "^5.0.0",
4747
"ghauth": "^5.0.1",
48-
"inquirer": "^9.2.10",
48+
"inquirer": "^9.2.11",
4949
"js-yaml": "^4.1.0",
50-
"listr2": "^6.6.1",
50+
"listr2": "^7.0.1",
5151
"lodash": "^4.17.21",
5252
"log-symbols": "^5.1.0",
5353
"ora": "^7.0.1",
5454
"replace-in-file": "^7.0.1",
55-
"undici": "^5.23.0",
56-
"which": "^3.0.1",
55+
"undici": "^5.25.2",
56+
"which": "^4.0.0",
5757
"yargs": "^17.7.2"
5858
},
5959
"devDependencies": {
6060
"@reporters/github": "^1.5.2",
6161
"c8": "^8.0.1",
62-
"eslint": "^8.47.0",
62+
"eslint": "^8.50.0",
6363
"eslint-config-standard": "^17.1.0",
6464
"eslint-plugin-import": "^2.28.1",
65-
"eslint-plugin-n": "^16.0.2",
65+
"eslint-plugin-n": "^16.1.0",
6666
"eslint-plugin-promise": "^6.1.1",
67-
"sinon": "^15.2.0"
67+
"sinon": "^16.0.0"
6868
}
6969
}

0 commit comments

Comments
 (0)