next-sanity 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -60,8 +60,8 @@ const apiVersion = process.env.NEXT_PUBLIC_SANITY_API_VERSION // "2022-11-16"
|
|
|
60
60
|
const client = createClient({
|
|
61
61
|
projectId,
|
|
62
62
|
dataset,
|
|
63
|
-
apiVersion,
|
|
64
|
-
useCdn: typeof document !== 'undefined',
|
|
63
|
+
apiVersion, // https://www.sanity.io/docs/api-versioning
|
|
64
|
+
useCdn: typeof document !== 'undefined', // server-side is statically generated, the CDN is only necessary beneficial if queries are called on-demand
|
|
65
65
|
})
|
|
66
66
|
|
|
67
67
|
const data = await client.fetch(groq`*[]`)
|
|
@@ -428,6 +428,9 @@ export const usePreview = definePreview({
|
|
|
428
428
|
dataset,
|
|
429
429
|
documentLimit: 10000,
|
|
430
430
|
includeTypes: ['page', 'product', 'sanity.imageAsset'],
|
|
431
|
+
// If you have a lot of editors changing content at the same time it might help to increase this value
|
|
432
|
+
// to reduce the amount of rerenders React have to perform.
|
|
433
|
+
subscriptionThrottleMs: 300,
|
|
431
434
|
})
|
|
432
435
|
```
|
|
433
436
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-sanity",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Sanity.io toolkit for Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -100,8 +100,7 @@
|
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"@sanity/client": "^3.4.1",
|
|
103
|
-
"@sanity/
|
|
104
|
-
"@sanity/preview-kit": "^1.2.6",
|
|
103
|
+
"@sanity/preview-kit": "^1.2.8",
|
|
105
104
|
"groq": "^2.33.2"
|
|
106
105
|
},
|
|
107
106
|
"devDependencies": {
|
|
@@ -121,7 +120,7 @@
|
|
|
121
120
|
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
|
122
121
|
"autoprefixer": "^10.4.13",
|
|
123
122
|
"eslint": "^8.27.0",
|
|
124
|
-
"eslint-config-next": "13.0.
|
|
123
|
+
"eslint-config-next": "13.0.4",
|
|
125
124
|
"eslint-config-prettier": "^8.5.0",
|
|
126
125
|
"eslint-config-sanity": "^6.0.0",
|
|
127
126
|
"eslint-gitignore": "^0.1.0",
|
|
@@ -130,7 +129,7 @@
|
|
|
130
129
|
"groqd": "^0.0.4",
|
|
131
130
|
"jest": "^29.3.1",
|
|
132
131
|
"jest-environment-jsdom": "^29.3.1",
|
|
133
|
-
"next": "13.0.
|
|
132
|
+
"next": "13.0.4",
|
|
134
133
|
"postcss": "^8.4.19",
|
|
135
134
|
"prettier": "^2.7.1",
|
|
136
135
|
"prettier-plugin-packagejson": "^2.3.0",
|