Repository navigation
chore(deps): upgrade sonner to 2.0.8 - #18
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
apps/dokploy:sonner^1.7.4->^2.0.8(resolved with a 3-day minimum release age).bun.lockupdated; no other package moved.components/ui/sonner.tsx, mounted once inpages/_app.tsxas<Toaster richColors />.What the release notes say
v2.0.0 is announced as "mostly bug fixes". The actual diff between 1.7.4 and 2.0.8 (source at
v1.7.3, whosestyles.cssis byte-identical to the 1.7.4 dist, andv2.0.8, plusdist/index.d.tsanddist/styles.cssof both installed versions) shows these changes:Removed API (not used here)
ToasterpropsloadingIcon(useicons.loading) andpauseWhenPageIsHidden. We already useicons.loading.export type.import { type ToasterProps }in our wrapper still works.Added API (not used here)
toast.promisesuccess/errorcan return an object with toast options ({ message, description, ... }). The return type oftoast.promise(id & { unwrap }) did not change.Toaster id/toasterId),testId,customAriaLabel,toastOptions.closeButtonAriaLabel.Behaviour changes
pauseWhenPageIsHidden). A toast fired while you are in another tab stays until you come back and the 4 s run out.bottom-right), duration (4000 ms), gap (14px), visible toasts (3) and width (356px) are unchanged.data-lifted,translateY(-10px)) is gone. Hovering still expands the stack.toast.dismiss(id)is applied on the next animation frame, andonDismissnow also fires for programmatic dismissals.Errorinstance now shows the error toast. Our 4toast.promisecalls resolve withundefinedor reject, so they behave as before.toast; they usetoast.success/error/info/warningwith strings anddescription/id/duration, plus 4toast.promise).classNames.defaultnow applies only to untyped toasts (unused here).closeButton).Styling
:where(...)wrappers were removed, so sonner's built-in selectors have more specificity. It makes no difference here: sonner's injected CSS is unlayered and already beat Tailwind v4 layered utilities, and our only custom classes (toaster groupon the list,cn-toaston each toast) carry no styles. No CSS in the repo targets[data-sonner-*],[data-theme]or[data-rich-colors].data-theme->data-sonner-theme. Nothing in the repo targets it.--normal-bg,--normal-text,--normal-border,--border-radiusthat the wrapper sets are still read the same way. The close button now uses them too, instead of the hard-coded gray palette.richColors):hsl(145 92% 91%)->87%(slightly darker green), info border91%->93%(lighter), warning border91%->84%(darker yellow);hsl(223 100% 12%)->hsl(223 43% 17%)(more gray, lighter), warning border12%->9%lightness.Backgrounds and text colors of rich toasts did not change.
#3f3f3f(light) /hsl(0 0% 91%)(dark) for descriptions. Rich toasts keepcolor: inherit, so success/error/info/warning descriptions still use the toast's text color. Only loading/plain toasts with a description would look different, and the app has none.flex: 1; min-width: 0, so title/description take the full width next to the icon. Very long unbreakable strings in error messages (URLs, IDs) may wrap or overflow slightly differently.filter: blur(0)was dropped from the toast, and the hover/swipe "ghost" areas changed size.How it was verified
bun run typecheck(all workspaces): passes.bunx biome checkonapps/dokploy/package.json,components/ui/sonner.tsx,pages/_app.tsx: clean.vitest runinapps/dokploy(*.real.test.tsexcluded; they need Docker): 229/234 files, 2051 tests passed. The 6 failures are timeouts in tests that shell out to Docker (backup injection, env-file literals, docker version probe, cloud queue setup) or ran under very high machine load;server-setupandbetter-auth-schema-compatpass when rerun on their own. No test mocks or importssonner.import("sonner")resolves under Bun and exportsToaster,toast,useSonner.next buildwas not run locally; CI builds it.What to check by hand on dev
lucideicons, descriptions in the toast's own color. Borders of info/warning toasts are slightly different.duration: 2000and should still close after 2 s.🤖 Generated with Claude Code