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

Wrong license in package.json #153

Open
Joery-M opened this issue Mar 16, 2024 · 1 comment
Open

Wrong license in package.json #153

Joery-M opened this issue Mar 16, 2024 · 1 comment

Comments

@Joery-M
Copy link

Joery-M commented Mar 16, 2024

The license field of package.json is MIT, but Apache-2.0 is defined in the LICENSE file.
Now this usually wouldn't matter, since the licenses are similar (for the most part). But tools like pnpm-licenses partially misinterpret the license to be MIT.

I don't know how much of a legal issue this is, since I've found packages like through that use both. But it just seems like sloppy to me.

Example:

  1. Create a new npm project
  2. Install pnpm
  3. Run pnpm i @pkgjs/parseargs
  4. Run npx pnpm-licenses list -o ./licenses.json
  5. View the licenses.json file.

Result:

[
    {
        "name": "@pkgjs/parseargs",
        "license": "MIT", // Incorrect
        "author": "",
        "homepage": "https://github.com/pkgjs/parseargs#readme",
        "description": "Polyfill of future proposal for `util.parseArgs()`",
        "version": "0.11.0",
        "licenseText": "Apache License\n Version 2.0, January 2004... You get the idea" // Correct
    }
]
@shadowspawn
Copy link
Collaborator

That looks like an error in the initial commits. I looked at some other packages under https://github.com/pkgjs and they have Apache license file and "license": "Apache-2.0".

https://github.com/pkgjs/wiby/blob/a777be1032aa829969d8df4e4f696dfbe73616d5/package.json#L26

https://github.com/pkgjs/dependents/blob/c2e17122cfa574a6e20b3df751cf23def8ab9ccc/package.json#L12

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

2 participants