@rassul/lock-fix
v1.0.1
Published
Fix merge conflicts in package manager lockfiles — supports npm, yarn, pnpm, and bun
Maintainers
Readme
lock-fix
Fix merge conflicts in package manager lockfiles with one command.
Install
npm install -g lock-fixUsage
Run inside any project root after hitting a lockfile merge conflict:
lock-fixThat's it. It detects your package manager, restores the conflicted lockfile, reinstalls dependencies, and re-stages the result.
Supported lockfiles
| Lockfile | Package manager |
|--------------------|-----------------|
| bun.lock | bun |
| bun.lockb | bun |
| pnpm-lock.yaml | pnpm |
| yarn.lock | yarn |
| package-lock.json| npm |
How it works
git restore --staged <lockfile>— unstage the conflicted filegit restore <lockfile>— discard working tree changes<pm> install— regenerate the lockfile frompackage.jsongit add <lockfile>— stage the clean result
Lock files are machine-generated — regenerating is always safer than hand-merging.
License
MIT
