chore(deps): update dependency @sanity/client to v8 - #1536
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
✅ Deploy Preview for nuxt-sanity-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
renovate
Bot
force-pushed
the
renovate/sanity-client-8.x
branch
4 times, most recently
from
August 24, 2026 07:35
de94512 to
5522f4b
Compare
renovate
Bot
force-pushed
the
renovate/sanity-client-8.x
branch
3 times, most recently
from
August 28, 2026 21:18
1040748 to
9bd0180
Compare
renovate
Bot
force-pushed
the
renovate/sanity-client-8.x
branch
4 times, most recently
from
September 7, 2026 19:48
9031f54 to
ff3c607
Compare
renovate
Bot
force-pushed
the
renovate/sanity-client-8.x
branch
2 times, most recently
from
September 14, 2026 08:05
15080d6 to
696b4ef
Compare
renovate
Bot
force-pushed
the
renovate/sanity-client-8.x
branch
from
September 17, 2026 00:02
696b4ef to
746f85f
Compare
renovate
Bot
force-pushed
the
renovate/sanity-client-8.x
branch
3 times, most recently
from
September 29, 2026 19:43
2dcf873 to
39360b3
Compare
renovate
Bot
force-pushed
the
renovate/sanity-client-8.x
branch
from
September 30, 2026 23:46
39360b3 to
a1ce3a5
Compare
This branch has not been deployed
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 contains the following updates:
^7.24.0→^8.0.0Release Notes
sanity-io/client (@sanity/client)
v8.9.0Compare Source
Minor Changes
v8.8.0Compare Source
Minor Changes
collaboration: accept comment
anchor, deprecaterange(#1346) (4ce6968)Create and update now take a typed
anchor(type: "portable-text"with optionalfieldValueon the anchor). Deprecatedrange+ top-levelfieldValue(andrange: null) are still accepted and sent asanchor.export
getCommentTargetDocumentReffrom@sanity/client/collaboration(#1343) (71d414a)Builds the global document reference a collaboration comment stores in
target.document._reffrom a resource and a document ID, with no client involved.client.collaboration.comments.getTargetDocumentRefis unchanged and now calls it, reading the resource off the client's configuration.Until now the reference could only be built through a client instance, which meant code that needs it somewhere a client should not be fetched or created, such as a state selector, had to reach for one anyway. Pass the same value
ClientConfig['resource']takes, for example{type: 'dataset', id: 'abc123.production'}.collaboration: send clientVersion on comment writes (#1347) (da15b5e)
update client.context types to the latest Context API (#1348) (69ccdd4)
v8.7.0Compare Source
Minor Changes
abort underlying EventSource request when response fails validation (#1340) (ba3de6b)
add per-resource schema, query and projection registries (#1334) (b43e033)
SanitySchemasByResource,SanityQueriesByResourceandSanityProjectionsByResourcejoin the existingSanityQueriesregistry, following the same pattern: a global interface that the interface exported from@sanity/clientinherits from, so a generated file can register either way and does not depend on module resolution.Each is keyed by a resource, using the same string the App SDK already uses for its runtime cache,
projectId.datasetfor a dataset. This is what lets two datasets whose schemas disagree register different result types for the same query text, which the flatSanityQueriesregistry cannot express. Projections add a document-type level, because a projection resolves against whichever document the caller's handle names.All three are empty by default and nothing in the client reads them yet.
client.fetchandClientReturnare unchanged, and keep resolving through the flat registry. They exist for consumers that do resource-aware lookups themselves, starting with the App SDK's hooks.Patch Changes
v8.6.2Patch Changes
v8.6.1Patch Changes
any-signaldependency and combine abort signals withget-it/any-signal, which uses nativeAbortSignal.anywhere it exists and a plainAbortControlleron Safari 17.0-17.3 (#1329) (4b5c198)v8.6.0Minor Changes
Patch Changes
any-signalinstead ofAbortSignal.anyso cancellable requests work on Safari 17.0-17.3 (#1326) (f87523e)v8.5.0Minor Changes
read query result types from a global
SanityQueriesinterface (#1319) (18313fe)Query result types can now be registered on a global
SanityQueriesinterface, which theSanityQueriesinterface exported from@sanity/clientinherits from.client.fetch,ClientReturnandClientReturnStegaresolve registrations made either way, so thedeclare module '@sanity/client'augmentation that Sanity TypeGen has emitted so far keeps working unchanged. The global registry does not depend on module resolution: it is seen whether or not@sanity/clientis a direct dependency of the generated file, however many copies of the client are installed, and from every entry point including@sanity/client/stega.Patch Changes
v8.4.0Compare Source
Minor Changes
Patch Changes
context.sources.list(#1306) (cd7a783)v8.3.0Compare Source
Minor Changes
invoke functions synchronously or asynchronously (#1295) (d1667c7)
client.functions.invoke()now takes anoptionsargument and acceptssanity.function.durableand
sanity.function.queuefunctions alongsidesanity.function.pubsub.By default the invocation is queued: the call resolves with
undefinedas soon as theservice accepts it, without waiting for the function to run. Pass
{sync: true}to keep therequest open until the function finishes and resolve with its return value — that adds a
?sync=truequery parameter to the invoke request, and remains limited tosanity.function.pubsub.The return type follows the option: a call with
{sync: true}resolves withR, while an asynccall resolves with
undefined. Callers who pass an explicit type argument without{sync: true}keep the previous
R | undefinedshape.collaboration: resolve comment
rangefrom optionalfieldValue(#1299) (88073e6)v8.2.0Compare Source
Minor Changes
add collaboration comments client (
@alpha) (#1235) (5906f72)add variant actions (#1279) (dd25720)
Adds
CreateVariantAction,EditVariantAction,DeleteVariantAction,PublishVariantActionandUnpublishVariantAction, along with aVariantActionunion, covering thesanity.action.document.variant.*actions. They are included in theActionunion, soclient.action()accepts them.Each action addresses a variant document by the
publishedId,variantIdandbundleIdtriplerather than by document ID, since the API derives the document ID from those three values.
Note that
Actionwidening is a breaking change for code that exhaustively switches onAction['actionType']with aneverfallthrough, which will need to handle the new cases.v8.1.0Compare Source
Minor Changes
add
client.functions.invoke()for calling deployed functions on demand (#1258) (4c2f718)Invoke a Sanity Pubsub Function by the
name. Onlysanity.function.pubsubfunctions can beinvoked on demand.
Available in two forms,
client.functions.invoke()resolves with the function's return value,client.observable.functions.invoke()emits it and accepts anevent.datapayload,a per-call
timeoutand anAbortSignal.Names are only unique within a stack, so resolving one requires a
stackId, either from the newstackIdclient config option or from the request. That resolution costs one extra request percall. A function that returns nothing resolves to
undefined.Stacks deployed at organization scope are reached with the new
organizationIdclient configoption, or a per-call
organizationId. It takes precedence overprojectId, which becomesoptional in that case.
add request handler for client integrations (#1286) (a9db52f)
add variant definition actions (#1278) (7c98361)
Adds
CreateVariantDefinitionAction,EditVariantDefinitionActionandDeleteVariantDefinitionAction, along with aVariantDefinitionActionunion, covering thesanity.action.variant.definition.*actions. They are included in theActionunion, soclient.action()accepts them.Note that
Actionwidening is a breaking change for code that exhaustively switches onAction['actionType']with aneverfallthrough, which will need to handle the new cases.Patch Changes
route the live-events CORS probe through the configured transport (#1282) (aaada67)
The
/check/corsprobe thatclient.live.events()uses to distinguish a CORSrejection from other connection failures called the global
fetchdirectly, soa custom
resolveFetchor an explicitproxywas not applied to it. It nowresolves the same fetch the EventSource connection uses.
reword the
createVersion()warning aboutbaseId(#1282) (aaada67)createVersion({document})warned that "the recommended approach is to provide abaseIdandreleaseIdinstead", which reads as a correction even when the caller had no other option:baseIdcreates a version of a document that already exists, so creating a genuinely new document inside a release can only be done by passingdocument.The client cannot tell those two cases apart, so the warning is now phrased as a condition rather than a correction: "If you are creating a version of a document that already exists, prefer providing
baseIdandreleaseIdinstead." No behavior changed, and both forms remain supported.correct the return type of
delete()andmutate()when called with no options (#1282) (aaada67)client.delete(id)andclient.mutate(mutations)were typed to resolve to adocument (
SanityDocument<R>) when called without an options argument, butthey actually resolve to a mutation result object
(
{transactionId, documentIds, results},MultipleMutationResult). Thedocument is genuinely mutated, but code that read
._idoff the resolvedvalue was reading
undefinedat runtime without any type error. Theunderlying method (
create()) does return the document by default, so thiswas easy to assume also held for
delete()andmutate()- it does not.Both methods now correctly type as resolving to
MultipleMutationResultbydefault, matching the (unchanged) runtime behavior, on both the
promise-based and observable clients.
Released as a patch rather than a major even though a declared type changed. Code that read
._idoff the result was readingundefinedat runtime, so no working application can have depended on the old type: anything that type-checked against it was already broken when it ran. What changes is that the mistake is now visible at compile time instead of at runtime.If
tscstarts failing on one of these calls, that failure is pointing at a real bug. To fix it:{returnFirst: true, returnDocuments: true}explicitly:
await client.delete(id, {returnFirst: true, returnDocuments: true}).documentIds(ordocumentIdwithreturnFirst: true) off the result instead of_id.No runtime behavior changed - this only corrects the public types.
populate server-sent event IDs on Cloudflare Workers (#1282) (aaada67)
client.live.events()andclient.listen()readlastEventIdoff theMessageEventthateventsourceconstructs. workerd does not carry that memberthrough the
MessageEventconstructor's init dict, so on bare Cloudflare Workersevery event arrived with an empty
id. Raising theeventsourcefloor to>= 5.1.0picks up the fix.return the asset from
assets.upload()against a Media Library (#1282) (aaada67)client.assets.upload()resolved toundefinedwhen the client was configured against a Media Library (resource: {type: 'media-library', id}), even though the upload succeeded server-side. Content Lake's upload endpoint responds with{document: {...}}, andupload()unwrapped that key unconditionally - but the Media Library upload endpoint responds with{asset: {...}}instead, so the unwrap producedundefined.upload()now unwraps.assetfor a Media Library response and.documentotherwise, on both the promise-based and observable clients. It resolves to the uploaded asset instead ofundefined.The Media Library asset shape is not the same as a Content Lake asset document: it is a
sanity.assetdocument that tracks one or more uploaded versions viacurrentVersion/versions, rather than a document withurl,size,mimeType, and so on. That shape is now exported asMediaLibraryAssetDocument.The declared return type is knowingly incomplete, and this is a patch on purpose. Which shape you get back depends on how the client is configured, not on the arguments to
upload(), so no overload can discriminate it. Expressing it would mean widening the return type into a union that every existing caller has to narrow - a breaking change for all users, to correct the typing of a much less common configuration. So the declared type still describes only the Content Lake shape. If you upload to a Media Library, narrow the result yourself (for example, check forcurrentVersion) or annotate it asSanityImageAssetDocument | MediaLibraryAssetDocument. Typing this accurately is deferred to the next major.v8.0.0Compare Source
Major Changes
require node 22.12 or higher, use fetch (#1217) (29b9601)
HttpRequestEvent,ResponseEvent, andProgressEventare removed. Observable asset uploads now emitUploadEvent<T>.unstable__adapterandunstable__environmentexports are removed.ClientErrorandServerErrormessages now include the HTTP status text._requestHandlerclient config option andRequestHandlertype are removed.requesterclient config option is removed. Useheadersconfiguration and a customfetchinstead.proxyoption is removed. Configureproxyon the client or through proxy environment variables.HTTP_PROXY,HTTPS_PROXY, andNO_PROXYafter process startup no longer affect requests.ENOTFOUNDerrors are retried for idempotent requests. SetmaxRetries: 0to fail immediately.HttpRequestcontract now uses get-it v9 fetch-shaped request options instead of the v8 request shape.config.resolveFetchtakes precedence over the environment resolver.esm.sh.typesVersionsdeclarations are removed. Use TypeScriptmoduleResolutionset tonode16,nodenext, orbundler.mainandmodulepackage fields are removed. Consumers must resolve the package throughexports.Patch Changes
restore editor autocomplete for
StackablePerspectiveandStudioBaseUrl(#1264) (5b0e529)Both types applied the
& {}autocomplete idiom around the whole union rather than around thestringmember, as in('published' | 'drafts' | string) & {}. That collapses to plainstring,so editors offered no completions for
publishedordrafts, and the three template literalpatterns in
StudioBaseUrlhad no effect. Assignability is unchanged, so this only addssuggestions that were always intended to be there.
deps: update dependency nanoid to v6 (#1267) (c6fc253)
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.