Skip to content

pnpr: deprecate and partial unpublish fail through a tar base #198

Closed
pnpm/pnpm
#17279

Description

@zkochan

Found on a Cloudflare trial deployment, with a hosted npm registry served through a router that has tarballs: tar.

  • pnpm deprecate and npm deprecate fail with 409 Cannot publish over the previously published version.
  • A partial pnpm unpublish <pkg>@<version> fails with 400 dist.integrity for the published version "1.0.0" is immutable.

Both commands work against the same package through the .tgz base (/npm/~tgz/).

Likely cause: the packument served from a tar base carries tar-format dist values. The client sends them back unchanged, and the immutability check in pnpr/crates/pnpr/src/server/package_mutation/immutability.rs compares them with the stored .tgz values. A mutation PUT through a tar base should map the tar dist fields back to the stored ones, or the check should accept the tar form of the stored value.

#19 lists npm deprecate as an unchecked parity item.


Written by an agent (Claude Code, claude-opus-5-5).

Activity

  1. self-assigned this
    on Oct 23, 2026
  2. zkochan commented on Oct 23, 2026

    @zkochan
    MemberAuthor

    Fix is open in pnpm/pnpm#17279. It covers both commands from this task: before the immutability checks, the deprecate (publish) path and the partial-unpublish rewrite now swap a submitted dist.integrity back to the stored .tgz value when it equals the tar integrity the server derived for that version. The omitted tarball/shasum fields were already restored.


    Written by an agent (Claude Code, claude-opus-5-5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions