microsoft / TypeScript-Node-Starter

A reference example for TypeScript and Node with a detailed README describing how to use the two together.
MIT License
11.31k stars 2.77k forks source link

Remove yarn.lock from .gitignore #328

Closed mezuzza closed 1 year ago

mezuzza commented 3 years ago

Lock files are designed to be submitted to source control for consistent builds. Ignoring yarn.lock conflicts with its intended purpose: https://classic.yarnpkg.com/en/docs/yarn-lock/#toc-check-into-source-control.

mezuzza commented 3 years ago

I'm not sure if yarn.lock was added to the gitignore for a reason I'm missing, but it seemed contradictory to its intended purpose as I mentioned above. I created this change since it was a quick fix. Feel free to merge or close as is appropriate.

peterblazejewicz commented 3 years ago

@mezuzza I believe it was just to avoid confusion on the CI (for build and for dependent bot). So only single lock file is used (for NPM), I'd leave this as is, probably as the best option.

mezuzza commented 3 years ago

That makes some sense - though that somewhat implies both npm and yarn are being used to manage the project which sounds strange given that the project specifically uses npm.

Still, if you think it really doesn't make sense, would you be opposed to me modifying the comment to provide that context?

peterblazejewicz commented 3 years ago

absolutely not, go for it, thx!