diff --git a/sh/publish.ts b/sh/publish.ts index e0dbf4e..a2f920e 100644 --- a/sh/publish.ts +++ b/sh/publish.ts @@ -39,7 +39,9 @@ async function init() { await run(`pnpm run build:wallet`, pathRoot) } //tip: change package.json content + //remove dep, add peer WalletJsonData.peerDependencies['@xterio-sdk/auth'] = '^' + authVersion.split('.').slice(0, 2).join('.') + delete WalletJsonData.dependencies['@xterio-sdk/auth'] writeJSONSync(pathWalletJson, WalletJsonData, { encoding: 'utf-8', spaces: 2 }) await run('npm publish', pathWallet) await run(`bash release.sh wallet ${walletVersion}`, pathSh) @@ -48,12 +50,13 @@ async function init() { } const commitVersionFile = async (_f: string, _v: string) => { const path = _f === 'auth' ? pathAuth : pathWallet - await run(`git push origin main && git push new-origin main`) + await run(`git push origin main`) await run(`git add package.json && git commit -m "feat: npm pkg(${_f}) publish(${_v})"`, path) - await run(`git push origin main && git push new-origin main`) + await run(`git push origin main`) } const reset = () => { WalletJsonData.peerDependencies['@xterio-sdk/auth'] = 'workspace:^' + WalletJsonData.dependencies['@xterio-sdk/auth'] = 'workspace:^' writeJSONSync(pathWalletJson, WalletJsonData, { encoding: 'utf-8', spaces: 2 }) } diff --git a/xterio-wallet/package.json b/xterio-wallet/package.json index bf41550..e9efb90 100644 --- a/xterio-wallet/package.json +++ b/xterio-wallet/package.json @@ -63,7 +63,8 @@ "ethers": "^5.7.2", "react": "^18.3.1", "react-dom": "^18.3.1", - "viem": "^2.21.2" + "viem": "^2.21.2", + "@xterio-sdk/auth": "workspace:^" }, "devDependencies": { "@eslint/js": "^9.9.0",