pnpm cache path
추가된 버전: v11.22.0
메타데이터 캐시용으로 pnpm이 사용하는 디렉터리를 출력하며, pnpm store path와 같은 방식으로 동작합니다. 경로는 어휘적으로 정리된 절대 경로로 출력되므로, 상대 경로인 cacheDir를 사용하더라도 다른 도구가 사용할 수 있는 경로를 얻을 수 있습니다.
pnpm cache path
pnpm은 플랫폼과 cacheDir 설정으로부터 이 디렉터리를 결정하므로, 이 디렉터리를 캐시하려는 CI 설정에서 더 이상 그 결정 방식을 직접 재현할 필요가 없습니다:
.github/workflows/ci.yaml
- name: Get the cache directory
run: echo "PNPM_CACHE_DIR=$(pnpm cache path)" >> $GITHUB_ENV
Besides registry metadata and the pnpm dlx cache, that directory holds the lockfile verification log: the record of which lockfile passed which supply-chain policies. Restoring it lets a job skip re-verifying a lockfile the log already covers under the policies currently configured. That check is the dominant cost of an install in CI once the store is warm. 버전 v11.22.0부터 pnpm store prune은 더 이상 이 로그를 삭제하지 않습니다.
important
신뢰할 수 있는 작업만 쓸 수 있는 위치에만 이 디렉터리를 캐시하세요. 자세한 내용은 cacheDir 설정을 참고하세요.