@sanity/groq-store
Advanced tools
Comparing version 5.0.1-pink-lizard to 5.0.2-experimental
133
CHANGELOG.md
# Changelog | ||
## [5.0.2-experimental](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.0.1-experimental...groq-store-v5.0.2-experimental) (2023-11-29) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to ^6.9.0 ([#434](https://github.com/sanity-io/visual-editing/issues/434)) ([c7c8ec5](https://github.com/sanity-io/visual-editing/commit/c7c8ec59e6503060eb60800bac4a494e39c1595c)) | ||
* **deps:** update dependency @sanity/client to ^6.9.1 ([#437](https://github.com/sanity-io/visual-editing/issues/437)) ([6974b0d](https://github.com/sanity-io/visual-editing/commit/6974b0d6fabd9911af40f6a1de645473b47df19d)) | ||
## [5.0.1-experimental](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.0.0-experimental...groq-store-v5.0.1-experimental) (2023-11-16) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to ^6.8.6 ([#374](https://github.com/sanity-io/visual-editing/issues/374)) ([f62967a](https://github.com/sanity-io/visual-editing/commit/f62967a2068844b358357c7c2254cd1d9228ba6d)) | ||
## [5.0.0-experimental](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.2.9-pink-lizard...groq-store-v5.0.0-experimental) (2023-11-15) | ||
### Features | ||
* production ready release ([#246](https://github.com/sanity-io/visual-editing/issues/246)) ([993c3cc](https://github.com/sanity-io/visual-editing/commit/993c3cc621921971087053950a1dc88fd9e34762)) | ||
## [5.2.9-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.2.8-pink-lizard...groq-store-v5.2.9-pink-lizard) (2023-11-13) | ||
### Bug Fixes | ||
* **deps:** Update dependency @sanity/client to ^6.8.2 ([#356](https://github.com/sanity-io/visual-editing/issues/356)) ([b80dfa5](https://github.com/sanity-io/visual-editing/commit/b80dfa519c9790efdfdc0590ad7eb3f56998ea01)) | ||
* **deps:** Update dependency @sanity/client to ^6.8.4 ([5dbbe06](https://github.com/sanity-io/visual-editing/commit/5dbbe062ac1dd71a251e70d15caa1c5d53a505f6)) | ||
* **deps:** Update dependency @sanity/client to ^6.8.5 ([#361](https://github.com/sanity-io/visual-editing/issues/361)) ([e8e61c1](https://github.com/sanity-io/visual-editing/commit/e8e61c1a377b2737db60a1c3e42160794b26ad9b)) | ||
## [5.2.8-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.2.7-pink-lizard...groq-store-v5.2.8-pink-lizard) (2023-11-13) | ||
### Bug Fixes | ||
* **deps:** Update dependency @sanity/client to ^6.8.1 ([#351](https://github.com/sanity-io/visual-editing/issues/351)) ([6efe86f](https://github.com/sanity-io/visual-editing/commit/6efe86f7589ae8e0b2e64e1c5b6c439b5ec5292d)) | ||
## [5.2.7-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.2.6-pink-lizard...groq-store-v5.2.7-pink-lizard) (2023-11-10) | ||
### Bug Fixes | ||
* **deps:** update dependency `@sanity/client` to ^6.8.0 ([4e11e0c](https://github.com/sanity-io/visual-editing/commit/4e11e0c1efd01e889c269d6a270b7c761b776fc0)) | ||
## [5.2.6-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.2.5-pink-lizard...groq-store-v5.2.6-pink-lizard) (2023-11-08) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to v6.8.0-pink-lizard.12 ([#301](https://github.com/sanity-io/visual-editing/issues/301)) ([c939d32](https://github.com/sanity-io/visual-editing/commit/c939d323065a0f9c287174befbb84b0d1dfeb2e6)) | ||
## [5.2.5-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.2.4-pink-lizard...groq-store-v5.2.5-pink-lizard) (2023-11-08) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to v6.8.0-pink-lizard.12 ([#298](https://github.com/sanity-io/visual-editing/issues/298)) ([4bfbfff](https://github.com/sanity-io/visual-editing/commit/4bfbfffb8fab9e3440fb525babd2df0120fc4900)) | ||
## [5.2.4-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.2.3-pink-lizard...groq-store-v5.2.4-pink-lizard) (2023-11-08) | ||
### Bug Fixes | ||
* **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)) | ||
## [5.2.3-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.2.2-pink-lizard...groq-store-v5.2.3-pink-lizard) (2023-11-08) | ||
### 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)) | ||
## [5.2.2-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.2.1-pink-lizard...groq-store-v5.2.2-pink-lizard) (2023-11-08) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to v6.8.0-pink-lizard.7 ([#288](https://github.com/sanity-io/visual-editing/issues/288)) ([7d63682](https://github.com/sanity-io/visual-editing/commit/7d63682b533495e75cdcef446e818e10b742329b)) | ||
## [5.2.1-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.2.0-pink-lizard...groq-store-v5.2.1-pink-lizard) (2023-11-08) | ||
### Bug Fixes | ||
* **deps:** update dependency `@sanity/client` to v6.8.0-pink-lizard.5 ([c88e4ec](https://github.com/sanity-io/visual-editing/commit/c88e4ec3a12c4dd3d5bac5c3e9c39a52fc698603)) | ||
## [5.2.0-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.1.3-pink-lizard...groq-store-v5.2.0-pink-lizard) (2023-11-08) | ||
### ⚠ BREAKING CHANGES | ||
* lazy load live mode ([#281](https://github.com/sanity-io/visual-editing/issues/281)) | ||
### Bug Fixes | ||
* lazy load live mode ([#281](https://github.com/sanity-io/visual-editing/issues/281)) ([e52991c](https://github.com/sanity-io/visual-editing/commit/e52991cc974df76647c4ede51de16527c14e6c10)) | ||
## [5.1.3-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.1.2-pink-lizard...groq-store-v5.1.3-pink-lizard) (2023-11-07) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to v6.8.0-pink-lizard.4 ([#278](https://github.com/sanity-io/visual-editing/issues/278)) ([f9a64c4](https://github.com/sanity-io/visual-editing/commit/f9a64c4f245da1f7beb3052fb205f422ec94221e)) | ||
## [5.1.2-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.1.1-pink-lizard...groq-store-v5.1.2-pink-lizard) (2023-11-07) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to v6.8.0-pink-lizard.3 ([#267](https://github.com/sanity-io/visual-editing/issues/267)) ([432f47b](https://github.com/sanity-io/visual-editing/commit/432f47bdd742cc863bbeb257325690b0f2063022)) | ||
## [5.1.1-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.1.0-pink-lizard...groq-store-v5.1.1-pink-lizard) (2023-11-05) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to v6.8.0-pink-lizard.0 ([#264](https://github.com/sanity-io/visual-editing/issues/264)) ([010b87a](https://github.com/sanity-io/visual-editing/commit/010b87a5afbc3619a3406db405299522456854a2)) | ||
## [5.1.0-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.0.1-pink-lizard...groq-store-v5.1.0-pink-lizard) (2023-11-04) | ||
### Features | ||
* use the new `@sanity/client/stega` features ([#252](https://github.com/sanity-io/visual-editing/issues/252)) ([fa08bb2](https://github.com/sanity-io/visual-editing/commit/fa08bb24e6413bfa49adb79df256217e06ed0844)) | ||
### Bug Fixes | ||
* **deps:** update dependency @sanity/client to v6.7.1-pink-lizard.2 ([#251](https://github.com/sanity-io/visual-editing/issues/251)) ([9f66693](https://github.com/sanity-io/visual-editing/commit/9f66693bd2e954f54987e9352f35f3fccab3ad6f)) | ||
* **deps:** update dependency @sanity/client to v6.7.1-pink-lizard.5 ([#259](https://github.com/sanity-io/visual-editing/issues/259)) ([8f2f00f](https://github.com/sanity-io/visual-editing/commit/8f2f00faef5a91dd11218b05be4c76da2ec45e0e)) | ||
* handle stega nodes in a way that supports focus ([#254](https://github.com/sanity-io/visual-editing/issues/254)) ([dce801f](https://github.com/sanity-io/visual-editing/commit/dce801f3b76e6e2bb0597345b5deacc2038e6fec)) | ||
## [5.0.1-pink-lizard](https://github.com/sanity-io/visual-editing/compare/groq-store-v5.0.0-pink-lizard...groq-store-v5.0.1-pink-lizard) (2023-11-02) | ||
@@ -4,0 +137,0 @@ |
@@ -66,2 +66,5 @@ import type { ClientPerspective } from '@sanity/client' | ||
/** | ||
* @alpha | ||
*/ | ||
export declare function unstable__getDocumentCacheKey( | ||
@@ -68,0 +71,0 @@ config: ClientConfigLike, |
@@ -1,31 +0,1 @@ | ||
import LRUCache from 'mnemonist/lru-cache'; | ||
const unstable__documentsCache = new LRUCache(1024); | ||
function unstable__getDocumentCacheKey(config, document) { | ||
const { | ||
projectId, | ||
dataset, | ||
perspective | ||
} = config; | ||
const { | ||
_id | ||
} = document; | ||
if (![projectId, dataset, perspective, _id].every(input => typeof input === "string" && input.length > 0)) { | ||
throw new Error("Invalid document cache key, all inputs must be non-empty strings", { | ||
cause: { | ||
config, | ||
document | ||
} | ||
}); | ||
} | ||
if (perspective !== "published" && perspective !== "previewDrafts") { | ||
throw new Error('Invalid document cache key, perspective must be "published" or "previewDrafts"', { | ||
cause: { | ||
config, | ||
document | ||
} | ||
}); | ||
} | ||
return `${projectId}-${dataset}-${perspective}-${_id}`; | ||
} | ||
export { unstable__documentsCache, unstable__getDocumentCacheKey }; | ||
//# sourceMappingURL=index.js.map | ||
import e from"mnemonist/lru-cache";const t=new e(1024);function r(e,t){const{projectId:r,dataset:n,perspective:o}=e,{_id:c}=t;if(![r,n,o,c].every((e=>"string"==typeof e&&e.length>0)))throw new Error("Invalid document cache key, all inputs must be non-empty strings",{cause:{config:e,document:t}});if("published"!==o&&"previewDrafts"!==o)throw new Error('Invalid document cache key, perspective must be "published" or "previewDrafts"',{cause:{config:e,document:t}});return`${r}-${n}-${o}-${c}`}export{t as unstable__documentsCache,r as unstable__getDocumentCacheKey};//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sanity/groq-store", | ||
"version": "5.0.1-pink-lizard", | ||
"version": "5.0.2-experimental", | ||
"homepage": "https://github.com/sanity-io/visual-editing/tree/main/packages/groq-store#readme", | ||
@@ -102,11 +102,11 @@ "bugs": { | ||
"devDependencies": { | ||
"@sanity/client": "6.7.1-pink-lizard.0", | ||
"@sanity/pkg-utils": "^3.2.2", | ||
"@typescript-eslint/eslint-plugin": "^6.9.1", | ||
"@typescript-eslint/parser": "^6.9.1", | ||
"eslint": "^8.52.0", | ||
"@sanity/client": "^6.9.1", | ||
"@sanity/pkg-utils": "^3.2.5", | ||
"@typescript-eslint/eslint-plugin": "^6.13.1", | ||
"@typescript-eslint/parser": "^6.13.1", | ||
"eslint": "^8.54.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"typescript": "^5.2.2", | ||
"typescript": "^5.3.2", | ||
"channels": "0.0.0", | ||
@@ -116,3 +116,3 @@ "visual-editing-helpers": "0.0.0" | ||
"peerDependencies": { | ||
"@sanity/client": "6.7.1-pink-lizard.0" | ||
"@sanity/client": "^6.9.1" | ||
}, | ||
@@ -124,3 +124,3 @@ "engines": { | ||
"access": "public", | ||
"tag": "pink-lizard" | ||
"tag": "experimental" | ||
}, | ||
@@ -127,0 +127,0 @@ "scripts": { |
# @sanity/groq-store | ||
[](https://npm-stat.com/charts.html?package=@sanity/groq-store) | ||
[](https://www.npmjs.com/package/@sanity/groq-store) | ||
[](https://www.npmjs.com/package/@sanity/groq-store) | ||
[![gzip size][gzip-badge]][bundlephobia] | ||
@@ -20,4 +20,4 @@ [![size][size-badge]][bundlephobia] | ||
[gzip-badge]: https://img.shields.io/bundlephobia/minzip/@sanity/groq-store@pink-lizard?label=gzip%20size&style=flat-square | ||
[size-badge]: https://img.shields.io/bundlephobia/min/@sanity/groq-store@pink-lizard?label=size&style=flat-square | ||
[bundlephobia]: https://bundlephobia.com/package/@sanity/groq-store@pink-lizard | ||
[gzip-badge]: https://img.shields.io/bundlephobia/minzip/@sanity/groq-store@experimental?label=gzip%20size&style=flat-square | ||
[size-badge]: https://img.shields.io/bundlephobia/min/@sanity/groq-store@experimental?label=size&style=flat-square | ||
[bundlephobia]: https://bundlephobia.com/package/@sanity/groq-store@experimental |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
40326
71
3