sanity-io / language-filter

A Sanity plugin that supports filtering localized fields by language
MIT License
17 stars 2 forks source link

chore(deps): update dependency sanity to v3.0.0-dev-preview.17 - autoclosed #10

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
sanity (source) 3.0.0-dev-preview.15 -> 3.0.0-dev-preview.17 age adoption passing confidence

Release Notes

sanity-io/sanity ### [`v3.0.0-dev-preview.17`](https://togithub.com/sanity-io/sanity/releases/tag/v3.0.0-dev-preview.17) [Compare Source](https://togithub.com/sanity-io/sanity/compare/v3.0.0-dev-preview.16...v3.0.0-dev-preview.17) ### 🐛 Notable bugfixes - Fixes an issue where CLI templates would import from the wrong module in `dev-preview.16` ### 📓 Full changelog Author | Message | Commit \------------ | ------------- | ------------- Espen Hovlandsdal | fix(cli): import from `sanity`, not `@sanity/types` | [`db34451`](https://togithub.com/sanity-io/sanity/commit/db3445178) ### [`v3.0.0-dev-preview.16`](https://togithub.com/sanity-io/sanity/releases/tag/v3.0.0-dev-preview.16) [Compare Source](https://togithub.com/sanity-io/sanity/compare/v3.0.0-dev-preview.15...v3.0.0-dev-preview.16) ### ✨ Highlights #### Less custom input boilerplate This release introduces a new [spreadable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) `elementProps` property to all input components. This currently includes things like `onFocus`/`onBlur` event handlers, `ref`, `value` (for primitive inputs) and an `onChange` that handles "native" React change events and emits the correct patches. The intention is that you can safely pass (or "spread") these on to any "native" input element. This reduces the amount of boilerplate needed for custom inputs - especially those dealing with primitive values, and handles things like unsetting the field if the value is empty, extracting the value from a change event and similar. For inputs dealing with complex values (objects and arrays), `value` is not included in `elementProps`, since it doesn't make sense to pass it to any native input. This change also includes moving the change indicator rendering from individual primitive input components to their corresponding field component instead. This means even less boilerplate is needed in order to render a simple input component. In the future, we will provide a way to opt-out of this behavior, should you wish to handle the rendering of the change indicator yourself. These changes means that in essence, all you need for the most basic custom string input would be: ```ts import React from 'react' import {StringInputProps} from 'sanity' function StringInput(props: StringInputProps) { return } ``` Note that this change means that input components will receive two "values" - `props.value` will now be of the "parsed" type defined in the schema (e.g. number), while `elementProps.value` will always be a string, since its intended to being forwarded as an attribute to the native HTML input element. #### Context improvements Custom validation functions and initial value resolvers now gets an extended context parameter passed to them, which includes the schema, the current user and a `getClient()` function. #### Other features - Now prints a warning when attempting to use an array with `layout: 'tags'` *and* a preconfigured list of options - Now supports URL imports in `sanity.config.ts` - Custom diff components are now supported and can be specified on schema types using the `components.diff` property - A `logo` can now be passed to the configuration and will be rendered in the navigation bar. Note that this property name might change in an upcoming release, but we are including it for people who want to start working on the rendering of their studio logos. - Studio loading should be between 50-300ms faster ### BREAKING CHANGES This release includes a few breaking changes: #### Versioned client The `useClient()` hook now requires you to pass an API version, for instance: `useClient({apiVersion: '2022-09-14'})`. This allows us to upgrade the API version used throughout the studio without breaking any custom queries or other requests performed from user code. Similarily, the `client` property in various contexts (validation, config, initial value resolvers) is deprecated - instead there is a `getClient()` method attached to the context which takes the same API version configuration. #### Router imports Router imports have been moved from `sanity/_unstable` to `sanity`. ### 🐛 Notable bugfixes - Fixes an issue where the reference input would sometimes be stuck in an initial loading phase - Fixes an issue causing the tags layout not to work for string array inputs - Fixes an issue where the content inside of a portable text annotation popover would sometimes not be displayed - Fixes placement of custom markers in the portable text editor - Fixes an issue where closing an empty array item would not automatically remove the item - Fixes an issue where aliased schema types would get an extra layer of indentation in forms - Fixes a peer dependency issue in `@sanity/vision` potentially causing installs to fail - Fixes icons not being shown in certain structure panes - Fixes an issue where previews using values from a schema type with a preconfigured list of options would use the name instead of the title - Fixes an issue where fieldsets would not respect the `readOnly` property - Fixes an issue where after hot-module reloading had been applied, some schema properties would not be reflected on Webpack-based environments such as Next.js - Fixes an issue where the error screens would not be reset after a hot-module reload - Fixes a bug where an invalid/expired session might cause the authentication screen to continously fail ### 📓 Full changelog Author | Message | Commit \------------ | ------------- | ------------- Espen Hovlandsdal | fix(vision): temporarily remove sanity peer dep while in preview | [`0ba345f`](https://togithub.com/sanity-io/sanity/commit/0ba345fed) Herman Wikner | feat(validation): add array validation when using tags layout with list in options | [`443a734`](https://togithub.com/sanity-io/sanity/commit/443a734f3) Herman Wikner | feat(form): render `TagsArrayInput` before `OptionsArray` | [`260e050`](https://togithub.com/sanity-io/sanity/commit/260e0507e) Herman Wikner | fix(form): placement of custom markers in portable text editor | [`8f048ef`](https://togithub.com/sanity-io/sanity/commit/8f048efd4) Herman Wikner | fix(form): only enable focus of `ArrayItem` when the dialog is closed | [`632151a`](https://togithub.com/sanity-io/sanity/commit/632151adb) Cody Olsen | fix(server): allow URL imports ([#​3536](https://togithub.com/sanity-io/sanity/issues/3536)) | [`32f120f`](https://togithub.com/sanity-io/sanity/commit/32f120fbb) Marius Lundgård | build: fix package versions | [`06f93b9`](https://togithub.com/sanity-io/sanity/commit/06f93b926) Marius Lundgård | build: update design system | [`6c883de`](https://togithub.com/sanity-io/sanity/commit/6c883dee2) Marius Lundgård | build: add `jsonc-parser` dependency | [`cfc8ae8`](https://togithub.com/sanity-io/sanity/commit/cfc8ae8c1) Marius Lundgård | feat(pkg-utils): respect `target` of tsconfig file | [`5941e51`](https://togithub.com/sanity-io/sanity/commit/5941e5151) Marius Lundgård | build(portable-text-editor): set build `target` to `ES2019` | [`8b1e844`](https://togithub.com/sanity-io/sanity/commit/8b1e844af) Espen Hovlandsdal | fix(form): remove unnecessary placement prop for popover dialog | [`15316c1`](https://togithub.com/sanity-io/sanity/commit/15316c110) Espen Hovlandsdal | fix(next-studio): allow routing at any depth | [`aac001d`](https://togithub.com/sanity-io/sanity/commit/aac001d78) Espen Hovlandsdal | refactor(test-studio): pass whole schema type to group builder | [`2e19691`](https://togithub.com/sanity-io/sanity/commit/2e1969182) Espen Hovlandsdal | fix(desk): pass whole schema type to item and list builder | [`0700476`](https://togithub.com/sanity-io/sanity/commit/07004761a) Espen Hovlandsdal | test(form): update snapshot for `@sanity/ui` update | [`608803f`](https://togithub.com/sanity-io/sanity/commit/608803f2b) Marius Lundgård | build: update design system | [`206c188`](https://togithub.com/sanity-io/sanity/commit/206c1880d) Herman Wikner | fix(desk): update `getSchemaType` in `ListItemBuilder` | [`ad7d724`](https://togithub.com/sanity-io/sanity/commit/ad7d72440) Herman Wikner | chore(types): add `diff` to `components` in `BaseDefinitionOptions` and `BaseSchemaType` | [`9473981`](https://togithub.com/sanity-io/sanity/commit/947398103) Herman Wikner | feat(field): use `components.diff` instead of `diffComponent` in `resolveDiffComponent` | [`64a4d42`](https://togithub.com/sanity-io/sanity/commit/64a4d42c1) Espen Hovlandsdal | docs(vision): fix usage example in readme | [`5cd1700`](https://togithub.com/sanity-io/sanity/commit/5cd170096) Marius Lundgård | build: update `@sanity/tsdoc-to-portable-text` | [`b490d72`](https://togithub.com/sanity-io/sanity/commit/b490d7259) Marius Lundgård | build: define API extraction reporting settings | [`47bea8e`](https://togithub.com/sanity-io/sanity/commit/47bea8ed1) Marius Lundgård | build: update `etl` script | [`c95e2e6`](https://togithub.com/sanity-io/sanity/commit/c95e2e6de) Bjørge Næss | feat(form): introduce spreadable "elementProps" to reduce custom input boilerplate | [`ac60168`](https://togithub.com/sanity-io/sanity/commit/ac6016846) Espen Hovlandsdal | fix(config): include logo in resolved studio config | [`96d61b3`](https://togithub.com/sanity-io/sanity/commit/96d61b31e) Marius Lundgård | test(portable-text-editor): increase timeout | [`66b1766`](https://togithub.com/sanity-io/sanity/commit/66b176607) Marius Lundgård | build: update design system | [`cd2aa91`](https://togithub.com/sanity-io/sanity/commit/cd2aa9193) Marius Lundgård | fix(sanity): use correct icon in document list context menu | [`f0e18d1`](https://togithub.com/sanity-io/sanity/commit/f0e18d16d) Herman Wikner | fix(form): always return `SanityPreview` in `defaultResolvePreviewComponent` since `SanityPreview` takes care of resolving the preview component | [`88363f9`](https://togithub.com/sanity-io/sanity/commit/88363f9d7) Marius Lundgård | build: update design system | [`83bd89c`](https://togithub.com/sanity-io/sanity/commit/83bd89c57) Per-Kristian Nordnes | fix(form): fix issue where ref.input auto complete was disabled initially | [`949dba4`](https://togithub.com/sanity-io/sanity/commit/949dba48a) Per-Kristian Nordnes | fix(preview): string of options must return option value for preview, not the title | [`7bdfd29`](https://togithub.com/sanity-io/sanity/commit/7bdfd2923) Herman Wikner | fix(form): read only fieldsets | [`520535a`](https://togithub.com/sanity-io/sanity/commit/520535ab1) Marius Lundgård | build: remove `etl` exit code override | [`d49a27d`](https://togithub.com/sanity-io/sanity/commit/d49a27d0d) Marius Lundgård | build: update `etl` script | [`9feb8f3`](https://togithub.com/sanity-io/sanity/commit/9feb8f3a8) Marius Lundgård | build: update `etl` script | [`16d160f`](https://togithub.com/sanity-io/sanity/commit/16d160fa3) Per-Kristian Nordnes | chore: upgrade eslint and [@​sanity/ui-workshop](https://togithub.com/sanity/ui-workshop) to avoid peer legacy deps | [`f6a4c5b`](https://togithub.com/sanity-io/sanity/commit/f6a4c5b14) Bjørge Næss | refactor(form): hide 'parents' argument in immutableReconcile | [`5b9fdb9`](https://togithub.com/sanity-io/sanity/commit/5b9fdb972) Bjørge Næss | fix(types): make disableNew optional for reference types | [`6627358`](https://togithub.com/sanity-io/sanity/commit/66273587f) Marius Lundgård | chore(deps): update design system dependencies | [`8ae7663`](https://togithub.com/sanity-io/sanity/commit/8ae766397) Espen Hovlandsdal | fix(hooks): short-circuit invalid dates in `useTimeAgo` hook | [`3ff700e`](https://togithub.com/sanity-io/sanity/commit/3ff700e43) Espen Hovlandsdal | fix(form): handle number and boolean changes in `elementProps` ([#​3580](https://togithub.com/sanity-io/sanity/issues/3580)) | [`796227e`](https://togithub.com/sanity-io/sanity/commit/796227ec3) Espen Hovlandsdal | fix(datastores): memoize edit state in document store instance ([#​3565](https://togithub.com/sanity-io/sanity/issues/3565)) | [`1eab7ba`](https://togithub.com/sanity-io/sanity/commit/1eab7ba89) Espen Hovlandsdal | fix(studio): reset error boundaries on hot module reload | [`67a83cc`](https://togithub.com/sanity-io/sanity/commit/67a83cc3a) Bjørge Næss | fix(base): improve correctness of error check | [`58d8bce`](https://togithub.com/sanity-io/sanity/commit/58d8bce29) Espen Hovlandsdal | chore: upgrade dependencies | [`35d31f3`](https://togithub.com/sanity-io/sanity/commit/35d31f326) Espen Hovlandsdal | chore: fix typescript 4.8 typing issues | [`3778698`](https://togithub.com/sanity-io/sanity/commit/37786984e) Snorre Eskeland Brekke | chore(deps): downgraded [@​sanity/logos](https://togithub.com/sanity/logos) to 1.1.15 | [`506579a`](https://togithub.com/sanity-io/sanity/commit/506579ab3) Snorre Eskeland Brekke | feat: context available to initialValue function and added schema to validation context | [`deb115d`](https://togithub.com/sanity-io/sanity/commit/deb115da9) Marius Lundgård | chore(deps): update design system dependencies | [`cd97217`](https://togithub.com/sanity-io/sanity/commit/cd9721740) Espen Hovlandsdal | chore(deps): temporarily pin logos package to 1.1.5 | [`76262a0`](https://togithub.com/sanity-io/sanity/commit/76262a0f5) Per-Kristian Nordnes | fix(form): fix issue with popover content not displaying | [`673e81a`](https://togithub.com/sanity-io/sanity/commit/673e81a69) Espen Hovlandsdal | fix: move presence menu to leftmost position in navbar | [`d172946`](https://togithub.com/sanity-io/sanity/commit/d1729464d) Espen Hovlandsdal | feat(types): add missing `Geopoint` data type | [`3f34928`](https://togithub.com/sanity-io/sanity/commit/3f3492802) Snorre Eskeland Brekke | chore: removed some debug logging | [`35065be`](https://togithub.com/sanity-io/sanity/commit/35065be5a) Marius Lundgård | refactor(sanity): export router members from main export | [`8b8f3d6`](https://togithub.com/sanity-io/sanity/commit/8b8f3d642) Marius Lundgård | refactor(sanity): update router api and exports | [`bfedd3c`](https://togithub.com/sanity-io/sanity/commit/bfedd3ca8) Marius Lundgård | refactor(vision): update router imports | [`919aee5`](https://togithub.com/sanity-io/sanity/commit/919aee559) Marius Lundgård | refactor(test-studio): adjust router imports | [`a37093d`](https://togithub.com/sanity-io/sanity/commit/a37093def) Espen Hovlandsdal | refactor(datastores): optimize cors check, clear token on 401 | [`852cf86`](https://togithub.com/sanity-io/sanity/commit/852cf861e) Snorre Eskeland Brekke | feat: defineType second pass | [`66e5624`](https://togithub.com/sanity-io/sanity/commit/66e562428) Espen Hovlandsdal | fix(form): apply JSON syntax highlighting on unknown array item value | [`4560afd`](https://togithub.com/sanity-io/sanity/commit/4560afdb5) Espen Hovlandsdal | feat(cli): use define helpers for template schema types | [`69d8cae`](https://togithub.com/sanity-io/sanity/commit/69d8cae5d) Snorre Eskeland Brekke | fix: empty array items are deleted when edit modal is closed | [`77beb12`](https://togithub.com/sanity-io/sanity/commit/77beb1220) Snorre Eskeland Brekke | fix: corrected object level indentation for slug and alias types ([#​3638](https://togithub.com/sanity-io/sanity/issues/3638)) | [`90c2bb9`](https://togithub.com/sanity-io/sanity/commit/90c2bb96c) Snorre Eskeland Brekke | fix: dark-mode checkerboard for images | [`dc8a1c8`](https://togithub.com/sanity-io/sanity/commit/dc8a1c884) Espen Hovlandsdal | chore(deps): upgrade `@sanity/client` to 3.4.1 | [`58d7a73`](https://togithub.com/sanity-io/sanity/commit/58d7a7378) Espen Hovlandsdal | fix(datastores): disallow reconfiguration of source client | [`6889632`](https://togithub.com/sanity-io/sanity/commit/688963298) Espen Hovlandsdal | feat!: require api version when using client, freeze config | [`fd5065a`](https://togithub.com/sanity-io/sanity/commit/fd5065a75) Espen Hovlandsdal | chore: provide an API version where clients are used | [`880856a`](https://togithub.com/sanity-io/sanity/commit/880856a53) Espen Hovlandsdal | feat: temporarily provide backwards compatibility with versionless client | [`e102803`](https://togithub.com/sanity-io/sanity/commit/e1028038d) Espen Hovlandsdal | test: provide correct mocks for updated `getClient` implementation | [`5d55e65`](https://togithub.com/sanity-io/sanity/commit/5d55e65b8) Espen Hovlandsdal | chore(types): normalize react dependency version | [`4e449ea`](https://togithub.com/sanity-io/sanity/commit/4e449ea67)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate using a preset from Sanity. View repository job log here