diff --git a/examples/nextjs-scheduler/package.json b/examples/nextjs-scheduler/package.json index 3930df3c5..0a5ba0a47 100644 --- a/examples/nextjs-scheduler/package.json +++ b/examples/nextjs-scheduler/package.json @@ -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", diff --git a/examples/profile-stack/package.json b/examples/profile-stack/package.json index 98fe8f2a2..24876093d 100644 --- a/examples/profile-stack/package.json +++ b/examples/profile-stack/package.json @@ -12,6 +12,6 @@ "vite": "^3.2.7" }, "dependencies": { - "yorkie-js-sdk": "^0.4.27" + "yorkie-js-sdk": "^0.4.28" } } diff --git a/examples/react-tldraw/package.json b/examples/react-tldraw/package.json index b8b41b7fd..2339141f6 100644 --- a/examples/react-tldraw/package.json +++ b/examples/react-tldraw/package.json @@ -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", diff --git a/examples/react-todomvc/package.json b/examples/react-todomvc/package.json index 8f87e44c6..88d9aa5c0 100644 --- a/examples/react-todomvc/package.json +++ b/examples/react-todomvc/package.json @@ -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", diff --git a/examples/simultaneous-cursors/package.json b/examples/simultaneous-cursors/package.json index 77f6fea00..2edea9fac 100644 --- a/examples/simultaneous-cursors/package.json +++ b/examples/simultaneous-cursors/package.json @@ -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", diff --git a/examples/vanilla-codemirror6/package.json b/examples/vanilla-codemirror6/package.json index af95a08f7..e7f86c26e 100644 --- a/examples/vanilla-codemirror6/package.json +++ b/examples/vanilla-codemirror6/package.json @@ -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" } } diff --git a/examples/vanilla-quill/package.json b/examples/vanilla-quill/package.json index ce4a2a520..01448539f 100644 --- a/examples/vanilla-quill/package.json +++ b/examples/vanilla-quill/package.json @@ -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" } } diff --git a/examples/vuejs-kanban/package.json b/examples/vuejs-kanban/package.json index 2bb97e6c9..e2c76aff2 100644 --- a/examples/vuejs-kanban/package.json +++ b/examples/vuejs-kanban/package.json @@ -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", diff --git a/package-lock.json b/package-lock.json index 1d8127e97..3c86e5cd9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yorkie-js-sdk", - "version": "0.4.27", + "version": "0.4.28", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yorkie-js-sdk", - "version": "0.4.27", + "version": "0.4.28", "license": "Apache-2.0", "workspaces": [ "examples/*" @@ -56,7 +56,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", @@ -95,10 +95,25 @@ "node": ">=4.2.0" } }, + "examples/nextjs-scheduler/node_modules/yorkie-js-sdk": { + "version": "0.4.28", + "resolved": "https://registry.npmjs.org/yorkie-js-sdk/-/yorkie-js-sdk-0.4.28.tgz", + "integrity": "sha512-laDG5LVXV1mW085F4BdagUgIgU4hd+QBD0kon8kAeVA086ZGwXRMlFSYhEZtY1bB+RTSDSe4i78vVGG2Kv6bcg==", + "dependencies": { + "@bufbuild/protobuf": "^1.6.0", + "@connectrpc/connect": "^1.4.0", + "@connectrpc/connect-web": "^1.4.0", + "long": "^5.2.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=7.1.0" + } + }, "examples/profile-stack": { "version": "0.0.0", "dependencies": { - "yorkie-js-sdk": "^0.4.27" + "yorkie-js-sdk": "^0.4.28" }, "devDependencies": { "vite": "^3.2.7" @@ -153,6 +168,21 @@ } } }, + "examples/profile-stack/node_modules/yorkie-js-sdk": { + "version": "0.4.28", + "resolved": "https://registry.npmjs.org/yorkie-js-sdk/-/yorkie-js-sdk-0.4.28.tgz", + "integrity": "sha512-laDG5LVXV1mW085F4BdagUgIgU4hd+QBD0kon8kAeVA086ZGwXRMlFSYhEZtY1bB+RTSDSe4i78vVGG2Kv6bcg==", + "dependencies": { + "@bufbuild/protobuf": "^1.6.0", + "@connectrpc/connect": "^1.4.0", + "@connectrpc/connect-web": "^1.4.0", + "long": "^5.2.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=7.1.0" + } + }, "examples/react-tldraw": { "version": "0.1.0", "dependencies": { @@ -163,7 +193,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", @@ -224,6 +254,21 @@ } } }, + "examples/react-tldraw/node_modules/yorkie-js-sdk": { + "version": "0.4.28", + "resolved": "https://registry.npmjs.org/yorkie-js-sdk/-/yorkie-js-sdk-0.4.28.tgz", + "integrity": "sha512-laDG5LVXV1mW085F4BdagUgIgU4hd+QBD0kon8kAeVA086ZGwXRMlFSYhEZtY1bB+RTSDSe4i78vVGG2Kv6bcg==", + "dependencies": { + "@bufbuild/protobuf": "^1.6.0", + "@connectrpc/connect": "^1.4.0", + "@connectrpc/connect-web": "^1.4.0", + "long": "^5.2.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=7.1.0" + } + }, "examples/react-todomvc": { "version": "0.0.0", "dependencies": { @@ -231,7 +276,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", @@ -290,6 +335,21 @@ } } }, + "examples/react-todomvc/node_modules/yorkie-js-sdk": { + "version": "0.4.28", + "resolved": "https://registry.npmjs.org/yorkie-js-sdk/-/yorkie-js-sdk-0.4.28.tgz", + "integrity": "sha512-laDG5LVXV1mW085F4BdagUgIgU4hd+QBD0kon8kAeVA086ZGwXRMlFSYhEZtY1bB+RTSDSe4i78vVGG2Kv6bcg==", + "dependencies": { + "@bufbuild/protobuf": "^1.6.0", + "@connectrpc/connect": "^1.4.0", + "@connectrpc/connect-web": "^1.4.0", + "long": "^5.2.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=7.1.0" + } + }, "examples/simple-tldraw": { "extraneous": true, "dependencies": { @@ -301,7 +361,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", @@ -327,6 +387,21 @@ "vite": "^4.2.0" } }, + "examples/simultaneous-cursors/node_modules/yorkie-js-sdk": { + "version": "0.4.28", + "resolved": "https://registry.npmjs.org/yorkie-js-sdk/-/yorkie-js-sdk-0.4.28.tgz", + "integrity": "sha512-laDG5LVXV1mW085F4BdagUgIgU4hd+QBD0kon8kAeVA086ZGwXRMlFSYhEZtY1bB+RTSDSe4i78vVGG2Kv6bcg==", + "dependencies": { + "@bufbuild/protobuf": "^1.6.0", + "@connectrpc/connect": "^1.4.0", + "@connectrpc/connect-web": "^1.4.0", + "long": "^5.2.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=7.1.0" + } + }, "examples/vanilla-codemirror6": { "version": "0.0.0", "dependencies": { @@ -337,7 +412,7 @@ "@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" }, "devDependencies": { "typescript": "^4.6.4", @@ -393,6 +468,21 @@ } } }, + "examples/vanilla-codemirror6/node_modules/yorkie-js-sdk": { + "version": "0.4.28", + "resolved": "https://registry.npmjs.org/yorkie-js-sdk/-/yorkie-js-sdk-0.4.28.tgz", + "integrity": "sha512-laDG5LVXV1mW085F4BdagUgIgU4hd+QBD0kon8kAeVA086ZGwXRMlFSYhEZtY1bB+RTSDSe4i78vVGG2Kv6bcg==", + "dependencies": { + "@bufbuild/protobuf": "^1.6.0", + "@connectrpc/connect": "^1.4.0", + "@connectrpc/connect-web": "^1.4.0", + "long": "^5.2.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=7.1.0" + } + }, "examples/vanilla-quill": { "version": "0.0.0", "dependencies": { @@ -400,7 +490,7 @@ "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" }, "devDependencies": { "@types/color-hash": "^1.0.2", @@ -470,11 +560,26 @@ } } }, + "examples/vanilla-quill/node_modules/yorkie-js-sdk": { + "version": "0.4.28", + "resolved": "https://registry.npmjs.org/yorkie-js-sdk/-/yorkie-js-sdk-0.4.28.tgz", + "integrity": "sha512-laDG5LVXV1mW085F4BdagUgIgU4hd+QBD0kon8kAeVA086ZGwXRMlFSYhEZtY1bB+RTSDSe4i78vVGG2Kv6bcg==", + "dependencies": { + "@bufbuild/protobuf": "^1.6.0", + "@connectrpc/connect": "^1.4.0", + "@connectrpc/connect-web": "^1.4.0", + "long": "^5.2.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=7.1.0" + } + }, "examples/vuejs-kanban": { "version": "0.0.0", "dependencies": { "vue": "^3.2.41", - "yorkie-js-sdk": "^0.4.27" + "yorkie-js-sdk": "^0.4.28" }, "devDependencies": { "@vitejs/plugin-vue": "^3.1.2", @@ -530,6 +635,21 @@ } } }, + "examples/vuejs-kanban/node_modules/yorkie-js-sdk": { + "version": "0.4.28", + "resolved": "https://registry.npmjs.org/yorkie-js-sdk/-/yorkie-js-sdk-0.4.28.tgz", + "integrity": "sha512-laDG5LVXV1mW085F4BdagUgIgU4hd+QBD0kon8kAeVA086ZGwXRMlFSYhEZtY1bB+RTSDSe4i78vVGG2Kv6bcg==", + "dependencies": { + "@bufbuild/protobuf": "^1.6.0", + "@connectrpc/connect": "^1.4.0", + "@connectrpc/connect-web": "^1.4.0", + "long": "^5.2.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=7.1.0" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -9700,21 +9820,6 @@ "node": ">=6" } }, - "node_modules/yorkie-js-sdk": { - "version": "0.4.27", - "resolved": "https://registry.npmjs.org/yorkie-js-sdk/-/yorkie-js-sdk-0.4.27.tgz", - "integrity": "sha512-UVFXIJDg3Or8H95IoEYhebKLh8wy2thYH0IoTJzoMtJwa/EmVvNjktrCYIuovWIBa/e3QFbhQbpw+CQ7oeLBzg==", - "dependencies": { - "@bufbuild/protobuf": "^1.6.0", - "@connectrpc/connect": "^1.4.0", - "@connectrpc/connect-web": "^1.4.0", - "long": "^5.2.0" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=7.1.0" - } - }, "node_modules/z-schema": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.5.tgz", diff --git a/package.json b/package.json index bae221358..8341530ca 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/scripts/update-examples.sh b/scripts/update-examples.sh new file mode 100755 index 000000000..aea7dc03c --- /dev/null +++ b/scripts/update-examples.sh @@ -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 + +# 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" + + # 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 .. + fi +done