Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automatically resolve merge conflicts in package-lock.json

Milad March 14, 2024

Dear Atlassian community,

in our pull-requests, by far the highest source of merge conflicts is the package-lock.json file (used by NPM). Default git can never automatically merge changes in that file, so every change will cause a merge conflict. This causes a manual resolving and rerunning the build.

I was wondering if there is a way to improve this. There is https://www.npmjs.com/package/npm-merge-driver which when installed will auto-resolve merge conflicts in package-lock.json. Is there a way to install this on Bitbucket?

Regards,

Milad

1 answer

1 vote
Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2024

Hi Milad,

I think the closest you can get to "install" on Bitbucket, is by running it on a pipeline and automating it there. Bitbucket doesn't support merge drivers, but there is a feature request here.

Flowie (an addon that we provide) has support for .gitattributes, so it should be possible to add support for resolving conflicts automatically. If you are interested, please reach out to our support and we will be able to assist you with this.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events