Jump to content

Pnpm Node Package Manager: Difference between revisions

From Torben's Wiki
No edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
  # update all packages to latest version
  # update all packages to latest version
  pnpm up --latest
  pnpm up --latest
# or
pnpm up -L
   
   
  # run package
  # run package
Line 23: Line 25:
  # check used packages for vulnerabilities
  # check used packages for vulnerabilities
  pnpm audit
  pnpm audit
  pnpm audit --fix
  pnpm audit --fix update
  pnpm install
  pnpm install

Latest revision as of 09:45, 2 June 2026

Commands

# install packages locally
pnpm install
# add package
pnpm add vue
# add dev package
pnpm add -D vitest

# update all packages to latest minor version
pnpm up
# update all packages to latest version
pnpm up --latest
# or
pnpm up -L

# run package
pnpm exec vitest --watch=false

# run script (defined in package.json)
pnpm run myscript

# run without installing to repo
pnpx cowsay Moin

# check used packages for vulnerabilities
pnpm audit
pnpm audit --fix update
pnpm install