Released Jun 152nd 2018


Upgrade with:

sanity upgrade

And install the latest Command Line Interface (CLI) with:

npm install --global @sanity/cli

✨ Highlights

🚜More reliable import

The sanity dataset import CLI command is now more fault tolerant, retrying in the case of network failures and similar (up to a maximum number of retries, obviously).

➡️Pass arguments to sanity exec scripts

You can now pass arguments to scripts executed through sanity exec by using subargs:

sanity exec --with-user-token -- --your-script --flags=here

👻 External CSS without CSS modules

When using third-party React components and want to import related CSS files, Sanity will by default convert the CSS to CSS modules. This won't usually work as expected, since the class names change. To force Sanity to use unprefixed CSS classes, you can import using the raw query parameter. For instance:

import 'some-react-component/styles.css?raw'

See PR #849 for more background information.

🐛 Notable bugfixes

  • Fix a bug where selecting a paragraph style from within a dialog would close the dialog
  • The block editor will no longer crash when selecting a block from an array without any text blocks
  • The --visibility flag on sanity dataset create now actually works 😳
  • @sanity/image-url can now parse full asset URLs, enabling you to add image transformation parameters to the URL programatically.

📓 Full changelog

Espen Hovlandsdalimport Add retry handling on write operations (#832)d8e9f1742
Espen Hovlandsdalplugin-loader Fix loading of namespaced configs (#836)6f7e34095
Espen Hovlandsdalcore Fix visibility mode flag on dataset creation (#833)77c7f3b37
Espen Hovlandsdalpreview Log EventListenerOptions warning only in development mode (#838)752e80eb6
Bjørge Næsspreview Refactor and expose WithVisibility helper component (#840)10f78f0ab
Bjørge Næsschore Upgrade prettier and add prettify script (#841)f9de6fb6a
Bjørge Næsschore Run prettier on all js filese0edb423a
Espen Hovlandsdalimport Fix serialization of numeric object keys (#842)86fda82af
Espen Hovlandsdalchore Add --all flag to symlink script to blindly symlink all Sanity-modules (#844)b72666777
Espen Hovlandsdalform-builder Pass parent path of slug field to source function (#845)6c17675e3
Espen Hovlandsdalimage-url Support parsing asset objects with only URL (#846)da749500e
Espen Hovlandsdaltest-studio Add array of objects containing blocks to blocks schemafb1a0ef54
Knut Melværreadme Add slack badge (#850)bf9b4d783
Espen Hovlandsdalcore Pass subargs onto exec target (#848)b72c68b3f
Thomas Drevonform-builder Remove patchChannel prop requirement (#851)b298cab60
Kristoffer J. Sivertsencomponents Fix bug where nested block input dialogs would close when selecting style (#847)2f8defb87
Kristoffer J. Sivertsendesk-tool Less text on publish button. Explanation in tooltip (#839)5e3bb029d
Espen Hovlandsdalserver Allow importing CSS with ?raw to bypass CSS modules (#849)3a5cfcaba