Skip to content

Remove lodash and uuid dependencies to reduce bundle size#558

Closed
davidtruong wants to merge 1 commit intomainfrom
claude/fix-issue-442-r5T2z
Closed

Remove lodash and uuid dependencies to reduce bundle size#558
davidtruong wants to merge 1 commit intomainfrom
claude/fix-issue-442-r5T2z

Conversation

@davidtruong
Copy link
Copy Markdown

Replace lodash/set with a simple object spread (single usage in inapp.ts) and replace uuid with native crypto.randomUUID() plus a fallback, removing ~73KB of unnecessary dependency weight. Fixes #442.

https://claude.ai/code/session_01EkgzU53JWSx3YHoupSiixd

JIRA Ticket(s) if any

Description

Test Steps

Replace lodash/set with a simple object spread (single usage in inapp.ts)
and replace uuid with native crypto.randomUUID() plus a fallback, removing
~73KB of unnecessary dependency weight. Fixes #442.

https://claude.ai/code/session_01EkgzU53JWSx3YHoupSiixd
@davidtruong davidtruong requested a review from mprew97 as a code owner April 7, 2026 14:58
delete dataFields[SHARED_PREFS_EVENT_TYPE];

const userId = uuidv4();
const userId = generateUUID();
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.36%. Comparing base (190a168) to head (05bc193).

Files with missing lines Patch % Lines
src/utils/generateUUID.ts 42.85% 4 Missing ⚠️
src/embedded/embeddedSessionManager.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #558      +/-   ##
==========================================
- Coverage   74.45%   74.36%   -0.09%     
==========================================
  Files          57       58       +1     
  Lines        2736     2742       +6     
  Branches      798      817      +19     
==========================================
+ Hits         2037     2039       +2     
+ Misses        698      662      -36     
- Partials        1       41      +40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davidtruong
Copy link
Copy Markdown
Author

Things are fixed

@davidtruong davidtruong closed this Apr 8, 2026
@davidtruong davidtruong deleted the claude/fix-issue-442-r5T2z branch April 8, 2026 14:43
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.

Reduce bundle size of the SDK and/or make it treeshakable

4 participants