Made changes for docusaurus v4 1785293457 - #158
Conversation
Our Pull Request Approval ProcessThis PR will be reviewed according to our: Your PR may be automatically closed if:
Thanks for contributing! |
WalkthroughThe project updates Docusaurus and related tooling versions, adds the ChangesDocusaurus upgrade
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Around line 44-45: Align the `@typescript-eslint/eslint-plugin` dependency in
package.json with the parser’s ^8.51.0 version range, then regenerate the
lockfile so the resolved package metadata is consistent.
- Line 31: Remove the legacy unscoped docusaurus dependency from package.json
and remove its corresponding package, resolution, and dependency entries from
pnpm-lock.yaml. Keep the existing scoped Docusaurus v3 packages and scripts
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 8019d04a-ce52-4a06-a8b4-332c010f13a6
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
docusaurus.config.tspackage.json
| "@mdx-js/react": "^3.1.1", | ||
| "@types/react": "^19.2.7", | ||
| "clsx": "^2.0.0", | ||
| "docusaurus": "^1.14.7", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== package files =="
git ls-files '*package.json*' | sed -n '1,120p'
echo "== root package.json relevant deps =="
python3 - <<'PY'
import json
from pathlib import Path
p=Path("package.json")
if not p.exists():
raise SystemExit("no root package.json")
pkg=json.loads(p.read_text())
for section in ("dependencies","devDependencies","peerDependencies","optionalDependencies"):
vals=pkg.get(section,{})
hits={k:v for k,v in vals.items() if "docusaurus" in k.lower()}
if hits:
print(section, hits)
PY
echo "== docusaurus usage references =="
rg -n --hidden --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' 'docusaurus|`@docusaurus/core`|docusaurus-plugin|`@docusaurus/`(core|plugin|theme)|migration' . | sed -n '1,240p'
echo "== lockfile docusaurus entries =="
for f in package-lock.json yarn.lock pnpm-lock.yaml lockfile.yaml; do
if [ -f "$f" ]; then
echo "--- $f docusavirus refs (sample) ---"
rg -n 'docusaurus(@|:| )|`@docusaurus`' "$f" | sed -n '1,220p'
fi
done
echo "== package manager and lockfile top-level package references =="
if [ -f package.json ]; then
python3 - <<'PY'
import json
p=json.load(open('package.json'))
for section in ('dependencies','devDependencies','peerDependencies'):
print(section, p.get(section,{}).get('docusaurus'), p.get(section,{}).get('`@docusaurus/core`'))
PY
fiRepository: PalisadoesFoundation/developer-docs
Length of output: 50391
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== root package.json =="
cat -n package.json | sed -n '1,90p'
echo "== pnpm lock root imports for docusaurus entries =="
sed -n '1,70p' pnpm-lock.yaml
echo "== exact pnpm lock import references for docusaurus@1.14.7 =="
rg -n -C 3 '/^ docusaurus@1\.14\.7|^importers:|^packageManager:|^lockfileVersion|docusaurus@1\.14\.7' pnpm-lock.yaml | sed -n '1,180p'
echo "== docusaurus v1 package metadata (registry) =="
node - <<'JS'
const https = require('https')
https.get('https://registry.npmjs.org/docusaurus/1.14.7', opts => {
let data = ''
opts.on('data', chunk => data += chunk)
opts.on('end', () => {
const meta = JSON.parse(data)
delete meta.time
delete meta._id
console.log(JSON.stringify({
version: meta.version,
bin: meta.bin,
scripts: meta.scripts,
dependencies: Object.fromEntries(Object.entries(meta.dependencies || {}).filter(([k]) => k.toLowerCase().includes('docusaurus') || ['react','core-js','terser-webpack-plugin','webpack'].includes(k))),
devDependencies: Object.fromEntries(Object.entries(meta.devDependencies || {}).filter(([k]) => k.toLowerCase().includes('docusaurus') || ['react','core-js','terser-webpack-plugin','webpack'].includes(k))),
}, null, 2))
})
}).on('error', err => {
console.error(err && err.message)
process.exit(1)
})Repository: PalisadoesFoundation/developer-docs
Length of output: 7618
🌐 Web query:
Docusaurus 3 create package @docusaurus/core CLI start build install legacy npm package docusaurus
💡 Result:
In modern Docusaurus (version 3 and above), the original legacy npm package named docusaurus is obsolete and replaced by a modular structure based on scoped packages under the @docusaurus/ namespace [1][2]. Core Package and CLI The package @docusaurus/core is the primary engine of a Docusaurus 3 project [3]. It is not intended to be installed as a global CLI tool in the way the legacy package was. Instead, Docusaurus 3 uses the create-docusaurus tool for scaffolding and provides a local CLI bundled within your project's dependencies to manage site tasks [4][5]. Installation To start a new Docusaurus 3 project, use the recommended initialization command, which scaffolds a project with the necessary dependencies (including @docusaurus/core and @docusaurus/preset-classic) [4][6]: npx create-docusaurus@latest my-website classic If you are adding Docusaurus to an existing project or managing dependencies manually, add the required scoped packages to your package.json [4][7]: npm install @docusaurus/core @docusaurus/preset-classic Running CLI Commands Once your project is installed, you do not use a global docusaurus command. Instead, you invoke the CLI scripts configured in your package.json [5]: { "scripts": { "start": "docusaurus start", "build": "docusaurus build" } } You execute these commands using your package manager (e.g., npm run start or npm run build), which triggers the local version of the CLI [5]. Migration Note If you are migrating from the legacy Docusaurus 1 (which used the docusaurus npm package), you must replace the legacy dependency with @docusaurus/core and @docusaurus/preset-classic, and update your CLI scripts to reference the new local execution pattern [1][2]. Automated migration tools are available to assist with this transition [8][9].
Citations:
- 1: https://docusaurus.io/docs/migration/v2/manual
- 2: https://github.com/facebook/docusaurus/blob/v3.10.0/website/versioned_docs/version-3.6.3/migration/v2/migration-manual.mdx
- 3: https://www.npmjs.com/package/@docusaurus/core
- 4: https://docusaurus.io/docs/installation
- 5: https://docusaurus.io/docs/cli
- 6: https://docusaurus.io/docs/3.9.2/installation
- 7: https://docusaurus.io/docs/next/installation
- 8: https://docusaurus.io/docs/migration/v2
- 9: https://docusaurus.io/docs/migration/v2/automated
Remove the legacy Docusaurus v1 package.
This project already installs the scoped Docusaurus v3 packages (@docusaurus/core, @docusaurus/faster, @docusaurus/preset-classic). The unscoped docusaurus@1.14.7 dependency is stale, is not needed for the current docusaurus start/build scripts, and should be dropped from both package.json and pnpm-lock.yaml unless there is a separate v1 site that still depends on it.
Proposed fix
- "docusaurus": "^1.14.7",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "docusaurus": "^1.14.7", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` at line 31, Remove the legacy unscoped docusaurus dependency
from package.json and remove its corresponding package, resolution, and
dependency entries from pnpm-lock.yaml. Keep the existing scoped Docusaurus v3
packages and scripts unchanged.
| "@typescript-eslint/eslint-plugin": "^8.48.0", | ||
| "@typescript-eslint/parser": "^8.51.0", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "package.json relevant deps:"
python3 - <<'PY'
import json
from pathlib import Path
p=Path('package.json')
data=json.loads(p.read_text())
for sec in ['devDependencies','dependencies']:
if sec in data:
vals={k:data[sec][k] for k in data[sec] if k.startswith('`@typescript-eslint/`') or k in ('eslint','`@eslint/eslintrc`','typescript')}
if vals:
print(sec)
for k,v in sorted(vals.items()):
print(f" {k}: {v}")
PY
echo
echo "lockfile yarn/npm/pnpm references:"
for f in package-lock.json yarn.lock pnpm-lock.yaml; do
if [ -f "$f" ]; then
echo "--- $f ---"
rg -n '`@typescript-eslint/`(eslint-plugin|parser)|typescript-eslint' "$f" | head -80 || true
fi
doneRepository: PalisadoesFoundation/developer-docs
Length of output: 5374
🌐 Web query:
typescript-eslint versioning synchronized @typescript-eslint/parser @typescript-eslint/eslint-plugin versions
💡 Result:
Yes, all packages within the typescript-eslint project, including @typescript-eslint/parser and @typescript-eslint/eslint-plugin, are published with the same version number [1][2][3]. This synchronization is maintained to simplify coordination during releases and installations [1][3]. While the packages share the same version number, they remain separate entities with distinct public API surfaces and versioning considerations for breaking changes [3]. The project follows semantic versioning (semver), but determines what constitutes a "breaking" change based on the specific impact of the change on the individual package [3]. For example, a change in the parser is evaluated based on its specific API, while a change in the plugin is evaluated based on whether it requires users to update their ESLint configuration [3]. The project also uses peer dependencies to manage relationships between these packages, which helps ensure that users maintain version compatibility across the suite [4][5].
Citations:
- 1: https://github.com/typescript-eslint/typescript-eslint/blob/91d71bcf6b2f822116d25b281e289fe1d5005401/README.md
- 2: https://github.com/typescript-eslint/typescript-eslint/tree/6edebcda00053eecf7b3e55eeb3fe5d7fb9e7db7
- 3: https://typescript-eslint.io/users/versioning/
- 4: Make @typescript-eslint/parser a direct dependency of @typescript-eslint/eslint-plugin typescript-eslint/typescript-eslint#4058
- 5: Bug: Not compatible peerDependencies typescript-eslint/typescript-eslint#8616
Align the @typescript-eslint package versions in package.json.
The parser is ^8.51.0, while the plugin remains ^8.48.0; TypeScript ESLint packages are published with coordinated versions, so use the same range here and regenerate the lockfile.
Proposed fix
- "`@typescript-eslint/eslint-plugin`": "^8.48.0",
+ "`@typescript-eslint/eslint-plugin`": "^8.51.0",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "@typescript-eslint/eslint-plugin": "^8.48.0", | |
| "@typescript-eslint/parser": "^8.51.0", | |
| "`@typescript-eslint/eslint-plugin`": "^8.51.0", | |
| "`@typescript-eslint/parser`": "^8.51.0", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` around lines 44 - 45, Align the
`@typescript-eslint/eslint-plugin` dependency in package.json with the parser’s
^8.51.0 version range, then regenerate the lockfile so the resolved package
metadata is consistent.
Made changes for docusaurus v4 1785293457
Summary by CodeRabbit