diff --git a/packages/api-derive/package.json b/packages/api-derive/package.json index 0b8109b7f4..47fbf71ec0 100644 --- a/packages/api-derive/package.json +++ b/packages/api-derive/package.json @@ -32,6 +32,6 @@ "@polkadot/types": "^1.1.0-beta.13" }, "devDependencies": { - "@polkadot/keyring": "^2.0.1" + "@polkadot/keyring": "^2.1.0-beta.0" } } diff --git a/packages/api/package.json b/packages/api/package.json index 7b5c6175ff..fcaacd9b45 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -31,14 +31,14 @@ "dependencies": { "@babel/runtime": "^7.8.3", "@polkadot/api-derive": "^1.1.0-beta.13", - "@polkadot/keyring": "^2.0.1", + "@polkadot/keyring": "^2.1.0-beta.0", "@polkadot/metadata": "^1.1.0-beta.13", "@polkadot/rpc-core": "^1.1.0-beta.13", "@polkadot/rpc-provider": "^1.1.0-beta.13", "@polkadot/types": "^1.1.0-beta.13", - "@polkadot/util-crypto": "^2.0.1" + "@polkadot/util-crypto": "^2.1.0-beta.0" }, "devDependencies": { - "@polkadot/keyring": "^2.0.1" + "@polkadot/keyring": "^2.1.0-beta.0" } } diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts index 3cedb8e084..bf078bcfd9 100644 --- a/packages/api/src/index.ts +++ b/packages/api/src/index.ts @@ -4,15 +4,22 @@ import { detectPackage } from '@polkadot/util'; +let dirname = 'node_modules'; let pkgJson; +try { + dirname = __dirname; +} catch (error) { + // ignore +} + try { pkgJson = require('./package.json'); } catch (error) { pkgJson = require('../package.json'); } -detectPackage(pkgJson); +detectPackage(dirname, pkgJson); export { Keyring } from '@polkadot/keyring'; export { WsProvider } from '@polkadot/rpc-provider'; diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 1c0b7f1dbe..a7c11c8ff8 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -28,10 +28,10 @@ "dependencies": { "@babel/runtime": "^7.8.3", "@polkadot/types": "^1.1.0-beta.13", - "@polkadot/util": "^2.0.1", - "@polkadot/util-crypto": "^2.0.1" + "@polkadot/util": "^2.1.0-beta.0", + "@polkadot/util-crypto": "^2.1.0-beta.0" }, "devDependencies": { - "@polkadot/keyring": "^2.0.1" + "@polkadot/keyring": "^2.1.0-beta.0" } } diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index 4b294d7006..1c964feb7b 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -30,7 +30,7 @@ "@polkadot/jsonrpc": "^1.1.0-beta.13", "@polkadot/rpc-provider": "^1.1.0-beta.13", "@polkadot/types": "^1.1.0-beta.13", - "@polkadot/util": "^2.0.1", + "@polkadot/util": "^2.1.0-beta.0", "rxjs": "^6.5.4" } } diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index 6d5ecb7181..96da547113 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -28,14 +28,14 @@ "dependencies": { "@babel/runtime": "^7.8.3", "@polkadot/metadata": "^1.1.0-beta.13", - "@polkadot/util": "^2.0.1", - "@polkadot/util-crypto": "^2.0.1", + "@polkadot/util": "^2.1.0-beta.0", + "@polkadot/util-crypto": "^2.1.0-beta.0", "eventemitter3": "^4.0.0", "isomorphic-fetch": "^2.2.1", "websocket": "^1.0.31" }, "devDependencies": { - "@polkadot/keyring": "^2.0.1", + "@polkadot/keyring": "^2.1.0-beta.0", "mock-socket": "^9.0.3", "nock": "^11.7.2" } diff --git a/packages/types/package.json b/packages/types/package.json index 31de9af72b..12512977de 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -35,13 +35,13 @@ "dependencies": { "@babel/runtime": "^7.8.3", "@polkadot/metadata": "^1.1.0-beta.13", - "@polkadot/util": "^2.0.1", - "@polkadot/util-crypto": "^2.0.1", + "@polkadot/util": "^2.1.0-beta.0", + "@polkadot/util-crypto": "^2.1.0-beta.0", "memoizee": "^0.4.14", "yargs": "^15.1.0" }, "devDependencies": { - "@polkadot/keyring": "^2.0.1", + "@polkadot/keyring": "^2.1.0-beta.0", "@types/memoizee": "^0.4.3", "@types/yargs": "^15.0.2" } diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index c9f0a789da..4600161550 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -7,15 +7,22 @@ import { detectPackage } from '@polkadot/util'; +let dirname = 'node_modules'; let pkgJson; +try { + dirname = __dirname; +} catch (error) { + // ignore +} + try { pkgJson = require('./package.json'); } catch (error) { pkgJson = require('../package.json'); } -detectPackage(pkgJson); +detectPackage(dirname, pkgJson); export * from './codec'; export * from './index.types'; diff --git a/yarn.lock b/yarn.lock index b4b8f0cfd5..cafeeff6bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2015,14 +2015,14 @@ typescript "^3.7.5" vuepress "^1.2.0" -"@polkadot/keyring@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-2.0.1.tgz#bbcc10c1a96bf3c43a53414f93646f3d7cc0d5e8" - integrity sha512-VsQQgQVnc5rfMGdFOxDhyv+YdoI5gJaTAhAB++FKxELUtfQJiGOCb16NUs29vNLf7UX59ZkLZfvO+EL0JcZwdw== +"@polkadot/keyring@^2.1.0-beta.0": + version "2.1.0-beta.0" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-2.1.0-beta.0.tgz#5fe05f715794e84eccb1f1efa2f01f92dd325e98" + integrity sha512-Qm9CXzKbb7WfkpaDS35ZaxZQWcwGCKJiCS8ymUnOQhCmd/7nQRu+ueIZpUfyxw5XEDeSA3fOhNmEi7oDxp8EAg== dependencies: "@babel/runtime" "^7.8.3" - "@polkadot/util" "^2.0.1" - "@polkadot/util-crypto" "^2.0.1" + "@polkadot/util" "^2.1.0-beta.0" + "@polkadot/util-crypto" "^2.1.0-beta.0" "@polkadot/ts@^0.2.1": version "0.2.1" @@ -2031,13 +2031,13 @@ dependencies: "@types/chrome" "^0.0.92" -"@polkadot/util-crypto@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-2.0.1.tgz#abfe4c229bb52b56b7ebab9256d366c65a3eca63" - integrity sha512-/PJXSVggnO6OHE6U3ji5u8Gal1HW0hDUWm85Wxw7ZQY1AnXwrnklrbTM2a+2myShxRe3HJ4A4pcYsaZPELxj4Q== +"@polkadot/util-crypto@^2.1.0-beta.0": + version "2.1.0-beta.0" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-2.1.0-beta.0.tgz#0d27cb897e0d116ce9197b6f566f11a416ef26a7" + integrity sha512-NUHLZua94cUcn4NvZOYX8YYmxfbQfhPcbZevJrqvROIVzHkO7IRvIzxNPVQH7KcvQEs+qzJf8VrM0+u1gURpqA== dependencies: "@babel/runtime" "^7.8.3" - "@polkadot/util" "^2.0.1" + "@polkadot/util" "^2.1.0-beta.0" "@polkadot/wasm-crypto" "^0.20.1" "@types/bs58" "^4.0.0" "@types/elliptic" "^6.4.12" @@ -2052,10 +2052,10 @@ tweetnacl "^1.0.2" xxhashjs "^0.2.2" -"@polkadot/util@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-2.0.1.tgz#6004da88c7430992285a44cff1062e0bba963605" - integrity sha512-BjUVLpJ1UtuKpcW2V5NEm5739mmTVO7imQvf87HIpmsR37vC1aWcR6JSwn4O6VBEkCOaxjsVmyOVdzfsbYp4Ew== +"@polkadot/util@^2.1.0-beta.0": + version "2.1.0-beta.0" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-2.1.0-beta.0.tgz#a0e7c891687e771582fe616047e58f96b7e435ff" + integrity sha512-ZHJ4vG+AJdltqhqotMu9Fw3Um7Gii61Ve2MQYYCaalLr9AZO3fgAq9St4O8vza49ZxOru8bZaexlToxCIt2b4g== dependencies: "@babel/runtime" "^7.8.3" "@types/bn.js" "^4.11.6"