File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
packages/gatsby-source-npm-package-search/src Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -29,19 +29,15 @@ exports.sourceNodes = async (
2929
3030 console . log ( `Grabbing local NPM packages...` )
3131
32- let buildFilter = [ ]
32+ const buildFilter = keywords . map ( keyword => `keywords: ${ keyword } ` )
3333
34- keywords . forEach ( keyword => {
35- buildFilter . push ( `keywords:${ keyword } ` )
36- } )
37-
38- const data = await browse ( {
34+ const hits = await browse ( {
3935 index,
4036 filters : `(${ buildFilter . join ( ` OR ` ) } )` ,
4137 hitsPerPage : 1000 ,
4238 } )
4339
44- data . hits . forEach ( hit => {
40+ hits . forEach ( hit => {
4541 // commented changed remove all badges and images from readme content to keep the creation of the node from failing below
4642 // if (hit.readme.includes(`![`)) {
4743 // hit.readme = hit.readme.replace(/[[]?!\[.*\b/gi, ``)
You can’t perform that action at this time.
0 commit comments