Skip to content

Commit

Permalink
fix: use local version of wasm-pack (#1168)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Dec 20, 2022
1 parent f80a1ed commit f922247
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
4 changes: 2 additions & 2 deletions calc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

if [ -z ${CALC_DEBUG} ]; then
wasm-pack build --target nodejs --scope substrate "$SCRIPT_DIR"
yarn wasm-pack build --target nodejs --scope substrate "$SCRIPT_DIR"
else
echo "Fee debugging enabled"
wasm-pack build --debug --target nodejs --scope substrate "$SCRIPT_DIR" -- --features debug
yarn wasm-pack build --debug --target nodejs --scope substrate "$SCRIPT_DIR" -- --features debug
fi
# append a newline to pkg/package.json if it isn't there
if [ "$(tail -c1 "$SCRIPT_DIR/pkg/package.json"; echo x)" != $'\nx' ]; then
Expand Down
Binary file modified calc/pkg/calc_bg.wasm
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
"@types/lru-cache": "^7.10.10",
"@types/morgan": "1.9.3",
"@types/triple-beam": "^1.3.2",
"tsc-watch": "^4.6.2"
"tsc-watch": "^4.6.2",
"wasm-pack": "^0.10.3"
},
"resolutions": {
"typescript": "4.7.4"
Expand Down
42 changes: 42 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,7 @@ __metadata:
lru-cache: ^7.13.1
rxjs: ^7.5.6
tsc-watch: ^4.6.2
wasm-pack: ^0.10.3
winston: ^3.8.1
bin:
substrate-api-sidecar: ./build/src/main.js
Expand Down Expand Up @@ -1970,6 +1971,15 @@ __metadata:
languageName: node
linkType: hard

"axios@npm:^0.21.1":
version: 0.21.4
resolution: "axios@npm:0.21.4"
dependencies:
follow-redirects: ^1.14.0
checksum: 44245f24ac971e7458f3120c92f9d66d1fc695e8b97019139de5b0cc65d9b8104647db01e5f46917728edfc0cfd88eb30fc4c55e6053eef4ace76768ce95ff3c
languageName: node
linkType: hard

"babel-jest@npm:^27.5.1":
version: 27.5.1
resolution: "babel-jest@npm:27.5.1"
Expand Down Expand Up @@ -2063,6 +2073,17 @@ __metadata:
languageName: node
linkType: hard

"binary-install@npm:^0.1.0":
version: 0.1.1
resolution: "binary-install@npm:0.1.1"
dependencies:
axios: ^0.21.1
rimraf: ^3.0.2
tar: ^6.1.0
checksum: a3df9c07a3ab81533cff610527263181c4c34a44efb115555be910b6011ac047bf875ad57469cc2259dfaba58e971c7ba2958038e9d222c546eef7b58b826ecc
languageName: node
linkType: hard

"bn.js@npm:^5.2.1":
version: 5.2.1
resolution: "bn.js@npm:5.2.1"
Expand Down Expand Up @@ -3314,6 +3335,16 @@ __metadata:
languageName: node
linkType: hard

"follow-redirects@npm:^1.14.0":
version: 1.15.2
resolution: "follow-redirects@npm:1.15.2"
peerDependenciesMeta:
debug:
optional: true
checksum: faa66059b66358ba65c234c2f2a37fcec029dc22775f35d9ad6abac56003268baf41e55f9ee645957b32c7d9f62baf1f0b906e68267276f54ec4b4c597c2b190
languageName: node
linkType: hard

"form-data@npm:^3.0.0":
version: 3.0.1
resolution: "form-data@npm:3.0.1"
Expand Down Expand Up @@ -6461,6 +6492,17 @@ resolve@^1.20.0:
languageName: node
linkType: hard

"wasm-pack@npm:^0.10.3":
version: 0.10.3
resolution: "wasm-pack@npm:0.10.3"
dependencies:
binary-install: ^0.1.0
bin:
wasm-pack: run.js
checksum: b980b33fc8adcd208556a1f5c4656b02d1ae584792259874f09ab5647dd52d0cdd3179d970ba99eed72ac1a422445c3c81122a3e9d7c05ebb2a3ff83bd7ec7db
languageName: node
linkType: hard

"web-streams-polyfill@npm:^3.0.3":
version: 3.2.1
resolution: "web-streams-polyfill@npm:3.2.1"
Expand Down

0 comments on commit f922247

Please sign in to comment.