Each section covers one release, newest first. Read the sections between your current version and the latest. The docs describe the latest published release. Sections marked next describe main, which isn’t published yet.
0.4.0
Upgrading from 0.3.x needs no migration and no API change. The schema didn’t change. One peer range is narrower, and one behaviour changes because of better-auth.
-
The better-auth peer floor is now
^1.7.16.better-authand@better-auth/coreboth need 1.7.16 or later, because 1.7.16 is a security release. Movebetter-authand every@better-auth/*package in your app together to 1.7.16 or later, before or with this package:terminalnpm install better-auth@latest @better-auth/core@latest @byo-oss/support@latestThe advisory that touches this package’s features is GHSA-c85h-5mrr-mgx4 (organization roles with padded names), because your agents are members of the staff organization. See the better-auth security release for the rest.
-
Role values are trimmed and split on commas. This comes from better-auth 1.7.16, not from this package. Support passes a staff member’s stored role to the organization plugin’s
hasPermission, which now trims it and splits it on commas. A staff member stored as"admin, owner"now has the permissions of both roles, owner included, so they may gainsupportactions they didn’t have. Before you upgrade, look for padded or comma-separated role values in the staff organization’smemberrows (and in pendinginvitationrows), and fix any that grant more than you intended.
0.3.0
Upgrading from 0.2.0 needs no migration. The schema didn’t change, and the package’s peer dependencies are the same. Three things change for users.
-
Category cards are on by default. The widget’s New ticket form, and its empty list, now show a card per kind of support: “Ask a question”, “Report a bug”, “Suggest a feature” and “Talk to us”. A new ticket gets the chosen kind as a tag, and the tag is set before
support.ticket.createdfires. To keep the form as it was, setcategories: false:lib/auth.tssupport({ staffOrganizationId, categories: false });The create endpoint accepts a
categoryand answers 400INVALID_CATEGORYfor a kind that isn’t offered. The list responses addfeatures.categories. -
Default wording changed. The widget names statuses in the customer’s words: “With our team” for open, and “Awaiting your reply” for pending. Before, it showed “Open” and “Pending”. Solved and Closed are unchanged. To keep the old names, set them in the components’
labels.customerStatusprop:tsx<SupportWidget labels={{ customerStatus: { open: "Open", pending: "Pending" } }} />The inbox’s “Status after sending” select is replaced by a Send and solve button and a send menu with Send and keep open and Send and close. Attach and Mention are now icon buttons with accessible labels. No label key was renamed or removed, and the new keys have English defaults.
-
New inbox behaviour, on by default. Keyboard shortcuts (j, k, /, r, n, e, ?) are on, and each agent can turn them off from the
?sheet. Drafts are kept per ticket while the inbox is mounted. Queue rows show how long a customer has waited on an open ticket. The agent queue filters byrequesterIdandrequesterEmail, anduseSupportQueuetakes the same filters.
0.2.0
Upgrading from 0.1.0 has two changes.
-
Events fire after the write commits.
onEventused to run as soon as its write returned, even inside the caller’s transaction. Endpoint writes don’t join a caller’s transaction, so their events still follow at once. Writes made insiderunWithTransactionnow queue their events until the transaction commits, and drop them if it rolls back. If your handler assumed it ran before commit, check that assumption. See Events. -
@better-auth/coreis a new required peer. Install it at the same version asbetter-auth. better-auth already depends on it, so this only matters when your package manager is strict about peers.terminalnpm install @better-auth/core