nice-registry / nice-package

📦 Clean up messy package metadata from the npm registry
35 stars 7 forks source link

versions metadata field should always be an array #27

Closed feross closed 4 years ago

feross commented 4 years ago

When a package has an empty string ('') as its description, the } else if (doc.name && doc.description) { check fails, because empty strings are falsey.

https://github.com/nice-registry/nice-package/blob/3dab613e9c43a57ddedcc0b68ccbe6e3400d8769/lib/clean.js#L21

This means that data from the npm registry is returned uncleaned. In particular, the behavior that caused me to notice this is a package where the versions field was returned as an object instead of an array like all the other packages.

zeke commented 4 years ago

:tada: This issue has been resolved in version 3.1.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: