Skip to content

build(deps): upgrade package dependencies#2654

Merged
nperez0111 merged 11 commits intomainfrom
package-upgrades
Apr 18, 2026
Merged

build(deps): upgrade package dependencies#2654
nperez0111 merged 11 commits intomainfrom
package-upgrades

Conversation

@nperez0111
Copy link
Copy Markdown
Contributor

@nperez0111 nperez0111 commented Apr 16, 2026

Summary

  • Replace uuid with lib0/random for UUID generation and fix corresponding test mock
  • Upgrade shiki packages to v4 in docs and examples
  • Upgrade @tanstack/store to 0.10.0 and @tanstack/react-store to 0.10.0
  • Upgrade Vite to 8.0.8 and Vitest to 4.1.4 across all packages
  • Upgrade jsdom to ^29.0.2 in @blocknote/core

Details

Batch dependency upgrade covering multiple packages. All core tests pass (325/325, 3 skipped). The uuid package has been replaced with lib0/random's uuidv4, which was already a transitive dependency via Yjs, removing an unnecessary direct dependency.

Summary by CodeRabbit

  • Chores

    • Upgraded syntax-highlighting packages to v4 and bumped Vite across the repo; updated several example/runtime dependencies (AI, code-block, exporters) and a docx minor version.
    • Adjusted workspace/CI package-store configuration and added a pnpm override for consistent tooling.
  • Refactor

    • Standardized internal state update semantics and unified ID generation source across extensions/components with no public API changes.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Apr 18, 2026 7:51am
blocknote-website Ready Ready Preview Apr 18, 2026 7:51am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Changed many package manifests (dev tooling bumps, Shiki @shikijs v3→v4), migrated UUID generation from uuid to lib0/random, refactored store creation/subscription patterns, converted many store.setState calls to functional updaters, adjusted tests, and added CI pnpm store env while removing workspace storeDir.

Changes

