Skip to content

Conversation

nektro
Copy link

@nektro nektro commented Aug 20, 2025

Description

Adds https://bun.com as a supported package manager option by successfully detecting its lockfile.

Scenarios Tested

Adds tests too.

Copy link

google-cla bot commented Aug 20, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Contributor

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

@joehan joehan requested a review from bkendall August 20, 2025 18:27
@annajowang annajowang requested review from abhis3 and removed request for bkendall August 20, 2025 19:59
@abhis3
Copy link
Contributor

abhis3 commented Aug 20, 2025

Hi @nektro thanks so much for the contribution!

It looks like this change is only for Bun support in the emulator. In order to accept this change, we would need to add support for Bun in the actual buildpacks as that's used during the production deploy process to App Hosting.

You can see where we have the necessary infra to support other package managers here such as npm, yarn, pnpm, etc https://github.com/GoogleCloudPlatform/buildpacks/tree/main/cmd/nodejs

The frustrating part is that we have an internal repository that is mapped to the open source repo I linked, meaning that I don't think it's possible for others to submit a PR to the buildpacks repo, since the changes first need to be made internally and then ported over to open source to ensure we remain in a consistent state.

Do you mind sharing a bit more about your use case and why you use Bun, in general we'd love to learn more! In addition, please file a feature request on our UserVoice at https://firebase.uservoice.com/forums/948424-general?category_id=501599. I went through the existing requests and didn't see anything related to Bun, but we routinely check this as we do our planning cycles on what to work on next :)

@nektro
Copy link
Author

nektro commented Aug 20, 2025

Hi @nektro thanks so much for the contribution!

It looks like this change is only for Bun support in the emulator. In order to accept this change, we would need to add support for Bun in the actual buildpacks as that's used during the production deploy process to App Hosting.

You can see where we have the necessary infra to support other package managers here such as npm, yarn, pnpm, etc GoogleCloudPlatform/buildpacks@main/cmd/nodejs

thanks for the heads up! i'll send a PR over there too

The frustrating part is that we have an internal repository that is mapped to the open source repo I linked, meaning that I don't think it's possible for others to submit a PR to the buildpacks repo, since the changes first need to be made internally and then ported over to open source to ensure we remain in a consistent state.

https://github.com/GoogleCloudPlatform/buildpacks/blob/main/CONTRIBUTING.md#code-reviews notes that github prs are accepted.

Do you mind sharing a bit more about your use case and why you use Bun, in general we'd love to learn more! In addition, please file a feature request on our UserVoice at firebase.uservoice.com/forums/948424-general?category_id=501599. I went through the existing requests and didn't see anything related to Bun, but we routinely check this as we do our planning cycles on what to work on next :)

I work at @oven-sh and am happy to follow up on this if anything comes up. Bun is by a decent margin the fastest npm-compilatible package manager i've used and so i love to use it for that reason.

the specific impetus for this patch was a user request https://x.com/elkriefy/status/1957914397893861432
we also get a number of users reporting using firebase https://github.com/oven-sh/bun/issues?q=is%3Aissue%20state%3Aopen%20firebase
apologies for the lack of uservoice thread

@abhis3
Copy link
Contributor

abhis3 commented Aug 21, 2025

Amazing thanks for the context, that's great to know I'll also surface this to the team! But overall we welcome this change and your contributions, and would love to support Bun (we have a few fans already here on the team).

Feel free to ping this thread when you have a PR out in the other repo and I can help get the right eyes on it. I briefly synced with the relevant team and just 2 additional things I want to point out so that there isn't too much churn:

  1. Do you mind creating an issue in the repo describing what the change you want to make is? That way you don't make a potentially large PR for something that wasn't on the team's radar
  2. There is some support that you'll need to add to some other files, specifically our platform specific buildpacks. I believe that this should account for all of the places this change will need to be made to support Bun, but I could be missing something so please quickly double check if possible. I'm linking the nodejs.go file here as an example for things in that directory https://github.com/GoogleCloudPlatform/buildpacks/blob/main/pkg/nodejs/nodejs.go#L66

But overall excited for this change and thanks for your contributions! Please let me know and I'm happy to interface and engage the right teams on our end to get this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants