diff --git a/.changeset/sour-schools-ring.md b/.changeset/sour-schools-ring.md new file mode 100644 index 0000000000000..efdc9aa4a98c0 --- /dev/null +++ b/.changeset/sour-schools-ring.md @@ -0,0 +1,5 @@ +--- +'@graphql-mesh/utils': patch +--- + +Revert tiny-lru to fix browser bundle compatibility diff --git a/packages/utils/package.json b/packages/utils/package.json index 6fbbc3bca6b5b..c291ea7a26374 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -43,7 +43,7 @@ "lodash.set": "4.3.2", "lodash.topath": "4.5.2", "js-yaml": "4.1.0", - "tiny-lru": "9.0.2", + "tiny-lru": "8.0.2", "tslib": "^2.4.0" }, "publishConfig": { diff --git a/packages/utils/src/global-lru-cache.ts b/packages/utils/src/global-lru-cache.ts index 600e494bc9e44..fcdda11c77931 100644 --- a/packages/utils/src/global-lru-cache.ts +++ b/packages/utils/src/global-lru-cache.ts @@ -1,6 +1,6 @@ -import { lru, LRU } from 'tiny-lru'; +import lru, { Lru } from 'tiny-lru'; -export type LRUCache = LRU; +export type LRUCache = Lru; export function createLruCache(max?: number, ttl?: number): LRUCache { return lru(max, ttl); diff --git a/yarn.lock b/yarn.lock index 7f98b8782aabc..26458b7ee14a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18968,16 +18968,16 @@ tiny-glob@^0.2.9: globalyzer "0.1.0" globrex "^0.1.2" +tiny-lru@8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/tiny-lru/-/tiny-lru-8.0.2.tgz#812fccbe6e622ded552e3ff8a4c3b5ff34a85e4c" + integrity sha512-ApGvZ6vVvTNdsmt676grvCkUCGwzG9IqXma5Z07xJgiC5L7akUMof5U8G2JTI9Rz/ovtVhJBlY6mNhEvtjzOIg== + tiny-lru@9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/tiny-lru/-/tiny-lru-9.0.0.tgz#c8c3875880011c0248a397d4194c38b6394eb412" integrity sha512-KbkzkMrQ5ilYe9vk4BSCuY0k5/a+nYRm2m21vpbHi7RDJVhZHO43ZqzqbHyg9NB260lbjR3GiVQex9ib2s2E4A== -tiny-lru@9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/tiny-lru/-/tiny-lru-9.0.2.tgz#6714626d1961831da99472eb9f6d26b3ff999c39" - integrity sha512-SZwDlvflOPYiImKv2Rh/1uccO+r5JsEexLU1szFsVudzk17Sj250xl75/X3aY4vINS1ZulnCPqcndvW9R0y7Yg== - tiny-warning@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754"