Skip to content

Commit 449ce8f

Browse files
committed
refactor(@angular/cli): exclude Cnpm from LOCKFILE_NAMES type
The `LOCKFILE_NAMES` constant in `packages/angular/cli/src/utilities/package-manager.ts` is updated to explicitly exclude `PackageManager.Cnpm` from its type definition. This refactors the type to accurately reflect the package managers supported by the lockfile detection logic.
1 parent f6ad41c commit 449ce8f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/angular/cli/src/utilities/package-manager.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ import { memoize } from './memoize';
1818
/**
1919
* A map of package managers to their corresponding lockfile names.
2020
*/
21-
const LOCKFILE_NAMES: Readonly<Record<PackageManager, string | readonly string[]>> = {
21+
const LOCKFILE_NAMES: Readonly<
22+
Record<Exclude<PackageManager, PackageManager.Cnpm>, string | readonly string[]>
23+
> = {
2224
[PackageManager.Yarn]: 'yarn.lock',
2325
[PackageManager.Pnpm]: 'pnpm-lock.yaml',
2426
[PackageManager.Bun]: ['bun.lockb', 'bun.lock'],

0 commit comments

Comments
 (0)