Files
pnpm/network/fetch
Alessio Attilio d401ff2500 feat: add native pnpm unpublish command (#11128)
- 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>
2026-04-06 17:01:40 +02:00
..
2025-10-21 15:30:20 +02:00

@pnpm/fetch

node-fetch with retries

npm version

Installation

pnpm add @pnpm/fetch

License

MIT