Skip to content

Commit

Permalink
Detect bun
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhacks committed Aug 30, 2023
1 parent d46b100 commit bf901ac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/what-pm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ export async function whatPM(pkgPath: string): Promise<WhatPMResult | null> {
isWorkspace
}
}
if (existsSync(join(pkgPath, 'bun.lockb'))) {
return {
name: 'bun',
version: '*',
isWorkspace
}
}
const pm = await pmInfo(pkgPath)
return (
pm && {
Expand Down Expand Up @@ -99,6 +106,13 @@ export function whatPMSync(pkgPath: string): WhatPMResult | null {
isWorkspace
}
}
if (existsSync(join(pkgPath, 'bun.lockb'))) {
return {
name: 'bun',
version: '*',
isWorkspace
}
}
if (findUp.sync('pnpm-lock.yaml', { cwd: pkgPath })) {
return {
name: 'pnpm',
Expand Down

0 comments on commit bf901ac

Please sign in to comment.