Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using yarn.lock and pin the exact versions of dependencies in the package.json files #77

Open
thomvaill opened this issue May 30, 2022 · 2 comments
Labels
feature New feature or request

Comments

@thomvaill
Copy link
Owner

Following the incident caused by a breaking change released in a dependency which does not follow semver: #74
And because of these reasons: https://gajus.medium.com/stop-using-package-lock-json-or-yarn-lock-909035e94328
I think we should not use yarn.lock anymore, and pin the versions of the project dependencies more strictly, and maybe use a tool like Renovate to assist us with their upgrades.

@thomvaill thomvaill added the feature New feature or request label May 30, 2022
thomvaill added a commit to indatawetrust/log4brains that referenced this issue Jul 8, 2022
thomvaill added a commit that referenced this issue Jul 8, 2022
@mervyn-mccreight
Copy link

Not sure whether it's a good idea to not put the yarn.lock into version control regardless, since this is not a library but rather an application (or is my impression on what log4brains is wrong?) and it helps with reproducibility. Even if you define your dependencies in a strict way, the transitive dependencies most likely are not defined like this and could possibly change without a yarn.lock making the build non-reproducible, or am I wrong about this?

Regardless of that, using strict dependency version notation in the package.json is a very good practice IMO.

@thomvaill
Copy link
Owner Author

Yes it is an app but since it's installed with npm install -g log4brains the yarn.lock file is not taken into account by users (or maybe I'm wrong?)
Of my understanding, the yarn.lock file is only taken into account when we develop on the log4brains project, which give a false sense of reproducibility since this is not the case of our users.
Whereas pinning exact versions in package.json will ensure both of users and developers use the same versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants