Skip to content

Commit 4f9588a

Browse files
committed
fix(deps): dev-preview.21
1 parent 8489ec0 commit 4f9588a

File tree

8 files changed

+900
-218
lines changed

8 files changed

+900
-218
lines changed

.eslintignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ coverage
44
lib
55
lint-staged.config.js
66
node_modules
7-
8-
.parcel-cache
7+
.parcel-cache
8+
v2-incompatible.js

package-lock.json

+857-202
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+11-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
],
2020
"files": [
2121
"src",
22-
"lib"
22+
"lib",
23+
"v2-incompatible.js",
24+
"sanity.json"
2325
],
2426
"source": "./src/index.ts",
2527
"exports": {
@@ -49,6 +51,7 @@
4951
"dependencies": {
5052
"@hookform/resolvers": "2.0.0-beta.3",
5153
"@reduxjs/toolkit": "^1.8.1",
54+
"@sanity/incompatible-plugin": "^1.0.4",
5255
"@sanity/ui": "^0.38.0",
5356
"@tanem/react-nprogress": "^5.0.0",
5457
"copy-to-clipboard": "^3.3.1",
@@ -81,8 +84,8 @@
8184
"@sanity/semantic-release-preset": "^2.0.1",
8285
"@types/is-hotkey": "^0.1.7",
8386
"@types/pluralize": "^0.0.29",
84-
"@types/react": "^17.0.0",
85-
"@types/react-dom": "^17.0.0",
87+
"@types/react": "^18.0.0",
88+
"@types/react-dom": "^18.0.0",
8689
"@types/react-file-icon": "^1.0.1",
8790
"@types/react-redux": "^7.1.24",
8891
"@types/styled-components": "^5.1.7",
@@ -99,19 +102,19 @@
99102
"lint-staged": "^13.0.3",
100103
"parcel": "^2.7.0",
101104
"prettier": "^2.7.1",
102-
"react": "^17.0.2",
103-
"react-dom": "^17.0.2",
105+
"react": "^18.0.0",
106+
"react-dom": "^18.0.0",
104107
"rimraf": "^3.0.2",
105-
"sanity": "3.0.0-dev-preview.20",
108+
"sanity": "3.0.0-dev-preview.21",
106109
"standard-version": "^9.5.0",
107110
"styled-components": "^5.3.3",
108111
"typescript": "4.7.3"
109112
},
110113
"peerDependencies": {
111114
"@sanity/color": "^2.1.8",
112115
"@sanity/icons": "^1.2.8",
113-
"react": "^17.0.0 || ^18.0.0",
114-
"react-dom": "^17.0.0 || ^18.0.0",
116+
"react": "^18.0.0",
117+
"react-dom": "^18.0.0",
115118
"sanity": "dev-preview",
116119
"styled-components": "^5.3.3"
117120
},

sanity.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"parts": [
3+
{
4+
"implements": "part:@sanity/base/sanity-root",
5+
"path": "./v2-incompatible.js"
6+
}
7+
]
8+
}

src/components/DocumentList/index.tsx

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import type {SanityDocument} from '@sanity/client'
22
import {Box, Button, Card, Stack, Text} from '@sanity/ui'
33
import React from 'react'
4-
import {SchemaType, useIntentLink, useSchema} from 'sanity'
5-
import {SanityPreview, useDocumentStore, WithReferringDocuments} from 'sanity/_unstable'
4+
import {
5+
SanityPreview,
6+
SchemaType,
7+
useDocumentStore,
8+
useSchema,
9+
WithReferringDocuments
10+
} from 'sanity'
11+
import {useIntentLink} from 'sanity/router'
612

713
type Props = {
814
assetId: string

src/components/FormBuilderTool/index.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {Box, Portal, PortalProvider, useLayer} from '@sanity/ui'
22
import React, {SyntheticEvent, useEffect, useState} from 'react'
3-
import type {AssetSourceComponentProps, SanityDocument} from 'sanity'
4-
import {useFormValue} from 'sanity/form'
3+
import {AssetSourceComponentProps, SanityDocument, useFormValue} from 'sanity'
54
import useKeyPress from '../../hooks/useKeyPress'
65
import Browser from '../Browser'
76

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"inlineSourceMap": false,
1212
"isolatedModules": true,
1313
"jsx": "preserve",
14-
"lib": ["dom", "dom.iterable", "es5"],
14+
"lib": ["dom", "es2015", "es2016", "es2017", "es2021"],
1515
"module": "esnext",
1616
"moduleResolution": "node",
1717
"noImplicitAny": true,
@@ -27,5 +27,5 @@
2727
"strict": true,
2828
"target": "esnext"
2929
},
30-
"include": [".d.ts", "./src/**/*", "node_modules/microbundle/index.d.ts"]
30+
"include": [".d.ts", "./src/**/*"]
3131
}

v2-incompatible.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const {showIncompatiblePluginDialog} = require('@sanity/incompatible-plugin')
2+
const {name, version} = require('./package.json')
3+
4+
export default showIncompatiblePluginDialog({
5+
name: name,
6+
versions: {
7+
v3: version,
8+
v2: '^1.4.13'
9+
},
10+
sanityExchangeUrl: 'https://www.sanity.io/plugins/sanity-plugin-media'
11+
})

0 commit comments

Comments
 (0)