pnpm dist-tag
패키지의 배포 태그를 관리합니다. Dist-tag는 레지스트리의 특정 패키지 버전을 가리키는, 사람이 읽기 쉬운 별칭(latest, next, beta 등)을 제공합니다.
Aliases: dist-tags
pnpm dist-tag add <pkg>@<version> [<tag>]
pnpm dist-tag rm <pkg> <tag>
pnpm dist-tag ls [<pkg>]
하위 명령#
add <pkg>@<version> [<tag>]#
패키지의 지정한 버전에 dist-tag를 지정합니다. If <tag> is omitted, latest is used. The version must be an exact semver version. A range fails with ERR_PNPM_DIST_TAG_ADD_INVALID_VERSION.
pnpm dist-tag add foo@1.2.0 next
rm <pkg> <tag>#
패키지에서 dist-tag를 제거합니다.
pnpm dist-tag rm foo next
ls [<pkg>]#
패키지의 모든 dist-tag를 나열합니다. list is accepted as an alias of ls. 패키지 이름을 지정하지 않으면 현재 패키지(로컬 package.json에서 읽음)의 dist-tag를 표시합니다.
pnpm dist-tag ls foo
Trusted publishing#
pnpm dist-tag add, rm, and ls can manage tags without a stored npm token when the registry trusts the CI identity. Enable Allow npm dist-tag in the package's trusted publishing settings.
- In GitHub Actions, grant the job
id-token: write. pnpm readsGITHUB_ACTIONS,ACTIONS_ID_TOKEN_REQUEST_TOKEN, andACTIONS_ID_TOKEN_REQUEST_URLto request an identity token. - A supported trusted CI provider can supply its identity token through
NPM_ID_TOKEN. Itsaudclaim must match the selected registry, such asnpm:registry.npmjs.org. This takes priority over GitHub's request variables. SettingGITLAB_CIalone does not supply a token.
pnpm exchanges the CI identity token for a temporary token scoped to the package and its configured registry. The token stays in memory and is not saved to .npmrc. Dist-tag commands do not generate provenance.
When OIDC is unavailable or the registry rejects the exchange, pnpm falls back to configured credentials. Missing GitHub request variables and rejected identity requests also use this fallback. Network errors and invalid identity-request URLs are reported.
OIDC requests use the configured fetch timeout and retry settings.
옵션#
--registry <url>#
작업할 레지스트리입니다. 기본값은 패키지에 구성된 레지스트리입니다.
--otp <code>#
When the registry requires two-factor authentication, supply the one-time password via this flag. When the registry uses web-based authentication, pnpm prints a URL to open instead. Rerun the command with --otp once the login finishes.