javascript
javascript copied to clipboard
fix(clerk-js): Correct init retry logic
Description
Refactor Clerk initialization retry logic to use a dedicated withRetry utility with exponential backoff
Checklist
- [ ]
pnpm testruns as expected. - [ ]
pnpm buildruns as expected. - [ ] (If applicable) JSDoc comments have been added or updated for any package exports
- [ ] (If applicable) Documentation has been updated
Type of change
- [x] 🐛 Bug fix
- [ ] 🌟 New feature
- [ ] 🔨 Breaking change
- [ ] 📖 Refactoring / dependency upgrade / documentation
- [ ] other:
Summary by CodeRabbit
-
New Features
- Added a configurable retry utility with jittered exponential backoff for startup operations.
-
Bug Fixes
- Improved initialization resilience and recovery for transient/network failures, clearer error wrapping (init errors now include causes), and dev-browser auth recovery; UI can mount in degraded mode.
-
Tests
- Added comprehensive tests for retry/backoff behavior and initialization retry scenarios.
-
Chores
- Updated TypeScript libs and added a patch changeset.
✏️ Tip: You can customize this high-level summary in your review settings.