File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44const log = require ( 'npmlog' )
55const crypto = require ( 'crypto' )
6+ const querystring = require ( 'querystring' )
67const npmSession = crypto . randomBytes ( 8 ) . toString ( 'hex' )
78log . verbose ( 'npm-session' , npmSession )
89const { join } = require ( 'path' )
@@ -92,7 +93,7 @@ const flatten = obj => ({
9293 description : obj . description ,
9394 exclude : obj . searchexclude ,
9495 limit : obj . searchlimit || 20 ,
95- opts : obj . searchopts ,
96+ opts : querystring . parse ( obj . searchopts ) ,
9697 staleness : obj . searchstaleness ,
9798 } ,
9899
Original file line number Diff line number Diff line change @@ -95,7 +95,9 @@ Object {
9595 "description": "description",
9696 "exclude": "searchexclude",
9797 "limit": "searchlimit",
98- "opts": "searchopts",
98+ "opts": Null Object {
99+ "from": "1",
100+ },
99101 "staleness": "searchstaleness",
100102 },
101103 "sendMetrics": "send-metrics",
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class MockConfig {
6565 description : 'description' ,
6666 searchexclude : 'searchexclude' ,
6767 searchlimit : 'searchlimit' ,
68- searchopts : 'searchopts ' ,
68+ searchopts : 'from=1 ' ,
6969 searchstaleness : 'searchstaleness' ,
7070 'dry-run' : 'dry-run' ,
7171 'engine-strict' : 'engine-strict' ,
You can’t perform that action at this time.
0 commit comments