Skip to content

fix(react-sdk): basicLogger was not re-exported causing compile time errors - #1843

Merged
joker23 merged 2 commits into
mainfrom
skz/react-basiclogger-typing
Aug 7, 2026
Merged

fix(react-sdk): basicLogger was not re-exported causing compile time errors#1843
joker23 merged 2 commits into
mainfrom
skz/react-basiclogger-typing

Conversation

@joker23

@joker23 joker23 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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
#1842

Describe the solution you've provided
re-export baseLogger from base package

Describe alternatives you've considered
The following considerations were rejected:

  • remove problematic type exports (eg baseLogger) - rejected because this would technically be a breaking change to the API
  • re-export the full base package - we opted to go for a more conservative approach. For the most part, there shouldn't be too many use cases where react-sdk users will need to use something from the base js-client-sdk.

Additional context
I've added an import of baseLogger in an example which would serve as a regression test.


Note

Low Risk
Adds a single public re-export and example-only usage; no runtime behavior change for existing consumers unless they adopt the new import.

Overview
Re-exports basicLogger from @launchdarkly/js-client-sdk on the React SDK’s public entry (packages/sdk/react/src/client/index.ts), so apps can import it from @launchdarkly/react-sdk without compile errors (issue #1842).

The bootstrap example now imports basicLogger from the React package and passes it via ldOptions.logger, documenting logger override and acting as a regression guard.

Reviewed by Cursor Bugbot for commit 0559003. Bugbot is set up for automated code reviews on this repo. Configure here.

@joker23
joker23 requested a review from a team as a code owner August 6, 2026 21:58

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26360 bytes
Compressed size limit: 29000
Uncompressed size: 129188 bytes

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 39099 bytes
Compressed size limit: 39300
Uncompressed size: 213748 bytes

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32142 bytes
Compressed size limit: 34000
Uncompressed size: 114604 bytes

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179980 bytes
Compressed size limit: 200000
Uncompressed size: 831788 bytes

@joker23
joker23 merged commit 459c891 into main Aug 7, 2026
54 checks passed
@joker23
joker23 deleted the skz/react-basiclogger-typing branch August 7, 2026 20:45
@github-actions github-actions Bot mentioned this pull request Aug 7, 2026
joker23 pushed a commit that referenced this pull request Aug 7, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>client-testing-plugin: 1.0.10</summary>

##
[1.0.10](client-testing-plugin-v1.0.9...client-testing-plugin-v1.0.10)
(2026-08-07)


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @launchdarkly/react-sdk bumped from 4.1.11 to 4.1.12
  * peerDependencies
    * @launchdarkly/react-sdk bumped from ^4.1.4 to ^4.1.12
</details>

<details><summary>react-sdk: 4.1.12</summary>

##
[4.1.12](react-sdk-v4.1.11...react-sdk-v4.1.12)
(2026-08-07)


### Bug Fixes

* **react-sdk:** `basicLogger` was not re-exported causing compile time
errors ([#1843](#1843))
([459c891](459c891))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Overview**
> Release Please cut for **`@launchdarkly/react-sdk` 4.1.12** and
**`@launchdarkly/client-testing-plugin` 1.0.10**, with manifest, package
versions, changelogs, and example apps aligned on the new React SDK
version.
> 
> **4.1.12** is documented as restoring the **`basicLogger`** re-export
from `@launchdarkly/js-client-sdk` so imports like `import { basicLogger
} from '@launchdarkly/react-sdk'` compile again
([#1843](#1843)). This PR
also updates the default **`wrapperVersion`** in `LDReactClient` to
`4.1.12`.
> 
> The testing plugin release only bumps **peer/dev** dependency ranges
to **`@launchdarkly/react-sdk` ^4.1.12**; no plugin source changes
appear in the diff.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
af55e9c. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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