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

Bump up Yorkie to v0.4.31 #160

Merged
merged 3 commits into from
Aug 22, 2024
Merged

Bump up Yorkie to v0.4.31 #160

merged 3 commits into from
Aug 22, 2024

Conversation

chacha912
Copy link
Contributor

@chacha912 chacha912 commented Aug 22, 2024

What this PR does / why we need it?

Bump up Yorkie to v0.4.31

Any background context you want to provide?

NOTE: As the js-sdk structure changed to a monorepo, the code in the examples was modified.
(e.g., changing from specifying the exact version of yorkie-js-sdk to using workspace:*)

image

What are the relevant tickets?

Fixes #

Checklist

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

Summary by CodeRabbit

  • New Features

    • Upgraded to version 0.4.31 of the Yorkie SDK, which may include enhancements and bug fixes.
    • Enhanced directory structure representation across multiple examples for better clarity and usability.
  • Bug Fixes

    • Adjusted configurations and file handling to ensure smoother integration with the updated SDK.
  • Chores

    • Updated dependencies in the project to reflect the new version of the yorkie-js-sdk and added dotenv for environment variable management.

Copy link

coderabbitai bot commented Aug 22, 2024

Walkthrough

The changes include updates to environment variables related to the Yorkie SDK, now set to version 0.4.31, alongside various modifications to FILE_INFO constants across multiple files. These changes enhance the hierarchical representation of directories and files, improving organization within example projects. Additionally, the package.json file has been updated to reflect the new Yorkie SDK version and added a new dependency.

Changes

Files Change Summary
.env Updated Yorkie SDK environment variables: NEXT_PUBLIC_YORKIE_VERSION, NEXT_PUBLIC_YORKIE_JS_VERSION, and NEXT_PUBLIC_JS_SDK_URL from 0.4.28 to 0.4.31.
examples/.../fileInfo.ts (multiple files) Modified FILE_INFO to provide a more detailed hierarchical representation of the directory structures relevant to each example project.
package.json Updated the yorkie-js-sdk dependency version from ^0.4.28 to ^0.4.31 and added dotenv dependency ^16.4.5.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant Application
    participant YorkieSDK

    Developer->>Application: Update SDK version
    Application->>YorkieSDK: Initialize with new version
    YorkieSDK-->>Application: Load new features and improvements
    Application-->>Developer: Notify of successful update
Loading

🐇 "In files and code, we've made a leap,
To enhance our work, our promises we keep.
With Yorkie's new version, we're all set,
A cleaner structure—oh, don't forget!
Through folders and files, we'll hop with glee,
Celebrating changes, so joyful and free!" 🐇✨


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.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

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

@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: 4

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 745d63f and d96d3bb.

Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing (9)
  • .env (1 hunks)
  • examples/nextjs-scheduler/fileInfo.ts (1 hunks)
  • examples/profile-stack/fileInfo.ts (1 hunks)
  • examples/react-tldraw/fileInfo.ts (1 hunks)
  • examples/react-todomvc/fileInfo.ts (1 hunks)
  • examples/vanilla-codemirror6/fileInfo.ts (1 hunks)
  • examples/vanilla-quill/fileInfo.ts (1 hunks)
  • examples/vuejs-kanban/fileInfo.ts (1 hunks)
  • package.json (1 hunks)
Files skipped from review due to trivial changes (2)
  • .env
  • package.json
Additional context used
Gitleaks
examples/vuejs-kanban/fileInfo.ts

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/vanilla-codemirror6/fileInfo.ts

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/profile-stack/fileInfo.ts

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/react-todomvc/fileInfo.ts

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/react-tldraw/fileInfo.ts

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/vanilla-quill/fileInfo.ts

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/nextjs-scheduler/fileInfo.ts

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

Additional comments not posted (7)
examples/vuejs-kanban/fileInfo.ts (1)

2-2: LGTM: Enhanced Directory Structure.

The updated FILE_INFO structure provides a more comprehensive representation of the project's file hierarchy.

This change improves the clarity and usability of the file information.

