@sanity/core-loader
Advanced tools
Comparing version 0.5.3-pink-lizard to 0.6.0-pink-lizard
# Changelog | ||
## [0.6.0-pink-lizard](https://github.com/sanity-io/visual-editing/compare/core-loader-v0.5.3-pink-lizard...core-loader-v0.6.0-pink-lizard) (2023-11-08) | ||
### Features | ||
* support SSR-only mode ([96d82f2](https://github.com/sanity-io/visual-editing/commit/96d82f2873d358353102181a10913d34949d645f)) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to v6.8.0-pink-lizard.8 ([#291](https://github.com/sanity-io/visual-editing/issues/291)) ([9623639](https://github.com/sanity-io/visual-editing/commit/9623639ac7c333ee7b13c253a61a7f9d4f9f599a)) | ||
### Dependencies | ||
* The following workspace dependencies were updated | ||
* dependencies | ||
* @sanity/groq-store bumped to 5.2.3-pink-lizard | ||
## [0.5.3-pink-lizard](https://github.com/sanity-io/visual-editing/compare/core-loader-v0.5.2-pink-lizard...core-loader-v0.5.3-pink-lizard) (2023-11-08) | ||
@@ -4,0 +23,0 @@ |
import cjs from './index.cjs'; | ||
export const createQueryStore = cjs.createQueryStore; | ||
export const runtime = cjs.runtime; | ||
@@ -20,3 +20,16 @@ import { Cache as Cache_2 } from 'async-cache-dedupe' | ||
export declare interface CreateQueryStoreOptions { | ||
client: SanityClient | SanityStegaClient | ||
/** | ||
* The Sanity client to use for fetching data, or `false` if `ssr: true` and it's set with `setServerClient` later | ||
* You may use any client that is an `instanceof SanityClient` or `instanceof SanityStegaClient`. | ||
* @example `import {createClient} from '@sanity/client'` | ||
* @example `import {createClient} from '@sanity/client/stega'` | ||
* @example `import {createClient} from '@sanity/preview-kit/client'` | ||
* @example `import {createClient} from 'next-sanity'` | ||
*/ | ||
client: SanityClient | SanityStegaClient | false | ||
/** | ||
* If you want all data fetching to be done server-side in production, set this to `true` and `client: false`. | ||
* Then, in your server entry file, you can set the Sanity client with `setServerClient`. | ||
*/ | ||
ssr?: boolean | ||
} | ||
@@ -39,2 +52,11 @@ | ||
/** | ||
* You may use any client that is an `instanceof SanityClient` or `instanceof SanityStegaClient`. | ||
* Required when `ssr: true`, optional otherwise. | ||
* @example `import {createClient} from '@sanity/client'` | ||
* @example `import {createClient} from '@sanity/client/stega'` | ||
* @example `import {createClient} from '@sanity/preview-kit/client'` | ||
* @example `import {createClient} from 'next-sanity'` | ||
*/ | ||
client?: SanityClient | SanityStegaClient | ||
/** | ||
* Fires when a connection is established to a parent Studio window. | ||
@@ -162,2 +184,7 @@ */ | ||
) => MapStore<QueryStoreState<Response, Error>> | ||
/** | ||
* When `ssr: true` you call this in your server entry point that imports the result of `createQueryStore` instance. | ||
* It's required to call it before any data fetching is done, and it can only be called once. | ||
*/ | ||
setServerClient: (client: SanityClient | SanityStegaClient) => void | ||
enableLiveMode: EnableLiveMode | ||
@@ -259,2 +286,5 @@ /** @internal */ | ||
/** @internal */ | ||
export declare const runtime: string | ||
/** @internal */ | ||
export declare type SetFetcher = (fetcher: Fetcher) => () => void | ||
@@ -261,0 +291,0 @@ |
import 'async-cache-dedupe'; | ||
export { createQueryStore } from './_chunks/index-ZKU3aUzI.js'; | ||
export { createQueryStore, runtime } from './_chunks/index-nK5gt4Si.js'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sanity/core-loader", | ||
"version": "0.5.3-pink-lizard", | ||
"version": "0.6.0-pink-lizard", | ||
"homepage": "https://github.com/sanity-io/visual-editing/tree/main/packages/core-loader#readme", | ||
@@ -100,6 +100,6 @@ "bugs": { | ||
"async-cache-dedupe": "2.0.0", | ||
"@sanity/groq-store": "5.2.2-pink-lizard" | ||
"@sanity/groq-store": "5.2.3-pink-lizard" | ||
}, | ||
"devDependencies": { | ||
"@sanity/client": "6.8.0-pink-lizard.7", | ||
"@sanity/client": "6.8.0-pink-lizard.8", | ||
"@sanity/pkg-utils": "^3.2.3", | ||
@@ -118,3 +118,3 @@ "@typescript-eslint/eslint-plugin": "^6.10.0", | ||
"peerDependencies": { | ||
"@sanity/client": "6.8.0-pink-lizard.7" | ||
"@sanity/client": "6.8.0-pink-lizard.8" | ||
}, | ||
@@ -121,0 +121,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
218464
1946
1
+ Added@sanity/client@6.8.0-pink-lizard.8(transitive)
+ Added@sanity/groq-store@5.2.3-pink-lizard(transitive)
- Removed@sanity/client@6.8.0-pink-lizard.7(transitive)
- Removed@sanity/groq-store@5.2.2-pink-lizard(transitive)