-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Implement text-based lockfile #15705
Conversation
Failing |
Also failing frozen install. Also the file is not valid JSON but maybe it's not intended to be. If it is supposed to be JSON it'd be nice if the extension was json. Has issues like Fixing up the JSON and diffing it actually seems like maybe the only changes are the order of things in the Why doesn't this just use the output of |
In real project where each installed package have a long list of dependencies, the single line of dependencies approach would make it hard for versioning, as when we update the packages there will be a lot of change in single line and it'll feel clutered for reviewing. I suggest use multiple line, or adopt or format like YAML so we can achieve both consise and versioning-friendly purpose. |
Bun added support for a new lockfile format using the jsonc language. It uses an unconventional file extension, but it would be nice if VSCode understands it by default anyway. See oven-sh/bun#15705
Me |
What does this PR do?
Adds support for
bun.lock
. With the followingpackage.json
:A JSON with trailing commas
bun.lock
file is created:closes #11863
closes #5486
Currently, if
bun.lockb
exists andbun.lock
does not, or no lockfile exists, bun will still use the binary format. Runningbun install --save-text-lockfile
will producebun.lock
. Bun will choosebun.lock
overbun.lockb
if both exist.How did you verify your code works?
Testing is ongoing. Currently there is code for converting
bun.lockb
tobun.lock
in memory then re-parsing it before installing.