Skip to content

feat: use/support algolia for package search and org/user package listing - #174

Closed
Haroenv wants to merge 2 commits into
npmx-dev:mainfrom
algolia:feat/algolia-search
Closed

feat: use/support algolia for package search and org/user package listing#174
Haroenv wants to merge 2 commits into
npmx-dev:mainfrom
algolia:feat/algolia-search

Conversation

@Haroenv

@HaroenvHaroenv commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

ref: #32

This is just a prototype to see what it takes to swap out the search for Algolia.

DONE:

  • set up search via algolia JS client
  • map the parameters to algolia parameters
  • map the response to the same one as npm registry
  • swap the query from debounced to non-debounced (it's faster)

TODO:

  • wire up the ALGOLIA flag to some global flags system
  • clean up types and mapping
  • highlighting

What do you think?

@vercel

vercelBot commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

@Haroenv is attempting to deploy a commit to the danielroe Team on Vercel.

A member of the Team first needs to authorize it.

return promise
}

const ALGOLIA_SEARCH = true

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put in a proper global flags system

.then(({ results }) => {
const response = results[0] as SearchResponse<AlgoliaSearchResult>
return {
objects: response.hits.map<NpmSearchResult>(hit => ({

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean this mapping a bit, somewhat superfluous now.

Comment threadapp/composables/useNpmRegistry.ts Outdated
Comment threadapp/pages/search.vue
searchInputRef.value?.focus()
})

const ALGOLIA = true

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put in a proper global flags system

Comment threadapp/pages/search.vue
</button>
<!-- Hidden submit button for accessibility (form must have submit button per WCAG) -->
<button type="submit" class="sr-only">{{ t('search.button') }}</button>
<button type="submit" class="sr-only">

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undo auto-formatting?

@danielroedanielroe changed the title feat(search): quick and dirty algolia prototypefeat: use/support algolia to for package search and org/user package listingFeb 8, 2026
@danielroedanielroe changed the title feat: use/support algolia to for package search and org/user package listingfeat: use/support algolia for package search and org/user package listingFeb 8, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Haroenv