github sanity-io/sanity v2.1.0

latest releases: v3.44.0, v3.43.0, v3.42.1...
3 years ago

Upgrade the Command Line Interface (CLI) with:

npm install --global @sanity/cli

Upgrade Sanity Studio with:

sanity upgrade

✨ Highlights

Advanced Dataset Management: Cloud Clone & Dataset Hotswap

We have added two new features for Advanced Dataset Management for projects on the Enterprise plan. You can now initate dataset copying directly in the cloud and create aliases to hot swap between datasets. This will enhance development and CI workflows.

Learn more in our blog post

GraphQL allDocument field

When deploying new GraphQL APIs for your datasets, you will now get an allDocument field which allows you to query for all documents matching a filter. You will still need to use fragments with type checks to access fields based on the type, of course:

{
  allDocument(where: {
    _createdAt: { gte: "2020-12-01T14:33:00Z"}
  }) {
    # `_id` is defined on the `Document` interface,
    # so it does not require a type assertion
    _id

    # Unique fields on the `post` type
    ...on Post {
      title
      category
    }
  }
}

If you already have a GraphQL API deployed, you will have to specify that you want to use the new generation of GraphQL schema by using sanity graphql deploy --generation gen3. The reason for this is a minor breaking change: the DocumentFilter type now represents the filters that can be applied in the allDocument query, mirroring other type filters (PostFilter, AuthorFilter), while the type previously called DocumentFilter has been renamed to Sanity_DocumentFilter.

Other features

  • We now prevent crawlers/search engines from indexing studios

🐛 Notable bugfixes

  • Fix bug where color input would crash when selecting color (thanks @obelmont!)
  • Fix bug where the top part of the searchable select dropdown scrollbar was being blocked by a hidden div (thanks @Aratramba!)

📓 Full changelog

Author Message Commit
Espen Hovlandsdal [util] Improve typing of PathUtils.trimChildPath cc3018f
Espen Hovlandsdal [chore] Build modules before running lint (#2118) 6d3f201
Espen Hovlandsdal [chore] Remove unused modules (#2114) ca34d93
Espen Hovlandsdal [chore] Remove @sanity/check module (#2119) fa95241
Espen Hovlandsdal [mendoza] Move mendoza out of monorepo cd7269c
Espen Hovlandsdal [desk-tool] Fix typings for document history 5523045
Espen Hovlandsdal [chore] Move @sanity/uuid out of monorepo (#2113) ea1902a
Bjørge Næss [chore] Remove obsolete @sanity/observable (#2120) 7b1f743
Espen Hovlandsdal [base] Prevent robots from crawling/indexing studios (#2125) 17c4637
Espen Hovlandsdal [chore] Use GitHub Actions for CI (#2127) bd86718
Bjørge Næss [test-studio] Bump and lax semver range of dashboard widget plugins 60afcd2
Bjørge Næss [form-builder] Upgrade to latest portable-text-editor becc35c
Oliver Belmont [color-input] Fix isValidHex error (#2124) (#2128) 7286a39
Bjørge Næss [chore] Move the the rich-date-input package out of the monorepo (#2126) f04dec0
Marius Lundgård [chore] Improve performance of webpack development server (#2116) e80891f
Marius Lundgård [chore] Install @sanity/ui (#2130) 48dd9ad
Marius Lundgård [chore] Upgrade popper dependencies 237f0e5
Marius Lundgård [chore] Bootstrap dev server (#2131) 3aa06da
Benedicte Emilie Brækken [chore] Remove non-js files before running lint CI 66f6ead
Arjen [components] Add pointer-events: none to noResultTextHidden (#2138) ba79bbf
Marius Lundgård [chore] Move @sanity/components to legacy directory in @sanity/base (#2117) 7fde820
Marius Lundgård [chore] Move example studios to examples directory (#2141) b90873e
Marius Lundgård [base] Fix base color issue when using custom theme 6bfead4
Bjørge Næss [base] Create a declarations file for the @sanity/ui theme e74cfef
Bjørge Næss [chore] Improve typings and explicitly disable strict mode flags where needed (#2133) 0b72b38
Espen Hovlandsdal [core] Disallow using aliases for studios (#2142) 15018b0
Marius Lundgård [storybook] Add support for @sanity/ui in Storybook and improve theme inference (#2143) 08c74a5
Bjørge Næss [mutator] Fix minor typing issue d07447c
Bjørge Næss [chore] Fix misc. formatting issues cc8fc58
Benedicte Emilie Brækken [core] Specify target/source dataset in copy prompt 8142a78
Benedicte Emilie Brækken [base] Fix bug where type-guard didn't return bool e254014
Bjørge Næss [default-layout] Fix lint error fa35092
Bjørge Næss [chore] Add a task to lint files changed between current branch and next 3e521f4
Bjørge Næss [chore] Upgrade @types/react to 17 e28fa6e
Benedicte Emilie Brækken [core] Change dataset copy to wait by default 16afe03
Benedicte Emilie Brækken [chore] Lint files one by one 4fd248d
Bjørge Næss [chore] Consolidate ad hoc declaration files for parts (#2150) e2ec8b5
Bjørge Næss [chore] Switch to project references instead of path aliases a1f117f
Bjørge Næss [chore] Run type-check before test suite 0906f4f
Benedicte Emilie Brækken [core] Add --skip-history flag to dataset copy f66c675
Benedicte Emilie Brækken [chore] Keep prettier at version 2.1.2 78fe914
Benedicte Emilie Brækken [chore] Prettify files with prettier 2.1.2 31a5e60
Benedicte Emilie Brækken [chore] Run clean before verifying format 84ababf
Espen Hovlandsdal [form-builder] Fix typings for resolveArrayInput (#2162) ac3bd05
Bjørge Næss [chore] Fail build script on TS compile errors + smaller improvements (#2165) fca8a4a
Marius Lundgård [base] Update @sanity/ui f37144d
Marius Lundgård [base] Improve base styles 3caf688
Bjørge Næss [server] Add missing dependencies (#2168) c4e5e57
Benedicte Emilie Brækken [test-studio] Add all types of modals to schema 557db54
Rex Raphael [core] Add dataset alias support to CLI (#2166) 5bff083
Rex Raphael [cli] Fix init command not respecting dataset visibility flag (#2163) f205938
Andy Richardson [core] Add full support for querying Document 38b2434
Espen Hovlandsdal [core] Do not include document interface as type 04821bf
Espen Hovlandsdal [core] Explicitly define which types to query for in allDocument query c6cc389
Anders Stensaas [core] Revert changes to GraphQL 'gen2'as they were breaking 652fc75
Anders Stensaas [core] Add a new GraphQL generation 'gen3' for querying all documents f2600c8
Bjørge Næss [chore] Lazy require tsconfig when resolving monorepo aliases bb76931
Bjørge Næss [chore] Remove unused file 6265c4d
Bjørge Næss [chore] Fix issue with double monorepo detection/config override 46a9c17
Bjørge Næss [chore] Add tsbuildinfo files to .npmignore f7e3830

Don't miss a new sanity release

NewReleases is sending notifications on new releases.