Skip to content

Commit

Permalink
bump agent-js version
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Sep 16, 2024
1 parent 24aca5b commit e1a7dbb
Show file tree
Hide file tree
Showing 34 changed files with 172 additions and 135 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/update-package-json.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# Check if a version argument is provided
if [ $# -eq 0 ]; then
echo "Please provide a version number as an argument."
echo "Usage: $0 <version_number>"
exit 1
fi

# Store the new version
NEW_VERSION="$1"

# Detect OS and set the appropriate sed command
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
if command -v gsed >/dev/null 2>&1; then
SED_CMD="gsed"
else
echo "Error: gsed is not installed. Please install it using Homebrew: brew install gnu-sed"
exit 1
fi
else
# Linux and other Unix-like systems
SED_CMD="sed"
fi

# Find all package.json files in subdirectories
find . -name "package.json" | while read -r file; do
# Check if the file contains any "@dfinity/" package
if grep -q '"@dfinity/' "$file"; then
# Use sed to replace the version for all @dfinity packages, preserving the caret if present
$SED_CMD -i 's/\("@dfinity\/[^"]*"\s*:\s*"\^*\)[0-9.]*"/\1'"$NEW_VERSION"'"/' "$file"
echo "Updated @dfinity/* versions in $file"
fi
done

echo "Script completed."
10 changes: 5 additions & 5 deletions hosting/photo-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@dfinity/agent": "^0.15.0",
"@dfinity/assets": "^0.15.0",
"@dfinity/candid": "^0.15.0",
"@dfinity/identity": "^0.15.0",
"@dfinity/principal": "^0.15.0",
"@dfinity/agent": "^2.1.1",
"@dfinity/assets": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-masonry-css": "^1.0.16",
Expand Down
10 changes: 5 additions & 5 deletions motoko/auth_client_demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
"last 2 edge version"
],
"dependencies": {
"@dfinity/agent": "^1.4.0",
"@dfinity/auth-client": "^1.4.0",
"@dfinity/candid": "^1.4.0",
"@dfinity/identity": "^1.4.0",
"@dfinity/principal": "^1.4.0",
"@dfinity/agent": "^2.1.1",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"lit-html": "^2.4.0",
"pinia": "^2.0.36",
"react": "^18.2.0",
Expand Down
6 changes: 3 additions & 3 deletions motoko/cert-var/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"generate": "dfx generate cert_var"
},
"devDependencies": {
"@dfinity/agent": "^1.4.0",
"@dfinity/candid": "^1.4.0",
"@dfinity/principal": "^1.4.0",
"@dfinity/agent": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"css-loader": "^6.0.0",
Expand Down
12 changes: 6 additions & 6 deletions motoko/defi/src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"svelte": "^3.49.0"
},
"dependencies": {
"@dfinity/agent": "^0.10.4",
"@dfinity/auth-client": "^0.10.4",
"@dfinity/authentication": "^0.10.4",
"@dfinity/candid": "^0.10.4",
"@dfinity/identity": "^0.10.4",
"@dfinity/principal": "0.10.4",
"@dfinity/agent": "^2.1.1",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/authentication": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "2.1.1",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"crc": "^4.1.0",
Expand Down
10 changes: 5 additions & 5 deletions motoko/encrypted-notes-dapp-vetkd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
"typescript": "^4.0.0"
},
"dependencies": {
"@dfinity/agent": "^0.15.1",
"@dfinity/auth-client": "^0.15.1",
"@dfinity/candid": "^0.15.1",
"@dfinity/identity": "^0.15.1",
"@dfinity/principal": "^0.15.1",
"@dfinity/agent": "^2.1.1",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"sirv-cli": "^1.0.0",
"svelte-icons": "^2.1.0",
"svelte-router-spa": "^6.0.3",
Expand Down
10 changes: 5 additions & 5 deletions motoko/encrypted-notes-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@
"typescript": "^4.0.0"
},
"dependencies": {
"@dfinity/agent": "^0.15.1",
"@dfinity/auth-client": "^0.15.1",
"@dfinity/candid": "^0.15.1",
"@dfinity/identity": "^0.15.1",
"@dfinity/principal": "^0.15.1",
"@dfinity/agent": "^2.1.1",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"crypto-js": "^4.2.0",
"idb": "^7.0.0",
"sirv-cli": "^1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions motoko/hello/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"generate": "dfx generate hello"
},
"devDependencies": {
"@dfinity/agent": "^0.15.1",
"@dfinity/candid": "^0.15.1",
"@dfinity/principal": "^0.15.1",
"@dfinity/agent": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"events": "3.3.0",
Expand Down
14 changes: 7 additions & 7 deletions motoko/ic-pos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
"dfx:generate": "dfx generate"
},
"dependencies": {
"@dfinity/agent": "^0.19.2",
"@dfinity/candid": "^0.19.2",
"@dfinity/ledger": "^0.0.15",
"@dfinity/principal": "^0.19.2",
"@dfinity/utils": "^0.0.22",
"@dfinity/agent": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/ledger": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"@dfinity/utils": "^2.1.1",
"@hookform/resolvers": "^3.1.1",
"@internet-identity-labs/react-ic-ii-auth": "^0.0.19",
"@radix-ui/react-icons": "^1.3.0",
Expand All @@ -64,8 +64,8 @@
"zod": "^3.22.3"
},
"devDependencies": {
"@dfinity/auth-client": "^0.19.2",
"@dfinity/identity": "^0.19.2",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/identity": "^2.1.1",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"@types/node": "^20.6.0",
Expand Down
8 changes: 4 additions & 4 deletions motoko/icrc2-swap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"fmt": "prettier --write ."
},
"dependencies": {
"@dfinity/agent": "^0.19.2",
"@dfinity/candid": "^0.19.2",
"@dfinity/identity": "^0.19.3",
"@dfinity/principal": "^0.19.2"
"@dfinity/agent": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "^2.1.1"
},
"devDependencies": {
"@babel/core": "^7.22.20",
Expand Down
10 changes: 5 additions & 5 deletions motoko/internet_identity_integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"generate": "dfx generate greet_backend"
},
"devDependencies": {
"@dfinity/agent": "0.15.3",
"@dfinity/auth-client": "^0.15.3",
"@dfinity/candid": "0.15.3",
"@dfinity/identity": "^0.15.3",
"@dfinity/principal": "0.15.3",
"@dfinity/agent": "2.1.1",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/candid": "2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"copy-webpack-plugin": "^11.0.0",
Expand Down
12 changes: 6 additions & 6 deletions motoko/ios-notifications/dapp-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
"last 2 edge version"
],
"dependencies": {
"@dfinity/agent": "0.14.0",
"@dfinity/auth-client": "^0.14.0",
"@dfinity/authentication": "^0.14.0",
"@dfinity/candid": "0.14.0",
"@dfinity/identity": "^0.14.0",
"@dfinity/principal": "0.14.0",
"@dfinity/agent": "2.1.1",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/authentication": "^2.1.1",
"@dfinity/candid": "2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "2.1.1",
"lit-html": "^2.4.0",
"ts-loader": "^9.4.1",
"typescript": "^4.8.4"
Expand Down
6 changes: 3 additions & 3 deletions motoko/life/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"generate": "dfx generate life"
},
"devDependencies": {
"@dfinity/agent": "^0.15.1",
"@dfinity/candid": "^0.15.1",
"@dfinity/principal": "^0.15.1",
"@dfinity/agent": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"css-loader": "^6.0.0",
Expand Down
6 changes: 3 additions & 3 deletions motoko/minimal-counter-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"generate": "dfx generate minimal_dapp"
},
"devDependencies": {
"@dfinity/agent": "0.15.1",
"@dfinity/candid": "0.15.1",
"@dfinity/principal": "0.15.1",
"@dfinity/agent": "2.1.1",
"@dfinity/candid": "2.1.1",
"@dfinity/principal": "2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"events": "3.3.0",
Expand Down
6 changes: 3 additions & 3 deletions motoko/phone-book/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"generate": "dfx generate phone_book"
},
"devDependencies": {
"@dfinity/agent": "^0.15.1",
"@dfinity/candid": "^0.15.1",
"@dfinity/principal": "^0.15.1",
"@dfinity/agent": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"css-loader": "^6.0.0",
Expand Down
6 changes: 3 additions & 3 deletions motoko/random_maze/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"generate": "dfx generate random_maze"
},
"devDependencies": {
"@dfinity/agent": "^0.15.1",
"@dfinity/candid": "^0.15.1",
"@dfinity/principal": "^0.15.1",
"@dfinity/agent": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"css-loader": "^6.0.0",
Expand Down
6 changes: 3 additions & 3 deletions motoko/send_http_get/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"generate": "dfx generate send_http_get_backend"
},
"dependencies": {
"@dfinity/agent": "^0.15.6",
"@dfinity/candid": "^0.15.6",
"@dfinity/principal": "^0.15.6"
"@dfinity/agent": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/principal": "^2.1.1"
},
"devDependencies": {
"assert": "2.0.0",
Expand Down
6 changes: 3 additions & 3 deletions motoko/send_http_post/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"generate": "dfx generate send_http_post_motoko_backend"
},
"dependencies": {
"@dfinity/agent": "^0.15.6",
"@dfinity/candid": "^0.15.6",
"@dfinity/principal": "^0.15.6"
"@dfinity/agent": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/principal": "^2.1.1"
},
"devDependencies": {
"assert": "2.0.0",
Expand Down
6 changes: 3 additions & 3 deletions motoko/superheroes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
"generate": "dfx generate superheroes"
},
"devDependencies": {
"@dfinity/agent": "^0.15.1",
"@dfinity/candid": "^0.15.1",
"@dfinity/principal": "^0.15.1",
"@dfinity/agent": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"copy-webpack-plugin": "^9.0.1",
Expand Down
8 changes: 4 additions & 4 deletions motoko/vetkd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"generate": "dfx generate app_backend"
},
"dependencies": {
"@dfinity/agent": "^0.15.6",
"@dfinity/auth-client": "^0.15.6",
"@dfinity/candid": "^0.15.6",
"@dfinity/principal": "^0.15.6",
"@dfinity/agent": "^2.1.1",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/candid": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"ic-vetkd-utils": "file:ic-vetkd-utils-0.1.0.tgz"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions native-apps/unity_ii_applink/ii_integration_dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"generate": "dfx generate greet_backend"
},
"devDependencies": {
"@dfinity/agent": "0.15.3",
"@dfinity/auth-client": "^0.15.3",
"@dfinity/candid": "0.15.3",
"@dfinity/identity": "^0.15.3",
"@dfinity/principal": "0.15.3",
"@dfinity/agent": "2.1.1",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/candid": "2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"copy-webpack-plugin": "^11.0.0",
Expand Down
10 changes: 5 additions & 5 deletions native-apps/unity_ii_deeplink/ii_integration_dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"generate": "dfx generate greet_backend"
},
"devDependencies": {
"@dfinity/agent": "0.15.3",
"@dfinity/auth-client": "^0.15.3",
"@dfinity/candid": "0.15.3",
"@dfinity/identity": "^0.15.3",
"@dfinity/principal": "0.15.3",
"@dfinity/agent": "2.1.1",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/candid": "2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"copy-webpack-plugin": "^11.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"generate": "dfx generate greet_backend"
},
"devDependencies": {
"@dfinity/agent": "0.15.3",
"@dfinity/auth-client": "^0.15.3",
"@dfinity/candid": "0.15.3",
"@dfinity/identity": "^0.15.3",
"@dfinity/principal": "0.15.3",
"@dfinity/agent": "2.1.1",
"@dfinity/auth-client": "^2.1.1",
"@dfinity/candid": "2.1.1",
"@dfinity/identity": "^2.1.1",
"@dfinity/principal": "2.1.1",
"assert": "2.0.0",
"buffer": "6.0.3",
"copy-webpack-plugin": "^11.0.0",
Expand Down
Loading

0 comments on commit e1a7dbb

Please sign in to comment.