n1ru4l / envelop

Envelop is a lightweight library allowing developers to easily develop, share, collaborate and extend their GraphQL execution layer. Envelop is the missing GraphQL plugin system.
https://envelop.dev
MIT License
785 stars 127 forks source link

Pin to the latest compatibility date for Cloudflare workers #2237

Open AdiRishi opened 4 months ago

AdiRishi commented 4 months ago

This change applies to the kv-response-cache plugin

Description

The @cloudflare/worker-types package has multiple versions of its types that are pinned to different compatibility dates. The When you create a new cloudflare project using their CLI, they now default to the latest date whcih is 2023-07-01.

This PR updates the imports for the kv response cache plugin to use the name compatibility dates as the default for new projects, this should incraese compatibility for users.

For issue #2104

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Testing this is a bit challenging. The types are correct locally, the hope is that when this package is imported there will be fewer conflicts with types.

Checklist:

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: e5e197cf187a11649e31ba5f28f1cc6a29cf2e72

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------------------------------- | ----- | | @envelop/response-cache-cloudflare-kv | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

EmrysMyrddin commented 4 months ago

Great ! Thank you for the PR! Does this fix all the types issues we had ?

EmrysMyrddin commented 4 months ago

@AdiRishi We also have another PR (#2238) which should even remove the necessity to have a type matching on user land. This PR doesn't take any CFW types anymore and takes the namespace name as string instead. Which both simplify the usage and should fix the type issue :-)

But I still think we should pin the typing anyway