Skip to content
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

[PE-228] fix: update tiptap package versions #6361

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

aaryan610
Copy link
Collaborator

@aaryan610 aaryan610 commented Jan 9, 2025

Description

This PR updates the tiptap packages to the latest stable version.

Type of Change

  • Improvement (change that would cause existing functionality to not work as expected)

Summary by CodeRabbit

  • Dependency Updates

    • Updated @tiptap library dependencies to version 2.11.0 across multiple packages
    • Removed react-moveable dependency from editor package
    • Locked dependency versions to specific releases instead of using caret versioning
  • Code Maintenance

    • Added TypeScript error suppression comments for Tiptap library type inconsistencies
    • Enhanced configuration for editor extensions, including detailed HTML attributes and options for various features

@aaryan610 aaryan610 added this to the v0.24.0 milestone Jan 9, 2025
Copy link
Contributor

coderabbitai bot commented Jan 9, 2025

Walkthrough

This pull request focuses on updating Tiptap library dependencies across multiple files in the project. The changes primarily involve upgrading versions of @tiptap packages in live/package.json and packages/editor/package.json, moving from caret (^) to exact versions. Additionally, the react-moveable dependency was removed. Several source files received TypeScript error suppression comments related to Tiptap type definitions, and some extension configurations were expanded with more detailed HTML attribute specifications.

Changes

File Change Summary
live/package.json Updated @tiptap/core and @tiptap/html from caret to exact versions 2.10.4 and 2.11.0 respectively.
packages/editor/package.json - Updated multiple @tiptap/* dependencies to version 2.10.4 and 2.11.0
- Removed react-moveable dependency
packages/editor/src/core/extensions/extensions.tsx - Added TypeScript error suppression comment
- Expanded StarterKit extension configuration
- Enhanced extension configurations with detailed HTML attributes
packages/editor/src/core/extensions/read-only-extensions.tsx Added TypeScript error suppression comment for StarterKit configuration
packages/editor/src/core/helpers/editor-commands.ts Added TypeScript error suppression comments for various editor command functions
packages/editor/src/core/helpers/yjs-utils.ts Added TypeScript error suppression comments for schema and JSON generation functions

Possibly related PRs

Suggested reviewers

  • rahulramesha
  • SatishGandham

Poem

🐰 Hopping through code with glee,
Tiptap versions dancing free!
Dependencies aligned just right,
Errors suppressed with TypeScript might.
A rabbit's update, clean and bright! 🚀


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3adc0f4 and e99cf38.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • live/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • live/package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)

Finishing Touches

  • 📝 Generate Docstrings

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@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/editor/src/core/helpers/yjs-utils.ts (1)

15-18: Consolidate TypeScript error handling across the codebase.

Multiple TypeScript errors are being suppressed in utility functions. Consider:

  1. Creating a central location for type definitions
  2. Documenting known type issues
  3. Planning for a proper fix in a follow-up PR

Also applies to: 59-60, 75-76, 104-105, 134-135

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d8f66a and 3adc0f4.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (6)
  • live/package.json (1 hunks)
  • packages/editor/package.json (1 hunks)
  • packages/editor/src/core/extensions/extensions.tsx (1 hunks)
  • packages/editor/src/core/extensions/read-only-extensions.tsx (1 hunks)
  • packages/editor/src/core/helpers/editor-commands.ts (3 hunks)
  • packages/editor/src/core/helpers/yjs-utils.ts (5 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/editor/src/core/extensions/read-only-extensions.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
packages/editor/src/core/extensions/extensions.tsx (1)

Line range hint 54-89: Good improvements to extension configuration and styling.

The expanded configuration enhances the editor's appearance and accessibility through:

  • Proper list styling and spacing
  • Consistent heading and paragraph block classes
  • Smooth dropcursor transition effects
packages/editor/package.json (3)

43-60: Ensure consistent versions across @tiptap packages.

Most @tiptap packages are updated to 2.11.0, but some (@tiptap/core, @tiptap/extension-blockquote, @tiptap/extension-task-item) are at 2.10.4. This inconsistency might lead to compatibility issues.

Consider updating all packages to 2.11.0 for consistency, or verify that these specific versions are intentionally pinned.


43-60: ⚠️ Breaking Changes Alert: Significant version updates in @tiptap packages.

The updates from 2.1.x/2.3.x/2.6.x/2.7.x/2.8.x to 2.10.4/2.11.0 represent substantial version jumps that may introduce breaking changes. Please ensure:

  1. All editor features are thoroughly tested
  2. Release notes for each package have been reviewed
  3. Breaking changes are documented in the PR description

Run the following script to check for breaking changes in the release notes:


Line range hint 32-75: Verify the impact of removing react-moveable dependency.

The react-moveable package has been removed from dependencies. Please ensure:

  1. No components depend on this package
  2. Alternative implementation is in place if needed

Run the following script to check for any remaining usage:

✅ Verification successful

The removal of react-moveable dependency is safe

The package has been completely removed from the codebase with no remaining references or usage found.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining references to react-moveable

echo "Checking for react-moveable imports..."
rg -l "react-moveable" --type ts --type tsx

echo "Checking for Moveable component usage..."
ast-grep --pattern 'import { Moveable } from "react-moveable"'
ast-grep --pattern '<Moveable'

Length of output: 347


Script:

#!/bin/bash
# Description: Comprehensive check for react-moveable usage

echo "Checking for any react-moveable references..."
rg -l "react-moveable" --type-add 'tsx:*.tsx' --type-add 'ts:*.ts' --type tsx --type ts

echo -e "\nChecking for Moveable imports and usage..."
rg "import.*['\"]react-moveable['\"]" --type-add 'tsx:*.tsx' --type-add 'ts:*.ts' --type tsx --type ts

echo -e "\nChecking for Moveable component references..."
rg "Moveable" --type-add 'tsx:*.tsx' --type-add 'ts:*.ts' --type tsx --type ts -A 2

Length of output: 589

live/package.json Outdated Show resolved Hide resolved
@sriramveeraghanta sriramveeraghanta merged commit 3ab959c into preview Jan 9, 2025
10 of 14 checks passed
@sriramveeraghanta sriramveeraghanta deleted the fix/tiptap-packages branch January 9, 2025 09:22
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.

2 participants