Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/js-client-sdk size report |
b1e6540 to
0dc6c85
Compare
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| const baseClientOptions: LDOptions = { | ||
| ...options, | ||
| wrapperName: options?.wrapperName ?? 'react-client-sdk', | ||
| wrapperVersion: options?.wrapperVersion ?? '0.0.0', // x-release-please-version |
There was a problem hiding this comment.
wrapperVersion will always remain '0.0.0' — release-please not configured
High Severity
The wrapperVersion is set to '0.0.0' with a // x-release-please-version magic comment, but packages/sdk/react is not listed in release-please-config.json, nor is src/client/LDReactClient.tsx listed as an extra-files entry. This means release-please will never update the '0.0.0' placeholder, and all React client SDK telemetry will permanently report version 0.0.0. Other packages (e.g. packages/sdk/browser) correctly register their files in release-please-config.json with extra-files.
There was a problem hiding this comment.
That is expected for now
| const baseClientOptions: LDOptions = { | ||
| ...options, | ||
| wrapperName: options?.wrapperName ?? 'react-client-sdk', | ||
| wrapperVersion: options?.wrapperVersion ?? '0.0.0', // x-release-please-version |
There was a problem hiding this comment.
🔴 wrapperVersion will always be '0.0.0' because release-please is not configured for the React package
The // x-release-please-version comment on line 123 is intended to have the version string automatically updated during releases. However, packages/sdk/react is completely absent from release-please-config.json, and src/client/LDReactClient.tsx is not listed in any extra-files array. Every other SDK that uses this pattern (e.g., packages/sdk/browser with src/platform/BrowserInfo.ts, packages/sdk/server-node with src/platform/NodeInfo.ts) has corresponding entries in release-please-config.json. Without this configuration, the version will permanently remain '0.0.0', causing incorrect wrapper version telemetry to be reported to LaunchDarkly servers.
Was this helpful? React with 👍 or 👎 to provide feedback.


Note
Low Risk
Low risk: only changes how
createClientbuilds options passed to the underlying JS client, plus adds tests to lock in option-merging behavior.Overview
The React SDK
createClientnow injects wrapper metadata (wrapperNamedefaulting toreact-client-sdkand a release-managedwrapperVersion) into the options passed to the underlying@launchdarkly/js-client-sdkclient, while still preserving and allowing overrides of user-supplied options.Tests were added to verify default wrapper values are passed through, user options are retained, and explicitly provided
wrapperName/wrapperVersiontake precedence.Written by Cursor Bugbot for commit 9b9b633. This will update automatically on new commits. Configure here.