chenglou / chenglou/react-motion

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

Open
#630 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
21.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

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](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#people-fields-author-contributors) 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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect package.json and compare its people fields with the npm package.json documentation linked in the issue. Validate the metadata against the referenced package.json schema; done means the author field represents one person, contributors holds the multiple names, and spec-compliant tools no longer fail.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system, tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.