Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Migrate from bun to npm, pnpm, or yarn as the package manager #215

Open
3 tasks
shige opened this issue Dec 11, 2024 · 5 comments
Open
3 tasks

Migrate from bun to npm, pnpm, or yarn as the package manager #215

shige opened this issue Dec 11, 2024 · 5 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@shige
Copy link
Member

shige commented Dec 11, 2024

Task description

Migrate from bun to npm, pnpm, or yarn as the package manager.

Background

  • It's inconvenient that I can't check the differences on a GitHub pull request and also can't provide the context to the Copilot Extension for review.
  • This task is necessary because currently, using bun:test with mock.module does not provide a way to reset the mocks.

Transitioning to npm, pnpm, or yarn will allow for more flexibility and might resolve the limitations encountered with bun.

TODO (Optional)

  • Evaluate and choose between npm, pnpm, or yarn.
  • Remove bun from the project and install the new package manager.
  • Update the project's dependency management scripts to use the new package manager.

Additional notes (Optional)

@shige shige added the help wanted Extra attention is needed label Dec 11, 2024
@sakit0 sakit0 self-assigned this Dec 16, 2024
@toyamarinyon
Copy link
Contributor

I was the one who adopted Bun, and I currently think we should migrate to npm, so I'll write down my thoughts.

First, the initial issue mentioned in the background is resolved by Bun v1.1.39, which enables text-based lock files.

https://x.com/bunjavascript/status/1866879040424120625

image

However, Bun is not being used as widely as I had imagined. In particular, most publicly available OSS applications that developers can try out immediately use npm or pnpm.

Vercel example (pnpm): https://github.com/vercel/ai-chatbot
OpenAI example (npm): https://github.com/openai/openai-realtime-console
Supabase example (npm): https://github.com/supabase-community/database-build

If this trend doesn't change, I believe switching from Bun to npm (or pnpm) would be a better choice for developers.

@sakit0
Copy link
Contributor

sakit0 commented Dec 25, 2024

@toyamarinyon @shige
How about adopting pnpm?
The following is the reason.

  • With npm, I get an error during installation due to peer-deps.

    • To solve this problem, specify --force or --legacy-peer-deps
    • pnpm automatically resolves it during installation
      • Same behavior as bun now.
  • pnpm allows you to specify the version of pnpm and Node

  • If there is a future for mono-repo, pnpm will be more advantageous

If agreement is reached on pnpm, I will make a PR.

@toyamarinyon
Copy link
Contributor

@sakit0 Thank you for summarising. I expect to use workspace (and turborepo) in the near future, so I think pnpm is fine.

@shige
Copy link
Member Author

shige commented Dec 25, 2024

@sakit0 I also think migrating to pnpm is a good idea!

@sakit0
Copy link
Contributor

sakit0 commented Dec 25, 2024

@toyamarinyon @shige
Thanks for the review.
I'll work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants