Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(dependencies): replace npm with pnpm #172

Closed

Conversation

mellodev
Copy link
Contributor

@mellodev mellodev commented Nov 26, 2024

Changes Proposed

  • pnpm is a much faster (and arguably better) package manager than npm. It uses disk caching and a different lock file format to make this possible. For example, a speed comparison for this project: npm install takes ~30s while pnpm install takes ~6s
  • This PR migrates the project from npm to pnpm to resolve migrate package manager from npm to pnpm #161
  • Going forward, developers/contributors/scripts will need to install pnpm first, then use the pnpm command rather than the npm command. For example: pnpm install or pnpm start.
  • Update README documentation
  • Update various scripts and github action workflows
  • Bumps version to 2.4.8
  • Bonus: if we hate it for any reason, it's trivial to revert back to using npm

Demo Video or Screenshots

https://streamable.com/6aohgh

@salbahra
Copy link
Member

I don’t disagree it has a lot of advantages but I’m not sure our project size is big enough to warrant it. I want to keep the repo as friendly as possible to newcomers. For CI/CD we have node module caching and for devs ultimately we are talking about 20 seconds on first install. I also suspect as we start upgrading things modern dependencies will install faster.

@mellodev
Copy link
Contributor Author

mellodev commented Nov 26, 2024

Sure, I respect that and we can always revisit this later. I've found the opposite with using modern dependencies, that you end up needing more and larger packages which take longer to install. As you see from the file changes, it's dead simple to change the package manager later if we choose to. In the mean time here's some more technical information comparing the performance of npm, yarn and pnpm: https://refine.dev/blog/pnpm-vs-npm-and-yarn/#why-not-npm-or-yarn

@salbahra
Copy link
Member

Sure, I respect that and we can always revisit this later. I've found the opposite with using modern dependencies, that you end up needing more and larger packages which take longer to install. As you see from the file changes, it's dead simple to change the package manager later if we choose to. In the mean time here's some more technical information comparing the performance of npm, yarn and pnpm: https://refine.dev/blog/pnpm-vs-npm-and-yarn/#why-not-npm-or-yarn

Let me review this, thank you for sharing. I didn't know about corepack either. Let's keep it open and revisit soon.

@mellodev
Copy link
Contributor Author

mellodev commented Dec 5, 2024

Closing this as it would be more trouble than it's worth to fix the merge conflicts. We can revisit pnpm in the future

@mellodev mellodev closed this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

migrate package manager from npm to pnpm
2 participants