Tools
Gitleaks

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/vanilla-codemirror6/fileInfo.ts (1)

2-2: LGTM: Enhanced Directory Structure.

The updated FILE_INFO structure provides a more comprehensive representation of the project's file hierarchy.

This change improves the clarity and usability of the file information.

Tools
Gitleaks

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/profile-stack/fileInfo.ts (1)

2-2: LGTM: Enhanced Directory Structure.

The updated FILE_INFO structure provides a more comprehensive representation of the project's file hierarchy.

This change improves the clarity and usability of the file information.

Tools
Gitleaks

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/react-todomvc/fileInfo.ts (1)

2-2: LGTM! Enhanced directory structure representation.

The restructuring of the FILE_INFO constant improves clarity and maintainability.

Tools
Gitleaks

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/react-tldraw/fileInfo.ts (1)

2-2: LGTM! Enhanced directory structure representation.

The restructuring of the FILE_INFO constant improves clarity and maintainability.

Tools
Gitleaks

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/vanilla-quill/fileInfo.ts (1)

2-2: LGTM! Enhanced directory structure representation.

The restructuring of the FILE_INFO constant improves clarity and maintainability.

Tools
Gitleaks

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/nextjs-scheduler/fileInfo.ts (1)

2-2: LGTM! Enhanced file structure representation.

The changes to the FILE_INFO constant enhance the clarity and usability of the file structure representation.

Tools
Gitleaks

2-2: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

examples/vuejs-kanban/fileInfo.ts Outdated Show resolved Hide resolved
examples/vanilla-codemirror6/fileInfo.ts Outdated Show resolved Hide resolved
examples/profile-stack/fileInfo.ts Outdated Show resolved Hide resolved
examples/nextjs-scheduler/fileInfo.ts Outdated Show resolved Hide resolved
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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d96d3bb and f95b9fa.

Files selected for processing (17)
  • components/exampleView/BasicView/commonIgnoreFiles.ts (1 hunks)
  • examples/nextjs-scheduler/fileInfo.ts (1 hunks)
  • examples/profile-stack/fileInfo.ts (1 hunks)
  • examples/react-tldraw/fileInfo.ts (1 hunks)
  • examples/react-todomvc/fileInfo.ts (1 hunks)
  • examples/vanilla-codemirror6/fileInfo.ts (1 hunks)
  • examples/vanilla-quill/fileInfo.ts (1 hunks)
  • examples/vuejs-kanban/fileInfo.ts (1 hunks)
  • pages/examples/calendar.tsx (1 hunks)
  • pages/examples/codemirror.tsx (1 hunks)
  • pages/examples/kanban.tsx (1 hunks)
  • pages/examples/profile-stack.tsx (1 hunks)
  • pages/examples/quill.tsx (1 hunks)
  • pages/examples/simultaneous-cursors.tsx (1 hunks)
  • pages/examples/tldraw.tsx (1 hunks)
  • pages/examples/todomvc.tsx (1 hunks)
  • scripts/fetchExamples.mts (1 hunks)
Files skipped from review due to trivial changes (6)
  • pages/examples/codemirror.tsx
  • pages/examples/kanban.tsx
  • pages/examples/profile-stack.tsx
  • pages/examples/quill.tsx
  • pages/examples/tldraw.tsx
  • pages/examples/todomvc.tsx
Files skipped from review as they are similar to previous changes (7)
  • examples/nextjs-scheduler/fileInfo.ts
  • examples/profile-stack/fileInfo.ts
  • examples/react-tldraw/fileInfo.ts
  • examples/react-todomvc/fileInfo.ts
  • examples/vanilla-codemirror6/fileInfo.ts
  • examples/vanilla-quill/fileInfo.ts
  • examples/vuejs-kanban/fileInfo.ts
Additional comments not posted (9)
components/exampleView/BasicView/commonIgnoreFiles.ts (1)

6-13: Verify the impact of updated ignore files.

The changes to the COMMON_IGNORE_FILES array reflect a more comprehensive approach to file management. Ensure these changes align with the project's build and deployment processes.

