Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feature Request [getBindingsProxy]: getBindingsProxy should expose a cf object #4875

Closed
dario-piotrowicz opened this issue Jan 30, 2024 · 4 comments 路 Fixed by #4926
Closed
Labels
enhancement New feature or request

Comments

@dario-piotrowicz
Copy link
Member

dario-piotrowicz commented Jan 30, 2024

In the getBindingsProxy return object we should include a cf object that developers can use to mock the real production thing.

It should reuse the same functionality Miniflare already implements: https://github.com/cloudflare/workers-sdk/blob/6a4cb8c6456f1dba95cae2b8bbe658f7227349f8/packages/miniflare/src/cf.ts

For that we either:

I did think that the former could be better (since it doesn't force the caller to be tied to the Miniflare instance), but I changed my mind and actually think that the latter could be better (since we already do have a Miniflare instance and get the cf from it... also other Miniflare users could make use of such additional field/method)

(In any case either should do)

@houmark
Copy link

houmark commented Feb 3, 2024

Hey guys! Any timeline on this one?

@dario-piotrowicz
Copy link
Member Author

Hi @houmark, this should make it into one of the stable releases next week (I would be very very surprised if it doesn't) 馃檪

For it we just need to merge: #4905 and then simply expose the cf in getBindingsProxy 馃檪

@houmark
Copy link

houmark commented Feb 3, 2024

Brilliant! Thanks so much!

@dario-piotrowicz
Copy link
Member Author

No problem 馃檪馃憤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants