2026-06-11 11:40:33 +05:30
|
|
|
name: pnpm
|
|
|
|
|
description: Profile for pnpm, extending npm-restrictive with pnpm write paths and environment variables
|
2026-02-01 15:20:17 +05:30
|
|
|
inherits: npm-restrictive
|
|
|
|
|
|
|
|
|
|
package_managers:
|
|
|
|
|
- pnpm
|
|
|
|
|
|
2026-06-11 11:40:33 +05:30
|
|
|
environment:
|
|
|
|
|
# The npm-restrictive base allows no environment variables. pnpm uses the
|
|
|
|
|
# npm auth and config conventions (.npmrc with env interpolation,
|
|
|
|
|
# npm_config_*). Sibling tokens (YARN_NPM_AUTH_*, BUN_AUTH_TOKEN) stay
|
|
|
|
|
# scrubbed.
|
|
|
|
|
allow:
|
|
|
|
|
- NPM_TOKEN
|
|
|
|
|
- NPM_AUTH_TOKEN
|
|
|
|
|
- NODE_AUTH_TOKEN
|
|
|
|
|
- npm_config_*
|
|
|
|
|
- NPM_CONFIG_*
|
|
|
|
|
- NODE_EXTRA_CA_CERTS
|
|
|
|
|
|
2026-02-01 15:20:17 +05:30
|
|
|
filesystem:
|
2026-06-12 12:11:12 +05:30
|
|
|
allow_read:
|
|
|
|
|
# pnpm cache on macOS lives under ~/Library/Caches (lockfile verification,
|
|
|
|
|
# metadata). The base profile only covers the XDG path ~/.cache/pnpm.
|
|
|
|
|
- ${HOME}/Library/Caches/pnpm/**
|
|
|
|
|
|
2026-02-01 15:20:17 +05:30
|
|
|
allow_write:
|
|
|
|
|
# pnpm needs write access here
|
|
|
|
|
- ${HOME}/Library/pnpm/.tools/**
|
|
|
|
|
- ${HOME}/.pnpm-store/**
|
2026-06-12 12:11:12 +05:30
|
|
|
- ${HOME}/Library/Caches/pnpm/**
|
2026-02-01 15:20:17 +05:30
|
|
|
|
|
|
|
|
# `pnpm i` creates the tmp files in local dir, at least on MacOS
|
|
|
|
|
- ${CWD}/_tmp_*
|
|
|
|
|
|
|
|
|
|
# pnpm self-update (or likely update) creates temporary package.json files
|
|
|
|
|
# for writing. This is likely for atomic update using filesystem rename operation
|
|
|
|
|
# which guarantees atomicity
|
|
|
|
|
- ${CWD}/package.json.*
|
|
|
|
|
|
2026-05-04 21:54:49 +05:30
|
|
|
# pnpm install/update writes pnpm-lock.yaml atomically via a sibling
|
|
|
|
|
# temp file (e.g. pnpm-lock.yaml.139703784) followed by rename.
|
|
|
|
|
- ${CWD}/pnpm-lock.yaml.*
|
|
|
|
|
|
2026-02-01 15:20:17 +05:30
|
|
|
# Need access for dependency resolution
|
|
|
|
|
- ${CWD}/.pnpm-store
|
|
|
|
|
|
2026-06-12 12:11:12 +05:30
|
|
|
# Workspaces (monorepos): pnpm creates a node_modules inside every
|
|
|
|
|
# workspace package to symlink its direct dependencies. The bare
|
|
|
|
|
# **/node_modules form is required in addition to **/node_modules/**:
|
|
|
|
|
# the automatic parent-directory allowance only works for literal
|
|
|
|
|
# parents, and this parent contains a glob, so mkdir of the directory
|
|
|
|
|
# itself must be matched explicitly.
|
|
|
|
|
- ${CWD}/**/node_modules
|
|
|
|
|
- ${CWD}/**/node_modules/**
|
|
|
|
|
|
2026-02-01 15:20:17 +05:30
|
|
|
|