@sanity/core-loader
Advanced tools
Comparing version 0.6.0-pink-lizard to 0.7.0-pink-lizard
# Changelog | ||
## [0.7.0-pink-lizard](https://github.com/sanity-io/visual-editing/compare/core-loader-v0.6.0-pink-lizard...core-loader-v0.7.0-pink-lizard) (2023-11-08) | ||
### ⚠ BREAKING CHANGES | ||
* `initialData` and `initialSourceMap` are now grouped by `initial` | ||
### Bug Fixes | ||
* `initialData` and `initialSourceMap` are now grouped by `initial` ([30f8cfd](https://github.com/sanity-io/visual-editing/commit/30f8cfdf284c940e5589820e1c72b5c50da17cbd)) | ||
* **deps:** update dependency @sanity/client to v6.8.0-pink-lizard.9 ([#295](https://github.com/sanity-io/visual-editing/issues/295)) ([6335f36](https://github.com/sanity-io/visual-editing/commit/6335f36c0c5324499ccbd42256e3a5d317e3a709)) | ||
### Dependencies | ||
* The following workspace dependencies were updated | ||
* dependencies | ||
* @sanity/groq-store bumped to 5.2.4-pink-lizard | ||
## [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) | ||
@@ -4,0 +23,0 @@ |
@@ -71,12 +71,14 @@ import { Cache as Cache_2 } from 'async-cache-dedupe' | ||
export declare interface Fetcher { | ||
hydrate: <Response, Error>( | ||
hydrate: <QueryResponseResult, QueryResponseError>( | ||
query: string, | ||
params: QueryParams, | ||
initialData?: Response, | ||
initialSourceMap?: ContentSourceMap, | ||
) => QueryStoreState<Response, Error> | ||
fetch: <Response, Error>( | ||
initial?: Pick< | ||
QueryStoreState<QueryResponseResult, QueryResponseError>, | ||
'data' | 'sourceMap' | ||
>, | ||
) => QueryStoreState<QueryResponseResult, QueryResponseError> | ||
fetch: <QueryResponseResult, QueryResponseError>( | ||
query: string, | ||
params: QueryParams, | ||
$fetch: MapStore<QueryStoreState<Response, Error>>, | ||
$fetch: MapStore<QueryStoreState<QueryResponseResult, QueryResponseError>>, | ||
controller: AbortController, | ||
@@ -177,8 +179,17 @@ ) => void | ||
export declare interface QueryStore { | ||
createFetcherStore: <Response = unknown, Error = unknown>( | ||
createFetcherStore: < | ||
QueryResponseResult = unknown, | ||
QueryResponseError = unknown, | ||
>( | ||
query: string, | ||
params?: QueryParams, | ||
initialData?: Response, | ||
initialSourceMap?: ContentSourceMap, | ||
) => MapStore<QueryStoreState<Response, Error>> | ||
/** | ||
* Initial `data` and `sourceMap`, used with SSR hydration and is required if `ssr: true` | ||
* and an optional speed optimization if `ssr: false` | ||
*/ | ||
initial?: { | ||
data: QueryResponseResult | ||
sourceMap: ContentSourceMap | undefined | ||
}, | ||
) => MapStore<QueryStoreState<QueryResponseResult, QueryResponseError>> | ||
/** | ||
@@ -192,4 +203,4 @@ * When `ssr: true` you call this in your server entry point that imports the result of `createQueryStore` instance. | ||
unstable__cache: Cache_2 & { | ||
fetch: <Response>(key: string) => Promise<{ | ||
result: Response | ||
fetch: <QueryResponseResult>(key: string) => Promise<{ | ||
result: QueryResponseResult | ||
resultSourceMap: ContentSourceMap | undefined | ||
@@ -201,6 +212,9 @@ }> | ||
/** @public */ | ||
export declare interface QueryStoreState<Response, Error> { | ||
export declare interface QueryStoreState< | ||
QueryResponseResult, | ||
QueryResponseError, | ||
> { | ||
loading: boolean | ||
error: Error | undefined | ||
data: Response | undefined | ||
error: QueryResponseError | undefined | ||
data: QueryResponseResult | undefined | ||
sourceMap: ContentSourceMap | undefined | ||
@@ -207,0 +221,0 @@ } |
import 'async-cache-dedupe'; | ||
export { createQueryStore, runtime } from './_chunks/index-nK5gt4Si.js'; | ||
export { createQueryStore, runtime } from './_chunks/index-sqGaJ-ul.js'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sanity/core-loader", | ||
"version": "0.6.0-pink-lizard", | ||
"version": "0.7.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.3-pink-lizard" | ||
"@sanity/groq-store": "5.2.4-pink-lizard" | ||
}, | ||
"devDependencies": { | ||
"@sanity/client": "6.8.0-pink-lizard.8", | ||
"@sanity/client": "6.8.0-pink-lizard.9", | ||
"@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.8" | ||
"@sanity/client": "6.8.0-pink-lizard.9" | ||
}, | ||
@@ -121,0 +121,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
220381
1960
+ Added@sanity/client@6.8.0-pink-lizard.9(transitive)
+ Added@sanity/groq-store@5.2.4-pink-lizard(transitive)
- Removed@sanity/client@6.8.0-pink-lizard.8(transitive)
- Removed@sanity/groq-store@5.2.3-pink-lizard(transitive)