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

Update exmples version to v0.4.20 #822

Merged
merged 2 commits into from
May 24, 2024
Merged

Update exmples version to v0.4.20 #822

merged 2 commits into from
May 24, 2024

Conversation

chacha912
Copy link
Contributor

@chacha912 chacha912 commented May 24, 2024

What this PR does / why we need it?

Update exmples version to v0.4.20

Any background context you want to provide?

What are the relevant tickets?

Fixes #

Checklist

  • Added relevant tests or not required
  • Didn't break anything

Summary by CodeRabbit

  • Dependencies

    • Updated yorkie-js-sdk dependency version from ^0.4.19 to ^0.4.20 across various examples (nextjs-scheduler, profile-stack, react-tldraw, react-todomvc, simultaneous-cursors, vanilla-codemirror6, vuejs-kanban).
  • Enhancements

    • Improved type safety and clarity in vanilla-codemirror6 by updating imports and function parameters to use specific types from yorkie-js-sdk.
  • Bug Fixes

    • Adjusted event subscription in public/quill.html to use a new parameter for Network instance creation, ensuring proper event handling.

@chacha912 chacha912 requested a review from hackerwins May 24, 2024 08:12
Copy link

coderabbitai bot commented May 24, 2024

Warning

Rate Limit Exceeded

@chacha912 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 50 minutes and 0 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 871144c and 7934748.

Walkthrough

The updates primarily involve incrementing the version of the yorkie-js-sdk dependency from ^0.4.19 to ^0.4.20 across various example projects. Additionally, there are minor changes in type imports and function parameters to enhance type safety in the vanilla-codemirror6 example, and an adjustment in event subscription parameters in public/quill.html.

Changes

Files/Paths Change Summary
.../nextjs-scheduler/package.json yorkie-js-sdk version updated from ^0.4.19 to ^0.4.20
.../profile-stack/package.json yorkie-js-sdk version updated from ^0.4.19 to ^0.4.20
.../react-tldraw/package.json yorkie-js-sdk version updated from ^0.4.19 to ^0.4.20
.../react-todomvc/package.json yorkie-js-sdk version updated from ^0.4.19 to ^0.4.20
.../simultaneous-cursors/package.json yorkie-js-sdk version updated from ^0.4.19 to ^0.4.20
.../vanilla-codemirror6/package.json yorkie-js-sdk version updated from ^0.4.19 to ^0.4.20
.../vanilla-codemirror6/src/main.ts Enhanced type safety by updating imports and function parameters
.../vuejs-kanban/package.json yorkie-js-sdk version updated from ^0.4.19 to ^0.4.20
public/quill.html Updated doc.subscribe method to use a different parameter for Network instance creation

🐰✨

In the fields of code, we hop and play,
Updating versions, come what may.
From yorkie-js a minor leap,
To keep our projects running neat.
Type safety grows, our code refined,
In every change, new paths we find.

🌟🚀


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.41%. Comparing base (5098586) to head (7934748).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #822   +/-   ##
=======================================
  Coverage   80.41%   80.41%           
=======================================
  Files          59       59           
  Lines        4535     4535           
  Branches      918      918           
=======================================
  Hits         3647     3647           
  Misses        620      620           
  Partials      268      268           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@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

Outside diff range and nitpick comments (2)
examples/vanilla-codemirror6/src/main.ts (2)

Line range hint 20-24: Avoid using non-null assertions. Consider adding null checks or using optional chaining.

- const editorParentElem = document.getElementById('editor')!;
- const peersElem = document.getElementById('peers')!;
- const documentElem = document.getElementById('document')!;
- const documentTextElem = document.getElementById('document-text')!;
- const networkStatusElem = document.getElementById('network-status')!;
+ const editorParentElem = document.getElementById('editor');
+ const peersElem = document.getElementById('peers');
+ const documentElem = document.getElementById('document');
+ const documentTextElem = document.getElementById('document-text');
+ const networkStatusElem = document.getElementById('network-status');
+ if (!editorParentElem || !peersElem || !documentElem || !documentTextElem || !networkStatusElem) {
+   throw new Error('One or more essential elements are missing in the DOM');
+ }

