From a2c7657a22b8292a30bbb570f963776a08892891 Mon Sep 17 00:00:00 2001 From: Adishwar Rishi Date: Tue, 5 Dec 2023 19:16:55 +0530 Subject: [PATCH] (fix): Try fixing cloudflare worker type issue with kv plugin (#2105) --- .changeset/tough-pugs-fetch.md | 5 +++++ .../plugins/response-cache-cloudflare-kv/package.json | 7 ++++++- pnpm-lock.yaml | 11 +++++++---- 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 .changeset/tough-pugs-fetch.md diff --git a/.changeset/tough-pugs-fetch.md b/.changeset/tough-pugs-fetch.md new file mode 100644 index 0000000000000..cd8d25f6c6e1d --- /dev/null +++ b/.changeset/tough-pugs-fetch.md @@ -0,0 +1,5 @@ +--- +'@envelop/response-cache-cloudflare-kv': minor +--- + +Change @cloudflare/workers-types to an optional peer dependency of the package diff --git a/packages/plugins/response-cache-cloudflare-kv/package.json b/packages/plugins/response-cache-cloudflare-kv/package.json index 515d88cf369b3..ebf643a25718d 100644 --- a/packages/plugins/response-cache-cloudflare-kv/package.json +++ b/packages/plugins/response-cache-cloudflare-kv/package.json @@ -50,14 +50,19 @@ }, "typings": "dist/typings/index.d.ts", "peerDependencies": { + "@cloudflare/workers-types": "^4.20231121.0", "@envelop/response-cache": "^6.1.1", "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" }, + "peerDependenciesMeta": { + "@cloudflare/workers-types": { + "optional": true + } + }, "dependencies": { "tslib": "^2.6.2" }, "devDependencies": { - "@cloudflare/workers-types": "^4.20231025.0", "@envelop/response-cache": "^6.1.1", "jest-environment-miniflare": "^2.14.1", "ts-jest": "29.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eaf158e829d05..84ff6f43a6e62 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1392,6 +1392,9 @@ importers: packages/plugins/response-cache-cloudflare-kv: dependencies: + '@cloudflare/workers-types': + specifier: ^4.20231121.0 + version: 4.20231121.0 graphql: specifier: 16.6.0 version: 16.6.0 @@ -1399,9 +1402,6 @@ importers: specifier: ^2.6.2 version: 2.6.2 devDependencies: - '@cloudflare/workers-types': - specifier: ^4.20231025.0 - version: 4.20231025.0 '@envelop/response-cache': specifier: ^6.1.1 version: link:../response-cache/dist @@ -4287,6 +4287,9 @@ packages: resolution: {integrity: sha512-TkcZkntUTOcvJ4vgmwpNfLTclpMbmbClZCe62B25/VTukmyv91joRa4eKzSjzCZUXTbFHNmVdOpmGaaJU2U3+A==} dev: true + /@cloudflare/workers-types@4.20231121.0: + resolution: {integrity: sha512-+kWfpCkqiepwAKXyHoE0gnkPgkLhz0/9HOBIGhHRsUvUKvhUtm3mbqqoGRWgF1qcjzrDUBbrrOq4MYHfFtc2RA==} + /@colors/colors@1.5.0: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} @@ -5551,7 +5554,7 @@ packages: resolution: {integrity: sha512-hfactEWiHuHOmE29XFG8oLNCF6+HqjD6Mb80CzidcVmLlBTEtSC3PEF+DXPyvNdLXpBolZMKOuC/yzzloWvACA==} engines: {node: '>=16.13'} dependencies: - '@cloudflare/workers-types': 4.20231025.0 + '@cloudflare/workers-types': 4.20231121.0 '@miniflare/cache': 2.14.1 '@miniflare/core': 2.14.1 '@miniflare/d1': 2.14.1