open-constructs / aws-cdk-library

Community-Driven CDK Construct Library
Apache License 2.0
44 stars 6 forks source link

Package Manager Decision: Yarn vs NPM vs PNPM #9

Closed mrgrain closed 1 month ago

mrgrain commented 1 month ago

The default in projen is currently Yarn Classic, but that doesn't mean we can't choose anything else. The options are:

I believe Yarn Classic is out of date and does not provide any benefits over other package managers (especially NPM) anymore. To the contrary, it has some annoying differences that won't ever get fixed. (Examples: Can't use local files with an @ in the file name. Different peer dep behavior)

(Modern) Yarn Berry support is unfortunately still patchy in projen.

I love PNPM, but believe it is too obscure and simply not needed for most projects.

I therefor propose we switch to NPM. NPM is the default for most users and is speed-wise probably on par with yarn classic. It also supports basic workspaces if we ever want that. And while NPM might not be at the forefront of new features, they are definitely catching up.

Happy to create the PR and ADR if maintainers agree.

hoegertn commented 1 month ago

I am fine with this. Benefit is that NPM is available without installing stuff or using custom build images

mbonig commented 1 month ago

Agreed, I'm fine with NPM. I've seen a few problems with various versioning with NPM but if that comes up, let's solve them (instead of my lazy 'I'll just use yarn instead' approach)

go-to-k commented 1 month ago

I like pnpm, but I agree with you. I think npm is good in this library for now.

hoegertn commented 1 month ago

@mrgrain is the PR what you envisioned?

mrgrain commented 1 month ago

Yes absolutely

dbartholomae commented 1 month ago

Nice work! :)