typesense / docusaurus-theme-search-typesense

A fork of the awesome @docusaurus/theme-search-algolia library customized to work with Typesense
https://typesense.org/docs/guide/docsearch.html
MIT License
67 stars 15 forks source link

feat(docusaurus): accept docusaurus updates #50

Closed lpillonel closed 3 months ago

lpillonel commented 3 months ago

This closes issue #49

Change Summary

docusaurus dependencies versions where loosened ("3.4.0" => "^3.4.0"), so any version >= 3.4.0 and < 5 is now accepted.

PR Checklist

joostdecock commented 3 months ago

I have the same problem, but docusaurus has moved on to 3.5.2 now.

If it needs to be locked to the exact docusaurus version -- not uncommon for a plugin -- would it perhaps make sense to adopt their version. This way if you are running docusaurus x.y.z you know you'll be ok if you also run docusaurus-theme-search-typesense x.y.z.

lpillonel commented 3 months ago

in the past, when we didn't pin the exact versions of docusaurus and related dependencies to the same one used in the main docusaurus project, it would cause errors due to multiple copies of React being loaded. See #10.

I published for our needs a package (@lpi/docusaurus-theme-search-typesense) with this change and I have noticed no such issue of multiples copy of react in our project. I also double checked in the package-lock.json (one copy of react installed). Actually there is no pinned version of react as a dependency for any of the packages loaded in our project.

You can give it a try in your project with : npm i docusaurus-theme-search-typesense@npm:@lpi/docusaurus-theme-search-typesense

If there was an error two years back around this, it might be maybe something wrong about docusaurus dependencies ?

jasonbosco commented 3 months ago

I see, ok open to giving this a shot. I'll merge this and publish a new version shortly.

jasonbosco commented 3 months ago

This is now available in v0.22.0-1.