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 11import path from 'node:path' ;
22
3- import { Listr } from 'listr2' ;
4-
53import {
64 getNodeV8Version ,
75 filterForVersion ,
@@ -19,10 +17,10 @@ const nodeChanges = [
1917export default function applyNodeChanges ( ) {
2018 return {
2119 title : 'Apply Node-specific changes' ,
22- task : async ( ctx ) => {
20+ task : async ( ctx , task ) => {
2321 const v8Version = await getNodeV8Version ( ctx . nodeDir ) ;
2422 const list = filterForVersion ( nodeChanges , v8Version ) ;
25- return new Listr ( list . map ( ( change ) => change . task ( ) ) ) ;
23+ return task . newListr ( list . map ( ( change ) => change . task ( ) ) ) ;
2624 }
2725 } ;
2826}
Original file line number Diff line number Diff line change 44} from 'node:fs' ;
55
66import inquirer from 'inquirer' ;
7- import { Listr } from 'listr2' ;
87import { ListrEnquirerPromptAdapter } from '@listr2/prompt-adapter-enquirer' ;
98
109import { shortSha } from '../utils.js' ;
@@ -50,8 +49,8 @@ export function doBackport(options) {
5049
5150 return {
5251 title : 'V8 commit backport' ,
53- task : ( ) => {
54- return new Listr ( todo ) ;
52+ task : ( ctx , task ) => {
53+ return task . newListr ( todo ) ;
5554 }
5655 } ;
5756} ;
@@ -164,16 +163,16 @@ function applyPatches() {
164163function applyAndCommitPatches ( ) {
165164 return {
166165 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 ) ) ;
169168 }
170169 } ;
171170}
172171
173172function applyPatchTask ( patch ) {
174173 return {
175174 title : `Commit ${ shortSha ( patch . sha ) } ` ,
176- task : ( ctx ) => {
175+ task : ( ctx , task ) => {
177176 const todo = [
178177 {
179178 title : 'Apply patch' ,
@@ -188,7 +187,7 @@ function applyPatchTask(patch) {
188187 }
189188 }
190189 todo . push ( commitPatch ( patch ) ) ;
191- return new Listr ( todo ) ;
190+ return task . newListr ( todo ) ;
192191 }
193192 } ;
194193}
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 { Listr } from 'listr2' ;
5-
64import { getCurrentV8Version } from './common.js' ;
75import {
86 getNodeV8Version ,
@@ -19,8 +17,8 @@ import { forceRunAsync } from '../run.js';
1917export default function majorUpdate ( ) {
2018 return {
2119 title : 'Major V8 update' ,
22- task : ( ) => {
23- return new Listr ( [
20+ task : ( ctx , task ) => {
21+ return task . newListr ( [
2422 getCurrentV8Version ( ) ,
2523 checkoutBranch ( ) ,
2624 removeDepsV8 ( ) ,
Original file line number Diff line number Diff line change @@ -2,17 +2,15 @@ import { spawn } from 'node:child_process';
22import path from 'node:path' ;
33import { promises as fs } from 'node:fs' ;
44
5- import { Listr } from 'listr2' ;
6-
75import { getCurrentV8Version } from './common.js' ;
86import { isVersionString } from './util.js' ;
97import { forceRunAsync } from '../run.js' ;
108
119export default function minorUpdate ( ) {
1210 return {
1311 title : 'Minor V8 update' ,
14- task : ( ) => {
15- return new Listr ( [
12+ task : ( ctx , task ) => {
13+ return task . newListr ( [
1614 getCurrentV8Version ( ) ,
1715 getLatestV8Version ( ) ,
1816 doMinorUpdate ( )
Original file line number Diff line number Diff line change 11import { promises as fs } from 'node:fs' ;
22
3- import { Listr } from 'listr2' ;
4-
53import { v8Git } from './constants.js' ;
64import { forceRunAsync } from '../run.js' ;
75
86export default function updateV8Clone ( ) {
97 return {
108 title : 'Update local V8 clone' ,
11- task : ( ) => {
12- return new Listr ( [ fetchOrigin ( ) , createClone ( ) ] ) ;
9+ task : ( ctx , task ) => {
10+ return task . newListr ( [ fetchOrigin ( ) , createClone ( ) ] ) ;
1311 }
1412 } ;
1513} ;
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 { Listr } from 'listr2' ;
5-
64import { getNodeV8Version } from './util.js' ;
75
86export default function updateVersionNumbers ( ) {
97 return {
108 title : 'Update version numbers' ,
11- task : ( ) => {
12- return new Listr ( [ resetEmbedderString ( ) , bumpNodeModule ( ) ] ) ;
9+ task : ( ctx , task ) => {
10+ return task . newListr ( [ resetEmbedderString ( ) , bumpNodeModule ( ) ] ) ;
1311 }
1412 } ;
1513} ;
You can’t perform that action at this time.
0 commit comments