Skip to content

fix: restore JSDoc in the client SDK type declarations and generate docs - #2179

Closed
joker23 wants to merge 2 commits into
mainfrom
skz/restore-client-common-dts-comments
Closed

joker23 wants to merge 2 commits into
mainfrom
skz/restore-client-common-dts-comments

Conversation

@joker23

@joker23 joker23 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

This PR re-adds comments to the built binary of the common client repo. The reason for this is that the inherited comments in the JSDocs are from the built resources. When we stripped the comments to make our resource size look better, we also removed all of the inherited documentation in our JSDocs.

This PR also removes the size limit check for the common client sdk as most of the bulk will be from comments. This should be fine as we are mostly concerned with the js-client-sdk size.


Devin Review


Note

Overview
Fixes lost inherited JSDoc in @launchdarkly/js-client-sdk-common type declarations by stopping TypeScript’s removeComments option during Rollup builds, since that was stripping comments from .d.ts files as well as JS.

Comment removal for runtime bundles (dist/esm/index.mjs and dist/cjs/index.cjs) now runs through a @rollup/plugin-terser step configured to drop comments only (no compress/mangle, beautified output), applied after the existing TypeScript/commonjs/resolve/json plugins for both ESM and CJS targets.

Reviewed by Cursor Bugbot for commit a9d9d7e. 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 November 5, 2026 19:25
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 32490 bytes
Compressed size limit: 32500
Uncompressed size: 153198 bytes

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 34531 bytes
Compressed size limit: 35000
Uncompressed size: 123185 bytes

@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 found 1 potential issue.

Devin Review

Comment thread .github/workflows/sdk-client.yml Resolved
@github-actions

github-actions Bot commented Nov 5, 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: 26346 bytes
Compressed size limit: 44000
Uncompressed size: 171286 bytes

@joker23

joker23 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

this PR will be superceded

@joker23 joker23 closed this Nov 5, 2026
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.

1 participant