Skip to content

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

@ikaronen-relex

Description

@ikaronen-relex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions