File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 3
3
4
4
const log = require ( 'npmlog' )
5
5
const crypto = require ( 'crypto' )
6
+ const querystring = require ( 'querystring' )
6
7
const npmSession = crypto . randomBytes ( 8 ) . toString ( 'hex' )
7
8
log . verbose ( 'npm-session' , npmSession )
8
9
const { join } = require ( 'path' )
@@ -92,7 +93,7 @@ const flatten = obj => ({
92
93
description : obj . description ,
93
94
exclude : obj . searchexclude ,
94
95
limit : obj . searchlimit || 20 ,
95
- opts : obj . searchopts ,
96
+ opts : querystring . parse ( obj . searchopts ) ,
96
97
staleness : obj . searchstaleness ,
97
98
} ,
98
99
Original file line number Diff line number Diff line change @@ -95,7 +95,9 @@ Object {
95
95
"description": "description",
96
96
"exclude": "searchexclude",
97
97
"limit": "searchlimit",
98
- "opts": "searchopts",
98
+ "opts": Null Object {
99
+ "from": "1",
100
+ },
99
101
"staleness": "searchstaleness",
100
102
},
101
103
"sendMetrics": "send-metrics",
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class MockConfig {
65
65
description : 'description' ,
66
66
searchexclude : 'searchexclude' ,
67
67
searchlimit : 'searchlimit' ,
68
- searchopts : 'searchopts ' ,
68
+ searchopts : 'from=1 ' ,
69
69
searchstaleness : 'searchstaleness' ,
70
70
'dry-run' : 'dry-run' ,
71
71
'engine-strict' : 'engine-strict' ,
You can’t perform that action at this time.
0 commit comments