Remove stale v1/v2 directory branching and promote v2 as default#2
Remove stale v1/v2 directory branching and promote v2 as default#2brionmario wants to merge 1 commit into
Conversation
76158cf to
d96d212
Compare
|
Important Review skippedToo many files! This PR contains 178 files, which is 28 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (178)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
Purpose
Removes the legacy v1/v2 platform-dispatch layer from the JavaScript SDKs. v1 targeted the WSO2 Identity Server embedded flow (
/api/server/v1/flow/execute) and is no longer needed — ThunderID is now the only supported platform. v2 (ThunderID native flow,/flow/execute) becomes the unconditional default, and allV2-suffixed exports are renamed to their clean equivalents.🔧 Summary of Breaking Changes
Platformenum andidentifyPlatformdeleted. Runtime platform-detection (if (platform === Platform.ThunderID)) is removed entirely.V2-suffixed exports renamed. e.g.EmbeddedFlowComponentTypeV2→EmbeddedFlowComponentType,executeEmbeddedSignInFlowV2→executeEmbeddedSignInFlow,useOAuthCallbackV2→useOAuthCallback.EmbeddedFlowExecuteRequestPayload,EmbeddedFlowExecuteResponse,EmbeddedFlowStatus,EmbeddedSignInFlowHandleRequestPayloadare no longer exported.platformprop removed fromThunderIDContextandThunderIDProviderProps(React + Vue).inheritFromBranding/modeprops removed from ReactThemeProvider.💥 Impact
Any consumer that:
*V2-suffixed name — compile error; rename to the clean equivalentplatformtoThunderIDProvider/useThunderID— prop silently ignored → remove itPlatform,identifyPlatform, or the deleted v1 types — compile error; no replacementinheritFromBrandingormodeto ReactThemeProvider— compile error; remove those props🔄 Migration Guide
Rename V2-suffixed imports:
Remove
platformfrom provider config:Remove deleted v1 types — use the v2 equivalent:
Approach
Every package carried a dispatcher pattern — a top-level component or function that checked
platform === Platform.ThunderIDat runtime and routed to av1/orv2/subdirectory. With only one platform remaining the entire dispatch layer is dead code.Dispatcher removal: All dispatcher files (e.g.
SignIn.tsx,BaseSignIn.tsx,ThemeProvider.tsx) were replaced with thin re-exports pointing directly at thev2/implementation. Thev1/directories were deleted.Name promotion: V2-suffixed identifiers were renamed in-place across every package that referenced them — imports, type annotations, enum usages, and dependency arrays — so the public API is clean with no aliases.
Platform plumbing removal:
Platformenum,identifyPlatformutility, and theplatformfield onThunderIDContextwere deleted.FlowMetaProvider(React) previously gated fetches behindplatform === Platform.ThunderID; that guard was simplified to theenabledflag alone.No runtime behaviour changes for ThunderID consumers — the v2 code path was already the active one.
Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks