diff options
author | 2023-08-19 19:10:20 -0700 | |
---|---|---|
committer | 2023-08-19 19:10:20 -0700 | |
commit | 53c755467bda33e90161d809a4ab55388b812698 (patch) | |
tree | f53e56c80085e7e22eb1f846ecec6d41a1fa92ef /docs | |
parent | 039404800f51cd02cf5f9197e87f2e8b95fce05f (diff) | |
download | bun-53c755467bda33e90161d809a4ab55388b812698.tar.gz bun-53c755467bda33e90161d809a4ab55388b812698.tar.zst bun-53c755467bda33e90161d809a4ab55388b812698.zip |
Update lockfile.md
Diffstat (limited to 'docs')
-rw-r--r-- | docs/install/lockfile.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/install/lockfile.md b/docs/install/lockfile.md index 64468c78d..599403913 100644 --- a/docs/install/lockfile.md +++ b/docs/install/lockfile.md @@ -31,11 +31,18 @@ Then add the following to `~/.gitconfig`: To only add to the local gitattributes file: -``` +```sh $ git config diff.lockb.textconv bun $ git config diff.lockb.binary true ``` +**Why this works:** + +- `textconv` tells git to run `bun` on the file before diffing +- `binary` tells git to treat the file as binary (so it doesn't try to diff it line-by-line) + +Running `bun` on a lockfile will print a human-readable diff. So we just need to tell `git` to run `bun` on the lockfile before diffing it. + #### Platform-specific dependencies? Bun stores normalized `cpu` and `os` values from npm in the lockfile, along with the resolved packages. It skips downloading, extracting, and installing packages disabled for the current target at runtime. This means the lockfile won’t change between platforms/architectures even if the packages ultimately installed do change. |