Skip to content

Commit

Permalink
Fix some TS in workspace.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed Oct 13, 2022
1 parent 9ec13d2 commit f1a7825
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/release/utils/workspace.ts
Expand Up @@ -33,7 +33,16 @@ const workspaces = rawWorkspaces.map(workspace => `${root}/${workspace}`);
export function mapWorkspaceToPackages(
workspaces: string[]
): Promise<string[]> {
return Promise.all<string[]>(
const workspacePromises: Promise<string[]>[] = workspaces.map(
workspace =>
new Promise(resolve => {
glob(workspace, (err, paths) => {
if (err) throw err;
resolve(paths);
});
})
);
return Promise.all<Promise<string[]>[]>(
workspaces.map(
workspace =>
new Promise(resolve => {
Expand All @@ -43,7 +52,7 @@ export function mapWorkspaceToPackages(
});
})
)
).then(paths => paths.reduce((arr, val) => arr.concat(val), []));
).then(paths => paths.reduce((arr: string[], val: string[]) => arr.concat(val), []));
}

function mapPackagestoPkgJson(packagePaths: string[]) {
Expand Down

0 comments on commit f1a7825

Please sign in to comment.