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

Function uninstallPackage

tests/e2e/utils/packages.ts:49–69  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

47}
48
49export async function uninstallPackage(name: string): Promise<void> {
50 try {
51 switch (getActivePackageManager()) {
52 case 'npm':
53 await silentNpm('uninstall', name);
54 break;
55 case 'yarn':
56 await silentYarn('remove', name);
57 break;
58 case 'bun':
59 await silentBun('remove', name);
60 break;
61 case 'pnpm':
62 await silentPnpm('remove', name);
63 break;
64 }
65 } catch (e) {
66 // Yarn throws an error when trying to remove a package that is not installed.
67 console.error(e);
68 }
69}
70
71export async function setRegistry(useTestRegistry: boolean): Promise<void> {
72 const url = useTestRegistry

Calls 6

silentNpmFunction · 0.90
silentYarnFunction · 0.90
silentBunFunction · 0.90
silentPnpmFunction · 0.90
getActivePackageManagerFunction · 0.85
errorMethod · 0.65

Tested by

no test coverage detected