File tree 8 files changed +57
-9
lines changed 8 files changed +57
-9
lines changed Original file line number Diff line number Diff line change 1
1
import path from 'node:path' ;
2
2
3
+ import Enquirer from 'enquirer' ;
3
4
import { Listr } from 'listr2' ;
4
5
5
6
import {
@@ -22,7 +23,11 @@ export default function applyNodeChanges() {
22
23
task : async ( ctx ) => {
23
24
const v8Version = await getNodeV8Version ( ctx . nodeDir ) ;
24
25
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
+ } ) ;
26
31
}
27
32
} ;
28
33
}
Original file line number Diff line number Diff line change 3
3
promises as fs
4
4
} from 'node:fs' ;
5
5
6
+ import Enquirer from 'enquirer' ;
6
7
import inquirer from 'inquirer' ;
7
8
import { Listr } from 'listr2' ;
8
9
@@ -50,7 +51,11 @@ export function doBackport(options) {
50
51
return {
51
52
title : 'V8 commit backport' ,
52
53
task : ( ) => {
53
- return new Listr ( todo ) ;
54
+ return new Listr ( todo , {
55
+ injectWrapper : {
56
+ enquirer : new Enquirer ( )
57
+ }
58
+ } ) ;
54
59
}
55
60
} ;
56
61
} ;
@@ -168,7 +173,11 @@ function applyAndCommitPatches() {
168
173
return {
169
174
title : 'Apply and commit patches to deps/v8' ,
170
175
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
+ } ) ;
172
181
}
173
182
} ;
174
183
}
@@ -191,7 +200,11 @@ function applyPatchTask(patch) {
191
200
}
192
201
}
193
202
todo . push ( commitPatch ( patch ) ) ;
194
- return new Listr ( todo ) ;
203
+ return new Listr ( todo , {
204
+ injectWrapper : {
205
+ enquirer : new Enquirer ( )
206
+ }
207
+ } ) ;
195
208
}
196
209
} ;
197
210
}
Original file line number Diff line number Diff line change
1
+ import Enquirer from 'enquirer' ;
1
2
import { Listr } from 'listr2' ;
2
3
3
4
import { checkOptions , doBackport } from './backport.js' ;
@@ -33,8 +34,16 @@ export async function backport(options) {
33
34
return tasks . run ( options ) ;
34
35
} ;
35
36
37
+ /**
38
+ * Get the listr2 options.
39
+ * @param {{ verbose?: boolean } } options The original options.
40
+ * @return {import('listr2').ListrOptions } The listr2 options.
41
+ */
36
42
function getOptions ( opts ) {
37
43
return {
38
- renderer : opts . verbose ? 'verbose' : 'default'
44
+ renderer : opts . verbose ? 'verbose' : 'default' ,
45
+ injectWrapper : {
46
+ enquirer : new Enquirer ( )
47
+ }
39
48
} ;
40
49
}
Original file line number Diff line number Diff line change 1
1
import path from 'node:path' ;
2
2
import { promises as fs } from 'node:fs' ;
3
3
4
+ import Enquirer from 'enquirer' ;
4
5
import { execa } from 'execa' ;
5
6
import { Listr } from 'listr2' ;
6
7
@@ -28,7 +29,11 @@ export default function majorUpdate() {
28
29
addDepsV8 ( ) ,
29
30
updateV8Deps ( ) ,
30
31
applyNodeChanges ( )
31
- ] ) ;
32
+ ] , {
33
+ injectWrapper : {
34
+ enquirer : new Enquirer ( )
35
+ }
36
+ } ) ;
32
37
}
33
38
} ;
34
39
} ;
Original file line number Diff line number Diff line change 1
1
import path from 'node:path' ;
2
2
import { promises as fs } from 'node:fs' ;
3
3
4
+ import Enquirer from 'enquirer' ;
4
5
import { execa } from 'execa' ;
5
6
import { Listr } from 'listr2' ;
6
7
@@ -14,7 +15,11 @@ export default function minorUpdate() {
14
15
getCurrentV8Version ( ) ,
15
16
getLatestV8Version ( ) ,
16
17
doMinorUpdate ( )
17
- ] ) ;
18
+ ] , {
19
+ injectWrapper : {
20
+ enquirer : new Enquirer ( )
21
+ }
22
+ } ) ;
18
23
}
19
24
} ;
20
25
} ;
Original file line number Diff line number Diff line change 1
1
import { promises as fs } from 'node:fs' ;
2
2
3
+ import Enquirer from 'enquirer' ;
3
4
import { execa } from 'execa' ;
4
5
import { Listr } from 'listr2' ;
5
6
@@ -9,7 +10,11 @@ export default function updateV8Clone() {
9
10
return {
10
11
title : 'Update local V8 clone' ,
11
12
task : ( ) => {
12
- return new Listr ( [ fetchOrigin ( ) , createClone ( ) ] ) ;
13
+ return new Listr ( [ fetchOrigin ( ) , createClone ( ) ] , {
14
+ injectWrapper : {
15
+ enquirer : new Enquirer ( )
16
+ }
17
+ } ) ;
13
18
}
14
19
} ;
15
20
} ;
Original file line number Diff line number Diff line change 1
1
import path from 'node:path' ;
2
2
import { promises as fs } from 'node:fs' ;
3
3
4
+ import Enquirer from 'enquirer' ;
4
5
import { Listr } from 'listr2' ;
5
6
6
7
import { getNodeV8Version } from './util.js' ;
@@ -9,7 +10,11 @@ export default function updateVersionNumbers() {
9
10
return {
10
11
title : 'Update version numbers' ,
11
12
task : ( ) => {
12
- return new Listr ( [ resetEmbedderString ( ) , bumpNodeModule ( ) ] ) ;
13
+ return new Listr ( [ resetEmbedderString ( ) , bumpNodeModule ( ) ] , {
14
+ injectWrapper : {
15
+ enquirer : new Enquirer ( )
16
+ }
17
+ } ) ;
13
18
}
14
19
} ;
15
20
} ;
Original file line number Diff line number Diff line change 37
37
"cheerio" : " ^1.0.0-rc.10" ,
38
38
"clipboardy" : " ^3.0.0" ,
39
39
"core-validate-commit" : " ^3.16.0" ,
40
+ "enquirer" : " ^2.3.6" ,
40
41
"execa" : " ^6.1.0" ,
41
42
"figures" : " ^4.0.1" ,
42
43
"form-data" : " ^4.0.0" ,
You can’t perform that action at this time.
0 commit comments