Code quality and maintainability improvements for the Video.js Data SDK
Back to Changelog
The Video.js Data SDK ships a round of code-quality fixes for safer global access and better maintainability, along with an updated Data Core dependency.
What’s new:
-
Safer global access:
windowreferences now useglobalThis.window, and the globalparseIntwas replaced withNumber.parseInt. -
Reduced function nesting: nested request helpers were hoisted to the top level to lower nesting depth.
-
Stronger typing and clearer code:
Functiontype usages were replaced with explicit function signatures, intentionally emptycatchblocks now carry explanatory comments, and conditionals were simplified with optional chaining. -
Updated Data Core dependency:
@fastpix/video-data-corewas upgraded to^1.0.8.