It appears that it's possible the problem bundle received from webpack does
not contain the versions data at all. This was not handled correctly in
the formatVersions function.
Fixed the function to be more robust and added unit tests for it along the
way. Unit tests for an existing case was added but really not sure if it's
the right format as I never seen it :)
Note I disabled no-use-before-define in my unit test as I found it
makes tests much more readable. Don't hesitate to disapprove and I'll
revert the change.
It appears that it's possible the problem bundle received from webpack does not contain the
versions
data at all. This was not handled correctly in theformatVersions
function.Fixed the function to be more robust and added unit tests for it along the way. Unit tests for an existing case was added but really not sure if it's the right format as I never seen it :)
Note I disabled
no-use-before-define
in my unit test as I found it makes tests much more readable. Don't hesitate to disapprove and I'll revert the change.