aws-amplify / aws-amplify/amplify-cli
Provide consistent dependencies versions for lambda functions build
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
**Is your feature request related to a problem? Please describe.**
Because of how npm works sometimes when a lambda function is built it can update dependencies as a side effect even when the package-lock.json file is present, for automated builds like this `npm ci` should be used instead of `npm install` to provide clean and consistent dependencies versions.
**Describe the solution you'd like**
When building a lambda function package, detect whether package-lock.json is already present and if so use `npm ci` command instead of `npm install` to install dependencies.
**Additional context**
The proposed command is available in npm since version 5.7.0
It seems like rather simple change in the current code, and I should be able to make a pull request once this gets accepted.
Contributor guide
Assessment
This issue has not been assessed yet.