Commit 36918ca7e12ec5fbe6f1a05db3564ced92e04e6c
Include name and version in version object
cel committed on 10/11/2017, 8:38:37 AMParent: 0d073639080ba4eb082eaa6bd4fa4bd415ed2525
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -72,8 +72,10 @@ | ||
72 | 72 | }) |
73 | 73 | if (dep.version && dep.integrity && dep.resolved) { |
74 | 74 | if (!hasNonBlobUrl && !blobUrlRegex.test(dep.resolved)) hasNonBlobUrl = true |
75 | 75 | pkg.versions[dep.version] = { |
76 | + name: name, | |
77 | + version: dep.version, | |
76 | 78 | dist: { |
77 | 79 | integrity: dep.integrity, |
78 | 80 | tarball: dep.resolved |
79 | 81 | } |
@@ -307,8 +309,10 @@ | ||
307 | 309 | if (err) return next(new Error(err.stack || err)) |
308 | 310 | var pkg = pkgs[sbotPkgLock.name] || (pkgs[sbotPkgLock.name] = {}) |
309 | 311 | var versions = pkg.versions || (pkg.versions = {}) |
310 | 312 | pkg.versions[sbotPkgLock.version] = { |
313 | + name: sbotPkgLock.name, | |
314 | + version: sbotPkgLock.version, | |
311 | 315 | dist: self.blobDist(id) |
312 | 316 | } |
313 | 317 | var distTags = pkg['dist-tags'] || (pkg['dist-tags'] = {}) |
314 | 318 | distTags.latest = sbotPkgLock.version |
@@ -463,8 +467,10 @@ | ||
463 | 467 | obj.versions[data.version] = { |
464 | 468 | author: { |
465 | 469 | url: mention.author |
466 | 470 | }, |
471 | + name: pkgName, | |
472 | + version: data.version, | |
467 | 473 | dist: self.server.blobDist(mention.link) |
468 | 474 | } |
469 | 475 | getMention(null, next) |
470 | 476 | }) |
Built with git-ssb-web