Skip to content

chore: update client-side JS SDK to @launchdarkly/js-client-sdk@4#38

Open
kinyoklion wants to merge 1 commit into
mainfrom
devin/1779700662-update-js-client-sdk
Open

chore: update client-side JS SDK to @launchdarkly/js-client-sdk@4#38
kinyoklion wants to merge 1 commit into
mainfrom
devin/1779700662-update-js-client-sdk

Conversation

@kinyoklion
Copy link
Copy Markdown
Member

Summary

Update the client-side JavaScript SDK from the legacy launchdarkly-js-client-sdk@3 to the current @launchdarkly/js-client-sdk@4.

Changes:

  • Replace launchdarkly-js-client-sdk@3 CDN script with @launchdarkly/js-client-sdk@4 ESM import
  • Update client-side API from LDClient.initialize() to createClient() + start()
  • Move bootstrap option from createClient() options to start() options (new SDK API)
  • Remove unnecessary es6-promise and event-source-polyfill polyfills
  • Update Node.js engine requirement from 16.13.1 to >=18

Tested locally — both normal and bootstrapped clients display flag values correctly with no console warnings.

Screenshot of working app

Review & Testing Checklist for Human

  • Run npm install && npm start with valid LD_SDK_KEY and LD_CLIENTSIDE_ID and verify both normal and bootstrapped clients display flag values
  • Verify the bootstrapped client loads flags instantly (without waiting for the streaming connection)
  • Toggle a flag in the LaunchDarkly dashboard and verify both clients update in real-time

Notes

The server-side SDK (@launchdarkly/node-server-sdk >= 8.0.0) was not changed — it already resolves to the latest version (9.11.0).

Link to Devin session: https://app.devin.ai/sessions/b648d8cd5e0b4a04ba0cbf1dcd1a9886
Requested by: @kinyoklion

- Replace launchdarkly-js-client-sdk@3 with @launchdarkly/js-client-sdk@4
- Update client-side API from LDClient.initialize() to createClient()/start()
- Move bootstrap option from createClient options to start() options
- Remove unnecessary es6-promise and event-source-polyfill
- Update Node.js engine requirement to >=18

Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@kinyoklion kinyoklion marked this pull request as ready for review May 26, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant