-
Notifications
You must be signed in to change notification settings - Fork 34
chore: upgrade docusaurus #371
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughUpdated Docusaurus core, preset-classic, and associated devDependencies from exact version 3.8.1 to flexible caret range ^3.9.2, replacing strict pinning with a more permissive versioning strategy. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on December 20
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| "@docusaurus/types": "3.8.1", | ||
| "@docusaurus/module-type-aliases": "^3.9.2", | ||
| "@docusaurus/tsconfig": "^3.9.2", | ||
| "@docusaurus/types": "^3.9.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Version conflict with webpack-dev-server resolution
The resolutions field pins webpack-dev-server to version 5.2.1, but the upgraded @docusaurus/core@3.9.2 requires ^5.2.2 (version 5.2.2 or higher). This version constraint conflict forces installation of an incompatible older version, potentially causing runtime errors or missing functionality that Docusaurus expects from webpack-dev-server 5.2.2+.
|
|
||
| js-yaml@^3.13.1: | ||
| version "3.14.1" | ||
| version "3.14.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Lockfile version mismatch for js-yaml packages
The js-yaml lockfile entries have inconsistent metadata where the version field claims 3.14.2 and 4.1.1 respectively, but the resolved URLs and integrity hashes still point to the older versions 3.14.1 and 4.1.0. This mismatch means the wrong package versions will be installed, potentially causing runtime errors or unexpected behavior if code depends on features or fixes from the newer versions.
Additional Locations (1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
package.json (1)
44-44: Update webpack-dev-server resolution to satisfy Docusaurus 3.9.2 requirement.Docusaurus 3.9.2 requires webpack-dev-server@^5.2.2, but the resolution pins it to 5.2.1, creating a version conflict. Update line 44 in package.json to:
"webpack-dev-server": "5.2.2"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (1)
package.json(2 hunks)
🔇 Additional comments (1)
package.json (1)
1-62: Verify consistency between PR description and package.json changes.The PR description mentions upgrading DocSearch to v4, adding AI SDK dependencies (
ai,@ai-sdk/*,swr,marked,zod), and updating Algolia packages to5.44.0. However, the providedpackage.jsonsnapshot only shows Docusaurus version bumps.Confirm that:
- All promised dependencies are present in the final
package.jsonandyarn.lock- DocSearch, AI SDK, and Algolia changes have been properly committed
- No dependencies were accidentally omitted or dropped
| "@docusaurus/core": "^3.9.2", | ||
| "@docusaurus/preset-classic": "^3.9.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify the versioning strategy change from exact to caret ranges.
The Docusaurus packages have been updated from exact pinning (3.8.1) to caret ranges (^3.9.2), which permits automatic minor and patch version upgrades. This could introduce unexpected breaking changes if a future 3.x.y release is incompatible with the codebase.
Confirm whether this permissive versioning is intentional or if exact version pinning should be restored for stability. Also ensure yarn.lock has been regenerated to reflect the new constraints.
Also applies to: 37-39
🏁 Script executed:
#!/bin/bash
# Check full package.json for webpack-dev-server and all Docusaurus entries
echo "=== Full package.json ==="
cat package.json | grep -A 150 '"dependencies"' | head -100Length of output: 905
🏁 Script executed:
#!/bin/bash
# Check for yarn.lock existence and webpack-dev-server entries
echo "=== Checking yarn.lock ==="
if [ -f yarn.lock ]; then
echo "yarn.lock exists"
echo "=== Webpack-dev-server entries in yarn.lock ==="
grep -A 5 'webpack-dev-server' yarn.lock | head -30
else
echo "yarn.lock not found"
fiLength of output: 787
🏁 Script executed:
#!/bin/bash
# Search for DocSearch, AI SDK, marked, zod mentions in package.json and codebase
echo "=== DocSearch, AI SDK, marked, zod in package.json ==="
grep -E '(docusaurus/plugin-ideal-image|@docusaurus/plugin-search|docusaurus-theme-search-typesense|@algolia/autocomplete|docsearch|@ai-sdk|marked|zod|swr)' package.json || echo "None found in package.json"
echo "=== Check if these are in node_modules ==="
if [ -d node_modules ]; then
ls node_modules | grep -E '(docsearch|ai|marked|zod)' || echo "These packages not in node_modules"
fiLength of output: 124
🏁 Script executed:
#!/bin/bash
# Extract exact versions of @docusaurus packages and webpack-dev-server from package.json
echo "=== Current Docusaurus and webpack-dev-server versions ==="
rg -n '@docusaurus|webpack-dev-server' package.json | head -20Length of output: 310
Resolve webpack-dev-server version conflict before merging.
Docusaurus 3.9.2 requires webpack-dev-server@^5.2.2, but the resolutions entry (line 44) pins it to 5.2.1—a downgrade that will cause build or runtime failures. Update the resolution to 5.2.2 or later to match the dependency requirement.
Additionally, the shift from exact version pinning (3.8.1) to caret ranges (^3.9.2) for Docusaurus packages allows automatic minor/patch upgrades. Confirm this permissive versioning aligns with your stability requirements; if not, revert to exact pins.
🤖 Prompt for AI Agents
In package.json around lines 26-27, the Docusaurus deps are caret-pinned to
^3.9.2 while the resolutions entry currently pins webpack-dev-server to 5.2.1
creating a mismatch; update the resolutions entry to "webpack-dev-server":
"5.2.2" (or a newer 5.x patch >=5.2.2) to satisfy Docusaurus 3.9.2, then run a
fresh install and verify build; additionally confirm whether you want permissive
caret ranges for @docusaurus/core and preset-classic—if you require exact
stability revert those entries to exact versions (e.g., 3.9.2) before
committing.
Note
Upgrades Docusaurus to 3.9.2 and refreshes the DocSearch/Algolia and build toolchain dependencies, updating the lockfile accordingly.
@docusaurus/core,@docusaurus/preset-classicand related plugins/themes from3.8.1to3.9.2.4.xand Algolia packages to^5.44.0(includes@docsearch/react,algoliasearch-helper).webpack-dev-serverto^5.2.2(resolution and transitive), plus assorted ecosystem bumps (e.g.,js-yaml).swr,zod,marked,@ai-sdk/*).Written by Cursor Bugbot for commit c7baa33. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.