File tree Expand file tree Collapse file tree 8 files changed +57
-9
lines changed Expand file tree Collapse file tree 8 files changed +57
-9
lines changed Original file line number Diff line number Diff line change 11import path from 'node:path' ;
22
3+ import Enquirer from 'enquirer' ;
34import { Listr } from 'listr2' ;
45
56import {
@@ -22,7 +23,11 @@ export default function applyNodeChanges() {
2223 task : async ( ctx ) => {
2324 const v8Version = await getNodeV8Version ( ctx . nodeDir ) ;
2425 const list = filterForVersion ( nodeChanges , v8Version ) ;
25- return new Listr ( list . map ( ( change ) => change . task ( ) ) ) ;
26+ return new Listr ( list . map ( ( change ) => change . task ( ) ) , {
27+ injectWrapper : {
28+ enquirer : new Enquirer ( )
29+ }
30+ } ) ;
2631 }
2732 } ;
2833}
Original file line number Diff line number Diff line change 33 promises as fs
44} from 'node:fs' ;
55
6+ import Enquirer from 'enquirer' ;
67import inquirer from 'inquirer' ;
78import { Listr } from 'listr2' ;
89
@@ -50,7 +51,11 @@ export function doBackport(options) {
5051 return {
5152 title : 'V8 commit backport' ,
5253 task : ( ) => {
53- return new Listr ( todo ) ;
54+ return new Listr ( todo , {
55+ injectWrapper : {
56+ enquirer : new Enquirer ( )
57+ }
58+ } ) ;
5459 }
5560 } ;
5661} ;
@@ -168,7 +173,11 @@ function applyAndCommitPatches() {
168173 return {
169174 title : 'Apply and commit patches to deps/v8' ,
170175 task : ( ctx ) => {
171- return new Listr ( ctx . patches . map ( applyPatchTask ) ) ;
176+ return new Listr ( ctx . patches . map ( applyPatchTask ) , {
177+ injectWrapper : {
178+ enquirer : new Enquirer ( )
179+ }
180+ } ) ;
172181 }
173182 } ;
174183}
@@ -191,7 +200,11 @@ function applyPatchTask(patch) {
191200 }
192201 }
193202 todo . push ( commitPatch ( patch ) ) ;
194- return new Listr ( todo ) ;
203+ return new Listr ( todo , {
204+ injectWrapper : {
205+ enquirer : new Enquirer ( )
206+ }
207+ } ) ;
195208 }
196209 } ;
197210}
Original file line number Diff line number Diff line change 1+ import Enquirer from 'enquirer' ;
12import { Listr } from 'listr2' ;
23
34import { checkOptions , doBackport } from './backport.js' ;
@@ -33,8 +34,16 @@ export async function backport(options) {
3334 return tasks . run ( options ) ;
3435} ;
3536
37+ /**
38+ * Get the listr2 options.
39+ * @param {{ verbose?: boolean } } options The original options.
40+ * @return {import('listr2').ListrOptions } The listr2 options.
41+ */
3642function getOptions ( opts ) {
3743 return {
38- renderer : opts . verbose ? 'verbose' : 'default'
44+ renderer : opts . verbose ? 'verbose' : 'default' ,
45+ injectWrapper : {
46+ enquirer : new Enquirer ( )
47+ }
3948 } ;
4049}
Original file line number Diff line number Diff line change 11import path from 'node:path' ;
22import { promises as fs } from 'node:fs' ;
33
4+ import Enquirer from 'enquirer' ;
45import { execa } from 'execa' ;
56import { Listr } from 'listr2' ;
67
@@ -28,7 +29,11 @@ export default function majorUpdate() {
2829 addDepsV8 ( ) ,
2930 updateV8Deps ( ) ,
3031 applyNodeChanges ( )
31- ] ) ;
32+ ] , {
33+ injectWrapper : {
34+ enquirer : new Enquirer ( )
35+ }
36+ } ) ;
3237 }
3338 } ;
3439} ;
Original file line number Diff line number Diff line change 11import path from 'node:path' ;
22import { promises as fs } from 'node:fs' ;
33
4+ import Enquirer from 'enquirer' ;
45import { execa } from 'execa' ;
56import { Listr } from 'listr2' ;
67
@@ -14,7 +15,11 @@ export default function minorUpdate() {
1415 getCurrentV8Version ( ) ,
1516 getLatestV8Version ( ) ,
1617 doMinorUpdate ( )
17- ] ) ;
18+ ] , {
19+ injectWrapper : {
20+ enquirer : new Enquirer ( )
21+ }
22+ } ) ;
1823 }
1924 } ;
2025} ;
Original file line number Diff line number Diff line change 11import { promises as fs } from 'node:fs' ;
22
3+ import Enquirer from 'enquirer' ;
34import { execa } from 'execa' ;
45import { Listr } from 'listr2' ;
56
@@ -9,7 +10,11 @@ export default function updateV8Clone() {
910 return {
1011 title : 'Update local V8 clone' ,
1112 task : ( ) => {
12- return new Listr ( [ fetchOrigin ( ) , createClone ( ) ] ) ;
13+ return new Listr ( [ fetchOrigin ( ) , createClone ( ) ] , {
14+ injectWrapper : {
15+ enquirer : new Enquirer ( )
16+ }
17+ } ) ;
1318 }
1419 } ;
1520} ;
Original file line number Diff line number Diff line change 11import path from 'node:path' ;
22import { promises as fs } from 'node:fs' ;
33
4+ import Enquirer from 'enquirer' ;
45import { Listr } from 'listr2' ;
56
67import { getNodeV8Version } from './util.js' ;
@@ -9,7 +10,11 @@ export default function updateVersionNumbers() {
910 return {
1011 title : 'Update version numbers' ,
1112 task : ( ) => {
12- return new Listr ( [ resetEmbedderString ( ) , bumpNodeModule ( ) ] ) ;
13+ return new Listr ( [ resetEmbedderString ( ) , bumpNodeModule ( ) ] , {
14+ injectWrapper : {
15+ enquirer : new Enquirer ( )
16+ }
17+ } ) ;
1318 }
1419 } ;
1520} ;
Original file line number Diff line number Diff line change 3737 "cheerio" : " ^1.0.0-rc.10" ,
3838 "clipboardy" : " ^3.0.0" ,
3939 "core-validate-commit" : " ^3.16.0" ,
40+ "enquirer" : " ^2.3.6" ,
4041 "execa" : " ^6.1.0" ,
4142 "figures" : " ^4.0.1" ,
4243 "form-data" : " ^4.0.0" ,
You can’t perform that action at this time.
0 commit comments