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

add support for bun #6528

Closed
1 task done
MarkLyck opened this issue Jan 27, 2023 · 54 comments
Closed
1 task done

add support for bun #6528

MarkLyck opened this issue Jan 27, 2023 · 54 comments
Assignees
Labels
Keep Exempt this from being marked by stalebot T: feature-request Requests for new features T: new-ecosystem Requests for new ecosystems/languages

Comments

@MarkLyck
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Feature description

https://bun.sh/ is quickly gaining traction and is now my preferred npm package manager.

It is faster than both yarn and pnpm, but the only thing left keeping me from moving to it for production use. Is the lack of support by dependabot or renovatebot.

Please add support for bun install and the bun.lockb lockfile.

@MarkLyck MarkLyck added the T: feature-request Requests for new features label Jan 27, 2023
@jeffwidman jeffwidman added the T: new-ecosystem Requests for new ecosystems/languages label Jan 27, 2023
@xhyrom
Copy link

xhyrom commented May 31, 2023

any progress here?

@aradalvand
Copy link

Bun v1 has been released, this is very much needed now.

@Wazbat
Copy link

Wazbat commented Sep 12, 2023

Surprised to not see any support on this yet. We're looking into moving our production applications to bun, however we make significate use of dependabot

@aradalvand
Copy link

aradalvand commented Sep 13, 2023

@brrygrdn @JamieMagee @jurre @greysteil Sorry for tagging you guys, but just wanted to ask if this is going to be worked on soon?

@greysteil
Copy link
Contributor

Afraid I don't work on Dependabot anymore, or at GitHub! 🤞 you get some traction - in the past the best / easiest integrations have been when the package manager team themselves collaborated with the Dependabot team.

@aradalvand
Copy link

aradalvand commented Sep 13, 2023

Got ya! Thank you.

@Jarred-Sumner Any chance you guys (the Bun team) could perhaps take a look at this?

@czj
Copy link

czj commented Sep 20, 2023

Hey @GrantBirki @jurre or @jakecoffman ... sorry to bother you, but is bun support planned for our beloved Dependabot ?

Thanks :)

@winstxnhdw
Copy link

winstxnhdw commented Sep 20, 2023

Hey guys, if any of you are willing to migrate from Dependabot.. Renovate has already introduced Bun support within ONLY 2 days since they announced that they have begun working on it. Unfortunately, Dependabot usually take anywhere from several months to years when it comes to implementing anything on the same level.

@GrantBirki
Copy link

@czj I do not work on the dependabot team here at GitHub but I let them know about this issue, thanks!

@carogalvin
Copy link
Contributor

Hi everyone, PM for Dependabot here. We do not currently have Bun support planned for Dependabot. We will post here if that changes.

@czj
Copy link

czj commented Sep 20, 2023

Thanks @carogalvin for clarifying.
Sincerely hope you will plan it sooner than later !

@DenIrkhin
Copy link

for packaging updating I have a repo with bun. It works for me nicely with package-ecosystem: 'npm', but I have to put a subconfig for each folder in monorepo as a workaround currently. Without it Dependabot doesn't open new PRs even I see all dependencies for whole monorepo in the dependency graph.

@ImLunaHey
Copy link

@carogalvin is there a reason why?

It's really disappointing to see this when dependabot is built into Github. We shouldn't need to switch to a thirdparty like renovate for something like this. 😞

@carogalvin
Copy link
Contributor

