Upgrade with:
sanity upgrade
And install the latest Command Line Interface (CLI) with:
npm install --global @sanity/cli
The first building blocks of the long-awaited validation infrastructure is here. Each document field can specify validation rules that generate either errors (prevent the document from being published) or warnings (allow publishing, but notify the user about the warning).
For a full overview of the validation feature, see the documentation. We're looking for feedback on this feature and how you like the developer and user experience - drop us a line if you'd like to help!
The slug input has been significantly simplified and is now easier to customize. A slugify
option can now be provided in order to customize how slugs are generated, which also introduces the ability to generate the slug in an asyncronous manner (just return a promise!).
The uniqueness check now more correctly considers draft/published status, and also ensures that the uniqueness check is run per document type. The check to determine whether a slug is unique or not can now be customized by passing an isUnique
function in the field options. More information can be found in the documentation.
sanity dataset export
now generates a tarball (.tar.gz
) containing both the documents in NDJSON form as well as assets (files and images). This provides a simple way to transfer data between different projects or datasets.
If you want to remove assets from the export, you can use the --no-assets
flag, or if you just want the raw documents, use the --raw
flag.
The studio is now more responsive in the case of network errors, indicating the reconnect status and locking the local document to prevent data from being lost.
The command line tool is now able to create and bootstrap a new project and dataset by using the --yes
and --create-project
flags (see sanity help init
for more information).
All documents that are previewed on screen now share the same in-memory representation. This should lead to a faster and more responsive UI.
@sanity/cli
package did not notify on new releases. Now is a good time to run npm install -g @sanity/cli
to ensure you stay up to date with new releases!@sanity/client
will now always try to reconnect if disconnected, until unsubscribe()
is called.Author | Message | Commit |
---|---|---|
Kristoffer J. Sivertsen | form-builder Show paste enable on uploadplaceholder (#583) | 9ebff0678 |
Espen Hovlandsdal | chore Disable browser env for non-browser modules | 7c98296ee |
Espen Hovlandsdal | export Add new export module for exporting a dataset and downloading associated assets | ee9aa4c05 |
Espen Hovlandsdal | core Use new @sanity/export module for exporting datasets | b14a433c2 |
Espen Hovlandsdal | import Refactored to alllow importing from tarballs | 36bf52a57 |
Espen Hovlandsdal | core Add more help text for import/export commands | 0d15beaa6 |
Espen Hovlandsdal | export Don't filter or touch asset documents or references in raw mode | dbc0bba9b |
Espen Hovlandsdal | export Add support for filtering on drafts and types | 1d452dd1e |
Espen Hovlandsdal | core Document drafts, types and overwrite flags for export command | c26fc06d3 |
Espen Hovlandsdal | cli Replace update-notifier with custom, non-lazy-loaded version | c7d4ecfc8 |
Espen Hovlandsdal | cli Remove unnecessary rewriting of lazy loader in update notifier | 166f06162 |
Espen Hovlandsdal | chore Normalize engines and author fields | 7e3ceb1a0 |
Espen Hovlandsdal | chore Upgrade and normalize dependencies | 1957c00e7 |
Bjørge Næss | form-builder Minor flowtype fix | 4442fccdb |
Bjørge Næss | preview Optimize preview fetching | c1e0ca303 |
Espen Hovlandsdal | client Always reconnect listeners, even when auto-reconnect fails | 292ed3bc6 |
Kristoffer J. Sivertsen | all Adding support for and styling readOnly fields. #440 (#574) | c716c93f6 |
Espen Hovlandsdal | validation Initial validation implementation | 22807f869 |
Bjørge Næss | form-builder Consistent naming of input components/folders (#603) | dd2cd2800 |
Espen Hovlandsdal | cli Replace progrescii + thenify dependencies | f4d3b0eb5 |
Bjørge Næss | preview Fix issue with accumulated queries + default pagination limit (#610) | e167b3ee1 |
Espen Hovlandsdal | base Provide size ordering + size subtitles for assets | ad772ced2 |
Bjørge Næss | export Set publishConfig.access = 'public' | c4063d30f |
Bjørge Næss | components Remove react-text-ellipsis due to perf issues (#606) | f5201382c |
Kristoffer J. Sivertsen | components Avoid repaint on scroll (#615) | ca81321fc |
Kristoffer J. Sivertsen | components Click to scroll for block editor #76 (#578) | c28dbff90 |
Bjørge Næss | preview Cache and share preview snapshots between all subscribers (#612) | 0b3498813 |
Kristoffer J. Sivertsen | components Proof of new slug concept (#585) | 03b7d9376 |
Espen Hovlandsdal | schema Deprecate slugifyFn (now called slugify ) | 1c857ac60 |
Kristoffer J. Sivertsen | base Not using height on text input (#619) | 0f0be2f13 |
Bjørge Næss | test-studio Add species type | 39324749a |
Bjørge Næss | chore Remove outdated changelog | f32b2ff75 |
Espen Hovlandsdal | desk-tool Lock to last-known local revision when publishing | 50bc679cf |
Espen Hovlandsdal | schema Change slug uniqueness function name to isUnique | 130c97893 |
Kristoffer J. Sivertsen | default-layout Removing padding from secondary navigation | 823769ecf |
Bjørge Næss | eslint-config-sanity Import eslint config package (#625) | d803394c4 |
Bjørge Næss | form-builder Handle readOnly on unknown fields (#627) | 2e874ef2f |
Espen Hovlandsdal | cli Allow creating new projects in unattended mode | febffa69c |
Bjørge Næss | cli Add react-icons as dev dependency (#630) | 0a8032ba5 |
Kristoffer J. Sivertsen | components Scrollcontainer has default style. Override for mobile in defaultpane (#631) | e4801da1f |
Espen Hovlandsdal | client Allow specifying ID of transactions | 4e73a0884 |
Espen Hovlandsdal | cli Skip dataset validation on CI-environment | 2d4a1f00a |
Bjørge Næss | infrastructure Improve how we handle connection failures/reconnects (#632) | 582a5ee45 |
Bjørge Næss | preview Emit null as snapshot for missing documents (#634) | fd6578350 |
Kristoffer J. Sivertsen | imagetool Min width on canvas (#636) | a7abf4b4f |
Espen Hovlandsdal | validation Allow disabling validation for field and document types | b22e0cc5d |
Espen Hovlandsdal | validation Infer value from title/value list options | 3929d4a70 |
Bjørge Næss | form-builder Support readOnly on block editor (#640) | 118417c14 |
Bjørge Næss | form-builder Hide delete button from dialog when array is read only (#641) | e230a931a |
Thomas Drevon | cli Fix slug field options in movies template schema (#642) | 60e4802d4 |
Espen Hovlandsdal | import Fix importing of unreferenced assets | 720c909f4 |
Espen Hovlandsdal | cli Update URL for moviedb dataset | fedbd5179 |