Version Packages - #2649
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
squiggler-app
Bot
force-pushed
the
changeset-release/main
branch
from
August 10, 2026 09:09
74e053c to
92330b4
Compare
squiggler-app
Bot
force-pushed
the
changeset-release/main
branch
from
August 10, 2026 09:19
92330b4 to
705522d
Compare
squiggler-app
Bot
force-pushed
the
changeset-release/main
branch
from
August 10, 2026 09:59
705522d to
27ad24c
Compare
stipsan
enabled auto-merge (squash)
August 10, 2026 10:00
stipsan
approved these changes
Aug 10, 2026
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@sanity/[email protected]
Major Changes
#2505
6069d4eThanks @stipsan! -@sanity/ui4.0. The full upgrade procedure is in the migration guide. TypeScript walks you through most of it: every removed or moved API stays in the types as a@deprecatedtombstone whose message names its replacement.ESM-only. Node.js 22.12+ required.
.cjs/.d.cts) and therequireexport condition are removed — the package now ships ESM only.enginesis now>=22.12, matchingsanity).exports-awaremoduleResolution(node16,nodenext, orbundler): v4 resolves everything through packageexportsand no longer shipstypesVersions, so the legacynode(node10) mode cannot resolve the subpath entry points' types.require(esm), sorequire('@sanity/ui')keeps working; things only break if the Node.js version is too old.React 19.2+ required.
react: ^19.2andreact-dom: ^19.2. The 19.2 floor is set by the new<Activity>component, which shipped in React 19.2.0 and which v4 uses to keep closedTooltipandPopovercontent mounted.'19', which uses React's built-in runtime — thereact-compiler-runtimedependency is dropped.reactandreact-domto 19.2 or later. No code changes needed.New required import:
@sanity/ui/styles.css.Static styles (the ones that don't depend on theme or props) are now extracted into a stylesheet at build time instead of being injected at runtime. The stylesheet is not loaded automatically — add this import once, next to where the app renders
<ThemeProvider>:Without it,
SrOnly,Spinnerand internal text-overflow styling render unstyled. These components have moved off styled-components — more components follow in future 4.x minors, and UI5 ships without styled-components or any other runtime CSS-in-JS.Heavy components moved out of the root entry point.
Importing
@sanity/uino longer pulls in@floating-ui/react-dom,motionorreact-refractor— even without bundler treeshaking. What moved where:@sanity/ui/toast—Toast,ToastProvider,useToast(motion)@sanity/ui/popover—Popover(@floating-ui/react-dom, motion)@sanity/ui/tooltip—Tooltip,TooltipDelayGroupProvider,useTooltipDelayGroup(@floating-ui/react-dom, motion)@sanity/ui/menu—Menu,MenuButton,MenuDivider,MenuGroup,MenuItem(rendersPopover)@sanity/ui/autocomplete—Autocomplete(rendersPopover)@sanity/ui/breadcrumbs—Breadcrumbs(rendersPopover)@sanity/ui/code—Code(lazy-loads react-refractor)Prop, context and message types moved along with their components (
PopoverProps,ToastParams,MenuItemProps,AutocompleteState,TooltipDelayGroupContextValue, …). Update the imports:Also part of this change:
ErrorBoundaryrenders a plain<pre><code>instead of theCodeprimitive, keeping the root entry free of thereact-refractormodule graph.Deprecated props, hooks, and components are removed.
Removed props stay on the public types as
@deprecatednever, so you get the migration message instead of a bare "does not exist" error. The removed hooks andConditionalWrapperare still exported but throw when called. What to replace:space→gapcolumns/rows/column*/row*→gridTemplateColumns/gridTemplateRows/gridColumn*/gridRow*focusFirst/focusLast→shouldFocuspopover={{…}}boundaryElement→floatingBoundary/referenceBoundary(andBoundaryElementProviderfor max-width /constrainSize)allowedAutoPlacements→fallbackPlacementsuseClickOutside→useClickOutsideEventuseElementRect→useElementSizeuseForwardedRef→useRef+useImperativeHandleuseArrayProp(value)→Array.isArray(value) ? value : [value]ConditionalWrapper→ inline the conditional wrapping logicThe private
@sanity/ui/_visual-editingentry point is removed.Import from
@sanity/uiinstead — except the moved components (Menu,MenuDivider,MenuGroup,MenuItem,Popover), which now live on@sanity/ui/menuand@sanity/ui/popover. The slim subset is no longer needed:displayNameside effects are gone, so unused components tree-shake out of consuming bundles.The
@juggle/resize-observerpolyfill is removed — the nativeResizeObserveris used directly.The internal
_ResizeObserverexport is gone. If you imported it, use the globalResizeObserverinstead.TooltipandPopoverkeep closed content mounted with React's<Activity>.animateenabled, hiding is deferred until exit animations finish (viaAnimateActivity, vendored from Motion).contentmust gate the recursion onopen— otherwise they render an infinitely deep hidden tree.All components are plain function components —
refis a regular prop (React 19 semantics).Refs keep working exactly as before. The one observable change: components no longer pass
react-ischecks such asisForwardRef.@sanity/[email protected]
Patch Changes
6069d4e]:Note
Medium Risk
Publishing
@sanity/ui4.0.0 is a major semver jump with wide breaking API and runtime requirements for all consumers; the PR itself is low-risk metadata, but merging triggers npm publication of that major.Overview
This is an automated Version Packages release — no application code changes in the diff, only version bumps, changelogs, and removal of the consumed
.changeset/ui-4.mdentry.@sanity/ui4.0.0 is published with the full 4.0 migration notes now recorded inpackages/ui/CHANGELOG.md: ESM-only and Node 22.12+, React 19.2+, requiredimport "@sanity/ui/styles.css", heavy APIs moved to subpaths (@sanity/ui/menu,/toast,/popover, etc.), removed deprecated props/hooks and@sanity/ui/_visual-editing,Tooltip/Popoverbehavior via React<Activity>, and related breaking changes (see MIGRATION.md).@sanity/themer0.3.2 is a patch release that only reflects the updated@sanity/[email protected]workspace dependency in its changelog.Reviewed by Cursor Bugbot for commit 27ad24c. Bugbot is set up for automated code reviews on this repo. Configure here.