Pnpm Aliases
How to install pnpm, create shell aliases, and upgrade dependencies efficiently.
Install & Upgrade pnpm
Install pnpm globally using npm:
npm i -g pnpmUpgrade to the latest version:
npm i -g pnpm@latestAdd Shell Alias
Open your shell profile file:
code ~/.zprofile # or code ~/.bash_profileAdd the following line:
alias pn=pnpmReload it:
source ~/.zprofile # or source ~/.bash_profileNow you can use pn instead of pnpm:
pn -v # Check pnpm versionUpgrade Project Dependencies
Interactively upgrade all dependencies to the latest version:
pnpm up -i -LThis shows a list of packages that can be upgraded and lets you select which ones to update.