eliza
eliza copied to clipboard
fix: Refactor to prevent unnecessary lockfile changes
Relates to:
https://github.com/ai16z/eliza/issues/1121
Risks
- Low: The changes primarily affect the installation process and dependency management. There is a risk of potential issues if the frozen lock file is not respected, which could lead to inconsistent dependency versions across environments.
Background
What does this PR do?
This PR updates the installation commands across various files to ensure that the pnpm install command uses the --frozen-lockfile option. This prevents the lock file from being incorrectly updated during installations. Additionally, an explicit update script has been added to allow updates without the frozen lock file option. We updated the .npmrc default to set frozen-lockfile=true and in order to update the lockfile when you add a new dependency in your package.json or bump a version in your package.json you need to explicitly call pnpm i --no-frozen-lockfile
What kind of change is this?
- Improvements: This change improves the dependency management process by enforcing the use of a consistent lock file during installations.
Documentation changes needed?
- My changes require a change to the project documentation.
- If a docs change is needed: I have updated the documentation accordingly.
Testing
Where should a reviewer start?
Review the changes made in the following files to understand the impact of the updates:
.github/workflows/pre-release.ymlDockerfilepackage.jsonscripts/start.sh
Detailed testing steps
- As a developer, run the installation command using
pnpm installto verify that it respects the frozen lock file. - Test the new update command by running
pnpm updateto ensure it updates dependencies correctly without the frozen lock file option.