Line range hint 131-131: Avoid using non-null assertions. Consider adding null checks or using optional chaining.

- insert: op.value!.content,
+ insert: op.value?.content ?? '',
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 5098586 and 871144c.
Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing (10)
  • examples/nextjs-scheduler/package.json (1 hunks)
  • examples/profile-stack/package.json (1 hunks)
  • examples/react-tldraw/package.json (1 hunks)
  • examples/react-todomvc/package.json (1 hunks)
  • examples/simultaneous-cursors/package.json (1 hunks)
  • examples/vanilla-codemirror6/package.json (1 hunks)
  • examples/vanilla-codemirror6/src/main.ts (2 hunks)
  • examples/vanilla-quill/package.json (1 hunks)
  • examples/vuejs-kanban/package.json (1 hunks)
  • public/quill.html (1 hunks)
Files skipped from review due to trivial changes (8)
  • examples/nextjs-scheduler/package.json
  • examples/profile-stack/package.json
  • examples/react-tldraw/package.json
  • examples/react-todomvc/package.json
  • examples/simultaneous-cursors/package.json
  • examples/vanilla-codemirror6/package.json
  • examples/vanilla-quill/package.json
  • examples/vuejs-kanban/package.json
Additional Context Used
Biome (10)
examples/vanilla-codemirror6/src/main.ts (10)

20-20: Forbidden non-null assertion.


21-21: Forbidden non-null assertion.


22-22: Forbidden non-null assertion.


23-23: Forbidden non-null assertion.


24-24: Forbidden non-null assertion.


48-48: Forbidden non-null assertion.


120-124: Prefer for...of instead of forEach.


131-131: Forbidden non-null assertion.


1-6: Some named imports are only used as types.


16-17: All these imports are only used as types.

Additional comments not posted (1)
public/quill.html (1)

74-77: Ensure that the Network instance is properly initialized with networkStatusElem before using it in doc.subscribe.

Verification successful

The Network class constructor in public/util.js properly initializes the elem parameter, storing it in this.elem and using it in methods to update the network status. This confirms that the Network instance is correctly initialized with networkStatusElem before being used in doc.subscribe.

  • public/util.js:
    • class Network:
      • constructor(elem): Initializes this.elem with elem.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the initialization of `Network` instance with `networkStatusElem`.

# Test: Search for the `Network` class definition and its constructor usage. Expect: Proper handling of `networkStatusElem`.
rg --type html --type js 'new Network\('

Length of output: 623



Script:

#!/bin/bash
# Description: Locate the `Network` class definition and inspect its constructor.

# Test: Search for the `Network` class definition and extract its constructor.
ast-grep --lang javascript --pattern $'class Network {
  constructor($_) {
    $$$
  }
}'

Length of output: 90



Script:

#!/bin/bash
# Description: Locate the `Network` class definition and inspect its constructor.

# Step 1: Search for the `class Network` definition across the codebase.
rg --type js 'class Network'

# Step 2: If found, extract the constructor of the `Network` class.
# Note: This step will be executed only if the first step finds the class definition.
rg --type js --after-context=10 'class Network' | rg 'constructor'

Length of output: 165



Script:

#!/bin/bash
# Description: Extract the full constructor implementation of the `Network` class from `public/util.js`.

# Extract the full constructor implementation of the `Network` class.
rg --type js --context=10 'constructor(elem)' public/util.js

Length of output: 62



Script:

#!/bin/bash
# Description: Extract the full constructor implementation of the `Network` class from `public/util.js`.

# Extract the full constructor implementation of the `Network` class with increased context lines.
rg --type js --context=20 'class Network' public/util.js

Length of output: 501

examples/vanilla-codemirror6/src/main.ts Outdated Show resolved Hide resolved
examples/vanilla-codemirror6/src/main.ts Outdated Show resolved Hide resolved
Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

@hackerwins hackerwins merged commit 67b3328 into main May 24, 2024
2 checks passed
@hackerwins hackerwins deleted the examples-v0.4.20 branch May 24, 2024 08:40
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.

2 participants