mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
## Description `@mastra/discord` pinned `@chat-adapter/discord` to `4.40.0` and `@mastra/teams` used `~4.40.0`, while `@mastra/core` moved `chat` to `^4.43.0`. Every `@chat-adapter/*` release depends on the exact `chat` release with the same version, so an app with core plus either package installs two copies of `chat`: ```sh pnpm add @mastra/core@1.81.0 @mastra/discord@1.3.2 @mastra/teams zod@4 ls node_modules/.pnpm | grep '^chat@' # chat@4.40.0_zod@4.6.7 # chat@4.44.0_zod@4.6.7 ``` The discord pin was correct when it landed in #25002 (it matched core's `chat` at the time). It went stale when #28417 bumped core, slack and telegram but not discord or teams. Renovate didn't catch it because the "Chat adapter" group only matched `chat` and `@chat-adapter/slack`. This PR: - moves `chat` and all four `@chat-adapter/*` packages into the pnpm catalog at `^4.44.0`, and points core, `@mastra/factory` and the channel packages at `catalog:` - widens the Renovate "Chat adapter" group to `@chat-adapter/*` - drops the "pinned to 4.40.0" wording from the discord README Installing the packed core, discord and teams tarballs into a fresh app now gives a single `chat@4.44.0`, and the repo lockfile has one `chat` entry. Tested locally: typecheck and tests for `@mastra/discord`, `@mastra/slack`, `@mastra/teams`, `@mastra/telegram`, core `src/channels`, the factory Slack integration, and core/factory typecheck. The two smaller requests in the issue (passing an adapter instance to `DiscordProvider`, back-off in core's `startGatewayLoop`) are out of scope here. ## Related issue(s) Fixes #29283 ## Type of change - [x] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test update ## Checklist - [x] I have linked the related issue(s) in the description above - [x] I have made corresponding changes to the documentation (if applicable) - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have addressed all Coderabbit comments on this PR <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 Mastra and its channel packages now use matching versions of the chat software. This helps prevent apps from installing separate copies that may not work together. ## Changes - Added `chat` and the Discord, Slack, Teams, and Telegram adapters to the pnpm catalog at `^4.44.0`. - Updated core, factory, and all four channel packages to use catalog versions. - Expanded Renovate’s “Chat adapter” group to match every `@chat-adapter/*` package and `chat`. - Updated the Discord README to remove the adapter pin wording and clarify the reaction retry behavior. - Added changesets for patch releases of the affected packages. ## Validation The author reports that packed core, Discord, and Teams packages install one `chat@4.44.0` in a fresh app, and that the repository lockfile has one `chat` entry. The author also reports passing typechecks and tests for Discord, Slack, Teams, Telegram, core channels, and the factory Slack integration. Accepting an adapter instance in `DiscordProvider` and adding back-off to core’s `startGatewayLoop` are out of scope. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
536 lines
22 KiB
536 lines
22 KiB