-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
fix(deps): fix cheerio version to rc.12 #218
Conversation
I think you need to amend your commit and push again based on this rules 😉 https://github.com/cmfcmf/docusaurus-search-local/blob/main/CONTRIBUTING.md#commit-message-guidelines probably adding |
Well summed up @slorber |
cedecb2
to
8394977
Compare
The search plugin was creating build issues because one of its dependencies (Cheerio) was upgraded and the search plugin package did not contain the necessary changes pertaining to this upgrade. On the search plugin repo, until the PR containing changes related to Cheerio version is merged, we are adding a workaround in package.json as specified in cmfcmf/docusaurus-search-local#218 After the search plugin package is updated, the 'overrides' may not be necessary in package.json. Also, the search plugin version is reverted to 1.2 as it is compatible with Docusaurus v2.
Pinning the version to the RC is a viable workaround. Instead of using |
Yes, that would also work but you'd have to also change deps to ensure all RC users upgrade to v1.0 stable v1.0 stable only works for Node 18.17+ and Docusaurus v3 has support for 18.0. If you upgrade Cheerio to v1.0 stable, you also ask your users to potentially upgrade Node, which is a breaking change. My suggestion is to release this PR as a minor/patch, and then upgrade Cheerio in the next major, mentioning it requires upgrading Node. |
Summary: 1. Update all packages to their most recent versions. 2. Add missing dependencies. 3. Add `cheerio` module's version override until a new version of `cmfcmf/docusaurus-search-local` is released. (see here cmfcmf/docusaurus-search-local#218) 4. Fix MDX pages failing to compile with docusaurus 3.5.2 Differential Revision: D61535847
Summary: Pull Request resolved: #131 1. Update all packages to their most recent versions. 2. Add missing dependencies. 3. Add `cheerio` module's version override until a new version of `cmfcmf/docusaurus-search-local` is released. (see here cmfcmf/docusaurus-search-local#218) 4. Fix MDX pages failing to compile with docusaurus 3.5.2 Reviewed By: SeaOtocinclus Differential Revision: D61535847 fbshipit-source-id: e52aefc9a2eade45202e618235e799804b13ace9
This needs reverting once cmfcmf/docusaurus-search-local#218 is resolved.
This needs reverting once cmfcmf/docusaurus-search-local#218 is resolved.
relevant discussion: cmfcmf/docusaurus-search-local#218
Thank you for the PR and the detailed explanation - I'll land this fix as part of #228. I also raised the minimum Node.js version to 18.18 since other (dev) dependencies like syncpack require it and Node.js 16 has been EOL for more than a year. |
Cheerio just released v1.0.0 after 7 years of RC
https://cheerio.js.org/blog/cheerio-1.0
The only problem is that RC users used semver ranges (
^
) and the 1.0 is not retro-compatible with the latest RC.12, published 2 years agoNotably:
import * as Cheerio from 'cheerio'
instead ofimport Cheerio from 'cheerio'
Docusaurus users installing this plugin will now get Cheerio v1.0, and the following error:
A temporary solution: fix the Cheerio version to rc.12 in this lib so that users never use Cheerio v1.0, until you fix the problems, or Cheerio adds back retrocompatibility.
Until this PR gets merged/released, users will have to force resolution to rc.12 on their side using their package managers features.
For example, Yarn users can do: