MCPcopy Index your code
hub / github.com/angular/angular-cli / installWorkspacePackages

Function installWorkspacePackages

tests/e2e/utils/packages.ts:14–33  ·  view source on GitHub ↗
(options?: { force?: boolean })

Source from the content-addressed store, hash-verified

12}
13
14export async function installWorkspacePackages(options?: { force?: boolean }): Promise<void> {
15 switch (getActivePackageManager()) {
16 case 'npm':
17 const npmArgs = ['install'];
18 if (options?.force) {
19 npmArgs.push('--force');
20 }
21 await silentNpm(...npmArgs);
22 break;
23 case 'yarn':
24 await silentYarn('install');
25 break;
26 case 'pnpm':
27 await silentPnpm('install');
28 break;
29 case 'bun':
30 await silentBun('install');
31 break;
32 }
33}
34
35export function installPackage(specifier: string, registry?: string): Promise<ProcessOutput> {
36 const registryOption = registry ? [`--registry=${registry}`] : [];

Calls 6

silentNpmFunction · 0.90
silentYarnFunction · 0.90
silentPnpmFunction · 0.90
silentBunFunction · 0.90
getActivePackageManagerFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected