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 example version to v0.4.28 #877

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/nextjs-scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"react": "18.2.0",
"react-calendar": "^4.6.0",
"react-dom": "18.2.0",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
},
"devDependencies": {
"@types/node": "20.4.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/profile-stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"vite": "^3.2.7"
},
"dependencies": {
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
}
}
2 changes: 1 addition & 1 deletion examples/react-tldraw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"unique-names-generator": "^4.7.1",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
},
"devDependencies": {
"@types/lodash": "^4.14.198",
Expand Down
2 changes: 1 addition & 1 deletion examples/react-todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"todomvc-app-css": "^2.4.2",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
},
"devDependencies": {
"@types/react": "^18.0.24",
Expand Down
2 changes: 1 addition & 1 deletion examples/simultaneous-cursors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
},
"devDependencies": {
"@types/react": "^18.0.37",
Expand Down
2 changes: 1 addition & 1 deletion examples/vanilla-codemirror6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"@codemirror/state": "^6.1.2",
"@codemirror/view": "^6.3.1",
"codemirror": "^6.0.1",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
}
}
2 changes: 1 addition & 1 deletion examples/vanilla-quill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"quill": "^1.3.7",
"quill-cursors": "^4.0.0",
"quill-delta": "^5.0.0",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
}
}
2 changes: 1 addition & 1 deletion examples/vuejs-kanban/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"vue": "^3.2.41",
"yorkie-js-sdk": "^0.4.27"
"yorkie-js-sdk": "^0.4.28"
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.1.2",
Expand Down
155 changes: 130 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"test:ci": "vitest run --coverage",
"test:yorkie.dev": "TEST_RPC_ADDR=https://api.yorkie.dev vitest run --coverage",
"lint": "eslint . --fix --max-warnings=0 --ext .ts",
"update:examples": "./scripts/update-examples.sh",
"prepare": "npm run build"
},
"engines": {
Expand Down
30 changes: 30 additions & 0 deletions scripts/update-examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# Get the version of yorkie-js-sdk
read -p "Enter the yorkie-js-sdk version: " version

# Change the directory to the examples folder
cd examples
Copy link

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.

Suggested change
cd examples
cd examples || exit
Tools
Shellcheck

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

(SC2164)


# Loop through all example folders
for dir in */; do
# Check if it is a directory and exclude the dist folder
echo $dir
if [ -d "$dir" ] && [ "$dir" != "dist/" ]; then
# Move to the example folder
cd "$dir"
Copy link

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.

Suggested change
cd "$dir"
cd "$dir" || exit
Tools
Shellcheck

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

(SC2164)


# Execute npm i and npm run build
npm i "yorkie-js-sdk@$version" && npm run build

# Check the result of the execution
if [ $? -ne 0 ]; then
echo "Error occurred in $dir"
else
echo "$dir build succeeded"
fi

# Move back to the examples folder
cd ..
Copy link

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.

Suggested change
cd ..
cd .. || exit

fi
done
Loading