Skip to content

Commit 2d682e4

Browse files
wraithgarruyadorno
authored andcommittedMar 4, 2021
fix(search): don't pass unused args
The searchopts get parsed and added to the query elsewhere, they're not part of the `include` array they are an extra querystring that is added to the search request. PR-URL: #2803 Credit: @wraithgar Close: #2803 Reviewed-by: @ruyadorno
1 parent e69be2a commit 2d682e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/search.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const packageFilter = require('./search/package-filter.js')
88
const output = require('./utils/output.js')
99
const usageUtil = require('./utils/usage.js')
1010

11-
function prepareIncludes (args, searchopts) {
11+
function prepareIncludes (args) {
1212
return args
1313
.map(s => s.toLowerCase())
1414
.filter(s => s)
@@ -47,7 +47,7 @@ class Search {
4747
const opts = {
4848
...this.npm.flatOptions,
4949
...this.npm.flatOptions.search,
50-
include: prepareIncludes(args, this.npm.flatOptions.search.opts),
50+
include: prepareIncludes(args),
5151
exclude: prepareExcludes(this.npm.flatOptions.search.exclude),
5252
}
5353

0 commit comments

Comments
 (0)
Please sign in to comment.