Skip to content

Commit

Permalink
fix: cjs and esm bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
amalcaraz committed May 3, 2024
1 parent bb2b427 commit 84762c3
Show file tree
Hide file tree
Showing 20 changed files with 822 additions and 299 deletions.
842 changes: 725 additions & 117 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 3 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@
"devDependencies": {
"@airgap/beacon-types": "^4.1.2",
"@jet-lab/e2e-react-adapter": "^0.1.3",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@types/elliptic": "^6.4.18",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.19",
Expand All @@ -64,11 +59,8 @@
"lerna": "^8.1.2",
"prettier": "^3.2.5",
"rollup": "^3.29.4",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-iife": "^0.7.1",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-polyfill-node": "^0.13.0",
"rollup-plugin-esbuild": "^6.1.1",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"typedoc": "^0.25.8",
Expand All @@ -90,8 +82,5 @@
"packages/superfluid",
"packages/client",
"packages/dns"
],
"dependencies": {
"@rollup/plugin-inject": "^5.0.5"
}
}
]
}
7 changes: 4 additions & 3 deletions packages/account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
"name": "@aleph-sdk/account",
"version": "1.0.1",
"description": "Common interfaces for accounts compatible with aleph.im.",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"type": "module",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@aleph-sdk/core": "^1.0.1"
"@aleph-sdk/core": "^1.x.x"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
12 changes: 6 additions & 6 deletions packages/avalanche/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/avalanche",
"version": "1.0.1",
"description": "Avalanche accounts for signing messages on aleph.im",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -19,11 +19,11 @@
"sha.js": "^2.4.11"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1",
"@aleph-sdk/evm": "^1.0.1",
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x",
"@aleph-sdk/evm": "^1.x.x",
"avalanche": "^3.15.3",
"ethers": "^6.x.x"
"ethers": "^5.x.x"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
2 changes: 1 addition & 1 deletion packages/avalanche/src/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SignableMessage } from '@aleph-sdk/account'
import { Avalanche, BinTools, Buffer as AvaBuff } from 'avalanche'
import shajs from 'sha.js'

export function digestMessage(message: Uint8Array): Uint8Array {
export function digestMessage(message: Uint8Array): Buffer {
const msgSize = Buffer.alloc(4)
msgSize.writeUInt32BE(message.length, 0)
const msgStr = Buffer.from(message).toString('utf-8')
Expand Down
10 changes: 5 additions & 5 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/client",
"version": "1.0.1",
"description": "",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -15,9 +15,9 @@
"@types/sha.js": "^2.4.4"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1",
"@aleph-sdk/message": "^1.0.1"
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x",
"@aleph-sdk/message": "^1.x.x"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/core",
"version": "1.0.1",
"description": "Shared utilities and constants for @aleph-sdk",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -20,4 +20,4 @@
"homepage": "https://aleph.im",
"bugs": "https://github.com/aleph-im/aleph-sdk-ts/issues",
"license": "MIT"
}
}
8 changes: 4 additions & 4 deletions packages/cosmos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/cosmos",
"version": "1.0.1",
"description": "Cosmos accounts for signing messages on aleph.im",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -15,8 +15,8 @@
"elliptic": "^6.5.4"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1",
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x",
"@cosmjs/amino": "^0.32.2"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/dns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/dns",
"version": "1.0.1",
"description": "",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -18,4 +18,4 @@
},
"author": "",
"license": "ISC"
}
}
8 changes: 4 additions & 4 deletions packages/ethereum-ledger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/ethereum-ledger",
"version": "1.0.1",
"description": "Ledger-based Ethereum accounts for signing messages on aleph.im",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -16,8 +16,8 @@
"semver": "^7.3.8"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1",
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x",
"@ledgerhq/hw-app-eth": "^6.35.4",
"@ledgerhq/hw-transport": "^6.30.3",
"@ledgerhq/hw-transport-node-hid": "^6.28.3",
Expand Down
12 changes: 6 additions & 6 deletions packages/ethereum/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/ethereum",
"version": "1.0.1",
"description": "Ethereum accounts for signing messages on aleph.im",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -16,10 +16,10 @@
"eciesjs": "^0.4.6"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1",
"@aleph-sdk/evm": "^1.0.1",
"ethers": "^6.x.x"
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x",
"@aleph-sdk/evm": "^1.x.x",
"ethers": "^5.x.x"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
13 changes: 8 additions & 5 deletions packages/evm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/evm",
"version": "1.0.1",
"description": "Common functions for EVM-based accounts interacting with aleph.im.",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -15,10 +15,13 @@
"@metamask/eth-sig-util": "^7.0.1",
"ethereumjs-util": "^7.1.5"
},
"devDependencies": {
"ethers": "^5.x.x"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1",
"ethers": "^6.x.x"
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x",
"ethers": "^5.x.x"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
8 changes: 4 additions & 4 deletions packages/message/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/message",
"version": "1.0.2",
"description": "Aleph.im message CRUD API",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -20,8 +20,8 @@
"sha.js": "^2.4.11"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1"
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
8 changes: 4 additions & 4 deletions packages/nuls2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/nuls2",
"version": "1.0.1",
"description": "Nuls2 accounts for signing messages on aleph.im",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -27,8 +27,8 @@
"sha.js": "^2.4.11"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1"
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
8 changes: 4 additions & 4 deletions packages/solana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/solana",
"version": "1.0.1",
"description": "Solana accounts for signing messages on aleph.im",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -19,8 +19,8 @@
"tweetnacl": "^1.0.3"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1",
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x",
"@solana/buffer-layout": "^4.0.1",
"@solana/web3.js": "^1.90.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/substrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/substrate",
"version": "1.0.1",
"description": "Polkadot/Substrate-based accounts for signing messages on aleph.im",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -17,8 +17,8 @@
"@polkadot/util-crypto": "^12.6.2"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1",
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x",
"@polkadot/extension-dapp": "^0.46.6",
"@polkadot/extension-inject": "^0.46.6"
},
Expand Down
12 changes: 6 additions & 6 deletions packages/superfluid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/superfluid",
"version": "1.0.1",
"description": "Aleph.im account wrapper for interacting with the Superfluid Avalanche Contract",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -15,10 +15,10 @@
"@types/sha.js": "^2.4.0"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/avalanche": "^1.0.1",
"@aleph-sdk/core": "^1.0.1",
"@aleph-sdk/evm": "^1.0.1",
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/avalanche": "^1.x.x",
"@aleph-sdk/core": "^1.x.x",
"@aleph-sdk/evm": "^1.x.x",
"@superfluid-finance/sdk-core": "^0.6.12",
"avalanche": "1.0.3",
"decimal.js": "^10.4.3"
Expand Down
8 changes: 4 additions & 4 deletions packages/tezos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@aleph-sdk/tezos",
"version": "1.0.1",
"description": "Tezos accounts for signing messages on aleph.im",
"main": "dist/cjs/index.min.cjs",
"module": "dist/esm/index.min.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
Expand All @@ -19,8 +19,8 @@
"tweetnacl": "^1.0.3"
},
"peerDependencies": {
"@aleph-sdk/account": "^1.0.1",
"@aleph-sdk/core": "^1.0.1",
"@aleph-sdk/account": "^1.x.x",
"@aleph-sdk/core": "^1.x.x",
"@taquito/beacon-wallet": "^17.5.2",
"@taquito/signer": "^17.5.2"
},
Expand Down
Loading

0 comments on commit 84762c3

Please sign in to comment.