Yes, but the reasons aren't very satisfying I'm afraid :/

  1. We have a lot of requests for new package managers, languages, and ecosystems (if you look at open issues and sort by most voted, you'll see a solid chunk of them are for adding such support). We cannot feasibly support every package manager, language, and ecosystem used on GitHub with just one engineering team.
  2. Adding coverage for a new package manager and maintaining that support is non-trivial, and we already support 20+ package managers
  3. Our top goal right now is improving the experience of working with Dependabot for ecosystems we already support; for example, our recent release of grouped version updates (which we're looking to extend to security updates next). When we look at our data, it's probably not too surprising to hear that a vast majority of Dependabot PRs are never merged - we're prioritizing features that address that.

Nothing against bun, it seems like a great package manager getting a lot of traction, but unfortunately with lots of feature requests and limited people we have to be very particular with how we prioritize. I'm sure we'll end up adding support eventually. I would encourage everyone looking at this to keep 👍 'ing this issue, because it helps us to see how many people will be helped with this.

@Jarred-Sumner
Copy link

We'd be happy to help with adding Bun support to Dependabot

@sambostock
Copy link

sambostock commented Sep 22, 2023

FWIW, until there is support at the Dependabot level, being able to losslessly import yarn.lock files into Bun would provide a workaround path.

For example, if a project dumped both a bun.lockb and an equivalent yarn.lock, Dependabot could update the yarn.lock and a GitHub Action could follow up by dumping the equivalent bun.lockb.

@thienandangthanh
Copy link

thienandangthanh commented Sep 22, 2023

@sambostock So we must have this feature of bun implemented oven-sh/bun#1751 (comment)?

And also this feature: oven-sh/bun#6409

@mstuercke
Copy link

mstuercke commented Mar 21, 2024

I've created a workflow, that runs whenever dependabot creates a pull request. It will execute bun install and commits the bun.lockb file. The original commit of dependabot will be overwritten.

I hope this helps someone!

name: 'Dependabot: Update bun.lockb'

on: pull_request

permissions:
  contents: write

jobs:
  update-bun-lockb:
    name: "Update bun.lockb"
    if: github.actor == 'dependabot[bot]'
    runs-on: ubuntu-latest
    steps:
      - uses: oven-sh/setup-bun@v1
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          ref: ${{ github.event.pull_request.head.ref }}
      - run: |
          bun install
          git add bun.lockb
          git config --global user.name 'dependabot[bot]'
          git config --global user.email 'dependabot[bot]@users.noreply.github.com'
          git commit --amend --no-edit 
          git push --force

Hint: This workflow, as written here, will only execute bun install in the project root folder

@czj
Copy link

czj commented Mar 22, 2024

Thanks a lot @mstuercke ! That's awesome :-)

To get rid of the skipped run status:

image

You can change the "on" to have a "paths" condition:

on:
  pull_request:
    paths:
      - "package.json"

@carlincherry
Copy link
Member

This has now been GA'd!!! 🥳 Check out the changelog.

@kristian-nst
Copy link

how do get a valid schema here?

Image

@patrickkabwe
Copy link

patrickkabwe commented Feb 14, 2025

@kristian-nst as a workaround you can add quotes around bun i.e 'bun' and enable-beta-ecosystems: true at the same level as version

@ViniciusCestarii
Copy link

Sharing a valid dependabot.yml

version: 2
enable-beta-ecosystems: true
updates:
  - package-ecosystem: "bun"
    directory: "/"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 10

I'm using on my repo modular-pets

@Sija
Copy link

Sija commented Feb 18, 2025

Works for me with package-ecosystem: npm.

vorburger added a commit to vorburger/enola that referenced this issue Feb 18, 2025
vorburger added a commit to enola-dev/enola that referenced this issue Feb 18, 2025
@Alex-ley-scrub
Copy link

Alex-ley-scrub commented Mar 12, 2025

Does it update the bun.lock file for everyone? It doesn't for me, it only updates the package.json

Ideally, it would update the package-lock.json, yarn.lock, and bun.lock (the first two were being updated for me previously)

issue about the bun.lock was filed by someone else a few weeks ago: [bun] bun package-manager does not update bun.lock #11602

Update 1:

I'm going to try switching from this:

version: 2
updates:
    - package-ecosystem: "bun"
      directory: "/"
      schedule:
          interval: "weekly"
      open-pull-requests-limit: 10

to this:

version: 2
enable-beta-ecosystems: true
updates:
    - package-ecosystem: "npm"
      directory: "/"
      schedule:
          interval: "weekly"
      open-pull-requests-limit: 10

and see if it works - it looks like it might 🤞:

Image

Update 2:

Yeah looks like that fixed it for me at least:

before:
Image

after:
Image

@phaux
Copy link

phaux commented Mar 12, 2025

@Alex-ley-scrub I'm pretty sure you're supposed to have only one lock file format in the repo.

@Alex-ley-scrub
Copy link

@phaux - I don't disagree with you but we've been unable to move fully over to bun as a package manager until some tools were updated to support it. Dependabot was one of the last things we needed to support bun, so I'm hoping we can fully move over to bun as a package manager shortly.

Dependabot does update all 3 lock files nicely once the enable-beta-ecosystems: true option is enabled. That's good.

That said, once this issues closed, I would have expected Dependabot to update both the package.json and the bun.lock (regardless if that is your only lock file or one of a few) without the need for the enable-beta-ecosystems: true option enabled. That was the experience of this issue author as well: [bun] bun package-manager does not update bun.lock #11602.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Keep Exempt this from being marked by stalebot T: feature-request Requests for new features T: new-ecosystem Requests for new ecosystems/languages
Projects
None yet
Development

No branches or pull requests