Skip to content

vp pm publish ​

Publish a package to a registry. Supported targets and preview options depend on the package manager:

bash
vp pm publish --dry-run
vp pm publish --access public --tag next
vp pm publish ./package.tgz

Options ​

OptionDescriptionNotes
--dry-runPreview without publishing.
--tag <tag>Select a distribution tag.
--access <public|restricted>Request public or restricted package access.
--otp <otp>Supply a one-time password.
--no-git-checksSkip git checks.
--publish-branch <branch>Set the branch name to publish from.
--report-summarySave publish summary.
--provenancePublish with provenance.Requires a compatible publishing environment.
--forceRequest native forced publishing.
--jsonRequest native JSON output.Output retains the native schema.
-r, --recursivePublish all workspace packages.
--filter <pattern>Select workspaces by pattern.Can be repeated.

Compatibility ​

  • npm: npm publish.
  • pnpm: pnpm publish.
  • Yarn Classic: yarn publish.
  • Yarn Modern: yarn npm publish for the active workspace. Explicit tarball or folder targets are rejected.
  • Bun: bun publish.
OptionnpmpnpmYarn ClassicYarn ModernBunNotes
--dry-runYesYesNo4.9.3 or laterYes
--tag <tag>YesYesYesYesYes
--access <public|restricted>YesYesYesYesYes
--otp <otp>YesYes1.12.1 or later3.2.0 or laterYes
--no-git-checksNoYesNoNoNo
--publish-branch <branch>NoYesNoNoNo
--report-summaryNoYesNoNoNo
--provenanceYesYesNo4.9.0 or laterNo
--forceYesYesNoNoNo
--jsonYesYesYes4.9.3 or laterNo
-r, --recursiveYesYesNoNoNo
--filter <pattern>YesYesNoNoNo

Yarn publishing uses Yarn's registry configuration and credentials. Unsupported targets and workspace selection cause an error rather than falling back to npm. Native publish failures are not retried through npm.

Vite+ rejects unsupported options before the native publish command runs. Yarn Classic can ignore --dry-run and publish for real, or accept --provenance without producing an attestation. Vite+ rejects both options on Yarn Classic.

Arguments after -- are passed directly to the native command without these checks. Passing an unsupported safety option this way can result in a real publication or a publication without provenance.

For a workflow that separates CI uploads from maintainer approval, use stage.

Native Options ​

For native options, see npm publish, pnpm publish, Yarn Classic publish, Yarn npm publish, and Bun publish. To pass these options through Vite+, see Native Arguments.