Skip to content

chore(deps): update dependency @sanity/client to v8 - #1500

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/sanity-client-8.x
Open

chore(deps): update dependency @sanity/client to v8#1500
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/sanity-client-8.x

Conversation

@renovate

@renovate renovate Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
@sanity/client (source) ^3.3.6^8.0.0 age confidence

Release Notes

sanity-io/client (@​sanity/client)

v8.2.0

Compare Source

Minor Changes
  • add collaboration comments client (@alpha) (#​1235) (5906f72)

  • add variant actions (#​1279) (dd25720)

    Adds CreateVariantAction, EditVariantAction, DeleteVariantAction, PublishVariantAction and
    UnpublishVariantAction, along with a VariantAction union, covering the
    sanity.action.document.variant.* actions. They are included in the Action union, so
    client.action() accepts them.

    Each action addresses a variant document by the publishedId, variantId and bundleId triple
    rather than by document ID, since the API derives the document ID from those three values.

    Note that Action widening is a breaking change for code that exhaustively switches on
    Action['actionType'] with a never fallthrough, which will need to handle the new cases.

v8.1.0

Compare Source

Minor Changes
  • add client.functions.invoke() for calling deployed functions on demand (#​1258) (4c2f718)

    Invoke a Sanity Pubsub Function by the name. Only sanity.function.pubsub functions can be
    invoked on demand.

    Available in two forms, client.functions.invoke() resolves with the function's return value, client.observable.functions.invoke() emits it and accepts an event.data payload,
    a per-call timeout and an AbortSignal.

    Names are only unique within a stack, so resolving one requires a stackId, either from the new
    stackId client config option or from the request. That resolution costs one extra request per
    call. A function that returns nothing resolves to undefined.

    Stacks deployed at organization scope are reached with the new organizationId client config
    option, or a per-call organizationId. It takes precedence over projectId, which becomes
    optional in that case.

  • add request handler for client integrations (#​1286) (a9db52f)

  • add variant definition actions (#​1278) (7c98361)

    Adds CreateVariantDefinitionAction, EditVariantDefinitionAction and
    DeleteVariantDefinitionAction, along with a VariantDefinitionAction union, covering the
    sanity.action.variant.definition.* actions. They are included in the Action union, so
    client.action() accepts them.

    Note that Action widening is a breaking change for code that exhaustively switches on
    Action['actionType'] with a never fallthrough, which will need to handle the new cases.

Patch Changes
  • route the live-events CORS probe through the configured transport (#​1282) (aaada67)

    The /check/cors probe that client.live.events() uses to distinguish a CORS
    rejection from other connection failures called the global fetch directly, so
    a custom resolveFetch or an explicit proxy was not applied to it. It now
    resolves the same fetch the EventSource connection uses.

  • reword the createVersion() warning about baseId (#​1282) (aaada67)

    createVersion({document}) warned that "the recommended approach is to provide a baseId and releaseId instead", which reads as a correction even when the caller had no other option: baseId creates a version of a document that already exists, so creating a genuinely new document inside a release can only be done by passing document.

    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 baseId and releaseId instead." No behavior changed, and both forms remain supported.

  • correct the return type of delete() and mutate() when called with no options (#​1282) (aaada67)

    client.delete(id) and client.mutate(mutations) were typed to resolve to a
    document (SanityDocument<R>) when called without an options argument, but
    they actually resolve to a mutation result object
    ({transactionId, documentIds, results}, MultipleMutationResult). The
    document is genuinely mutated, but code that read ._id off the resolved
    value was reading undefined at runtime without any type error. The
    underlying method (create()) does return the document by default, so this
    was easy to assume also held for delete() and mutate() - it does not.

    Both methods now correctly type as resolving to MultipleMutationResult by
    default, 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 ._id off the result was reading undefined at 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 tsc starts failing on one of these calls, that failure is pointing at a real bug. To fix it:

    • To get the document back, pass {returnFirst: true, returnDocuments: true}
      explicitly: await client.delete(id, {returnFirst: true, returnDocuments: true}).
    • To keep the mutation-result shape, read documentIds (or documentId with
      returnFirst: 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() and client.listen() read lastEventId off the
    MessageEvent that eventsource constructs. workerd does not carry that member
    through the MessageEvent constructor's init dict, so on bare Cloudflare Workers
    every event arrived with an empty id. Raising the eventsource floor to
    >= 5.1.0 picks up the fix.

  • return the asset from assets.upload() against a Media Library (#​1282) (aaada67)

    client.assets.upload() resolved to undefined when 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: {...}}, and upload() unwrapped that key unconditionally - but the Media Library upload endpoint responds with {asset: {...}} instead, so the unwrap produced undefined.

    upload() now unwraps .asset for a Media Library response and .document otherwise, on both the promise-based and observable clients. It resolves to the uploaded asset instead of undefined.

    The Media Library asset shape is not the same as a Content Lake asset document: it is a sanity.asset document that tracks one or more uploaded versions via currentVersion/versions, rather than a document with url, size, mimeType, and so on. That shape is now exported as MediaLibraryAssetDocument.

    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 for currentVersion) or annotate it as SanityImageAssetDocument | MediaLibraryAssetDocument. Typing this accurately is deferred to the next major.

v8.0.0

Compare Source

Major Changes
  • require node 22.12 or higher, use fetch (#​1217) (29b9601)

    • Node 22.12+ is required. The package is ESM-only and no longer ships CommonJS runtime or declaration files.
    • HttpRequestEvent, ResponseEvent, and ProgressEvent are removed. Observable asset uploads now emit UploadEvent<T>.
    • unstable__adapter and unstable__environment exports are removed.
    • Observable asset uploads emit progress events only in browsers. Node and edge runtimes emit only the terminal response event.
    • ClientError and ServerError messages now include the HTTP status text.
    • The deprecated internal _requestHandler client config option and RequestHandler type are removed.
    • The requester client config option is removed. Use headers configuration and a custom fetch instead.
    • The per-request proxy option is removed. Configure proxy on the client or through proxy environment variables.
    • Changes to HTTP_PROXY, HTTPS_PROXY, and NO_PROXY after process startup no longer affect requests.
    • DNS ENOTFOUND errors are retried for idempotent requests. Set maxRetries: 0 to fail immediately.
    • The internal HttpRequest contract now uses get-it v9 fetch-shaped request options instead of the v8 request shape.
    • A caller-provided internal config.resolveFetch takes precedence over the environment resolver.
    • The UMD bundle is removed from the distribution. Use a bundler or a service such as esm.sh.
    • typesVersions declarations are removed. Use TypeScript moduleResolution set to node16, nodenext, or bundler.
    • The main and module package fields are removed. Consumers must resolve the package through exports.
Patch Changes
  • restore editor autocomplete for StackablePerspective and StudioBaseUrl (#​1264) (5b0e529)

    Both types applied the & {} autocomplete idiom around the whole union rather than around the
    string member, as in ('published' | 'drafts' | string) & {}. That collapses to plain string,
    so editors offered no completions for published or drafts, and the three template literal
    patterns in StudioBaseUrl had no effect. Assignability is unchanged, so this only adds
    suggestions that were always intended to be there.

  • deps: update dependency nanoid to v6 (#​1267) (c6fc253)

v7.26.2

Compare Source

Bug Fixes

v7.26.1

Compare Source

Bug Fixes
  • stega: keep symbol-keyed properties unbranded in StegaBranded (#​1241) (a36eebb)

v7.26.0

Compare Source

Features

v7.25.0

Compare Source

Features
  • stega: add branded string types for stega encoded results (#​1234) (c3ea109)

v7.24.0

Compare Source

Features

v7.23.2

Compare Source

Bug Fixes

v7.23.1

Compare Source

Bug Fixes
  • stop reconnecting live/listen connections rejected with a 4xx (#​1226) (8c26558)

v7.23.0

Compare Source

Features

v7.22.1

Compare Source

Bug Fixes
  • live: verify CORS via /check/cors (credentials-aware) before reporting CorsOriginError (#​1219) (566e1b5)

v7.22.0

Compare Source

Features

v7.21.0

Compare Source

Features
  • live: add waitFor option to defer events until Sanity Function processing (#​1209) (3251113)
  • support intercepting requests via internal requestHandler config (#​1208) (4d794f6)
Bug Fixes

v7.20.0

Compare Source

Features

v7.19.0

Compare Source

Features

v7.18.0

Compare Source

Features
  • types: add VideoRenditionInfo types with typed resolution (#​1186) (6d9e85e)
Bug Fixes

v7.17.0

Compare Source

Features
  • projects: add onlyExplicitMembership option to projects.list() (#​1200) (96619c5)

v7.16.0

Compare Source

Features
  • dataset: added embeddings configuration options (d4cca13)

v7.15.0

Compare Source

Features

v7.14.1

Compare Source

Bug Fixes

v7.14.0

Compare Source

Features
  • media-library: add thumbhash support to AssetMetadataType (223fdbc)
  • media-library: improve Media Library API support (#​1171) (df82583)
Bug Fixes
  • types: thumbhash -> thumbHash (223fdbc)

v7.13.2

Compare Source

Bug Fixes

v7.13.1

Compare Source

Bug Fixes

v7.13.0

Compare Source

Features

v7.12.1

Compare Source

Bug Fixes

v7.12.0

Compare Source

Features

v7.11.2

Compare Source

Bug Fixes

v7.11.1

Compare Source

Bug Fixes
  • move extra options check after first connect attempt (#​1136) (fa8a040)

v7.11.0

Compare Source

Features

v7.10.0

Compare Source

Features
  • projects: allow a project list to be filtered to a specific Organization ID (#​1131) (b455862)

v7.9.0

Compare Source

Features
  • add ReleaseCardinality type and update ReleaseDocument interface (#​1129) (fd5198e)
  • allow experimental resource for projects and datasets (#​1124) (a2c8892)

v7.8.2

Compare Source

Bug Fixes

v7.8.1

Compare Source

Bug Fixes
  • add missing provider property to CurrentSanityUser type (#​1115) (5d98eca)

v7.8.0

Compare Source

Features
  • version.create action supports optional baseId and versionId instead of document (#​1108) (aaa1042)

v7.7.0

Compare Source

Features
  • add isHttpError method (and shared HttpError interface) (#​1112) (98ee6d3)
  • add ignoreExperimentalApiWarning configuration option (#​1107) (b1cdfbe)

v7.6.0

Compare Source

Features
  • transform: adds support for optional imageUrl param in for target.operation image-description (#​1105) (c47214f)

v7.5.0

Compare Source

Features
  • agent.action.transform can now transform images to text descriptions (#​1096) (609e572)

v7.4.1

Compare Source

Bug Fixes

v7.4.0

Compare Source

Features
  • agent.action.patch - a schema aware patch api (#​1091) (0bf6de3)
  • agent.action.prompt (d6b08b7)
  • agent.action.prompt – for when you dont want to bring an LLM key and just use Sanity (#​1078) (d6b08b7)
  • new agent action parameter forcePublishedWrite – agent actions never write to published doc by default (#​1092) (7587e2c)
Bug Fixes

v7.3.0

Compare Source

Features
  • pass default headers to createClient for all requests (#​1079) (e99c852)

v7.2.2

Compare Source

Bug Fixes

v7.2.1

Compare Source

Bug Fixes
  • downgrade nanoid to ensure compatibility with node < 22 (#​1076) (368a12d)

v7.2.0

Compare Source

Features

v7.1.0

Compare Source

Features

v7.0.0

Compare Source

⚠ BREAKING CHANGES
  • Dropping support for Node.js < v20 as Node.js v18 is EOL as of 2025-04-30
Bug Fixes

v6.29.1

Compare Source

Bug Fixes
  • dependency update, import condition (d8109b9)

v6.29.0

Compare Source

Features

v6.28.4

Compare Source

Bug Fixes

v6.28.3

Compare Source

Bug Fixes

v6.28.2

Compare Source

Bug Fixes

v6.28.1

Compare Source

Bug Fixes

v6.28.0

Compare Source

Features
Bug Fixes

v6.27.2

Compare Source

Bug Fixes

v6.27.1

Compare Source

Bug Fixes
  • csm: handle Cannot read properties of undefined (cb80d68)

v6.27.0

Compare Source

Features

v6.26.1

Compare Source

Bug Fixes

v6.26.0

Compare Source

Features

v6.25.0

Compare Source

Features
  • request: add flag to disable logging api warnings (#​925) (3f90ab0)

v6.24.4

Compare Source

Bug Fixes

v6.24.3

Compare Source

Bug Fixes

v6.24.2

Compare Source

Bug Fixes

v6.24.1

Compare Source

Bug Fixes

v6.24.0

Compare Source

Features
Bug Fixes
  • export validateApiPerspective (b73ae46)

v6.23.0

Compare Source

Features
Bug Fixes
  • types: add (abort) signal to raw request typings (#​926) (fcd9a16)

v6.22.5

Compare Source

Bug Fixes

v6.22.4

Compare Source

Bug Fixes
  • stega: add textTheme to deny list (39edfe1)
  • stega: ignore paths that end with Id (81aa664)

v6.22.3

Compare Source

Bug Fixes

v6.22.2

Compare Source

Bug Fixes

v6.22.1

Compare Source

Bug Fixes
  • add missing listenerName property on welcome event (#​894) (6173089)

v6.22.0

Compare Source

Features
Bug Fixes

v6.21.3

Compare Source

Bug Fixes
  • deprecate studioHost, externalStudioHost in typings (#​879) (ebe840b)
  • support signal on getDocument(s) to cancel requests (#​881) (13d71bb)

v6.21.2

Compare Source

Bug Fixes

v6.21.1

Compare Source

Bug Fixes
  • add support for includeMutations listen parameter (#​872) (5f0a991)

v6.21.0

Compare Source

Features
  • codegen: Allow query reponse types to be overridden through SanityQueries (#​858) (c25d51a)

v6.20.2

Compare Source

Bug Fixes

v6.20.1

Compare Source

Bug Fixes
  • add warning about setting both useCdn and withCredentials to true (#​849) (ae01edb)
  • deps: update dependency get-it to ^8.6.1 (#​856) (ced69bc)

v6.20.0

Compare Source

Features

v6.19.2

Compare Source

Bug Fixes

v6.19.1

Compare Source

Bug Fixes
  • types: adjust action types to reflect Actions API (#​830) (e116c62)

v6.19.0

Compare Source

Features

v6.18.3

Compare Source

Bug Fixes

v6.18.2

Compare Source

Bug Fixes

v6.18.1

Compare Source

Bug Fixes

v6.18.0

Compare Source

Features

v6.17.3

Compare Source

Bug Fixes

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 12:00 AM and 03:59 AM, only on Monday (* 0-3 * * 1)
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from a team as a code owner August 17, 2026 00:02
@renovate renovate Bot added dependencies Pull requests that update a dependency file javascript labels Aug 17, 2026
@netlify

netlify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Deploy Preview for netlify-plugins ready!

Name Link
🔨 Latest commit d5be075
🔍 Latest deploy log https://app.netlify.com/projects/netlify-plugins/deploys/6a89c5d39c637800088c75ec
😎 Deploy Preview https://deploy-preview-1500--netlify-plugins.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

kodiakhq[bot]
kodiakhq Bot previously approved these changes Aug 17, 2026
kodiakhq[bot]
kodiakhq Bot previously approved these changes Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants