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

Introduce PNPM as a package manager #154

Merged
merged 6 commits into from
Jan 27, 2025
Merged

Conversation

andrea-smiesna
Copy link
Collaborator

@andrea-smiesna andrea-smiesna commented Jan 10, 2025

Closes #153

  • replace npm with pnpm in scripts
  • update the docs
  • remove npm-audit lib, replace with pnpm audit
  • update the github actions, install pnpm
  • update the Dockerfile files

The architectural decision/why we chose to replace an npm package manager by pnpm:

Content-Addressable Storage System:

  • A content-addressable storage system stores data in a way that each piece of data is referenced by its content (usually a hash) rather than its location.

The practical impact:

  • Reduced Redundancy: since our project has multiple dependencies that rely on the same sub-dependency, pnpm will store only one copy of that sub-dependency
  • Efficient Storage: this method reduces the overall amount of disk space used, as identical sub-dependencies are not redundantly stored multiple times within our project's node_modules directory

Symbolic links:

  • Symbolic links (symlinks) are pointers that act as references to files or directories located elsewhere in the filesystem

The practical impact:

  • Faster Installations: Symlinking is faster than copying files, so installations are quicker.
  • Less Disk Space Usage: Since the actual data is stored only once globally, the node_modules directory is much smaller, containing only symlinks rather than full copies of each package and sub-dependency
  • Simplified Updates: Updating a package in the global store automatically updates the symlinked references in our project's node_modules, ensuring consistency and reducing the risk of version conflicts

@andrea-smiesna andrea-smiesna self-assigned this Jan 10, 2025
@andrea-smiesna andrea-smiesna marked this pull request as ready for review January 10, 2025 14:34
@georgimld georgimld merged commit 9cb6733 into main Jan 27, 2025
6 checks passed
@georgimld georgimld deleted the 153-pnpm-package-manager branch January 27, 2025 14:35
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.

Introduce PNPM as a package manager
2 participants