pages/examples/calendar.tsx (1)

48-48: Verify the impact of configuration file changes.

The inclusion of next.config.js in the ignoreFiles array suggests a change in configuration management. Ensure this aligns with the project's current setup and requirements.

pages/examples/simultaneous-cursors.tsx (1)

50-50: Verify the impact of simplified ignore files.

The simplification of the ignoreFiles property to only use COMMON_IGNORE_FILES may affect file visibility. Ensure this change aligns with the intended behavior of the ProjectCodes component.

scripts/fetchExamples.mts (6)

71-73: Security Enhancement: Skip .env.production files.

The addition of this check to skip .env.production files is a good practice to prevent the exposure of sensitive information.


Line range hint 4-7: LGTM: Directory creation with recursion.

The makeDirectory function correctly uses fs.mkdirSync with { recursive: true } to ensure directories are created as needed.


Line range hint 9-11: LGTM: File reading implementation.

The readFile function correctly reads the file content synchronously using fs.readFileSync.


Line range hint 13-19: LGTM: Asynchronous file writing with logging.

The writeFile function correctly handles asynchronous file writing and logs success or errors.


Line range hint 21-30: LGTM: Directory retrieval implementation.

The getDirectories function efficiently retrieves directories using fs.readdirSync with withFileTypes: true.


Line range hint 97-113: LGTM: Example fetching and processing.

The fetchExamples function correctly processes example directories and writes their information to output files using the utility functions.

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.

(e.g., changing from specifying the exact version of yorkie-js-sdk to using workspace:*)

It would be nice if Yorkie JS SDK was versioned like before. What do you think? 🤔

@chacha912
Copy link
Contributor Author

It would be better to specify the version. I’ve updated the script to fetch code based on the specified version tag and to change the yorkie-js-sdk version accordingly.

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f95b9fa and 0190520.

Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing (10)
  • examples/nextjs-scheduler/fileInfo.ts (1 hunks)
  • examples/profile-stack/fileInfo.ts (1 hunks)
  • examples/react-tldraw/fileInfo.ts (1 hunks)
  • examples/react-todomvc/fileInfo.ts (1 hunks)
  • examples/vanilla-codemirror6/fileInfo.ts (1 hunks)
  • examples/vanilla-quill/fileInfo.ts (1 hunks)
  • examples/vuejs-kanban/fileInfo.ts (1 hunks)
  • package.json (2 hunks)
  • scripts/fetch-examples.sh (2 hunks)
  • scripts/fetchExamples.mts (2 hunks)
Files skipped from review as they are similar to previous changes (8)
  • examples/nextjs-scheduler/fileInfo.ts
  • examples/profile-stack/fileInfo.ts
  • examples/react-tldraw/fileInfo.ts
  • examples/react-todomvc/fileInfo.ts
  • examples/vanilla-codemirror6/fileInfo.ts
  • examples/vanilla-quill/fileInfo.ts
  • package.json
  • scripts/fetchExamples.mts
Additional context used
Shellcheck
scripts/fetch-examples.sh

[warning] 3-3: Quote this to prevent word splitting.

(SC2046)


[warning] 7-7: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

Additional comments not posted (4)
scripts/fetch-examples.sh (3)

8-8: LGTM!

The command correctly fetches the specified version tag.


9-9: LGTM!

The command correctly checks out the specified version tag.


10-10: LGTM!

The echo statement provides useful feedback to the user.

examples/vuejs-kanban/fileInfo.ts (1)

2-2: LGTM! But address the security issue.

The updated FILE_INFO structure provides a comprehensive overview of the project's files and directories.

However, ensure that the security issue with the generic API key in the .env.production file is addressed.

scripts/fetch-examples.sh Show resolved Hide resolved
scripts/fetch-examples.sh 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.

LGTM. 👍

@hackerwins hackerwins merged commit 554ff59 into main Aug 22, 2024
2 checks passed
@hackerwins hackerwins deleted the v0.4.31 branch August 22, 2024 07:28
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