Skip to content

Latest commit

 

History

History
924 lines (456 loc) · 43.3 KB

CHANGELOG.md

File metadata and controls

924 lines (456 loc) · 43.3 KB

📓 Changelog

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

6.20.2 (2024-07-09)

Bug Fixes

  • deps: update dependency get-it to ^8.6.3 (#866) (0661f5d)

6.20.1 (2024-06-18)

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)

6.20.0 (2024-06-10)

Features

  • the client.live.events() API is now stable (#843) (d03fc09)

6.19.2 (2024-06-10)

Bug Fixes

  • deps: update dependency get-it to ^8.6.0 (#846) (85afc9e)

6.19.1 (2024-05-29)

Bug Fixes

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

6.19.0 (2024-05-28)

Features

6.18.3 (2024-05-24)

Bug Fixes

  • deps: update dependency get-it to ^8.5.0 (#824) (f4fc8f6)

6.18.2 (2024-05-14)

Bug Fixes

  • deps: update dependency get-it to ^8.4.30 (#811) (6598ce8)

6.18.1 (2024-05-13)

Bug Fixes

  • race condition in client.listen memory leak (#805) (d2e468a)

6.18.0 (2024-05-07)

Features

  • add experimental new live events API (#797) (de0cec7)

6.17.3 (2024-05-07)

Bug Fixes

  • deps: update dependency get-it to ^8.4.29 (#796) (7cfec3e)

6.17.2 (2024-05-03)

Bug Fixes

  • stega: remove try/catch block from stegaClean (#788) (06aaad2)

6.17.1 (2024-05-03)

Bug Fixes

  • deps: update dependency @vercel/stega to v0.1.2 (#784) (7297ead)
  • deps: update dependency get-it to v8.4.28 (#786) (47985fc)
  • prevent listener leak on unsubscribe before eventsource module load (#783) (f38b64e)

6.17.0 (2024-05-02)

Features

  • update SanityProject to include metadata.cliInitializedAt (#779) (77bf6f6)

6.16.0 (2024-05-02)

Features

  • add stegaClean method, deprecate vercelStegaCleanAll (#773) (2749586)

Bug Fixes

  • deps: update dependency @vercel/stega to v0.1.1 (#771) (aea84ce)

6.15.20 (2024-04-22)

Bug Fixes

  • deps: update dependency @sanity/eventsource to ^5.0.2 (#754) (754183f)

6.15.19 (2024-04-19)

Bug Fixes

  • handle bug affecting next 14.2.2 during static pregeneration (#748) (28493e2)

6.15.18 (2024-04-18)

Bug Fixes

  • allow setting middleware on requester (#742) (65d45be)

6.15.17 (2024-04-17)

Bug Fixes

  • deps: update dependency get-it to ^8.4.26 (96ea964)

6.15.16 (2024-04-17)

Bug Fixes

  • createClient from @sanity/client/stega is deprecated (4d0a03f)
  • requester from @sanity/client/stega is deprecated (f29263d)
  • use the correct stega export conditions for react-native (06af163)

6.15.15 (2024-04-17)

Bug Fixes

  • add react-native export conditions (cc0fd76)
  • deps: update dependency get-it to ^8.4.24 (0d5952c)

6.15.14 (2024-04-14)

Bug Fixes

  • deps: update dependency get-it to ^8.4.23 (#720) (11a6299)

6.15.13 (2024-04-11)

Bug Fixes

6.15.12 (2024-04-11)

Bug Fixes

  • add bun export condition (57e814f)
  • deps: update dependency get-it to ^8.4.19 (#705) (fa3e10c)

6.15.11 (2024-04-05)

Bug Fixes

  • stega: update default filter to skip paths that contain "type" (#689) (1c6e4ea)

6.15.10 (2024-04-05)

Bug Fixes

  • deps: update dependency get-it to ^8.4.18 (#686) (c4dab41)

6.15.9 (2024-04-02)

Bug Fixes

  • deps: update dependency terser to ^5.30.2 (#679) (7ad406b)

6.15.8 (2024-04-02)

Bug Fixes

  • deps: update dependency get-it to ^8.4.16 (#668) (cea5c1c)
  • deps: update dependency get-it to ^8.4.17 (#677) (694298f)

6.15.7 (2024-03-20)

Bug Fixes

  • deps: update dependency get-it to ^8.4.15 (#661) (20af691)

6.15.6 (2024-03-18)

Bug Fixes

  • deps: update dependency get-it to ^8.4.14 (#647) (e7c1930)

6.15.5 (2024-03-15)

Bug Fixes

  • deps: update dependency get-it to ^8.4.13 (8c0bb8d)

6.15.4 (2024-03-12)

Bug Fixes

  • deps: update dependency get-it to ^8.4.11 (#633) (67ba08a)

6.15.3 (2024-03-07)

Bug Fixes

6.15.2 (2024-03-07)

Bug Fixes

6.15.1 (2024-02-28)

Bug Fixes

6.15.0 (2024-02-26)

Features

  • csm: add conditional isDraft search parameter to edit urls (#604) (89783d2)

6.14.4 (2024-02-26)

Bug Fixes

  • deps: update dependency get-it to ^8.4.10 (#601) (afeee23)

6.14.3 (2024-02-23)

Bug Fixes

6.14.2 (2024-02-21)

Bug Fixes

  • deps: update dependency get-it to ^8.4.8 (#576) (c88fdf8)
  • deps: update dependency get-it to ^8.4.9 (#586) (63b652c)

6.14.1 (2024-02-21)

Bug Fixes

  • deps: update dependency get-it to ^8.4.7 (#568) (a328a6d)

6.14.0 (2024-02-19)

Features

  • optionally encode cross dataset reference specific data (#560) (62a9edb)

6.13.3 (2024-02-14)

Bug Fixes

  • reintroduce support for returnQuery option, default to false (dba1696)

6.13.2 (2024-02-14)

Bug Fixes

  • revert "add support for returnQuery option, default to false" (#545) (e6b4e1c)

6.13.1 (2024-02-14)

Bug Fixes

  • passing array of document ids to patch()/delete() (#549) (fee7ff7)

6.13.0 (2024-02-14)

Features

  • add support for returnQuery option, default to false (#545) (dee015b)

6.12.4 (2024-02-08)

Bug Fixes

  • adjust stega logging prefix (76a8b5e)

6.12.3 (2024-01-29)

Bug Fixes

  • typings: add ListenParams for client.listen (dff1bcc)
  • typings: add MutationSelectionQueryParams type (5bf3eee)
  • typings: improve the QueryParams typing and generics (#514) (9c606a4)

6.12.2 (2024-01-29)

Bug Fixes

  • typings: relax query params typings to fix regressions (#510) (b46583e)

6.12.1 (2024-01-26)

Bug Fixes

  • stega: resolve issue where strings that ends in numbers are mistaken for datetimes (6b64cc4)

6.12.0 (2024-01-26)

Features

  • add stega support to the core client (#495) (a1abe4a)

Bug Fixes

  • add guards for common Next.js App Router mistakes (#499) (323ca33)

6.11.3 (2024-01-25)

Bug Fixes

  • deps: update dependency get-it to ^8.4.6 (#488) (9d3131a)

6.11.2 (2024-01-23)

Bug Fixes

  • deps: update dependency get-it to ^8.4.5 (#474) (d6d40ff)
  • stega: fallback to original value if invalid JSON (d51963a)

6.11.1 (2024-01-10)

Bug Fixes

  • typings: changed cache doc typing to be `Partial<SanityDocument>`` (#469) (5483f74)

6.11.0 (2024-01-09)

Features

  • csm: support perspective modes when optimistically applying document mutations (#464) (0c9db11)

6.10.0 (2023-12-12)

Features

  • allow setting useCdn: boolean on client.fetch (#454) (936ec9e)
  • stega: allow setting stega options on client.fetch (#427) (144fc2d)

Bug Fixes

  • stega: strip stega strings from params (#453) (26ce483)

6.9.3 (2023-12-07)

Bug Fixes

  • stega: add mode=presentation to edit intent links (8f062e1)

6.9.2 (2023-12-07)

Bug Fixes

  • types: disambiguate SanityClient imports (#445) (b4b9079)

6.9.1 (2023-11-28)

Bug Fixes

  • stega: revert allow setting stega options on client.fetch (#424) (fdbb57a)

6.9.0 (2023-11-28)

Features

  • stega: allow setting stega options on client.fetch (#419) (d38afd8)

6.8.6 (2023-11-15)

Bug Fixes

  • stega: merge stega options in .config() and .withConfig() (ef2d282)
  • stega: remove the vercelStegaCombineSkip option (07b343c)

6.8.5 (2023-11-13)

Bug Fixes

  • add missing resultSourceMap typings (cddd331)

6.8.4 (2023-11-13)

Bug Fixes

  • csm: don't apply tool to baseUrl (a836c7c)

6.8.3 (2023-11-13)

Bug Fixes

  • csm: allow passing a string path (c6c27b8)

6.8.2 (2023-11-13)

Bug Fixes

  • csm: remove optional intent resolve parameters (00b5ffa)
  • csm: remove unused intent resolve parameters (#397) (00b5ffa)

6.8.1 (2023-11-10)

Bug Fixes

  • stega: add href to denyList (2886ae8)
  • stega: add secret to denyList (a2c22d2)

6.8.0 (2023-11-10)

Features

  • experimental: add CSM and stega utils (3e7ecdd)

6.7.1 (2023-11-05)

Bug Fixes

6.7.0 (2023-10-19)

Features

  • support resultSourceMap=withKeyArraySelector (#363) (d528e99)

6.6.0 (2023-10-12)

Features

  • types: add _type to ContentSourceMapDocuments (#358) (1acf6c5)

6.5.0 (2023-10-10)

Features

  • allow passing null as tag to explicitly disable it (#348) (2698bde)

6.4.12 (2023-09-13)

Bug Fixes

6.4.11 (2023-09-06)

Bug Fixes

  • adjust incorrect listener visibility option type (#317) (92ac2a6)
  • remove deprecated annotation for the request method (#320) (8d8f0e2)

6.4.10 (2023-09-06)

Bug Fixes

6.4.9 (2023-08-18)

Bug Fixes

  • set useCdn: false automatically when perspective: 'previewDrafts' (#299) (0cb98cf)

6.4.8 (2023-08-18)

Bug Fixes

  • docs: add Next.js App Router example (#300) (d0d432c)

6.4.7 (2023-08-17)

Bug Fixes

  • don't set signal on fetch unless provided to client.fetch (#298) (e1d5210)

6.4.6 (2023-08-13)

Bug Fixes

  • client.fetch: allow setting perspective and resultSourceMap on fetch (18eedfd)

6.4.5 (2023-08-09)

Bug Fixes

6.4.4 (2023-08-08)

Bug Fixes

6.4.3 (2023-08-07)

Bug Fixes

  • add react-server export condition (3a81261)

6.4.2 (2023-08-07)

Bug Fixes

6.4.1 (2023-08-07)

Bug Fixes

  • add node.module export condition (6ec1d7e)

6.4.0 (2023-08-02)

Features

  • limit the number of connections open in Node.js (#271) (7d3d537)

6.3.0 (2023-08-01)

Features

  • projects: includeMembers option on projects.list() (#273) (5f14eaf)

6.2.0 (2023-07-26)

Features

  • support fetch for Next.js app-router (#249) (0aa4c6d)

6.1.7 (2023-07-07)

Bug Fixes

6.1.6 (2023-07-04)

Bug Fixes

  • add GROQ query params when large POST queries (#255) (4e7a5de)

6.1.5 (2023-06-29)

Bug Fixes

6.1.4 (2023-06-29)

Bug Fixes

  • check if @sanity/preview-kit/client is incorrectly setup (2507638)
  • deps: update dependency get-it to v8.1.4 (#250) (09f89ea)
  • deps: update non-major (#251) (07935ec)

6.1.3 (2023-06-12)

Bug Fixes

  • add ClientPerspective type export (4c8664d)
  • update perspective typings (74a02f8)

6.1.2 (2023-05-23)

Bug Fixes

  • update RawQueryResponse response type properties (#232) (5eb0272)

6.1.1 (2023-05-16)

Bug Fixes

  • prevent crash when using url option instead of uri (#231) (573c1bd)

6.1.0 (2023-05-15)

Features

Bug Fixes

  • apply resultSourceMap parameter only to queries (#225) (dac8ea6)

6.0.1 (2023-05-03)

Bug Fixes

6.0.0 (2023-05-03)

⚠ BREAKING CHANGES

  • useCdn is now set to true by default. Our CDN ensures your content has reliably, world-wide delivery by caching queries made from your front-end. If you require fresh data for every query, perhaps for testing purposes, add useCdn: false to your configuration.
  • Client will now automatically retry all GET/HEAD requests as well as queries if the server responds with a 429, 502 or 503 status code - as well as on socket/DNS errors. Previously, the client would immediately throw an error. If you have application-level retry code, you should either disable the retrying in the client by passing {maxRetries: 0}, or remove the custom retry code and potentially alter the retryDelay and maxRetries options to match your wanted behavior.

The migration guide outlines every breaking change and how to migrate your code

Introducing Content Source Maps

Note

Content Source Maps are available for select Sanity enterprise customers. Contact our sales team for more information.

Content Source Maps are an optional layer of contextual metadata sent with queries to enable use cases such as Visual Editing, tracing content lineage, and more. Our implementation of Content Source Maps are based on an open standard posted on GitHub, and you can read the API documentation here. To get started with Content Source Maps, check out the documentation in the README file.

Features

  • add automatic retrying of 429, 502, 503 (#199)

Bug Fixes

  • make useCdn use true by default (#191)
  • undeprecate request() (#205)

5.4.2 (2023-04-03)

Bug Fixes

  • mutate: reflect support for providing transaction id in typings (#187) (b7ad302)
  • mutate: serialize clientless patches correctly (#186) (b635dff)

5.4.1 (2023-03-30)

Bug Fixes

5.4.0 (2023-03-28)

Features

5.3.2 (2023-03-23)

Bug Fixes

  • declare File for envs without lib.dom (#175) (1e9cb5e)

5.3.1 (2023-03-22)

Bug Fixes

  • deps: update dependency @sanity/eventsource to v5 (#169) (1cda138)

5.3.0 (2023-03-13)

Features

  • include mutation error items in error message (#148) (193f45e)

Bug Fixes

5.2.2 (2023-02-21)

Bug Fixes

  • deps: update devdependencies (non-major) (#132) (0acb16b)

5.2.1 (2023-02-15)

Bug Fixes

5.2.0 (2023-02-07)

Features

5.1.0 (2023-02-02)

Features

Bug Fixes

  • make @types/node a dev dependency (88a4cc1)
  • show a migration error when using the default export (#105) (adb582e)

5.0.0 (2023-02-02)

⚠ BREAKING CHANGES

  • We have removed the default export and replaced it with a named one:

    -import SanityClient from '@sanity/client'
    +import {createClient} from '@sanity/client'

The migration guide outlines every breaking change and how to migrate your code

Features

  • full Node.js ESM runtime support (#86) (bd9b247)

4.0.1 (2023-01-06)

Bug Fixes

  • deps: upgrade rxjs to v7 (#80) (594b4e7)
  • use NodeJS.ReadableStream type for upload body type to prevent conflict with DOM ReadableStream (#33) (8cbfe0c)

4.0.0 (2023-01-02)

⚠ BREAKING CHANGES

  • Expanding ESM support is a significant change. Although a tremendous effort is made to preserve backward compatibility it can't be guaranteed as there are too many conditions, environments, and runtime versions to cover them all.

Bug Fixes

  • deps: update dependencies (non-major) (#36) (658b40f)
  • improve ESM output to support Deno, Bun and Edge runtimes (#29) (5ef19d4)
  • fix(typings): fetch() does not need to return record
  • feat: allow setting allowReconfigure to false to prevent reconfiguration of existing client instance
  • fix(typings): make typings compatible with TypeScript 4.8
  • fix(typings): add missing params to MutationSelection
  • fix(typings): missing class extend for ObservableTransaction
  • fix: regression introduced in #24. Partially exporting ESM breaks environments that bundle for the browser, such as Next.js. Remove pkg.exports until what we ship there is 100% compatible with the ecosystem.
  • fix: removed @sanity/generate-help-url dependency which threw TypeError: generateHelpUrl is not a function errors in some cases
  • fix(typings): observable client emits observables on transaction/patch commit
  • fix(typings): add missing operation property on mutation result
  • docs: fix typo in readme (#10)
  • chore: upgrade eventsource dependency
  • feat: add dryRun, autoGenerateArrayKeys mutation options
  • fix: use named import for @sanity/generate-help-url module
  • chore(deps): upgrade dependencies
  • fix(typings): add missing timeout config option
  • feat: support passing custom headers to http methods (#5)
  • feat: add new polyfill for event source (#2)
  • feat: make request() return value generic
  • feat: add skipCrossDatasetReferenceValidation flag to mutations
  • fix(typings): add missing clone() method on requester
  • feat(http): request compressed responses
  • fix(typings): add missing maxRedirects option
  • fix(typings): use rxjs for observable type
  • BREAKING: Passing a token and useCdn: true will now use the API CDN for queries, where it previously used the uncached, "live" API
  • BREAKING: Client now only supports Node.js v12 and higher
  • BREAKING: Remove deprecated merge patch operator
  • BREAKING: Remove deprecated document property on assets.upload response
  • BREAKING: Make sure client.observable.fetch() returns a cold observable