From 17ebfc2668b29635c1a816c6ddc076167b33161c Mon Sep 17 00:00:00 2001 From: Clockwork Date: Tue, 5 Dec 2023 08:07:46 +0200 Subject: [PATCH] feat: Bump CosmJS for SDK 0.50.0 support --- packages/react-template/package.json | 10 +++++----- packages/react-template/postinstall.cjs | 10 ---------- packages/react-template/preinstall.cjs | 12 ++++++++++++ packages/vue-template/package.json | 10 +++++----- packages/vue-template/postinstall.js | 9 --------- packages/vue-template/preinstall.js | 12 ++++++++++++ 6 files changed, 34 insertions(+), 29 deletions(-) delete mode 100644 packages/react-template/postinstall.cjs create mode 100644 packages/react-template/preinstall.cjs delete mode 100644 packages/vue-template/postinstall.js create mode 100644 packages/vue-template/preinstall.js diff --git a/packages/react-template/package.json b/packages/react-template/package.json index 6137972b..356476c8 100644 --- a/packages/react-template/package.json +++ b/packages/react-template/package.json @@ -8,7 +8,7 @@ "build": "tsc && vite build", "preview": "vite preview", "lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", - "postinstall": "node postinstall.cjs", + "preinstall": "node preinstall.cjs", "prepare": "node prepare.cjs" }, "engines": { @@ -16,8 +16,8 @@ "node": ">=16.0.0" }, "dependencies": { - "@cosmjs/encoding": "^0.31.1", - "@cosmjs/stargate": "^0.31.1", + "@cosmjs/encoding": "^0.32.1", + "@cosmjs/stargate": "^0.32.1", "@headlessui/react": "^1.7.3", "@headlessui/tailwindcss": "^0.1.1", "@ignt/react-library": "^0.5.1", @@ -36,8 +36,8 @@ "react-router-dom": "^6.4.2" }, "devDependencies": { - "@cosmjs/proto-signing": "^0.31.1", - "@keplr-wallet/types": "^0.11.14", + "@cosmjs/proto-signing": "^0.32.1", + "@keplr-wallet/types": "^0.13.44", "@rollup/plugin-node-resolve": "^15.0.1", "@rushstack/eslint-patch": "^1.2.0", "@types/crypto-js": "^4.1.1", diff --git a/packages/react-template/postinstall.cjs b/packages/react-template/postinstall.cjs deleted file mode 100644 index 4bcb6ebc..00000000 --- a/packages/react-template/postinstall.cjs +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -/* eslint-env node */ -const pkgjson = require("./package.json"); -var exec = require("child_process").exec; - -for (let pkg in pkgjson.dependencies) { - if (pkgjson.dependencies[pkg].startsWith("file:")) { - exec(`cd ./node_modules/${pkg} && npm install`); - } -} diff --git a/packages/react-template/preinstall.cjs b/packages/react-template/preinstall.cjs new file mode 100644 index 00000000..35ddba4f --- /dev/null +++ b/packages/react-template/preinstall.cjs @@ -0,0 +1,12 @@ +/* eslint-env node */ +const pkgjson = require("./package.json"); +var spawnSync = require("child_process").spawnSync; + +for (let pkg in pkgjson.dependencies) { + if (pkgjson.dependencies[pkg].startsWith("file:")) { + let relPath = pkgjson.dependencies[pkg].substring(5); + console.log(`PRE-INSTALL Installing & building ${pkg} prior to webapp install`); + spawnSync("npm", ['install'], {cwd: relPath, stdio: "inherit" }); + spawnSync("npm", ['run','build'], {cwd: relPath, stdio: "inherit" }); + } +} diff --git a/packages/vue-template/package.json b/packages/vue-template/package.json index 5c621cfd..1338f543 100644 --- a/packages/vue-template/package.json +++ b/packages/vue-template/package.json @@ -1,7 +1,7 @@ { "dependencies": { - "@cosmjs/encoding": "^0.31.1", - "@cosmjs/stargate": "^0.31.1", + "@cosmjs/encoding": "^0.32.1", + "@cosmjs/stargate": "^0.32.1", "@headlessui/tailwindcss": "^0.1.1", "@headlessui/vue": "^1.7.3", "@ignt/vue-library": "^0.5.1", @@ -18,8 +18,8 @@ "vue-router": "^4.1.6" }, "devDependencies": { - "@cosmjs/proto-signing": "^0.31.1", - "@keplr-wallet/types": "^0.11.14", + "@cosmjs/proto-signing": "^0.32.1", + "@keplr-wallet/types": "^0.12.44", "@rollup/plugin-node-resolve": "^15.0.1", "@rushstack/eslint-patch": "^1.2.0", "@types/crypto-js": "^4.1.1", @@ -50,7 +50,7 @@ "build-only": "vite build", "dev": "vite", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", - "postinstall": "node postinstall.js", + "preinstall": "node preinstall.js", "prepare": "node prepare.js", "preview": "vite preview --port 4173", "type-check": "vue-tsc --noEmit" diff --git a/packages/vue-template/postinstall.js b/packages/vue-template/postinstall.js deleted file mode 100644 index 7cd5712b..00000000 --- a/packages/vue-template/postinstall.js +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-env node */ -const pkgjson = require("./package.json"); -var exec = require("child_process").exec; - -for (let pkg in pkgjson.dependencies) { - if (pkgjson.dependencies[pkg].startsWith("file:")) { - exec(`cd ./node_modules/${pkg} && npm install`); - } -} diff --git a/packages/vue-template/preinstall.js b/packages/vue-template/preinstall.js new file mode 100644 index 00000000..35ddba4f --- /dev/null +++ b/packages/vue-template/preinstall.js @@ -0,0 +1,12 @@ +/* eslint-env node */ +const pkgjson = require("./package.json"); +var spawnSync = require("child_process").spawnSync; + +for (let pkg in pkgjson.dependencies) { + if (pkgjson.dependencies[pkg].startsWith("file:")) { + let relPath = pkgjson.dependencies[pkg].substring(5); + console.log(`PRE-INSTALL Installing & building ${pkg} prior to webapp install`); + spawnSync("npm", ['install'], {cwd: relPath, stdio: "inherit" }); + spawnSync("npm", ['run','build'], {cwd: relPath, stdio: "inherit" }); + } +}