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 agent-js version #977

Merged
merged 21 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
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
chenyan-dfinity marked this conversation as resolved.
Show resolved Hide resolved
# 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
chenyan-dfinity marked this conversation as resolved.
Show resolved Hide resolved
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
8 changes: 1 addition & 7 deletions motoko/send_http_get/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
.PHONY: all
all: build

.PHONY: node_modules
.SILENT: node_modules
node_modules:
npm install

.PHONY: build
.SILENT: build
build: node_modules
dfx canister create send_http_get_backend
dfx build

Expand All @@ -32,4 +26,4 @@ test: install
.PHONY: clean
.SILENT: clean
clean:
rm -fr .dfx
rm -fr .dfx
10 changes: 2 additions & 8 deletions motoko/send_http_get/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
"main": "src/send_http_get_backend/main.mo",
"type": "motoko"
}
},
"defaults": {
"build": {
"args": "",
"packtool": ""
}
},
}
"output_env_file": ".env",
"version": 1
}
}
Loading
Loading