Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Detect bun as the package manager when using bun.lock #37

Closed
3 tasks done
anurag-roy opened this issue Dec 16, 2024 · 1 comment
Closed
3 tasks done

Detect bun as the package manager when using bun.lock #37

anurag-roy opened this issue Dec 16, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@anurag-roy
Copy link
Contributor

Clear and concise description of the problem

Bun is introducing a text-based lockfile called bun.lock.

At the time of writing this, the feature is in the canary version, but will soon land in stable and supposedly will be the default after v1.2.

package-manager-detector does not detect bun as the package manager when using bun.lock

Suggested solution

Add a new line in src/constants.ts

export const LOCKS: Record<string, AgentName> = {
  'bun.lockb': 'bun',
+ 'bun.lock': 'bun',  
  'deno.lock': 'deno',
  'pnpm-lock.yaml': 'pnpm',
  'yarn.lock': 'yarn',
  'package-lock.json': 'npm',
  'npm-shrinkwrap.json': 'npm',
}

And of course add new tests for the above.

Happy to open a PR!

Alternative

No response

Additional context

No response

Validations

@anurag-roy anurag-roy added the enhancement New feature or request label Dec 16, 2024
@benmccann
Copy link
Collaborator

PR welcome!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants