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

chore: update agent deps in frontend projects #3974

Closed
wants to merge 3 commits into from
Closed
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: 2 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ jobs:
time dfx new smoke
cd smoke
time dfx start --background
time npm install
time dfx deploy
time dfx canister call smoke_backend greet '("fire")'
time curl --fail http://localhost:"$(dfx info webserver-port)"/sample-asset.txt?canisterId=$(dfx canister id smoke_frontend)
Expand Down Expand Up @@ -207,6 +208,7 @@ jobs:
dfx new e2e_project
cd e2e_project
dfx start --background --clean
npm install
dfx deploy 2>&1 | tee deploy.log
echo FRONTEND_URL=$(grep "_frontend:" deploy.log | grep -Eo "(http|https)://[a-zA-Z0-9./?=_&%:-]*") >> $GITHUB_ENV
echo CANDID_URL=$(grep "_backend:" deploy.log | grep -Eo "(http|https)://[a-zA-Z0-9./?=_&%:-]*") >> $GITHUB_ENV
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# UNRELEASED

### chore: update agent version in frontend templates. move the dependencies to top-level package.json

### chore: improve error message when trying to use the local replica when it is not running

### Frontend canister
Expand Down
33 changes: 19 additions & 14 deletions src/dfx/assets/project_templates/any_js/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"name": "__project_name__",
"type": "module",
"scripts": {
"start": "npm start --workspaces --if-present",
"prebuild": "npm run prebuild --workspaces --if-present",
"build": "npm run build --workspaces --if-present",
"pretest": "npm run prebuild --workspaces --if-present",
"test": "npm test --workspaces --if-present"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
},
"workspaces": [ ]
"name": "__project_name__",
"type": "module",
"scripts": {
"start": "npm start --workspaces --if-present",
"prebuild": "npm run prebuild --workspaces --if-present",
"build": "npm run build --workspaces --if-present",
"pretest": "npm run prebuild --workspaces --if-present",
"test": "npm test --workspaces --if-present"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
},
"dependencies": {
"@dfinity/agent": "^2.1.3",
"@dfinity/candid": "^2.1.3",
"@dfinity/principal": "^2.1.3"
},
"workspaces": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@dfinity/agent": "^1.4.0",
"@dfinity/candid": "^1.4.0",
"@dfinity/principal": "^1.4.0"
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.14",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"format": "prettier --write \"src/**/*.{json,js,jsx,ts,tsx,css,scss}\""
},
"dependencies": {
"@dfinity/agent": "^1.4.0",
"@dfinity/candid": "^1.4.0",
"@dfinity/principal": "^1.4.0"
},
"devDependencies": {
"@sveltejs/adapter-static": "^3.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
"vitest": "^2.0.5"
},
"dependencies": {
"@dfinity/agent": "^1.4.0",
"@dfinity/candid": "^1.4.0",
"@dfinity/principal": "^1.4.0",
"lit-html": "^2.8.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
},
"dependencies": {
"pinia": "^2.1.6",
"vue": "^3.3.4",
"@dfinity/agent": "^1.4.0",
"@dfinity/candid": "^1.4.0",
"@dfinity/principal": "^1.4.0"
"vue": "^3.3.4"
}
}
Loading