-
Notifications
You must be signed in to change notification settings - Fork 95
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 example version to v0.4.28 #877
Conversation
WalkthroughThe primary change is the introduction of the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant BuildScript
participant ExampleProject
User->>BuildScript: Specify SDK version
BuildScript->>BuildScript: Navigate to examples directory
BuildScript->>ExampleProject: Install specified SDK version
ExampleProject->>BuildScript: Build project
BuildScript->>User: Report build success/failure
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #877 +/- ##
=======================================
Coverage 80.85% 80.85%
=======================================
Files 60 60
Lines 4639 4639
Branches 942 942
=======================================
Hits 3751 3751
Misses 621 621
Partials 267 267 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
package-lock.json
is excluded by!**/package-lock.json
Files selected for processing (9)
- build_examples.sh (1 hunks)
- 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-quill/package.json (1 hunks)
- examples/vuejs-kanban/package.json (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
Shellcheck
build_examples.sh
[warning] 7-7: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 14-14: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
Additional comments not posted (1)
build_examples.sh (1)
1-5
: LGTM!The shebang line and user input prompt are correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- package.json (1 hunks)
- scripts/update-examples.sh (1 hunks)
Files skipped from review due to trivial changes (1)
- package.json
Additional context used
Shellcheck
scripts/update-examples.sh
[warning] 7-7: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 15-15: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
Additional comments not posted (7)
scripts/update-examples.sh (7)
1-1
: Shebang is correct.The shebang
#!/bin/bash
is appropriate for this script.
4-4
: Ensure secure input handling.The
read
command is used to get user input, which is fine for this context. However, consider validating the input to ensure it matches the expected version format.
10-10
: Loop through directories is correct.The loop correctly iterates through all directories in the
examples
folder.
12-12
: Print directory names for debugging.Printing directory names helps in debugging and tracking progress.
13-13
: Excludedist
folder correctly.The check correctly excludes the
dist
folder from the loop.
18-18
: Ensure npm commands are executed securely.The npm commands are executed securely and sequentially. Ensure that the
npm i
command installs the correct version ofyorkie-js-sdk
.
21-25
: Error handling for npm commands.The script correctly handles errors from the npm commands and provides appropriate feedback.
fi | ||
|
||
# Move back to the examples folder | ||
cd .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle directory change errors.
Add error handling to the cd
command to ensure the script exits if the directory change fails.
- cd ..
+ cd .. || exit
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
cd .. | |
cd .. || exit |
echo $dir | ||
if [ -d "$dir" ] && [ "$dir" != "dist/" ]; then | ||
# Move to the example folder | ||
cd "$dir" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle directory change errors.
Add error handling to the cd
command to ensure the script exits if the directory change fails.
- cd "$dir"
+ cd "$dir" || exit
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
cd "$dir" | |
cd "$dir" || exit |
Tools
Shellcheck
[warning] 15-15: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
read -p "Enter the yorkie-js-sdk version: " version | ||
|
||
# Change the directory to the examples folder | ||
cd examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle directory change errors.
Add error handling to the cd
command to ensure the script exits if the directory change fails.
- cd examples
+ cd examples || exit
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
cd examples | |
cd examples || exit |
Tools
Shellcheck
[warning] 7-7: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
There was a problem hiding this 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.
What this PR does / why we need it?
Update example version to v0.4.28
Any background context you want to provide?
What are the relevant tickets?
Fixes #
Checklist
Summary by CodeRabbit
New Features
Updates
yorkie-js-sdk
dependency in various example projects to version0.4.28
, which may include bug fixes and performance improvements.