Bun package manager support #24511
Replies: 29 comments 6 replies
-
Hi there, You're asking us to support a new package manager. We need to know some basic information about this package manager first. Please copy/paste the new package manager questionnaire, and fill it out in full. Once the questionnaire is filled out we'll decide if we want to support this new manager. Good luck, The Renovate team |
Beta Was this translation helpful? Give feedback.
-
It's not using |
Beta Was this translation helpful? Give feedback.
-
needs an installer in containerbase image like: so renovate can update the lockfile |
Beta Was this translation helpful? Give feedback.
-
it does use |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@rarkins bun just reached |
Beta Was this translation helpful? Give feedback.
-
It would be a really nice addition. |
Beta Was this translation helpful? Give feedback.
-
Nobody has filled out the questionnaire above so this is going nowhere without it |
Beta Was this translation helpful? Give feedback.
-
New package manager questionnaireDid you read our documentation on adding a package manager?
BasicsName of package managerBun built-in package manager (https://bun.sh/docs/cli/install) What language does this support?Javascript / Typescript running with the Bun environment How popular is this package manager?Bun recently reached out version 1.0, and is gaining popularity quickly Does this language have other (competing?) package managers?
Package File DetectionWhat type of package files and names does it use?It uses NPM packages as input What fileMatch pattern(s) should be used?
Is it likely that many users would need to extend this pattern for custom file names?
Is the fileMatch pattern likely to get many "false hits" for files that have nothing to do with package management?No Parsing and ExtractionCan package files have "local" links to each other that need to be resolved?Yes, it uses the Is there a reason why package files need to be parsed together (in serial) instead of independently?Not sure, I guess the algorithm here will be the same as for the other JS package managers, but using Bun's lockfile What format/syntax is the package file in?
Bun uses a binary lockfile for speed, with an optional flag to have it handle an additional Details are here: https://bun.sh/docs/install/lockfile How do you suggest parsing the file?
Bun is written in Zig, and the lockfile-related code is here: https://github.com/oven-sh/bun/blob/main/src/install/lockfile.zig I think the easiest way to integrate with Renovate is to have Does the package file structure distinguish between different "types" of dependencies? e.g. production dependencies, development dependencies, etc?
Standard JS package manager List all the sources/syntaxes of dependencies that can be extractedSame as other JS package managers Describe which types of dependencies above are supported and which will be implemented in futureSame as other JS package managers VersioningWhat versioning scheme does the package file(s) use?Same as other JS package managers Does this versioning scheme support range constraints, e.g.
|
Beta Was this translation helpful? Give feedback.
-
Please take into account that It might be good to handle this case (where we have a bun lock and a yarn lock) to use the right flag. |
Beta Was this translation helpful? Give feedback.
-
I think most people would prefer to use |
Beta Was this translation helpful? Give feedback.
-
Yeah I would do bun.lockb and leave it to the devs to debug. But maybe you can make that optional in renovate where it updates both bun.lockb and yarn.lock? (I also don't want to add complexity) |
Beta Was this translation helpful? Give feedback.
-
It is highly desirable that we can parse the lock file using JS internal to Renovate. We do not need to "understand" the entire thing - enough to get the locked versions of dependencies. It's ok to run external tools like "bun" when the lock file needs updating, but we avoid it for all other managers when extracting/scanning dependencies. |
Beta Was this translation helpful? Give feedback.
-
Are bun workspaces compatible with Eg yarn workspaces? |
Beta Was this translation helpful? Give feedback.
-
It seems so https://bun.sh/docs/install/workspaces |
Beta Was this translation helpful? Give feedback.
-
No need to update both manually. All you need id probably check if the repo have both bun and yarn lock, run the "bun install" command with tje tag "--yarn". Bun will handle everything |
Beta Was this translation helpful? Give feedback.
-
Is it common to check in both files? I think it will be better for Renovate to have only the Bun one |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
Done |
Beta Was this translation helpful? Give feedback.
-
@viceice is there any timeline for bun being added to renovate |
Beta Was this translation helpful? Give feedback.
-
Oh one thing I was to confirm is that bun in renovate also handles private registries right? |
Beta Was this translation helpful? Give feedback.
-
@floydjones1 this would be something you need to check with the Bun team as im not sure. |
Beta Was this translation helpful? Give feedback.
-
I covered this when filling the form above:
|
Beta Was this translation helpful? Give feedback.
-
Ahh okay. I have a |
Beta Was this translation helpful? Give feedback.
-
I have split Bun support into multiple issues which can be implemented incrementally, and will convert this issue into a Discussion soon so please follow the others which apply to you: |
Beta Was this translation helpful? Give feedback.
-
Initial bun support has now been delivered and is live in the app as well as documentation |
Beta Was this translation helpful? Give feedback.
-
@rarkins the bun.lockb support works great now, thank you! We detect that the package-lock.json get ignored during update now. This is required for the case where you use bun for your application, but still have node and a package-lock.json for eslint or other tools. It would be great if renovate would update package-lock.json and bun.lockb at the same time. |
Beta Was this translation helpful? Give feedback.
-
Hey, I searched into the repo and found that individual parsing of bun.lockb is tracked here #24462
Furthermore, from the comments above, I think complete rewrite of bun.lockb file is already supported. I would love to have a complete rewrite of bun.lockb file when The example repo can be found here: |
Beta Was this translation helpful? Give feedback.
-
Bun's text-based lockfile has just shipped. I hope this will make it much easier for Renovate to add support. |
Beta Was this translation helpful? Give feedback.
-
What would you like Renovate to be able to do?
I'm switching my package manager from
pnpm
tobun
, since it runs much faster.However it looks like mendRenovate doesn't support
bun
or it's lockfilebun.lockb
Please add support for
bun install
https://github.com/oven-sh/bun#bun-install
Is this a feature you are interested in implementing yourself?
No
Beta Was this translation helpful? Give feedback.
All reactions