Skip to content

refactor!: make @docusaurus/* peer/dev deps instead of bundled - #122

Merged
dipakparmar merged 1 commit into
nextfrom
refactor/docusaurus-peer-deps
Jul 12, 2026
Merged

dipakparmar merged 1 commit into
nextfrom
refactor/docusaurus-peer-deps

Conversation

@dipakparmar

Copy link
Copy Markdown
Owner

What

Stops bundling Docusaurus core packages as runtime dependencies and expresses them correctly.

  • @docusaurus/utils-validation (runtime — provides Joi): dependency → peerDependency ^3.0.0 + devDependency (for building/tests)
  • @docusaurus/types (type-only): dependency → devDependency (consumers resolve it transitively from their own Docusaurus install)
  • Dropped tslib + tsconfig importHelpers — inert at target: ES2022 (no helpers are emitted; verified dist/ contains no tslib refs)

Why

A Docusaurus plugin runs inside a Docusaurus site that already ships these packages. Bundling utils-validation as an exact dependency (3.10.1) meant a site on any other 3.x got a second, duplicate copy in its tree — a classic source of version skew. As peers, the plugin uses whatever the site already has.

BREAKING CHANGE

@docusaurus/utils-validation is now a peer. A consumer on a Docusaurus version outside ^3.0.0 will get an explicit unmet-peer error instead of a silently-bundled copy. → major release (3.0.0).

Verification

bun run build, typecheck, lint, format:check, knip all pass; dist/ has no tslib references.

BREAKING CHANGE: @docusaurus/utils-validation is now a peerDependency
(^3.0.0) rather than a bundled dependency, so the consumer site's own
Docusaurus install provides it — no duplicate copy in the tree.

- @docusaurus/utils-validation: dependency -> peerDependency ^3.0.0 + devDependency
- @docusaurus/types: dependency -> devDependency only (type-only, resolved
  transitively from the consumer's Docusaurus install)
- drop tslib + tsconfig importHelpers (inert at target ES2022, no helpers emitted)
@changeset-bot

changeset-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 51e6549

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@dipakparmar, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 62682f92-a764-4240-bd88-f2185fabae43

📥 Commits

Reviewing files that changed from the base of the PR and between e68deda and 51e6549.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • package.json
  • tsconfig.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/docusaurus-peer-deps

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Jul 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@dipakparmar/docusaurus-plugin-umami@122

commit: 51e6549

@dipakparmar
dipakparmar changed the base branch from main to next July 12, 2026 21:09
@dipakparmar
dipakparmar merged commit d920669 into next Jul 12, 2026
10 checks passed
@dipakparmar
dipakparmar deleted the refactor/docusaurus-peer-deps branch July 12, 2026 21:11
@dipakparmar dipakparmar mentioned this pull request Jul 12, 2026
dipakparmar added a commit that referenced this pull request Jul 12, 2026
Sync Dependabot bumps merged directly to main (#119, #121): knip 5->6,
oxfmt 0.51->0.58, semantic-release 25.0.3->25.0.5. Kept tslib removed
(dropped in #122). All checks green.
dipakparmar added a commit that referenced this pull request Jul 12, 2026
* refactor!: @docusaurus/* peer/dev deps (#122)
* feat: enableRecorder — session replays & heatmaps (#123)
* feat: custom event tracking, distinct IDs & auto-identify (#124)
github-actions Bot added a commit that referenced this pull request Jul 12, 2026
# [3.0.0](v2.4.0...v3.0.0) (2026-07-12)

* refactor!: make @docusaurus/* peer/dev deps instead of bundled ([#122](#122)) ([d920669](d920669))

### Features

* add enableRecorder option (session replays & heatmaps) ([#123](#123)) ([3333164](3333164))
* custom event tracking, distinct IDs & anonymous auto-identify ([#124](#124)) ([fb9a939](fb9a939))

### BREAKING CHANGES

* @docusaurus/utils-validation is now a peerDependency
(^3.0.0) rather than a bundled dependency, so the consumer site's own
Docusaurus install provides it — no duplicate copy in the tree.

- @docusaurus/utils-validation: dependency -> peerDependency ^3.0.0 + devDependency
- @docusaurus/types: dependency -> devDependency only (type-only, resolved
  transitively from the consumer's Docusaurus install)
- drop tslib + tsconfig importHelpers (inert at target ES2022, no helpers emitted)
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant