git ssb

3+

cel / ssb-npm-registry



Commit 36918ca7e12ec5fbe6f1a05db3564ced92e04e6c

Include name and version in version object

cel committed on 10/11/2017, 8:38:37 AM
Parent: 0d073639080ba4eb082eaa6bd4fa4bd415ed2525

Files changed

index.jschanged
index.jsView
@@ -72,8 +72,10 @@
7272 })
7373 if (dep.version && dep.integrity && dep.resolved) {
7474 if (!hasNonBlobUrl && !blobUrlRegex.test(dep.resolved)) hasNonBlobUrl = true
7575 pkg.versions[dep.version] = {
76+ name: name,
77+ version: dep.version,
7678 dist: {
7779 integrity: dep.integrity,
7880 tarball: dep.resolved
7981 }
@@ -307,8 +309,10 @@
307309 if (err) return next(new Error(err.stack || err))
308310 var pkg = pkgs[sbotPkgLock.name] || (pkgs[sbotPkgLock.name] = {})
309311 var versions = pkg.versions || (pkg.versions = {})
310312 pkg.versions[sbotPkgLock.version] = {
313+ name: sbotPkgLock.name,
314+ version: sbotPkgLock.version,
311315 dist: self.blobDist(id)
312316 }
313317 var distTags = pkg['dist-tags'] || (pkg['dist-tags'] = {})
314318 distTags.latest = sbotPkgLock.version
@@ -463,8 +467,10 @@
463467 obj.versions[data.version] = {
464468 author: {
465469 url: mention.author
466470 },
471+ name: pkgName,
472+ version: data.version,
467473 dist: self.server.blobDist(mention.link)
468474 }
469475 getMention(null, next)
470476 })

Built with git-ssb-web