Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(algolia): upgrade to the new major #10672

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

millotp
Copy link

@millotp millotp commented Nov 12, 2024

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Algolia has released a new major version of the javascript search client.
Since DocSearch is now using the new version, we can also upgrade the docusaurus-theme-search-algolia package to use the latest version of the js client and of DocSearch.
There are a few changes to do in the code to accommodate the new version but nothing breaking, it's mostly around types and imports.

Test Plan

The existing tests are enough to test that every works, I also tried the local website and the search is working, with the user agent containing the latest version.

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 12, 2024
Copy link

github-actions bot commented Nov 12, 2024

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🔴 47 🟢 98 🟢 96 🟢 100 Report
/docs/installation 🟠 54 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 74 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 64 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 55 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 64 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 76 🟢 100 🟢 100 🟠 86 Report

@slorber slorber added the Argos Add this label to run UI visual regression tests. See argos.yml GH action. label Nov 14, 2024
Copy link

netlify bot commented Nov 14, 2024

[V2]

Name Link
🔨 Latest commit 367f60a
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6735eaf478e0010008ff2622
😎 Deploy Preview https://deploy-preview-10672--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@algolia/[email protected] None 0 133 kB instantsearch-bot
npm/@algolia/[email protected] None +1 199 kB abodelot, agdavid, alg-admin, ...82 more
npm/@algolia/[email protected] None 0 57.5 kB instantsearch-bot
npm/@algolia/[email protected] None 0 8.15 kB shortcuts
npm/@algolia/[email protected] None 0 5.58 kB shortcuts
npm/@algolia/[email protected] None 0 3.63 kB shortcuts
npm/@algolia/[email protected] None 0 408 kB shortcuts
npm/@algolia/[email protected] None 0 6.78 kB shortcuts
npm/@algolia/[email protected] None 0 12.3 kB shortcuts
npm/@algolia/[email protected] None 0 10.6 kB shortcuts
npm/@algolia/[email protected] None 0 379 kB shortcuts
npm/@algolia/[email protected] None 0 6.51 kB shortcuts
npm/@algolia/[email protected] None 0 386 kB shortcuts
npm/@algolia/[email protected] None 0 190 kB shortcuts
npm/@algolia/[email protected] None 0 13 kB haroenv
npm/@algolia/[email protected] None 0 1.78 MB shortcuts
npm/@algolia/[email protected] None 0 2.16 kB shortcuts
npm/@algolia/[email protected] None 0 2.37 kB shortcuts
npm/@algolia/[email protected] None 0 405 kB shortcuts
npm/@algolia/[email protected] None 0 85.4 kB shortcuts
npm/@algolia/[email protected] None 0 6.25 kB shortcuts
npm/@algolia/[email protected] None 0 2.76 kB shortcuts
npm/@algolia/[email protected] network 0 17.8 kB shortcuts
npm/@algolia/[email protected] network 0 9.21 kB shortcuts
npm/@algolia/[email protected] None 0 50.1 kB shortcuts
npm/@docsearch/[email protected] None 0 42.7 kB shortcuts
npm/@docsearch/[email protected] Transitive: network +8 7 MB shortcuts
npm/@docusaurus/[email protected] None +1 12.5 kB slorber
npm/@docusaurus/[email protected] None 0 232 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] None 0 414 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] None 0 39.1 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] None 0 37.7 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] None 0 11.5 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] None 0 15.5 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] None 0 8.36 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] None 0 35.7 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] None 0 14.1 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] None 0 761 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] environment +1 468 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] None 0 114 kB docusaurus-bot, fb, lex111, ...1 more
npm/@docusaurus/[email protected] filesystem 0 335 kB slorber
npm/@mdx-js/[email protected] None 0 14.4 kB wooorm
npm/@types/[email protected] None 0 7.97 kB types
npm/@types/[email protected] None 0 19.4 kB types
npm/@types/[email protected] None 0 7.64 kB types
npm/@types/[email protected] None 0 6.97 kB types
npm/[email protected] None 0 1.11 MB instantsearch-bot
npm/[email protected] None 0 210 kB shortcuts
npm/[email protected] None 0 13.7 kB leerobinson
npm/[email protected] None +1 287 kB feedic
npm/[email protected] Transitive: network +4 1.09 MB feedic
npm/[email protected] None 0 8.55 kB lukeed
npm/[email protected] None 0 5.14 kB sindresorhus
npm/[email protected] None 0 22.6 kB wooorm
npm/[email protected] None 0 105 kB jpmonette
npm/[email protected] None 0 620 kB slorber
npm/[email protected] None 0 5.4 kB dominictarr
npm/[email protected] None 0 31.8 kB rstacruz
npm/[email protected] None 0 4.37 kB sindresorhus
npm/[email protected] None 0 5.44 kB euank
npm/[email protected] None 0 18.7 kB 43081j
npm/[email protected] None 0 738 kB formidablelabs
npm/[email protected] None 0 2.05 MB rundevelopment
npm/[email protected] None 0 4.86 kB isaacs
npm/[email protected] environment 0 4.51 MB react-bot
npm/[email protected] None 0 87.9 kB anyroad
npm/[email protected] environment 0 318 kB react-bot
npm/[email protected] None 0 10.2 kB ngryman

🚮 Removed packages: npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

@slorber
Copy link
Collaborator

slorber commented Nov 14, 2024

Thanks @millotp

Since this is a new version, where can I check the breaking changes that potentially affect us?

This seems a bit risky to release this as a minor/patch release.

There are a few changes to do in the code to accommodate the new version but nothing breaking, it's mostly around types and imports.

That's how it affects our internal code. But we also expose some things as part of a public API through themeConfig options:

https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-theme-search-algolia/src/validateThemeConfig.ts

https://docusaurus.io/docs/search#connecting-algolia

I'm particularly worried of possible breaking changes to this type that we expose through themeConfig.algolia.searchParameters

import type { SearchOptions } from '@algolia/client-search';

Are there any to be aware of?

Apart from TS APIs, are there behavior changes to be aware of? For example, different defaults?

Copy link

argos-ci bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ Auto-approved build - Nov 14, 2024, 12:32 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Argos Add this label to run UI visual regression tests. See argos.yml GH action. CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants