File tree 1 file changed +11
-2
lines changed 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,16 @@ const workspaces = rawWorkspaces.map(workspace => `${root}/${workspace}`);
33
33
export function mapWorkspaceToPackages (
34
34
workspaces : string [ ]
35
35
) : Promise < string [ ] > {
36
- return Promise . all < string [ ] > (
36
+ const workspacePromises : Promise < string [ ] > [ ] = workspaces . map (
37
+ workspace =>
38
+ new Promise ( resolve => {
39
+ glob ( workspace , ( err , paths ) => {
40
+ if ( err ) throw err ;
41
+ resolve ( paths ) ;
42
+ } ) ;
43
+ } )
44
+ ) ;
45
+ return Promise . all < Promise < string [ ] > [ ] > (
37
46
workspaces . map (
38
47
workspace =>
39
48
new Promise ( resolve => {
@@ -43,7 +52,7 @@ export function mapWorkspaceToPackages(
43
52
} ) ;
44
53
} )
45
54
)
46
- ) . then ( paths => paths . reduce ( ( arr , val ) => arr . concat ( val ) , [ ] ) ) ;
55
+ ) . then ( paths => paths . reduce ( ( arr : string [ ] , val : string [ ] ) => arr . concat ( val ) , [ ] ) ) ;
47
56
}
48
57
49
58
function mapPackagestoPkgJson ( packagePaths : string [ ] ) {
You can’t perform that action at this time.
0 commit comments