Skip to content

feat!: support Sanity Studio v6 - #107

Open
saliougaye wants to merge 1 commit into
Q42:mainfrom
saliougaye:feat/sanity-v6-support
Open

feat!: support Sanity Studio v6#107
saliougaye wants to merge 1 commit into
Q42:mainfrom
saliougaye:feat/sanity-v6-support

Conversation

@saliougaye

Copy link
Copy Markdown

Sanity v6 ships @sanity/ui 4, @sanity/icons 5 and @sanity/client 8, all of which are ESM-only and require React 19.2 and Node >=22.12.

The import surfaces of @sanity/ui and @sanity/icons changed in ways that cannot be expressed by a single source tree alongside the v3 line used by Sanity 3/4/5, so this drops support for those majors:

  • @sanity/icons 5 removed the barrel export; icons now come from their own entry points (@sanity/icons/Add). v3 has no such subpaths.
  • @sanity/ui 4 moved Tooltip and the Menu family to /tooltip and /menu, and exports the old root names as never tombstones. v3 has no such subpaths.

Other changes:

  • Drop the CommonJS build. Modern Node supports require(esm), so requiring the package still works on Node 22.12+.
  • Rename the removed space prop to gap.
  • Pass the now-required path prop to FormField.
  • Switch moduleResolution to "bundler". @sanity/ui 4 resolves through package exports and no longer ships typesVersions, so node10 resolution cannot see the subpath entry points' types.
  • Drop next-sanity. It still peers @sanity/client ^7 while Sanity 6 ships ^8, which breaks peer resolution. The three types it re-exported now come from @sanity/client directly, unchanged, and installing the plugin no longer pulls in next-sanity or its next peer dependency.
  • Widen the styled-components peer from the exact pin 6.4.3 to ^6.1.15 to match Sanity 6's own range.
  • Bump examples/studio to Sanity 6 and React 19.

BREAKING CHANGE: requires Sanity Studio v6, React 19.2 and Node >=22.12, and no longer ships a CommonJS build.

Closes #105

Sanity v6 ships @sanity/ui 4, @sanity/icons 5 and @sanity/client 8, all of
which are ESM-only and require React 19.2 and Node >=22.12.

The import surfaces of @sanity/ui and @sanity/icons changed in ways that
cannot be expressed by a single source tree alongside the v3 line used by
Sanity 3/4/5, so this drops support for those majors:

- @sanity/icons 5 removed the barrel export; icons now come from their own
  entry points (@sanity/icons/Add). v3 has no such subpaths.
- @sanity/ui 4 moved Tooltip and the Menu family to /tooltip and /menu, and
  exports the old root names as `never` tombstones. v3 has no such subpaths.

Other changes:

- Drop the CommonJS build. Modern Node supports require(esm), so requiring
  the package still works on Node 22.12+.
- Rename the removed `space` prop to `gap`.
- Pass the now-required `path` prop to FormField.
- Switch moduleResolution to "bundler". @sanity/ui 4 resolves through package
  exports and no longer ships typesVersions, so node10 resolution cannot see
  the subpath entry points' types.
- Drop next-sanity. It still peers @sanity/client ^7 while Sanity 6 ships ^8,
  which breaks peer resolution. The three types it re-exported now come from
  @sanity/client directly, unchanged, and installing the plugin no longer
  pulls in next-sanity or its `next` peer dependency.
- Widen the styled-components peer from the exact pin 6.4.3 to ^6.1.15 to
  match Sanity 6's own range.
- Bump examples/studio to Sanity 6 and React 19.

BREAKING CHANGE: requires Sanity Studio v6, React 19.2 and Node >=22.12, and
no longer ships a CommonJS build.

Closes Q42#105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Sanity v6.x

1 participant