Skip to content

feat: dprint upgrade requires npm provenance - #1505

Merged
dsherret merged 2 commits into
mainfrom
feat/upgrade-provenance
Dec 1, 2026
Merged

dsherret merged 2 commits into
mainfrom
feat/upgrade-provenance

Conversation

@dsherret

@dsherret dsherret commented Dec 1, 2026

Copy link
Copy Markdown
Member

dprint upgrade now refuses to install a version unless the registry's metadata says it was published with provenance from the dprint repository.

These are both in the packument that's already fetched, so there's no extra request and no new dependencies. Nothing is downloaded when either check fails.

This trusts the registry. It's for preventing a version that wasn't published from this repository's CI (ex. with a stolen npm token) rather than a malicious registry.

Notes for reviewing

  • Private registries that don't provide this metadata don't work for upgrading.
  • If the repository is ever renamed or moved, versions with this can't upgrade to versions published after that.
  • All the @dprint/<platform> packages satisfy this at 0.65.0.

@dsherret
dsherret merged commit 6eda4a7 into main Dec 1, 2026
1 check passed
@dsherret
dsherret deleted the feat/upgrade-provenance branch December 1, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant