andrasq/consistent-hash-js

The installed package.json is invalid (has two "files" keys) and causes bun to throw an error

Opened this issue · 1 comments

Version 1.2.1

Repro

% npm install consistent-hash

added 2 packages, changed 1 package, and audited 4 packages in 1s

found 0 vulnerabilities

% grep files node_modules/consistent-hash/package.json 
  "files": ["LICENSE", "Readme.md", "consistent-hash.js", "test-consistent-hash.js"],
  "files": ["LICENSE", "Readme.md", "consistent-hash.js", "test-consistent-hash.js"],

Result

This is cause some build tools to throw an error when trying to read the node_modules/consistent-hash/package.json

Hmm, I see the typo in the repo, but not in the npm package.

Oh wait, this is an npm thing -- with npm v2 and v6 the entry is not duplicated, with npm v8 it is. So older versions of npm (probably inadvertently) de-dup the json.

Published 1.2.2 and deprecated 1.2.1.