Cohort / File(s) Summary
Root & CI manifests
package.json, .github/workflows/.../build.yml, .github/workflows/.../fresh-install-tests.yml, .github/workflows/.../publish.yaml, pnpm-workspace.yaml
Added pnpm_config_store_dir env to workflows; removed storeDir from pnpm workspace; added pnpm.overrides entry in root package.json.
Docs / Shiki upgrades
docs/package.json, examples/04-theming/**/package.json
Upgraded shiki and @shikijs/* constraints from 3.x → ^4 in docs/examples manifests.
Tooling bumps (vite etc.)
examples/**/package.json, packages/**/package.json, playground/package.json, tests/package.json
Widespread bump of vite devDependency from ^8.0.3^8.0.8; many example manifests also reordered or added runtime deps.
TanStack store & deps
packages/core/package.json, packages/react/package.json
Updated @tanstack/store / @tanstack/react-store versions; added lib0, removed uuid and some type deps; bumped dev tooling versions.
UUID → lib0/random
packages/core/src/.../YjsThreadStore.ts, .../Placeholder.ts, .../UniqueID.ts, tests (YjsThreadStore.test.ts)
Replaced uuid.v4() with lib0/random.uuidv4() and updated tests to mock lib0/random for deterministic IDs.
createStore / subscription refactor
packages/core/src/editor/BlockNoteExtension.ts, packages/core/src/comments/extension.ts, packages/core/src/extensions/ShowSelection/ShowSelection.ts
Removed createStore onUpdate/StoreOptions usage; moved on-update logic into explicit store.subscribe() in mount lifecycle and updated unsubscribe/cleanup handling.
Functional updaters for setState
packages/core/src/extensions/..., packages/react/src/..., packages/xl-ai/src/...
Converted numerous store.setState(value) calls to store.setState(() => value) (functional updaters) across extensions and React components.
Hooks & tests
packages/react/src/hooks/useExtension.ts, packages/core/src/comments/threadstore/yjs/YjsThreadStore.test.ts
useExtensionState now always passes a selector (defaults to identity); tests adapted to new lib0/random mocking.
Example runtime deps
examples/**/package.json
Reordered and added example runtime dependencies (various @blocknote/*, AWS, AI packages) without broad version changes to most entries.

Sequence Diagram(s)

sequenceDiagram
  participant Editor as Editor
  participant Extension as Extension
  participant Store as Store
  participant Yjs as YjsThreadStore

  Editor->>Extension: mount()
  Extension->>Store: createStore(initialState)
  Extension->>Store: subscribe(onChange)
  Store-->>Extension: notify(stateChange)
  Extension->>Editor: editor.transact(setMeta(...))
  Editor->>Yjs: addComment(...)
  Yjs->>Yjs: generate id via uuidv4()
  Yjs-->>Store: update thread/comment state
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐇 I hopped through deps and changed the tune,
lib0 now hums beneath the moon.
Stores subscribe and updates wait,
Vite leapt forward — examples sate.
A twitching nose — the repo’s in tune.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(deps): upgrade package dependencies' clearly and concisely summarizes the main change—a batch dependency upgrade across the project.
Description check ✅ Passed The PR description provides a clear summary of changes and includes details about the batch upgrade, testing results, and rationale for removing uuid. However, it lacks several sections from the template (Impact, Testing methodology details, Screenshots, and Checklist).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch package-upgrades

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/core/src/extensions/ShowSelection/ShowSelection.ts (1)

50-54: Use the updater's prev argument instead of reading store.state.

Since you've switched to a functional updater, derive the next state from the callback argument rather than re-reading store.state inside it — otherwise the functional form offers no benefit over passing an object.

♻️ Proposed refactor
-      store.setState(() => ({
+      store.setState((prev) => ({
         enabledSet: shouldShow
-          ? new Set([...store.state.enabledSet, key])
-          : new Set([...store.state.enabledSet].filter((k) => k !== key)),
+          ? new Set([...prev.enabledSet, key])
+          : new Set([...prev.enabledSet].filter((k) => k !== key)),
       }));
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/extensions/ShowSelection/ShowSelection.ts` around lines 50
- 54, The updater passed to store.setState currently reads store.state inside
the functional updater; change it to use the updater argument (commonly named
prev) to derive the new enabledSet so you don't re-read external state. In the
store.setState callback for ShowSelection, compute enabledSet from
prev.enabledSet (e.g., create a new Set from prev.enabledSet, add or remove key
based on shouldShow) and return that object instead of referencing
store.state.enabledSet.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/core/src/comments/extension.ts`:
- Around line 100-108: The new store.subscribe created next to
prevSelectedThreadId must be cleaned up on unmount: move the subscription
registration into mount() (alongside threadStore.subscribe and
onSelectionChange) or capture the unsubscribe function returned by
store.subscribe and store it so it can be called during the existing teardown;
ensure you keep the same logic that compares prevSelectedThreadId and calls
editor.transact(tr => tr.setMeta(PLUGIN_KEY, true)), but save the unsubscribe
and invoke it during the mount() cleanup so the listener does not outlive the
extension/editor.

In `@packages/core/src/extensions/ShowSelection/ShowSelection.ts`:
- Around line 17-19: Move the store.subscribe call out of the top-level and into
the ShowSelection extension's mount method so the returned unsubscribe function
can be cleaned up with the provided AbortSignal; inside mount, call
store.subscribe(() => editor.transact((tr) => tr.setMeta(PLUGIN_KEY, {}))) and
capture the unsubscribe function, then either listen to
signal.addEventListener('abort', ...) to call unsubscribe or return an OnDestroy
callback that calls unsubscribe so the subscription is disposed when the
extension is destroyed.

---

Nitpick comments:
In `@packages/core/src/extensions/ShowSelection/ShowSelection.ts`:
- Around line 50-54: The updater passed to store.setState currently reads
store.state inside the functional updater; change it to use the updater argument
(commonly named prev) to derive the new enabledSet so you don't re-read external
state. In the store.setState callback for ShowSelection, compute enabledSet from
prev.enabledSet (e.g., create a new Set from prev.enabledSet, add or remove key
based on shouldShow) and return that object instead of referencing
store.state.enabledSet.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4f718a90-3704-480f-8f44-2d750250fc96

📥 Commits

Reviewing files that changed from the base of the PR and between cb51b28 and 32c3790.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (123)
  • docs/package.json
  • examples/01-basic/01-minimal/package.json
  • examples/01-basic/02-block-objects/package.json
  • examples/01-basic/03-multi-column/package.json
  • examples/01-basic/04-default-blocks/package.json
  • examples/01-basic/05-removing-default-blocks/package.json
  • examples/01-basic/06-block-manipulation/package.json
  • examples/01-basic/07-selection-blocks/package.json
  • examples/01-basic/08-ariakit/package.json
  • examples/01-basic/09-shadcn/package.json
  • examples/01-basic/10-localization/package.json
  • examples/01-basic/11-custom-placeholder/package.json
  • examples/01-basic/12-multi-editor/package.json
  • examples/01-basic/13-custom-paste-handler/package.json
  • examples/01-basic/14-editor-scrollable/package.json
  • examples/01-basic/15-shadowdom/package.json
  • examples/01-basic/16-read-only-editor/package.json
  • examples/01-basic/testing/package.json
  • examples/02-backend/01-file-uploading/package.json
  • examples/02-backend/02-saving-loading/package.json
  • examples/02-backend/03-s3/package.json
  • examples/02-backend/04-rendering-static-documents/package.json
  • examples/03-ui-components/01-ui-elements-remove/package.json
  • examples/03-ui-components/02-formatting-toolbar-buttons/package.json
  • examples/03-ui-components/03-formatting-toolbar-block-type-items/package.json
  • examples/03-ui-components/04-side-menu-buttons/package.json
  • examples/03-ui-components/05-side-menu-drag-handle-items/package.json
  • examples/03-ui-components/06-suggestion-menus-slash-menu-items/package.json
  • examples/03-ui-components/07-suggestion-menus-slash-menu-component/package.json
  • examples/03-ui-components/08-suggestion-menus-emoji-picker-columns/package.json
  • examples/03-ui-components/09-suggestion-menus-emoji-picker-component/package.json
  • examples/03-ui-components/10-suggestion-menus-grid-mentions/package.json
  • examples/03-ui-components/11-uppy-file-panel/package.json
  • examples/03-ui-components/12-static-formatting-toolbar/package.json
  • examples/03-ui-components/13-custom-ui/package.json
  • examples/03-ui-components/14-experimental-mobile-formatting-toolbar/package.json
  • examples/03-ui-components/15-advanced-tables/package.json
  • examples/03-ui-components/16-link-toolbar-buttons/package.json
  • examples/03-ui-components/17-advanced-tables-2/package.json
  • examples/03-ui-components/18-drag-n-drop/package.json
  • examples/04-theming/01-theming-dom-attributes/package.json
  • examples/04-theming/02-changing-font/package.json
  • examples/04-theming/03-theming-css/package.json
  • examples/04-theming/04-theming-css-variables/package.json
  • examples/04-theming/05-theming-css-variables-code/package.json
  • examples/04-theming/06-code-block/package.json
  • examples/04-theming/07-custom-code-block/package.json
  • examples/05-interoperability/01-converting-blocks-to-html/package.json
  • examples/05-interoperability/02-converting-blocks-from-html/package.json
  • examples/05-interoperability/03-converting-blocks-to-md/package.json
  • examples/05-interoperability/04-converting-blocks-from-md/package.json
  • examples/05-interoperability/05-converting-blocks-to-pdf/package.json
  • examples/05-interoperability/06-converting-blocks-to-docx/package.json
  • examples/05-interoperability/07-converting-blocks-to-odt/package.json
  • examples/05-interoperability/08-converting-blocks-to-react-email/package.json
  • examples/05-interoperability/09-blocks-to-html-static-render/package.json
  • examples/05-interoperability/10-static-html-render/package.json
  • examples/06-custom-schema/01-alert-block/package.json
  • examples/06-custom-schema/02-suggestion-menus-mentions/package.json
  • examples/06-custom-schema/03-font-style/package.json
  • examples/06-custom-schema/04-pdf-file-block/package.json
  • examples/06-custom-schema/05-alert-block-full-ux/package.json
  • examples/06-custom-schema/06-toggleable-blocks/package.json
  • examples/06-custom-schema/07-configuring-blocks/package.json
  • examples/06-custom-schema/draggable-inline-content/package.json
  • examples/06-custom-schema/react-custom-blocks/package.json
  • examples/06-custom-schema/react-custom-inline-content/package.json
  • examples/06-custom-schema/react-custom-styles/package.json
  • examples/07-collaboration/01-partykit/package.json
  • examples/07-collaboration/02-liveblocks/package.json
  • examples/07-collaboration/03-y-sweet/package.json
  • examples/07-collaboration/04-electric-sql/package.json
  • examples/07-collaboration/05-comments/package.json
  • examples/07-collaboration/06-comments-with-sidebar/package.json
  • examples/07-collaboration/07-ghost-writer/package.json
  • examples/07-collaboration/08-forking/package.json
  • examples/08-extensions/01-tiptap-arrow-conversion/package.json
  • examples/09-ai/01-minimal/package.json
  • examples/09-ai/02-playground/package.json
  • examples/09-ai/03-custom-ai-menu-items/package.json
  • examples/09-ai/04-with-collaboration/package.json
  • examples/09-ai/05-manual-execution/package.json
  • examples/09-ai/06-client-side-transport/package.json
  • examples/09-ai/07-server-persistence/package.json
  • examples/vanilla-js/react-vanilla-custom-blocks/package.json
  • examples/vanilla-js/react-vanilla-custom-inline-content/package.json
  • examples/vanilla-js/react-vanilla-custom-styles/package.json
  • package.json
  • packages/ariakit/package.json
  • packages/code-block/package.json
  • packages/core/package.json
  • packages/core/src/comments/extension.ts
  • packages/core/src/comments/threadstore/yjs/YjsThreadStore.test.ts
  • packages/core/src/comments/threadstore/yjs/YjsThreadStore.ts
  • packages/core/src/editor/BlockNoteExtension.ts
  • packages/core/src/extensions/Collaboration/ForkYDoc.ts
  • packages/core/src/extensions/FilePanel/FilePanel.ts
  • packages/core/src/extensions/FormattingToolbar/FormattingToolbar.ts
  • packages/core/src/extensions/Placeholder/Placeholder.ts
  • packages/core/src/extensions/ShowSelection/ShowSelection.ts
  • packages/core/src/extensions/SideMenu/SideMenu.ts
  • packages/core/src/extensions/SuggestionMenu/SuggestionMenu.ts
  • packages/core/src/extensions/TableHandles/TableHandles.ts
  • packages/core/src/extensions/tiptap-extensions/UniqueID/UniqueID.ts
  • packages/mantine/package.json
  • packages/react/package.json
  • packages/react/src/components/FormattingToolbar/DefaultButtons/AddCommentButton.tsx
  • packages/react/src/components/FormattingToolbar/DefaultButtons/CreateLinkButton.tsx
  • packages/react/src/components/FormattingToolbar/FormattingToolbarController.tsx
  • packages/react/src/hooks/useExtension.ts
  • packages/server-util/package.json
  • packages/shadcn/package.json
  • packages/xl-ai-server/package.json
  • packages/xl-ai/package.json
  • packages/xl-ai/src/AIExtension.ts
  • packages/xl-ai/src/components/FormattingToolbar/AIToolbarButton.tsx
  • packages/xl-docx-exporter/package.json
  • packages/xl-email-exporter/package.json
  • packages/xl-multi-column/package.json
  • packages/xl-odt-exporter/package.json
  • packages/xl-pdf-exporter/package.json
  • playground/package.json
  • tests/package.json

Comment thread packages/core/src/comments/extension.ts Outdated
Comment thread packages/core/src/extensions/ShowSelection/ShowSelection.ts Outdated
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 17, 2026

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@2654

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@2654

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@2654

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@2654

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@2654

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@2654

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@2654

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@2654

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@2654

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@2654

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@2654

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@2654

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@2654

commit: 32be46b

…ures

During fresh install (no lockfile), @vitest/runner ^4.1.2 resolves to 4.1.4
while vitest@4.1.2 (pinned by override) bundles its own @vitest/runner@4.1.2.
Two separate singleton instances cause getCurrentTest() to return a test
object without suite context, breaking msw-snapshot's createSnapshotPath
in xl-ai streaming tests.
Replace the blunt 'rm pnpm-lock.yaml' approach with targeted
'pnpm update --prod' for all published packages. This only
re-resolves production dependencies, keeping devDependencies
pinned to the lockfile so test tooling churn doesn't cause
false positives.

A node one-liner dynamically discovers non-private workspace
packages, so no workflow changes are needed when packages are
added or removed.
After pnpm update --prod rewrites inter-workspace deps to workspace:*,
npm pack preserves the protocol literally in tarballs. npm install then
fails because it doesn't understand workspace:*. pnpm pack correctly
resolves workspace:* to actual version numbers during packing.
@nperez0111 nperez0111 changed the title fix(deps): upgrade package dependencies build(deps): upgrade package dependencies Apr 18, 2026
@nperez0111 nperez0111 merged commit 40ddec4 into main Apr 18, 2026
12 checks passed
@nperez0111 nperez0111 deleted the package-upgrades branch April 18, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant