npm @sanity/cli 3.2.0
v3.2.0

latest releases: 3.64.0, 3.63.0, 3.59.2-corel.355...
22 months ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

npx create-sanity@latest

To upgrade a v3 Studio:

npm install sanity@latest

✨ Highlights

RxJS upgraded to v7

This is an internal change, but if you have RxJS as a dependency in your Studio project you should make sure to upgrade to v7 of RxJS in your package.json. Otherwise you may get build errors due to changes in the Observable interface between v6 and v7 (note: this is a type change only, and should not affect the runtime behavior of your studio).

If you get a build error saying something similar to:

TS2322: Type 'Observable<…>' is not assignable to type 'ObservableInput<any>'. 
  Type 'Observable<…>' is not assignable to type 'Observable<any>'. 
  The types of 'source.operator.call' are incompatible between these types. 
…

Then the solution is to upgrade the version of RxJS used in your project or library to 7.x. See the full list of breaking changes in RxJS 7

Vite upgraded to v4

This is an internal change, but theoretically there might be small changes to how assets are handled between v3 and v4. If you're using custom Vite plugins or you are loading CSS or other files, please make sure they still work after the upgrade.

Notable changes

  • Reintroduces some flags for sanity graphql deploy. Note that flags will apply to all configured GraphQL APIs.

Notable bugfixes

  • Fixes issue with useFormValue hook lagging one iteration behind
  • Fixes issue where the uploaded images menu was inaccessible
  • Fixes some incorrect typings in defineField() when using Rule.valueOfField() - thanks @fritz-c
  • Adds schema validation error when defining already defined field names for image and file types
  • Supports Node ESM (>=14)

📓 Full changelog

Author Message Commit
Marius Lundgård fix(deps): upgrade to @sanity/pkg-utils@2 (#4012) 7f5f8fc
fritz-c docs: fix typos and update npm->yarn in CONTRIBUTING 6da910e
Espen Hovlandsdal fix(create-sanity): resolve cli module without module.resolve ad98901
Herman Wikner fix(core): add missing hook dependencies 6b9ae90
Herman Wikner fix(desk): set the form to read-only when reconnecting e1b94d3
Bjørge Næss chore: ignore @sanity/client when depchecking 'create-sanity' 784b57d
Herman Wikner fix(core): improve boolean read only ui e449ad6
Herman Wikner fix(core): add default icon to new document dialog bba4c71
Espen Hovlandsdal fix(cli): prevent crash when deploying graphql API without a cli config 570958f
Espen Hovlandsdal fix(cli): make project ID optional in cli config when deploying graphql API 9c68553
Espen Hovlandsdal fix(cli): improve error when failing to encode CLI configuration 70de8eb
Espen Hovlandsdal fix(cli): reintroduce deprecated graphql deployment flags 93d3080
Espen Hovlandsdal chore: upgrade to vite 4 ba49795
Espen Hovlandsdal fix(server): make build entries plugin compatible with vite 4 e3aa8fd
Espen Hovlandsdal fix: type fix for legacy experimental actions declaration d0bd029
Espen Hovlandsdal fix(types): add missing asset source extension properties a1f1ed7
Espen Hovlandsdal refactor(core): use optional chaining operator over lodash.get ae426da
Espen Hovlandsdal refactor(core): improve type safety of template serialization a94dcd6
Marius Lundgård chore(deps): upgrade esbuild and esbuild-register 2356e06
Marius Lundgård fix: use esbuild-register only once in each thread 2005960
Espen Hovlandsdal fix: add esbuild to depcheck ignore (esbuild-register peer dependency) 6c04052
Espen Hovlandsdal chore: drop unused babel plugin 81dbc4d
Espen Hovlandsdal refactor: move @sanity/server into sanity module 6bad3f3
Espen Hovlandsdal test(cli): adjust cli build tests for vite 4 8e8a4b1
Fritz fix(types): allow use of Rule.valueOfField inside defineField 827a88f
Bjørge Næss chore: update license files 12d13ea
Nina Andal Aarvik fix(core): uploaded images popover display (#4048) b9d335b
Bjørge Næss chore(movies-studio): use correct version of google-maps plugin 8fcc067
Bjørge Næss chore(test-studio): add google maps input plugin to test-studio 20b40a8
Bjørge Næss chore: upgrade typescript to latest 4.x 5010f13
Bjørge Næss chore(validation): allow @sanity/client@4 as peer dependency 42cf304
Bjørge Næss chore: upgrade to @sanity/client@4 55acbcc
Bjørge Næss chore(portable-text-editor): allow rxjs@7 as peer dependency 8f08a68
Bjørge Næss chore: upgrade rxjs to latest 7.x d458a31
Bjørge Næss chore(sanity): upgrade @sanity/bifur-client 30b5353
Bjørge Næss chore(test-studio): add example of field groups within an array c2cf16c
Bjørge Næss chore(test-studio): add repro case for field groups issue 7bd29b5
Bjørge Næss fix(desk-tool): prevent form-state being re-used when switching between documents of different types f02b5dd
Nina Andal Aarvik fix(schema): disallow fieldnames that are already defined (#4057) 020e24f
Herman Wikner fix(desk): improve saving indicator 3009836
Bjørge Næss fix: rename various scripts publish => release ca49582
Herman Wikner fix(core): useFormValue lagging one iteration behind 3eebac3
Bjørge Næss refactor(core): deprecate WithReferringDocuments HOC in favor of a useReferringDocuments() hook (#4070) 71526d7

Don't miss a new cli release

NewReleases is sending notifications on new releases.