Skip to content

vp pm stage ​

Use staged publishing to separate a package upload from its release. A CI job can upload a staged version without 2FA, then a maintainer approves or rejects it from a trusted device with 2FA.

bash
vp pm stage publish --dry-run
vp pm stage publish
vp pm stage list
vp pm stage view <stage-id>
vp pm stage download <stage-id>
vp pm stage approve <stage-id>
vp pm stage reject <stage-id>

Options ​

Use the subcommands below to upload, inspect, approve, or reject staged versions.

publish ​

Upload a package. Accepts an optional tarball or folder target.

OptionDescriptionNotes
--tag <tag>Publish tag.
--access <public|restricted>Request public or restricted package access.
--otp <otp>Supply a one-time password.
--dry-runPreview without staging.
--jsonRequest native JSON output.Output retains the native schema.
-r, --recursiveStage all publishable workspace packages.
--filter <pattern>Select workspaces by pattern.Can be repeated.
--provenanceStage with provenance.Requires a compatible publishing environment.
--registry <url>Select the registry.

list ​

List staged versions. Accepts an optional package specification. Alias: ls.

OptionDescriptionNotes
--jsonRequest native JSON output.Output retains the native schema.
--registry <url>Select the registry.

view ​

Inspect a staged version. Requires a stage ID.

OptionDescriptionNotes
--jsonRequest native JSON output.Output retains the native schema.
--registry <url>Select the registry.

download ​

Download a staged tarball. Requires a stage ID.

OptionDescriptionNotes
--registry <url>Select the registry.

approve ​

Promote a staged version to the live registry. Requires a stage ID.

OptionDescriptionNotes
--otp <otp>Supply a one-time password.
--registry <url>Select the registry.

reject ​

Discard a staged version. Requires a stage ID.

OptionDescriptionNotes
--otp <otp>Supply a one-time password.
--registry <url>Select the registry.

Compatibility ​

All npm paths, including fallbacks, require npm 11.15 or later and Node.js 22.14 or later.

publish ​

  • npm: 11.15 or later: npm stage publish.
  • pnpm: 11.3 or later: pnpm stage publish.
  • Yarn Classic: Fallback: npm stage publish.
  • Yarn Modern: 4.16.0 or later: yarn npm publish --staged. Earlier versions use npm stage publish as a fallback. Explicit targets use npm fallback.
  • Bun: Fallback: npm stage publish.
OptionnpmpnpmYarn ClassicYarn ModernBunNotes
--tag <tag>YesYesYesYesYes
--access <public|restricted>YesYesYesYesYes
--otp <otp>YesYesYesYesYes
--dry-runYesYesYesYesYes
--jsonYesYesYesYesYes
-r, --recursiveNo target or target .YesNo target or target .Before 4.16 with no target, or target .No target or target .
--filter <pattern>No target or target .YesNo target or target .Before 4.16 with no target, or target .No target or target .
--provenanceYesYesYesYesYes
--registry <url>YesYesYesBefore 4.16, or an explicit targetYesUse Yarn registry settings on native Yarn paths.

list ​

  • npm: 11.15 or later: npm stage list.
  • pnpm: 11.3 or later: pnpm stage list.
  • Yarn Classic: Fallback: npm stage list.
  • Yarn Modern: 4.16.0 or later: yarn npm stage list. Earlier versions use npm stage list as a fallback.
  • Bun: Fallback: npm stage list.
OptionnpmpnpmYarn ClassicYarn ModernBunNotes
--jsonYesYesYesYesYes
--registry <url>YesYesYesBefore 4.16.0YesUse Yarn registry settings on native Yarn paths.

view ​

  • npm: 11.15 or later: npm stage view.
  • pnpm: 11.3 or later: pnpm stage view.
  • Yarn Classic: Fallback: npm stage view.
  • Yarn Modern: Fallback: npm stage view.
  • Bun: Fallback: npm stage view.
OptionnpmpnpmYarn ClassicYarn ModernBunNotes
--jsonYesYesYesYesYes
--registry <url>YesYesYesYesYes

download ​

  • npm: 11.15 or later: npm stage download.
  • pnpm: 11.3 or later: pnpm stage download.
  • Yarn Classic: Fallback: npm stage download.
  • Yarn Modern: Fallback: npm stage download.
  • Bun: Fallback: npm stage download.
OptionnpmpnpmYarn ClassicYarn ModernBunNotes
--registry <url>YesYesYesYesYes

approve ​

  • npm: 11.15 or later: npm stage approve.
  • pnpm: 11.3 or later: pnpm stage approve.
  • Yarn Classic: Fallback: npm stage approve.
  • Yarn Modern: 4.16.0 or later: yarn npm stage approve. Earlier versions use npm stage approve as a fallback.
  • Bun: Fallback: npm stage approve.
OptionnpmpnpmYarn ClassicYarn ModernBunNotes
--otp <otp>YesYesYesYesYes
--registry <url>YesYesYesBefore 4.16.0YesUse Yarn registry settings on native Yarn paths.

reject ​

  • npm: 11.15 or later: npm stage reject.
  • pnpm: 11.3 or later: pnpm stage reject.
  • Yarn Classic: Fallback: npm stage reject.
  • Yarn Modern: 4.16.0 or later: yarn npm stage reject. Earlier versions use npm stage reject as a fallback.
  • Bun: Fallback: npm stage reject.
OptionnpmpnpmYarn ClassicYarn ModernBunNotes
--otp <otp>YesYesYesYesYes
--registry <url>YesYesYesBefore 4.16.0YesUse Yarn registry settings on native Yarn paths.

Yarn fallback paths and Bun warn before invoking npm.

This command is unrelated to Yarn's version-control staging command or Vite+'s staged-file checks.

Native Options ​

For native options, see npm stage, pnpm stage, Yarn npm publish, Yarn npm stage list, Yarn npm stage approve, and Yarn npm stage reject. To pass these options through Vite+, see Native Arguments.

For the registry workflow, see npm staged publishing.