Effective yesterday morning, all requests to the npm registry are made via HTTPS
.
Practically this means:
http://registry.npmjs.org/pkgname
you get a JSON responsehttp://registry.npmjs.org/pkgname/-/pkgname-1.2.3.tgz
https://registry.npmjs.org/pkgname/-/pkgname-1.2.3.tgz
.http://registry.npmjs.org/pkgname
will 301 (redirect) over to https://registry.npmjs.org/pkgname
No! The CLI client checks a shashum to verify the package and that check always has been over HTTPS.
We’ve developed an ecosystem of tools that you can use to replicate the registry in a way that is resilient to these changes:
_changes
feed: https://skimdb.npmjs.com/registry/_changes?descending=true&limit=10
For every change in a package in the registry, the whole package object (with changes) gets emitted as data on the _changes
feed of CouchDB.
follower: https://github.com/npm/concurrent-couch-follower
Users wishing to follow the changes feed can use our CouchDB follower wrapper, which will ensure you don’t miss any documents even if you process them asynchronously.
normalizer: https://github.com/npm/normalize-registry-metadata
Finally, we also provide a normalizer, so that you can clean up the data you receive, and implement the changes from the changes feed.
We will never stop making replicating public packages utterly trivial. If anything, we’ll keep making it easier.
We believe these tools should minimize any disruption from our transition to HTTPS — but of course there are edge cases! If you experience difficulty, we want to hear about it and help you out. As always, don’t be shy to reach out: support@npmjs.com.
Happy replicating!