[fix]: Update org unit parameter changes in v42#387
Conversation
BundleMonNo change in files bundle size Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
| return { ouMode, orgUnit: buildOrgUnitsParameter(orgUnits) }; | ||
| const orgUnitsParam = buildOrgUnitsParameter(majorVersion, orgUnits); | ||
| if (majorVersion >= 42) return { orgUnitMode: ouMode, orgUnits: orgUnitsParam }; | ||
| else if (majorVersion === 41) return { ouMode: ouMode, orgUnit: orgUnitsParam }; |
There was a problem hiding this comment.
Looks like the return for this is the same as the one in the else branch, we can remove this else if branch, right?
|
I have added @MatiasArriola to review these changes as he suggested some improvements. |
MatiasArriola
left a comment
There was a problem hiding this comment.
Now the getVersion call is cached, getExistingTeis handles v42, and the !isOuReq condition is handled.
All of this was because I was evaluating the approach to support v42 in generic apps.
I think this PR is the most sensible short-term approach, until we have new releases of d2-api available.
Once we have d2-api ready to support these v42 changes, we could replace this implementation.
Thanks for the updates @deeonwuli !
📌 References
📝 Implementation
buildOrgUnitModeto check the api version and return the ou parameters correctly🔥 Notes for the reviewer
📹 Screenshots/Screen capture
Screen.Recording.2026-03-04.at.17.08.34.mov
📑 Others
#869cb326m