Skip to content

fix: add .js extension to fast-deep-equal ESM import#2641

Merged
nperez0111 merged 1 commit intomainfrom
feat/fix-next-server-util-ci
Apr 13, 2026
Merged

fix: add .js extension to fast-deep-equal ESM import#2641
nperez0111 merged 1 commit intomainfrom
feat/fix-next-server-util-ci

Conversation

@nperez0111
Copy link
Copy Markdown
Contributor

@nperez0111 nperez0111 commented Apr 13, 2026

Summary

Fixes the CI failure introduced by d8fb6c2 (Next.js server-util integration test) by adding the .js extension to the fast-deep-equal/es6/react import in @blocknote/react.

Rationale

The fast-deep-equal package has no exports field in its package.json, so Node.js ESM strictly requires the .js file extension to resolve subpath imports. The Next.js test app runs under ESM, causing ERR_MODULE_NOT_FOUND at runtime.

Changes

  • Added .js extension to fast-deep-equal/es6/react import in packages/react/src/hooks/useEditorState.ts

Impact

No impact on existing bundler-based consumers (Webpack, Vite, etc.) since they already resolve extensionless imports. This change only affects Node.js ESM resolution, fixing the server-util test.

Testing

  • Rebuilt @blocknote/react and verified the dist output contains the corrected import path with .js extension.

Checklist

  • Code follows the project's coding standards.
  • All existing tests pass.

Summary by CodeRabbit

  • Chores
    • Internal dependency path adjustment to ensure proper module resolution.

…atibility

The Next.js server-util test failed because fast-deep-equal has no exports
field, so Node.js ESM requires the explicit .js extension to resolve the file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 2026

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

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Apr 13, 2026 0:01am
blocknote-website Ready Ready Preview Apr 13, 2026 0:01am

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3584bdec-b2b6-4214-b2f9-c39dd74e0bd2

📥 Commits

Reviewing files that changed from the base of the PR and between 90b1598 and 1b86baf.

📒 Files selected for processing (1)
  • packages/react/src/hooks/useEditorState.ts

📝 Walkthrough

Walkthrough

Updated the import path for the deepEqual function in the useEditorState hook from fast-deep-equal/es6/react to fast-deep-equal/es6/react.js, resolving the module entry without altering any hook logic or control flow.

Changes

Cohort / File(s) Summary
Import Path Update
packages/react/src/hooks/useEditorState.ts
Updated deepEqual import path to include explicit .js file extension for module resolution.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A tiny tweak, so small and neat,
An import path made more complete,
With .js appended, clear as day,
The module resolves the proper way!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change—adding .js extension to the fast-deep-equal ESM import to fix a CI failure.
Description check ✅ Passed The description covers all critical sections: Summary, Rationale, Changes, Impact, and Testing. Non-critical sections like Screenshots and full Checklist items are appropriately omitted or marked as complete.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fix-next-server-util-ci

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.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 13, 2026

Open in StackBlitz

@blocknote/ariakit

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

@blocknote/code-block

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

@blocknote/core

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

@blocknote/mantine

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

@blocknote/react

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

@blocknote/server-util

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

@blocknote/shadcn

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

@blocknote/xl-ai

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

@blocknote/xl-docx-exporter

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

@blocknote/xl-email-exporter

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

@blocknote/xl-multi-column

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

@blocknote/xl-odt-exporter

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

@blocknote/xl-pdf-exporter

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

commit: 1b86baf

@nperez0111 nperez0111 merged commit 5927ea9 into main Apr 13, 2026
22 of 23 checks passed
@nperez0111 nperez0111 deleted the feat/fix-next-server-util-ci branch April 13, 2026 12:15
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