Skip to content

Commit

Permalink
Update dapp libs and versions (#406)
Browse files Browse the repository at this point in the history
* Bump dapp versions
* Update voting dApp to vite
* Unify web-sdk version across workspace
* Update wallet-common-helpers
  • Loading branch information
soerenbf authored Nov 14, 2023
1 parent 5fae57a commit a6ae208
Show file tree
Hide file tree
Showing 27 changed files with 151 additions and 143 deletions.
2 changes: 1 addition & 1 deletion examples/add-example-Web3Id/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"start": "live-server ./index.html --mount=/sdk.js:../../node_modules/@concordium/web-sdk/lib/concordium.min.js --mount=/helpers.js:../../packages/browser-wallet-api-helpers/lib/concordiumHelpers.min.js"
},
"dependencies": {
"@concordium/web-sdk": "^7.0.3"
"@concordium/web-sdk": "^7.1.0"
}
}
8 changes: 8 additions & 0 deletions examples/eSealing/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.1.4

- Bumped version of @concordium/web-sdk and @concordium/react-components (fixes wallet connect serialization issue)

## 1.1.3

- Bumped version of @concordium/web-sdk and @concordium/react-components

## 1.1.2

- Migrate dApp from using deprecated JSON-RPC client to new gRPC client.
Expand Down
6 changes: 3 additions & 3 deletions examples/eSealing/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "e_sealing",
"packageManager": "[email protected]",
"version": "1.1.3",
"version": "1.1.4",
"license": "Apache-2.0",
"dependencies": {
"@concordium/react-components": "0.4.0-rc.5",
"@concordium/web-sdk": "^7.0.3",
"@concordium/react-components": "^0.4.0",
"@concordium/web-sdk": "^7.1.0",
"@thi.ng/leb128": "^2.1.18",
"@types/sha256": "^0.2.0",
"@walletconnect/types": "^2.1.4",
Expand Down
2 changes: 1 addition & 1 deletion examples/nft-minting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packageManager": "[email protected]",
"dependencies": {
"@concordium/browser-wallet-api-helpers": "workspace:^",
"@concordium/web-sdk": "^7.0.3",
"@concordium/web-sdk": "^7.1.0",
"cors": "^2.8.5",
"express": "^4.18.1",
"express-fileupload": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/piggybank/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packageManager": "[email protected]",
"dependencies": {
"@concordium/browser-wallet-api-helpers": "workspace:^",
"@concordium/web-sdk": "^7.0.3",
"@concordium/web-sdk": "^7.1.0",
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/two-step-transfer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"start": "live-server ../two-step-transfer/index.html --mount=/sdk.js:../../node_modules/@concordium/web-sdk/lib/min/concordium.web.min.js --mount=/helpers.js:../../packages/browser-wallet-api-helpers/lib/concordiumHelpers.min.js"
},
"dependencies": {
"@concordium/web-sdk": "^7.0.3"
"@concordium/web-sdk": "^7.1.0"
}
}
4 changes: 4 additions & 0 deletions examples/voting/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.1.2

- Bumped version of @concordium/web-sdk and @concordium/browser-wallet-api-helpers

## 1.1.1

- Migrate dApp from using deprecated JSON-RPC client to new gRPC client.
Expand Down
3 changes: 2 additions & 1 deletion examples/voting/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ FROM ${base_image} AS build
WORKDIR /app
COPY ./package.json ./package.json
COPY ./tsconfig.json ./tsconfig.json
COPY ./esbuild.config.ts ./
COPY ./index.html ./
COPY ./vite.config.ts ./
COPY ./public ./public
COPY ./src ./src

Expand Down
42 changes: 0 additions & 42 deletions examples/voting/esbuild.config.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<link rel="stylesheet" href="/public/index.css" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand All @@ -37,6 +36,6 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->

<script src="/public/index.js" defer=""></script>
<script src="/src/index.jsx" type="module"></script>
</body>
</html>
51 changes: 42 additions & 9 deletions examples/voting/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,42 @@
server {
listen 80;
server_name frontend;
location / {
# This would be the directory where your React app's static files are stored at
root /usr/share/nginx/html;
try_files $uri /index.html;
}
}
# Enable Gzip
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_proxied any;
gzip_types
text/css
text/javascript
text/xml
text/plain
text/x-component
application/javascript
application/json
application/xml
application/wasm
application/rss+xml
font/truetype
font/opentype
application/vnd.ms-fontobject
image/svg+xml
image/jpeg;

gzip_static on;

gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;

server {
listen 80 default;
server_name frontend;
root /usr/share/nginx/html;

# Set expires max on static file types
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|wasm)$ {
expires max;
root /usr/share/nginx/html;
access_log off;
}
}
24 changes: 12 additions & 12 deletions examples/voting/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "voting",
"license": "Apache-2.0",
"version": "1.1.1",
"version": "1.1.3",
"packageManager": "[email protected]",
"dependencies": {
"@concordium/browser-wallet-api-helpers": "beta",
"@concordium/web-sdk": "^7.0.3",
"@concordium/browser-wallet-api-helpers": "^3.0.0",
"@concordium/web-sdk": "^7.1.0",
"bootstrap": "^5.2.1",
"cross-env": "^7.0.3",
"moment": "^2.29.4",
"react": "^18.2.0",
"react-bootstrap": "^2.5.0",
Expand All @@ -20,16 +19,17 @@
"@types/node": "^18.7.23",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.5",
"esbuild": "^0.19.5",
"esbuild-plugin-copy": "^1.6.0",
"esbuild-plugin-svgr": "^1.0.1",
"express": "^4.18.1",
"@vitejs/plugin-react-swc": "^3.4.0",
"ts-node": "^10.8.0",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vite-plugin-svgr": "^4.1.0",
"vite-plugin-top-level-await": "^1.3.1",
"vite-plugin-wasm": "^3.2.2"
},
"scripts": {
"build": "node --loader ts-node/esm ./esbuild.config.ts; cp ./public/static/img/* ./dist",
"start": "node ./serve",
"watch": "cross-env WATCH=1 yarn build"
"build": "vite build",
"start": "vite preview",
"watch": "vite"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions examples/voting/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import svgr from 'vite-plugin-svgr';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import wasm from 'vite-plugin-wasm';
import topLevelAwait from 'vite-plugin-top-level-await';

export default defineConfig({
plugins: [
react(),
svgr(),
wasm(),
topLevelAwait(), // For legacy browser compatibility
],
resolve: {
alias: {
'@concordium/rust-bindings': '@concordium/rust-bindings/bundler', // Resolve bundler-specific wasm entrypoints.
},
},
});
10 changes: 9 additions & 1 deletion examples/wCCD/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Changelog

# 4.1.0
## 4.1.2

- Bumped version of @concordium/web-sdk and @concordium/react-components (fixes wallet connect serialization issue)

## 4.1.1

- Bumped version of @concordium/web-sdk and @concordium/react-components

## 4.1.0

- Migrate dApp from using deprecated JSON-RPC client to new gRPC client.

Expand Down
6 changes: 3 additions & 3 deletions examples/wCCD/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "wccd",
"packageManager": "[email protected]",
"version": "4.1.1",
"version": "4.1.2",
"license": "Apache-2.0",
"dependencies": {
"@concordium/react-components": "0.4.0-rc.5",
"@concordium/web-sdk": "^7.0.3",
"@concordium/react-components": "^0.4.0",
"@concordium/web-sdk": "^7.1.0",
"@thi.ng/leb128": "^2.1.18",
"@walletconnect/types": "^2.1.4",
"mathjs": "^11.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-wallet-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@concordium/browser-wallet-api-helpers": "workspace:^",
"@concordium/browser-wallet-message-hub": "workspace:^",
"@concordium/web-sdk": "^7.0.3",
"@concordium/web-sdk": "^7.1.0",
"@concordium/web-sdk-legacy": "npm:@concordium/web-sdk@6",
"@protobuf-ts/grpcweb-transport": "^2.8.2",
"@protobuf-ts/runtime-rpc": "^2.8.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/browser-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@concordium/browser-wallet-api": "workspace:^",
"@concordium/browser-wallet-api-helpers": "workspace:^",
"@concordium/browser-wallet-message-hub": "workspace:^",
"@concordium/web-sdk": "^7.0.3",
"@concordium/web-sdk": "^7.1.0",
"@noble/ed25519": "^1.7.0",
"@protobuf-ts/runtime-rpc": "^2.8.2",
"@scure/bip39": "^1.1.0",
Expand Down Expand Up @@ -53,7 +53,7 @@
"react-window-infinite-loader": "^1.0.8",
"readable-stream": "^4.2.0",
"uuid": "^8.3.2",
"wallet-common-helpers": "https://github.com/Concordium/concordium-wallet-common-helpers.git#12cba9df452e92130566dd0b525f814dbee85190"
"wallet-common-helpers": "https://github.com/Concordium/concordium-wallet-common-helpers.git#d6dd106aa892d683bcaad33189ed4043bcfc55a0"
},
"devDependencies": {
"@babel/core": "^7.18.2",
Expand Down
Loading

0 comments on commit a6ae208

Please sign in to comment.