npm @sanity/base 0.132.2
v0.132.2

latest releases: 2.36.6, 2.36.4, 2.36.3...
6 years ago

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

Author Message Commit
Espen Hovlandsdal [import] Add retry handling on write operations (#832) d8e9f17
Espen Hovlandsdal [plugin-loader] Fix loading of namespaced configs (#836) 6f7e340
Espen Hovlandsdal [core] Fix visibility mode flag on dataset creation (#833) 77c7f3b
Espen Hovlandsdal [preview] Log EventListenerOptions warning only in development mode (#838) 752e80e
Bjørge Næss [preview] Refactor and expose WithVisibility helper component (#840) 10f78f0
Bjørge Næss [chore] Upgrade prettier and add prettify script (#841) f9de6fb
Bjørge Næss [chore] Run prettier on all js files e0edb42
Espen Hovlandsdal [import] Fix serialization of numeric object keys (#842) 86fda82
Espen Hovlandsdal [chore] Add --all flag to symlink script to blindly symlink all Sanity-modules (#844) b726667
Espen Hovlandsdal [form-builder] Pass parent path of slug field to source function (#845) 6c17675
Espen Hovlandsdal [image-url] Support parsing asset objects with only URL (#846) da74950
Espen Hovlandsdal [test-studio] Add array of objects containing blocks to blocks schema fb1a0ef
Knut Melvær [readme] Add slack badge (#850) bf9b4d7
Espen Hovlandsdal [core] Pass subargs onto exec target (#848) b72c68b
Thomas Drevon [form-builder] Remove patchChannel prop requirement (#851) b298cab
Kristoffer J. Sivertsen [components] Fix bug where nested block input dialogs would close when selecting style (#847) 2f8defb
Kristoffer J. Sivertsen [desk-tool] Less text on publish button. Explanation in tooltip (#839) 5e3bb02
Espen Hovlandsdal [server] Allow importing CSS with ?raw to bypass CSS modules (#849) 3a5cfca

Don't miss a new base release

NewReleases is sending notifications on new releases.