diff options
author | isaacs <i@izs.me> | 2013-03-09 21:11:22 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-03-09 21:11:22 +0400 |
commit | 31b5d41f57cb717c14a29d789f1c0c1bb40a8bca (patch) | |
tree | fb565a093decb9365d1b8b96d5dfb20b1e748850 /deps | |
parent | 5757ce48b41eaa0bfff89b3b9bc6f8f4ebbfeb53 (diff) |
npm: Upgrade to 1.2.14 (fixed)
Diffstat (limited to 'deps')
-rw-r--r-- | deps/npm/lib/search.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/deps/npm/lib/search.js b/deps/npm/lib/search.js index 3e9bdb15f78..edbdc70b13a 100644 --- a/deps/npm/lib/search.js +++ b/deps/npm/lib/search.js @@ -86,6 +86,7 @@ function stripData (data) { }) , url: !Object.keys(data.versions || {}).length ? data.url : null , keywords: data.keywords || [] + , version: Object.keys(data.versions)[0] || [] , time: data.time && data.time.modified && (new Date(data.time.modified).toISOString() @@ -142,18 +143,19 @@ function prettify (data, args) { var longest = [] , spaces , maxLen = npm.config.get("description") - ? [20, 60, 20, 20, Infinity] - : [20, 20, 20, Infinity] + ? [20, 60, 20, 20, 10, Infinity] + : [20, 20, 20, 10, Infinity] , headings = npm.config.get("description") - ? ["NAME", "DESCRIPTION", "AUTHOR", "DATE", "KEYWORDS"] - : ["NAME", "AUTHOR", "DATE", "KEYWORDS"] + ? ["NAME", "DESCRIPTION", "AUTHOR", "DATE", "VERSION", "KEYWORDS"] + : ["NAME", "AUTHOR", "DATE", "VERSION", "KEYWORDS"] , lines , searchsort = (npm.config.get("searchsort") || "NAME").toLowerCase() , sortFields = { name: 0 , description: 1 , author: 2 , date: 3 - , keywords: 4 } + , version: 4 + , keywords: 5 } , searchRev = searchsort.charAt(0) === "-" , sortField = sortFields[searchsort.replace(/^\-+/, "")] @@ -171,6 +173,7 @@ function prettify (data, args) { , data.description || "" , data.maintainers.join(" ") , data.time + , data.version || "" , (data.keywords || []).join(" ") ] l.forEach(function (s, i) { |