File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 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}`);
3333export function mapWorkspaceToPackages (
3434 workspaces : string [ ]
3535) : 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 [ ] > [ ] > (
3746 workspaces . map (
3847 workspace =>
3948 new Promise ( resolve => {
@@ -43,7 +52,7 @@ export function mapWorkspaceToPackages(
4352 } ) ;
4453 } )
4554 )
46- ) . then ( paths => paths . reduce ( ( arr , val ) => arr . concat ( val ) , [ ] ) ) ;
55+ ) . then ( paths => paths . reduce ( ( arr : string [ ] , val : string [ ] ) => arr . concat ( val ) , [ ] ) ) ;
4756}
4857
4958function mapPackagestoPkgJson ( packagePaths : string [ ] ) {
You can’t perform that action at this time.
0 commit comments