Fix undefined method error when package.json is malformed
What does this MR do and why?
Contributes to #455366 (closed)
Problem
package.json
file is generated by user. It might have an invalid
syntax. The current logic doesn't cover the case when dependencies
key
has not a hash value.
Solution
Add a validation for the hash content.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.