Fortunately as someone else replied, both yarn and npm have safe and easy ways to resolve merge conflicts in their lock files.