zaach / jsonlint

A JSON parser and validator with a CLI.
http://zaach.github.com/jsonlint/
1.94k stars 420 forks source link

[HOTFIX] Use ^ in package.json versions #105

Closed strugee closed 6 years ago

strugee commented 6 years ago

This ensures that semver-major upgrades don't get pulled in.

This became a critical bug recently because npm decided to publish a placeholder package as nomnom@2, causing all new installs of jsonlint to crash. See https://www.npmjs.com/package/nomnom, https://travis-ci.org/pump-io/pump.io/jobs/342947005

astorije commented 6 years ago

Unfortunately, this repo hasn't seen a merge in 3.5y, so it looks like we lost jsonlint 😩 Thanks npm, again...

strugee commented 6 years ago

Yeah I prefixed it with 'hotfix' in the hopes it would be noticed... idk though

astorije commented 6 years ago

Understandable. We can only hope, but that would be surprising after so many years. On my end, I have pinged npm about it, hoping they can revive nomnom since so many packages depend on it (558 according to the package page). Why do they continue to do this after the left-pad fiasco...

EDIT: wrong tweet URL

colinodell commented 6 years ago

I'm also experiencing this issue.

And to help people who are Googling this issue, here's some of the output I see:

$ npm install jsonlint -g
npm WARN deprecated nomnom@2.0.0: Package no longer supported. Contact support@npmjs.com for more info.
/usr/local/bin/jsonlint -> /usr/local/lib/node_modules/jsonlint/lib/cli.js
jsonlint@1.6.2 /usr/local/lib/node_modules/jsonlint
├── nomnom@2.0.0
└── JSV@4.0.2
$ jsonlint users.json
module.js:327
    throw err;
    ^

Error: Cannot find module 'nomnom'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/jsonlint/lib/cli.js:9:15)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
ERROR: Job failed: exit code 1
graingert commented 6 years ago

@zaach ^

zaach commented 6 years ago

I published this PR in version 1.6.3. Ugh, thanks for the heads up.

alerque commented 6 years ago

Please also tag a release here on Github so distro maintainers like me can roll this out to distro packages.