Let's say you build a node app via your CI system. Every time you build it you have to increment the node app version to create the new app, and then commit that version back to your git repository
But in that exact moment when you were building your new app somebody (a colleague) commits new code to your node app repository. To commit back to the repo we will have to merge any new changes and then commit back. By doing it this way we will end up with a package with certain version that will not have the new code committed during that time, so my node app will not be consisten with whatever I have on git, meaning that if I want to build the node app manually I will have not the same result as my CI, I will end up with that delta from whoever committed the code during the build.
So my question is what could be a good solution to keep the node app version unique and avoid having those extra commits on that particular version.