Skip to content

feat: Support ldcli's dev-server #94

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

Merged
merged 2 commits into from
Dec 24, 2024

Conversation

ynishinaka
Copy link
Contributor

@ynishinaka ynishinaka commented Dec 24, 2024

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Describe the solution you've provided

The LaunchDarkly CLI provides a development server for local testing (https://docs.launchdarkly.com/guides/flags/ldcli-dev-server). Its streaming format is slightly different than stream.launchdarkly.com in that:

  • it lacks segments field;
  • it emits an additional newline after comment (:\n\n as opposed to :\n).

To overcome these differences, I modified how it parses JSON and server-sent events. I've confirmed that stack test passed for lts-20.26.

Describe alternatives you've considered

Additional context

BEGIN_COMMIT_OVERRIDE
fix: Fix SSE newline handling
fix: Handle optional properties in data payload
END_COMMIT_OVERRIDE

@ynishinaka ynishinaka requested a review from a team as a code owner December 24, 2024 07:06
@ynishinaka ynishinaka changed the title Support ldcli's dev-server feat: Support ldcli's dev-server Dec 24, 2024
@keelerm84 keelerm84 merged commit 365340a into launchdarkly:main Dec 24, 2024
11 of 12 checks passed
@keelerm84
Copy link
Member

@ynishinaka thank you so much for your contribution!

I have released those changes under v4.4.1. Thanks!

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