chartjs / Chart.js

Simple HTML5 Charts using the <canvas> tag
https://www.chartjs.org/
MIT License
63.94k stars 11.89k forks source link

`pnpm install` changes pnpm-lock.yaml #11627

Closed koroliov closed 5 months ago

koroliov commented 6 months ago

Documentation Is:

Please Explain in Detail...

How do I set up the project locally? The page Contributing https://github.com/chartjs/Chart.js/blob/master/docs/developers/contributing.md says:

Firstly, we need to ensure development dependencies are installed. With node and pnpm installed, after cloning the Chart.js repo to a local directory, and navigating to that directory in the command line, we can run the following:

> pnpm install

Everything is installed (although 1 test is broken, which may be related to different dependencies installed), but the pnpm-lock.yaml file is changed, probably due to dependencies specified like ^4.2.1 which allows minor version updates. This leads to my version being different from the version of the developer who did the latest commit which may lead to the broken test.

So my question is: how do I proceed?

Am I allowed to update dependencies and commit the changed version of the pnpm-lock.yaml file (apparently only after the test is fixed)? Or do I need to use something like pnmp install --frozen-lockfile ?

I asked a question on Discord: https://discord.com/channels/1109494364788502548/1109495603408416899/1189527688424206408 but received virtually no replies from the devs, only 1 person replied, who probably hadn't committed to the repo.

Your Proposal for Changes

Someone, who actively works on the project needs to update instructions on what to do in such a case, ideally updating the Contributing page https://github.com/chartjs/Chart.js/blob/master/docs/developers/contributing.md

Example

No response

LeeLenaleee commented 6 months ago

I did an update, you should be able to install without changing the lockfile now.

The reason it happened is because pnpm increased the lockfile version

LeeLenaleee commented 5 months ago

Closing as this is fixed, if it still happens you are free to reopen the issue