[PR #8942] [MERGED] fix: patch changesets to fix pre-release peer dep version escalation #16560

Closed
opened 2026-04-13 10:34:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8942
Author: @gustavovalverde
Created: 4/3/2026
Status: Merged
Merged: 4/3/2026
Merged by: @gustavovalverde

Base: mainHead: fix/changesets-prerelease-peer-deps


📝 Commits (1)

  • d5f4e5c fix: patch changesets to fix pre-release peer dep major escalation

📊 Changes

3 files changed (+55 additions, -3 deletions)

View changed files

patches/@changesets__assemble-release-plan.patch (+44 -0)
📝 pnpm-lock.yaml (+8 -3)
📝 pnpm-workspace.yaml (+3 -0)

📄 Description

Summary

Patches @changesets/assemble-release-plan to pass { includePrerelease: true } to semver.satisfies() when in pre-release mode.

Without this patch, pre-release versions like 1.6.0-beta.0 are incorrectly considered "out of range" for ^1.5.6 by the semver spec (pre-releases only match ranges for the same major.minor.patch tuple). This causes all peer dependents to escalate to major versions (2.0.0-beta.0 instead of remaining at 1.5.x-beta.0).

Upstream bug: changesets/changesets#960 (open since 2022, confirmed by maintainer).

Tested

Verified locally: with the patch, a minor changeset for better-auth in pre-release mode produces 1.6.0-beta.0 for core and patch bumps for dependents — no major escalation.


Summary by cubic

Fixes pre-release peer dependency version escalation by patching @changesets/assemble-release-plan so pre-releases count as in-range during pre mode. This keeps dependents on minor/patch betas instead of jumping to major betas.

  • Bug Fixes

    • Passes { includePrerelease: true } to semver.satisfies() when in pre-release mode to correctly evaluate ranges.
  • Dependencies

    • Adds a pnpm patch for @changesets/assemble-release-plan; updates pnpm-lock.yaml and pnpm-workspace.yaml to apply it automatically.

Written for commit d5f4e5cc72. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8942 **Author:** [@gustavovalverde](https://github.com/gustavovalverde) **Created:** 4/3/2026 **Status:** ✅ Merged **Merged:** 4/3/2026 **Merged by:** [@gustavovalverde](https://github.com/gustavovalverde) **Base:** `main` ← **Head:** `fix/changesets-prerelease-peer-deps` --- ### 📝 Commits (1) - [`d5f4e5c`](https://github.com/better-auth/better-auth/commit/d5f4e5cc72f99ac6dc5d9b8ceccd07dc1b2cdf03) fix: patch changesets to fix pre-release peer dep major escalation ### 📊 Changes **3 files changed** (+55 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `patches/@changesets__assemble-release-plan.patch` (+44 -0) 📝 `pnpm-lock.yaml` (+8 -3) 📝 `pnpm-workspace.yaml` (+3 -0) </details> ### 📄 Description ## Summary Patches `@changesets/assemble-release-plan` to pass `{ includePrerelease: true }` to `semver.satisfies()` when in pre-release mode. Without this patch, pre-release versions like `1.6.0-beta.0` are incorrectly considered "out of range" for `^1.5.6` by the semver spec (pre-releases only match ranges for the same major.minor.patch tuple). This causes all peer dependents to escalate to major versions (`2.0.0-beta.0` instead of remaining at `1.5.x-beta.0`). Upstream bug: changesets/changesets#960 (open since 2022, confirmed by maintainer). ### Tested Verified locally: with the patch, a minor changeset for `better-auth` in pre-release mode produces `1.6.0-beta.0` for core and patch bumps for dependents — no major escalation. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes pre-release peer dependency version escalation by patching `@changesets/assemble-release-plan` so pre-releases count as in-range during pre mode. This keeps dependents on minor/patch betas instead of jumping to major betas. - Bug Fixes - Passes `{ includePrerelease: true }` to `semver.satisfies()` when in pre-release mode to correctly evaluate ranges. - Dependencies - Adds a `pnpm` patch for `@changesets/assemble-release-plan`; updates `pnpm-lock.yaml` and `pnpm-workspace.yaml` to apply it automatically. <sup>Written for commit d5f4e5cc72f99ac6dc5d9b8ceccd07dc1b2cdf03. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 10:34:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#16560