Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listing an array of authors in package.json breaks some tools that parse it #630

Open
ikaronen-relex opened this issue Dec 16, 2022 · 0 comments

Comments

@ikaronen-relex
Copy link

Hi! While upgrading some dependencies in our project, I noticed an issue with the metadata for this package that caused our build process to crash after the upgrade.

Specifically, according to the npm documentation the author field in package.json should designate a single person and be either a JSON object or a string. This package currently has "author": ["nkbt", "chenglou"], which violates the spec and crashes some tools that try to parse it according to the spec (such as https://github.com/pivotal/LicenseFinder). While such tools should probably be made more robust, the current package.json for this project is (AFAICT) still invalid.

Probably the simplest fix would be to change the key from "author" to "contributors", which has the same semantics but allows multiple values. It could also be a good idea to validate the package.json against https://www.npmjs.com/package/package.json-schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant