File tree Expand file tree Collapse file tree 6 files changed +16
-27
lines changed Expand file tree Collapse file tree 6 files changed +16
-27
lines changed Original file line number Diff line number Diff line change 1
1
import path from 'node:path' ;
2
2
3
- import { Listr } from 'listr2' ;
4
-
5
3
import {
6
4
getNodeV8Version ,
7
5
filterForVersion ,
@@ -19,10 +17,10 @@ const nodeChanges = [
19
17
export default function applyNodeChanges ( ) {
20
18
return {
21
19
title : 'Apply Node-specific changes' ,
22
- task : async ( ctx ) => {
20
+ task : async ( ctx , task ) => {
23
21
const v8Version = await getNodeV8Version ( ctx . nodeDir ) ;
24
22
const list = filterForVersion ( nodeChanges , v8Version ) ;
25
- return new Listr ( list . map ( ( change ) => change . task ( ) ) ) ;
23
+ return task . newListr ( list . map ( ( change ) => change . task ( ) ) ) ;
26
24
}
27
25
} ;
28
26
}
Original file line number Diff line number Diff line change 4
4
} from 'node:fs' ;
5
5
6
6
import inquirer from 'inquirer' ;
7
- import { Listr } from 'listr2' ;
8
7
import { ListrEnquirerPromptAdapter } from '@listr2/prompt-adapter-enquirer' ;
9
8
10
9
import { shortSha } from '../utils.js' ;
@@ -50,8 +49,8 @@ export function doBackport(options) {
50
49
51
50
return {
52
51
title : 'V8 commit backport' ,
53
- task : ( ) => {
54
- return new Listr ( todo ) ;
52
+ task : ( ctx , task ) => {
53
+ return task . newListr ( todo ) ;
55
54
}
56
55
} ;
57
56
} ;
@@ -164,16 +163,16 @@ function applyPatches() {
164
163
function applyAndCommitPatches ( ) {
165
164
return {
166
165
title : 'Apply and commit patches to deps/v8' ,
167
- task : ( ctx ) => {
168
- return new Listr ( ctx . patches . map ( applyPatchTask ) ) ;
166
+ task : ( ctx , task ) => {
167
+ return task . newListr ( ctx . patches . map ( applyPatchTask ) ) ;
169
168
}
170
169
} ;
171
170
}
172
171
173
172
function applyPatchTask ( patch ) {
174
173
return {
175
174
title : `Commit ${ shortSha ( patch . sha ) } ` ,
176
- task : ( ctx ) => {
175
+ task : ( ctx , task ) => {
177
176
const todo = [
178
177
{
179
178
title : 'Apply patch' ,
@@ -188,7 +187,7 @@ function applyPatchTask(patch) {
188
187
}
189
188
}
190
189
todo . push ( commitPatch ( patch ) ) ;
191
- return new Listr ( todo ) ;
190
+ return task . newListr ( todo ) ;
192
191
}
193
192
} ;
194
193
}
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 { Listr } from 'listr2' ;
5
-
6
4
import { getCurrentV8Version } from './common.js' ;
7
5
import {
8
6
getNodeV8Version ,
@@ -19,8 +17,8 @@ import { forceRunAsync } from '../run.js';
19
17
export default function majorUpdate ( ) {
20
18
return {
21
19
title : 'Major V8 update' ,
22
- task : ( ) => {
23
- return new Listr ( [
20
+ task : ( ctx , task ) => {
21
+ return task . newListr ( [
24
22
getCurrentV8Version ( ) ,
25
23
checkoutBranch ( ) ,
26
24
removeDepsV8 ( ) ,
Original file line number Diff line number Diff line change @@ -2,17 +2,15 @@ import { spawn } from 'node:child_process';
2
2
import path from 'node:path' ;
3
3
import { promises as fs } from 'node:fs' ;
4
4
5
- import { Listr } from 'listr2' ;
6
-
7
5
import { getCurrentV8Version } from './common.js' ;
8
6
import { isVersionString } from './util.js' ;
9
7
import { forceRunAsync } from '../run.js' ;
10
8
11
9
export default function minorUpdate ( ) {
12
10
return {
13
11
title : 'Minor V8 update' ,
14
- task : ( ) => {
15
- return new Listr ( [
12
+ task : ( ctx , task ) => {
13
+ return task . newListr ( [
16
14
getCurrentV8Version ( ) ,
17
15
getLatestV8Version ( ) ,
18
16
doMinorUpdate ( )
Original file line number Diff line number Diff line change 1
1
import { promises as fs } from 'node:fs' ;
2
2
3
- import { Listr } from 'listr2' ;
4
-
5
3
import { v8Git } from './constants.js' ;
6
4
import { forceRunAsync } from '../run.js' ;
7
5
8
6
export default function updateV8Clone ( ) {
9
7
return {
10
8
title : 'Update local V8 clone' ,
11
- task : ( ) => {
12
- return new Listr ( [ fetchOrigin ( ) , createClone ( ) ] ) ;
9
+ task : ( ctx , task ) => {
10
+ return task . newListr ( [ fetchOrigin ( ) , createClone ( ) ] ) ;
13
11
}
14
12
} ;
15
13
} ;
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 { Listr } from 'listr2' ;
5
-
6
4
import { getNodeV8Version } from './util.js' ;
7
5
8
6
export default function updateVersionNumbers ( ) {
9
7
return {
10
8
title : 'Update version numbers' ,
11
- task : ( ) => {
12
- return new Listr ( [ resetEmbedderString ( ) , bumpNodeModule ( ) ] ) ;
9
+ task : ( ctx , task ) => {
10
+ return task . newListr ( [ resetEmbedderString ( ) , bumpNodeModule ( ) ] ) ;
13
11
}
14
12
} ;
15
13
} ;
You can’t perform that action at this time.
0 commit comments