normalize-package-data
normalize-package-data copied to clipboard
[QUESTION] What should happen with empty or invalid bugs field?
-
Remove it always.
-
Remove it if neither valid url or email were given, or could have been inferred. (current behavior)
-
Set it to an empty object.
-
Leave as much fields as is, but
a. remove offending properties b. coerce offending properties to string
Properties are email and url, which must be strings. They could also be validated to be email addresses or http urls, respectively.
Currently, normalized bugs field will only have email and url properties, if a valid a value for either was given, or could have been inferred. If bug field exists in the normalized data, it's ensured to have either a url or email property.