Add resolver for jest (#1813)
This commit is contained in:
@@ -32,6 +32,6 @@
|
||||
"@polkadot/types": "^1.1.0-beta.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.1.1"
|
||||
"@polkadot/keyring": "^2.2.0-beta.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,20 +25,17 @@
|
||||
"url": "https://github.com/polkadot-js/api/issues"
|
||||
},
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"browser": {
|
||||
"../package.json": "./package.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.8.3",
|
||||
"@polkadot/api-derive": "^1.1.0-beta.21",
|
||||
"@polkadot/keyring": "^2.1.1",
|
||||
"@polkadot/keyring": "^2.2.0-beta.0",
|
||||
"@polkadot/metadata": "^1.1.0-beta.21",
|
||||
"@polkadot/rpc-core": "^1.1.0-beta.21",
|
||||
"@polkadot/rpc-provider": "^1.1.0-beta.21",
|
||||
"@polkadot/types": "^1.1.0-beta.21",
|
||||
"@polkadot/util-crypto": "^2.1.1"
|
||||
"@polkadot/util-crypto": "^2.2.0-beta.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.1.1"
|
||||
"@polkadot/keyring": "^2.2.0-beta.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,23 +4,14 @@
|
||||
|
||||
import { detectPackage } from '@polkadot/util';
|
||||
|
||||
let dirname;
|
||||
let pkgJson;
|
||||
|
||||
// eslint-disable-next-line no-useless-catch
|
||||
try {
|
||||
dirname = __dirname;
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
detectPackage(require('./package.json'), __dirname);
|
||||
} catch (error) {
|
||||
// ignore
|
||||
throw error;
|
||||
}
|
||||
|
||||
try {
|
||||
pkgJson = require('./package.json');
|
||||
} catch (error) {
|
||||
pkgJson = require('../package.json');
|
||||
}
|
||||
|
||||
detectPackage(pkgJson, dirname);
|
||||
|
||||
export { Keyring } from '@polkadot/keyring';
|
||||
export { WsProvider } from '@polkadot/rpc-provider';
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.8.3",
|
||||
"@polkadot/types": "^1.1.0-beta.21",
|
||||
"@polkadot/util": "^2.1.1",
|
||||
"@polkadot/util-crypto": "^2.1.1"
|
||||
"@polkadot/util": "^2.2.0-beta.0",
|
||||
"@polkadot/util-crypto": "^2.2.0-beta.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.1.1"
|
||||
"@polkadot/keyring": "^2.2.0-beta.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"@polkadot/jsonrpc": "^1.1.0-beta.21",
|
||||
"@polkadot/rpc-provider": "^1.1.0-beta.21",
|
||||
"@polkadot/types": "^1.1.0-beta.21",
|
||||
"@polkadot/util": "^2.1.1",
|
||||
"@polkadot/util": "^2.2.0-beta.0",
|
||||
"rxjs": "^6.5.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.8.3",
|
||||
"@polkadot/metadata": "^1.1.0-beta.21",
|
||||
"@polkadot/util": "^2.1.1",
|
||||
"@polkadot/util-crypto": "^2.1.1",
|
||||
"@polkadot/util": "^2.2.0-beta.0",
|
||||
"@polkadot/util-crypto": "^2.2.0-beta.0",
|
||||
"eventemitter3": "^4.0.0",
|
||||
"isomorphic-fetch": "^2.2.1",
|
||||
"websocket": "^1.0.31"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.1.1",
|
||||
"@polkadot/keyring": "^2.2.0-beta.0",
|
||||
"mock-socket": "^9.0.3",
|
||||
"nock": "^11.7.2"
|
||||
}
|
||||
|
||||
@@ -35,13 +35,13 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.8.3",
|
||||
"@polkadot/metadata": "^1.1.0-beta.21",
|
||||
"@polkadot/util": "^2.1.1",
|
||||
"@polkadot/util-crypto": "^2.1.1",
|
||||
"@polkadot/util": "^2.2.0-beta.0",
|
||||
"@polkadot/util-crypto": "^2.2.0-beta.0",
|
||||
"memoizee": "^0.4.14",
|
||||
"yargs": "^15.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.1.1",
|
||||
"@polkadot/keyring": "^2.2.0-beta.0",
|
||||
"@types/memoizee": "^0.4.3",
|
||||
"@types/yargs": "^15.0.2"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user