Closed jrgm closed 10 years ago
Does it seem like npm is not following semver?
@vladikoff - possibly. My notes are just anecdotal. I haven't traced the handling of .cache.json
to the actual commit, but lockdown was failing with 1.4.15, but working with 1.4.9 and seemed to me to be that structural change.
Pretty certain that npm doesn't follow semver, but accessing internal caches not exposed by a public API is always risky. On Jun 28, 2014 11:49 PM, "John Morrison" notifications@github.com wrote:
@vladikoff https://github.com/vladikoff - possibly. My notes are just anecdotal. I haven't traced the handling of .cache.json to the actual commit, but lockdown was failing with 1.4.15, but working with 1.4.9 and seemed to me to be that structural change.
— Reply to this email directly or view it on GitHub https://github.com/mozilla/npm-lockdown/issues/29#issuecomment-47447327.
FWIW, currently Node.js is at 0.10.29 (released Jun 16) which comes w/ npm 1.4.14, so it may be currently broken w/ release versions of Node 0.10.latest.
http://blog.nodejs.org/2014/06/16/node-v0-10-29-stable/
On Sat, Jun 28, 2014 at 11:49 PM, John Morrison notifications@github.com wrote:
@vladikoff https://github.com/vladikoff - possibly. My notes are just anecdotal. I haven't traced the handling of .cache.json to the actual commit, but lockdown was failing with 1.4.15, but working with 1.4.9 and seemed to me to be that structural change.
— Reply to this email directly or view it on GitHub https://github.com/mozilla/npm-lockdown/issues/29#issuecomment-47447327.
Yeah, so this starts breaking with changes in npm 1.4.11, so we are broken starting with node.js 0.10.29 (with default npm install).
The following PR #30 reads the current registry from the users .npmrc
and if the previous methods of reading the cache directories fail then it will then search for cache/registry/name
etc.
And because this uses the npmconf
module from npm
we can also use npm environment variables to change the detected registry.
I am on node 0.10.31
and npm 2.0.0-alpha-5
. If I understood correctly, npm-lockdown
is not compatible with these versions and my next choice is npm-shrinkwrap
. Are there any plans to have this package compatible with the latest node/npm?
I merged in this fix (sorry for taking so long), but the best solution would be for npm-shrinkwrap to validate shasums. So, pile on in here https://github.com/npm/npm/issues/2649
Currently, nodejs is at 0.10.28 which comes with npm @ 1.4.9. lockdown works with that version.
But I had updated to npm @ 1.4.15, and in that version there are changes to the structure of the
.npm
cache. In particular, the.cache.json
files are now kept in a per-registry-host directory under.npm
. This breaksgetShasum
inrelock.js
, and breaks npm-lockdown.