aws / aws-sam-cli

CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
https://aws.amazon.com/serverless/sam/
Apache License 2.0
6.51k stars 1.17k forks source link

Feature request: Support alternative package managers #7560

Open marcoreni opened 1 week ago

marcoreni commented 1 week ago

Describe your idea/feature/enhancement

Right now SAM install dependencies through NPM. If the project makes use of alternative package managers (pnpm or yarn) this may cause issues since lock files may not be respected, leading to unpredictable builds. It would be nice to support alternative package managers as well.

Proposal

Recognise the package manager according to the file existing in the project (pnpm-lock / package-lock / yarn.lock) and use the appropriate tool

mndeveci commented 5 days ago

Hi @marcoreni thanks for feature recommendation.

SAM CLI does support custom builds via using Makefile. You should be able to use any package managers of your choice in that way. If you haven't done so I will recommend giving it a try to see how well it works.

In the meantime, I will keep this issue open for any future discussions.