pnpm store
Управление хранилищем пакетов.
Команды
status
Проверяет наличие измененных пакетов в хранилище.
Возвращает код выхода 0, если содержимое пакета осталось таким же, каким оно было во время распаковки.
add
Functionally equivalent to pnpm add
, except this adds new packages to the
store directly without modifying any projects or files outside of the store.
prune
Removes unreferenced packages from the store.
Unreferenced packages are packages that are not used by any projects on the system. Packages can become unreferenced after most installation operations, for instance when dependencies are made redundant.
For example, during pnpm install
, package foo@1.0.0
is updated to
foo@1.0.1
. pnpm will keep foo@1.0.0
in the store, as it does not
automatically remove packages. If package foo@1.0.0
is not used by any other
project on the system, it becomes unreferenced. Running pnpm store prune
would
remove foo@1.0.0
from the store.
Running pnpm store prune
is not harmful and has no side effects on your
projects. If future installations require removed packages, pnpm will download
them again.
It is best practice to run pnpm store prune
occasionally to clean up the
store, but not too frequently. Sometimes, unreferenced packages become required
again. Это может произойти при переключении ветвей и установке старых зависимостей, в этом случае pnpm потребуется заново загрузить все удаленные пакеты, ненадолго
замедляя процесс установки.
Please note that this command is prohibited when a store server is running.
path
Возвращает путь к активному каталогу хранилища.