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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Cloudflare Workers and Bun #3

Merged
merged 11 commits into from
Nov 21, 2024
Merged

Add support for Cloudflare Workers and Bun #3

merged 11 commits into from
Nov 21, 2024

Conversation

adams85
Copy link
Collaborator

@adams85 adams85 commented Nov 14, 2024

Describe the purpose of your pull request

Adds experimental support for Cloudflare Workers and Bun.

Breaking changes:

  • Remove proxy from common client options (IOptions) and make it available on the Node platform only. (Very low impact expected as proxy hasn't been supported on any other platform than Node so far.)

Requirement checklist (only if applicable)

  • I have covered the applied changes with automated tests.
  • I have executed the full automated test set against my changes.
  • I have validated my changes against all supported platform versions.
  • I have read and accepted the contribution agreement.

@adams85 adams85 changed the base branch from master to minor-corrections November 14, 2024 20:27
@adams85 adams85 marked this pull request as draft November 14, 2024 20:28
@adams85 adams85 force-pushed the cfworker branch 2 times, most recently from 02657a1 to 8e0973f Compare November 15, 2024 08:51
@adams85 adams85 changed the title Add support for Cloudflare Workers Add support for Cloudflare Workers and Bun Nov 15, 2024
@adams85 adams85 force-pushed the cfworker branch 5 times, most recently from 803d234 to 8d7a351 Compare November 15, 2024 17:32
@adams85 adams85 marked this pull request as ready for review November 18, 2024 13:57
README.md Outdated
replace the old package with the new and adjust the import specifiers (as shown [here](#1-install-and-import-package)).

> [!CAUTION]
> Please note that the SDK is still under development and is currently in beta phase. You use it at your own risk.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "You use it at your own risk." part maybe not necessary, it sounds a bit harsh to me.

Copy link
Collaborator Author

@adams85 adams85 Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this disclaimer is needed here until we go GA. It should be "Use it at your own risk." though. With "you" it's harsh indeed. :)

async fetch(request, env, ctx): Promise<Response> {
// Creating the ConfigCat client instance using the SDK Key
const client = getClient(
"PKDVCLf-Hq-h-kCzMp-L7Q/HhOWfwVtZ0mb30i9wi17GQ",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should go with a V2 config here (and everywhere else)

@adams85 adams85 changed the base branch from minor-corrections to master November 21, 2024 19:09
@adams85 adams85 force-pushed the cfworker branch 5 times, most recently from 0faa640 to 6fbefa3 Compare November 21, 2024 22:08
Copy link

sonarcloud bot commented Nov 21, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
25.6% Coverage on New Code (required ≥ 80%)
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@adams85 adams85 merged commit c6ff3d5 into master Nov 21, 2024
40 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants