File tree Expand file tree Collapse file tree 2 files changed +21
-13
lines changed
Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,15 @@ export default {
3636 async processChunk ( inputSlice , itemIndices ) {
3737 const filePaths = itemIndices . map ( idx => inputSlice [ idx ] ) ;
3838
39- return Promise . all (
40- filePaths . map ( async path => parseJsSource ( await read ( path , 'utf-8' ) ) )
41- ) ;
39+ const results = [ ] ;
40+
41+ for ( const path of filePaths ) {
42+ const vfile = await read ( path , 'utf-8' ) ;
43+
44+ results . push ( parseJsSource ( vfile ) ) ;
45+ }
46+
47+ return results ;
4248 } ,
4349
4450 /**
Original file line number Diff line number Diff line change @@ -38,18 +38,20 @@ export default {
3838 async processChunk ( inputSlice , itemIndices ) {
3939 const filePaths = itemIndices . map ( idx => inputSlice [ idx ] ) ;
4040
41- return Promise . all (
42- filePaths . map ( async path => {
43- const vfile = await read ( path , 'utf-8' ) ;
41+ const results = [ ] ;
4442
45- updateStabilityPrefixToLink ( vfile ) ;
43+ for ( const path of filePaths ) {
44+ const vfile = await read ( path , 'utf-8' ) ;
4645
47- return {
48- tree : remarkProcessor . parse ( vfile ) ,
49- file : { stem : vfile . stem , basename : vfile . basename } ,
50- } ;
51- } )
52- ) ;
46+ updateStabilityPrefixToLink ( vfile ) ;
47+
48+ results . push ( {
49+ tree : remarkProcessor . parse ( vfile ) ,
50+ file : { stem : vfile . stem , basename : vfile . basename } ,
51+ } ) ;
52+ }
53+
54+ return results ;
5355 } ,
5456
5557 /**
You can’t perform that action at this time.
0 commit comments