-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(bun): Add support for updating text-format lockfile when package.json changes #33189
feat(bun): Add support for updating text-format lockfile when package.json changes #33189
Conversation
Bun 1.2 will introduce and switch by default to a text-format verison of the lockfile. Where currently they use a binary version named `bun.lockb`, this will become `bun.lock` and be plaintext: https://bun.sh/blog/bun-lock-text-lockfile This can be switched on by default in-advance since Bun 1.1.40 and so will appear in the wild as of now: https://bun.sh/blog/bun-v1.1.40#new-install-savetextlockfile-in-bunfig-toml This commit adds support for both lockfile formats by supporting by file-suffixes.
ce825ec
to
50e6e6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs testing on a real repo with text lockfile format
@rarkins Thanks so much for super-fast review — I've made that fix to simplify the regex, and I've created a public repository where I've run Renovate with the changes at https://github.com/nathankleyn/bun-renovate-text-lockfile-test — you can see a PR at which correctly detected and changed the new-style lockfile: nathankleyn/bun-renovate-text-lockfile-test#2 |
@nathankleyn thanks for your PR! I'm surprised/delighted to discover that this started working with very little logic change. |
🎉 This PR is included in version 39.74.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Changes
Bun 1.2.x will introduce and switch by default to a text-format verison of the lockfile. Where currently they use a binary version named
bun.lockb
, this will becomebun.lock
and be plaintext:https://bun.sh/blog/bun-lock-text-lockfile
This can be switched on by default in-advance since Bun 1.1.40 and so will appear in the wild as of now:
https://bun.sh/blog/bun-v1.1.40#new-install-savetextlockfile-in-bunfig-toml
This commit adds support for both lockfile formats by supporting by file-suffixes.
Context
As of Bun 1.1.40, this feature can be opted-in and Renovate no longer works for Bun without it.
As of Bun 1.2.x this feature will be on by default.
Documentation (please check one with an [x])
The docs that would be affected are auto-generated ones
How I've tested my work (please select one)
I have verified these changes via:
Tested and run on https://github.com/nathankleyn/bun-renovate-text-lockfile-test, where you can see a PR at which correctly detected and changed the new-style lockfile: nathankleyn/bun-renovate-text-lockfile-test#2