fix(journey-client): remove undefined from JourneyResult return type#545
fix(journey-client): remove undefined from JourneyResult return type#545
Conversation
The implementation already returns GenericError for empty server responses, so undefined was unreachable. Removing it aligns the type with the actual behavior and matches davinci-client and oidc-client conventions. Also strengthens the wellknown.utils.test.ts assertion helper with a properly typed parameter for compile-time narrowing.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR tightens an internal JourneyResult type (removing Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 70b6781
☁️ Nx Cloud last updated this comment at |
@forgerock/davinci-client
@forgerock/device-client
@forgerock/journey-client
@forgerock/oidc-client
@forgerock/protect
@forgerock/sdk-types
@forgerock/sdk-utilities
@forgerock/iframe-manager
@forgerock/sdk-logger
@forgerock/sdk-oidc
@forgerock/sdk-request-middleware
@forgerock/storage
commit: |
|
Deployed 6386c9b to https://ForgeRock.github.io/ping-javascript-sdk/pr-545/6386c9b111c299ea8d17318358ce11a9f6b01cf0 branch gh-pages in ForgeRock/ping-javascript-sdk |
📦 Bundle Size Analysis📦 Bundle Size Analysis🆕 New Packages🆕 @forgerock/journey-client - 87.7 KB (new) ➖ No Changes➖ @forgerock/sdk-logger - 1.6 KB 13 packages analyzed • Baseline from latest Legend🆕 New package ℹ️ How bundle sizes are calculated
🔄 Updated automatically on each push to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #545 +/- ##
===========================================
+ Coverage 18.79% 58.95% +40.16%
===========================================
Files 140 96 -44
Lines 27640 5358 -22282
Branches 980 790 -190
===========================================
- Hits 5195 3159 -2036
+ Misses 22445 2199 -20246
🚀 New features to boost your workflow:
|
Add compile-time type assertions to verify JourneyResult union members and ensure undefined never reappears. Enable vitest typecheck in vite.config.ts. Remove redundant Arrange/Act/Assert comments and fix prettier formatting across all modified test files.
JIRA Ticket
https://pingidentity.atlassian.net/browse/SDKS-4715
Description
The implementation already returns GenericError for empty server
responses, so undefined was unreachable. Removing it aligns the type
with the actual behavior and matches davinci-client and oidc-client
conventions. Also strengthens the wellknown.utils.test.ts assertion
helper with a properly typed parameter for compile-time narrowing.
Summary by CodeRabbit
Tests
Refactor