Compare commits

...

1 Commits

Author SHA1 Message Date
chloetedder
c236662fd8 Add "rush" workspace 2022-09-13 17:06:41 -05:00
3 changed files with 19 additions and 1 deletions

View File

@@ -33,6 +33,12 @@ export async function getWorkspacePackagePaths({
case 'pnpm':
results = await getPnpmWorkspacePackagePaths({ fs: workspaceFs });
break;
case 'rush':
// /common/temp is the location that Rush defaults adding the pnpm workspace file
results = await getPnpmWorkspacePackagePaths({
fs: fs.chdir('/common/temp'),
});
break;
default:
throw new Error(`Unknown workspace implementation: ${type}`);
}

View File

@@ -12,7 +12,7 @@ export interface GetWorkspaceOptions {
cwd?: string;
}
export type WorkspaceType = 'yarn' | 'pnpm' | 'npm';
export type WorkspaceType = 'yarn' | 'pnpm' | 'npm' | 'rush';
export type Workspace = {
type: WorkspaceType;

View File

@@ -59,6 +59,18 @@ export const workspaceManagers: Array<
],
},
},
{
name: 'rush',
slug: 'rush',
detectors: {
every: [
{
path: 'rush.json',
matchContent: '"useWorkspaces":\\strue',
},
],
},
},
{
name: 'default',
slug: 'yarn',