[feature request] Add support for the bun package manager
Executing bunx update-browserslist-db@latest results in the following error:
update-browserslist-db: No lockfile found. Run "npm install", "yarn install" or "pnpm install"
Bun uses a binary lockfile called bun.lockb and at the time of writing has no built-in method yet to update individual packages.
Sure, please send PR.
Just be sure that you are updating all nested dependencies.
I'm working on a draft PR and will post back as soon as I have a working setup.
Hey! Any update on this issue? @eelkevdbos
Appears to be blocked by oven-sh/bun#6419
Bun now supports it! https://github.com/oven-sh/bun/issues/6419#issuecomment-2179541513
I need some Bun user to send PR. Here is what you need to do:
- Add Bun detection here https://github.com/browserslist/update-db/blob/main/index.js#L41-L57
- Add
caniuse-litelatest version extraction here https://github.com/browserslist/update-db/blob/main/index.js#L63-L79 - Add
caniuse-liteupdate CLI call like this https://github.com/browserslist/update-db/blob/main/index.js#L288-L289 - Add tests to
text/fixturesand call them fromtest/index.test.js.
Bun support added with 1.1. Thanks to @pornoiya and @kytta.
Note 2 limits:
- You need to have
npmto get latestcaniuse-liteversion. - It will add
caniuse-litetodependencies. https://github.com/browserslist/update-db/issues/42
We created issues in Bun repo to fix these limits.