[PR #8937] [MERGED] chore: use caret ranges for internal peerDependencies #25209

Closed
opened 2026-04-15 22:46:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

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

Base: mainHead: chore/peer-deps-caret-range


📝 Commits (2)

  • f7cbcac chore: use caret ranges for internal peerDependencies
  • 45937e2 fix: remove changeset config (belongs in release automation PR)

📊 Changes

18 files changed (+28 additions, -28 deletions)

View changed files

📝 packages/api-key/package.json (+2 -2)
📝 packages/drizzle-adapter/package.json (+1 -1)
📝 packages/electron/package.json (+2 -2)
📝 packages/expo/package.json (+2 -2)
📝 packages/i18n/package.json (+2 -2)
📝 packages/kysely-adapter/package.json (+1 -1)
📝 packages/memory-adapter/package.json (+1 -1)
📝 packages/mongo-adapter/package.json (+1 -1)
📝 packages/oauth-provider/package.json (+2 -2)
📝 packages/passkey/package.json (+2 -2)
📝 packages/prisma-adapter/package.json (+1 -1)
📝 packages/redis-storage/package.json (+1 -1)
📝 packages/scim/package.json (+2 -2)
📝 packages/sso/package.json (+2 -2)
📝 packages/stripe/package.json (+2 -2)
📝 packages/telemetry/package.json (+1 -1)
📝 packages/test-utils/package.json (+2 -2)
📝 pnpm-lock.yaml (+1 -1)

📄 Description

Summary

  • Change workspace:* to workspace:^ in all plugin peerDependencies
  • Add onlyUpdatePeerDependentsWhenOutOfRange to changeset config

Why

workspace:* publishes as exact versions (e.g., "better-auth": "1.5.6"). This causes ERESOLVE errors whenever better-auth releases a new version, forcing consumers to upgrade all plugins simultaneously.

workspace:^ publishes as caret ranges (e.g., "^1.5.6"), which accepts any compatible 1.x version. Consumers can upgrade core independently of plugins.

Impact on consumers

  • npm install no longer fails when core and plugin versions are slightly out of sync
  • Major version boundary (2.0.0) still triggers proper peer dep warnings
  • No change for consumers who upgrade all packages together (the common case)

Summary by cubic

Switch internal plugin peerDependencies from workspace:* to workspace:^ so published packages use caret ranges. Removed the Changesets config tweak from this PR (handled in release automation).

  • Dependencies
    • Use workspace:^ for @better-auth/core and better-auth across all plugins.

Written for commit 45937e2d80. 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/8937 **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:** `chore/peer-deps-caret-range` --- ### 📝 Commits (2) - [`f7cbcac`](https://github.com/better-auth/better-auth/commit/f7cbcacf8876443666fe76b4f4dc65f63543d22d) chore: use caret ranges for internal peerDependencies - [`45937e2`](https://github.com/better-auth/better-auth/commit/45937e2d80cf82228abc043699e4b23f8ace4fe8) fix: remove changeset config (belongs in release automation PR) ### 📊 Changes **18 files changed** (+28 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `packages/api-key/package.json` (+2 -2) 📝 `packages/drizzle-adapter/package.json` (+1 -1) 📝 `packages/electron/package.json` (+2 -2) 📝 `packages/expo/package.json` (+2 -2) 📝 `packages/i18n/package.json` (+2 -2) 📝 `packages/kysely-adapter/package.json` (+1 -1) 📝 `packages/memory-adapter/package.json` (+1 -1) 📝 `packages/mongo-adapter/package.json` (+1 -1) 📝 `packages/oauth-provider/package.json` (+2 -2) 📝 `packages/passkey/package.json` (+2 -2) 📝 `packages/prisma-adapter/package.json` (+1 -1) 📝 `packages/redis-storage/package.json` (+1 -1) 📝 `packages/scim/package.json` (+2 -2) 📝 `packages/sso/package.json` (+2 -2) 📝 `packages/stripe/package.json` (+2 -2) 📝 `packages/telemetry/package.json` (+1 -1) 📝 `packages/test-utils/package.json` (+2 -2) 📝 `pnpm-lock.yaml` (+1 -1) </details> ### 📄 Description ## Summary - Change `workspace:*` to `workspace:^` in all plugin `peerDependencies` - Add `onlyUpdatePeerDependentsWhenOutOfRange` to changeset config ### Why `workspace:*` publishes as exact versions (e.g., `"better-auth": "1.5.6"`). This causes `ERESOLVE` errors whenever `better-auth` releases a new version, forcing consumers to upgrade all plugins simultaneously. `workspace:^` publishes as caret ranges (e.g., `"^1.5.6"`), which accepts any compatible `1.x` version. Consumers can upgrade core independently of plugins. ### Impact on consumers - `npm install` no longer fails when core and plugin versions are slightly out of sync - Major version boundary (2.0.0) still triggers proper peer dep warnings - No change for consumers who upgrade all packages together (the common case) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Switch internal plugin `peerDependencies` from `workspace:*` to `workspace:^` so published packages use caret ranges. Removed the Changesets config tweak from this PR (handled in release automation). - **Dependencies** - Use `workspace:^` for `@better-auth/core` and `better-auth` across all plugins. <sup>Written for commit 45937e2d80cf82228abc043699e4b23f8ace4fe8. 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-15 22:46:00 -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#25209