Skip to content

Commit f1a7825

Browse files
committed
Fix some TS in workspace.ts
1 parent 9ec13d2 commit f1a7825

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

scripts/release/utils/workspace.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@ const workspaces = rawWorkspaces.map(workspace => `${root}/${workspace}`);
3333
export 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

4958
function mapPackagestoPkgJson(packagePaths: string[]) {

0 commit comments

Comments
 (0)