Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions components/Library/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export default function Library({
const { github } = library;
const { isSmallScreen, isBelowMaxWidth } = useLayout();

const libName = library.npmPkg ?? github.name;
const bookmarkId = library.npmPkg ?? library.github.fullName;
const libName = library.npmPkg ?? github.fullName;

const hasSecondaryMetadata =
github.license ||
Expand All @@ -54,7 +53,7 @@ export default function Library({
library.unmaintained && tw`opacity-85`,
]}>
<BookmarkButton
bookmarkId={bookmarkId}
bookmarkId={libName}
style={tw`absolute right-2.5 top-2.5 z-10 rounded border border-palette-gray2 p-1.5 dark:border-palette-gray6`}
/>
<View
Expand Down
1 change: 0 additions & 1 deletion pages/api/libraries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
configPlugin: parsedQuery.configPlugin,
isMaintained: parsedQuery.isMaintained,
isPopular: parsedQuery.isPopular,
isRecommended: parsedQuery.isRecommended,
wasRecentlyUpdated: parsedQuery.wasRecentlyUpdated,
minPopularity: parsedQuery.minPopularity,
minMonthlyDownloads: parsedQuery.minMonthlyDownloads,
Expand Down
6 changes: 2 additions & 4 deletions scripts/build-and-score-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,10 @@ async function buildAndScoreData() {
const fetchList: string[] = [];

// Filter out template entries, prepare npm-stat API chunks
data = data.map(project => {
data.forEach(project => {
if (!project.template) {
fetchList.push(project.npmPkg);
return project;
}
return project;
});

// Assemble and fetch packages data in bulk queries
Expand Down Expand Up @@ -439,7 +437,7 @@ async function fetchNpmStatDataSequentially(bulkList: string[][]) {
async function fetchNpmRegistryDataSequentially(list: LibraryType[]) {
const total = list.length;

for (let i = 0; i < list.length; i++) {
for (let i = 0; i < total; i++) {
const entry = list[i];

if (!entry || entry.template) {
Expand Down
1 change: 0 additions & 1 deletion types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export type Query = {
configPlugin?: string;
isMaintained?: string;
isPopular?: string;
isRecommended?: string;
wasRecentlyUpdated?: string;
minPopularity?: string;
minMonthlyDownloads?: string;
Expand Down
5 changes: 0 additions & 5 deletions util/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export function handleFilterLibraries({
configPlugin,
isMaintained,
isPopular,
isRecommended,
wasRecentlyUpdated,
minPopularity,
minMonthlyDownloads,
Expand Down Expand Up @@ -252,10 +251,6 @@ export function handleFilterLibraries({
return false;
}

if (isRecommended && !library.matchingScoreModifiers.includes('Recommended')) {
return false;
}

if (wasRecentlyUpdated && !library.matchingScoreModifiers.includes('Recently updated')) {
return false;
}
Expand Down