mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-11 10:40:53 -04:00
- Implements the `pnpm unpublish` command natively instead of passing through to npm - Supports unpublishing specific versions or version ranges using semver - Supports unpublishing entire packages with `--force` flag (with protection against accidental unpublish) - Supports OTP authentication via `--otp` flag - Supports custom registry via `--registry` flag - Reuses existing data structures from the deprecate command ## Usage ```bash # Unpublish a specific version pnpm unpublish my-package@1.0.0 # Unpublish multiple versions matching a range pnpm unpublish my-package@">1.0.0 <2.0.0" # Unpublish entire package (requires --force) pnpm unpublish my-package --force # With custom registry pnpm unpublish my-package --registry https://my-registry.com ``` ## Changes - Added `unpublish.ts` command in `releasing/plugin-commands-publishing/` - Removed unpublish from npm pass-through list in `pnpm.ts` - Added required dependencies: `@pnpm/fetch`, `semver`, `@types/semver` Follows npm unpublish behavior and is aligned with the existing `pnpm deprecate` implementation. --------- Co-authored-by: Zoltan Kochan <z@kochan.io>