Skip to content

feat: support upgrading to a specific version with dprint upgrade - #1506

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

dsherret merged 2 commits into
mainfrom
feat/upgrade-version

Conversation

@dsherret

@dsherret dsherret commented Dec 1, 2026

Copy link
Copy Markdown
Member

Adds dprint upgrade <version> for changing to a specific version.

dprint upgrade 0.65.0
  • The version may be older than the current one, because it was explicitly asked for. dprint upgrade without a version still never downgrades.
  • The minimum dependency age doesn't apply, because that's only for choosing a version. Providing --minimum-dependency-age along with a version is an error.
  • Only accepts a full version (ex. not latest, v0.65.0, or 0.65).
  • Provenance, the repository, integrity, and https are still required. The oldest version that has provenance is 0.51.1 (checked for Windows x64), so older ones are refused.

Notes for reviewing

  • Versions 0.65.0 and below have the previous implementation of dprint upgrade, so that's what's used to upgrade again after downgrading to one of them.

Testing

  • Unit tests.
  • Manually ran on Windows x64 with killing other processes stubbed out: 0.65.0 to 0.64.2 and 0.51.1, 0.64.0 to 0.64.3, and that 0.51.0 is refused without changing the executable.

@dsherret
dsherret merged commit 0bbe4f8 into main Dec 1, 2026
22 checks passed
@dsherret
dsherret deleted the feat/upgrade-version branch December 1, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant