Bump dependencies
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"lerna": "2.5.1",
|
||||
"lerna": "2.11.0",
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"command": {
|
||||
|
||||
+2
-2
@@ -7,10 +7,10 @@
|
||||
"scripts": {
|
||||
"build": "polkadot-dev-build-babel",
|
||||
"check": "eslint packages && flow check",
|
||||
"clean": "polkadot-dev-clean-build",
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/dev": "^0.17.13",
|
||||
"lerna": "^2.5.1"
|
||||
"@polkadot/dev": "^0.18.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@polkadot/api-jsonrpc": "^0.10.11",
|
||||
"@polkadot/primitives-json": "^0.13.9",
|
||||
"@polkadot/util": "^0.19.6",
|
||||
"@polkadot/primitives-json": "^0.13.10",
|
||||
"@polkadot/util": "^0.19.7",
|
||||
"babel-runtime": "^6.26.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
"nock": "^9.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@polkadot/storage-substrate": "^0.13.9",
|
||||
"@polkadot/util": "^0.19.6",
|
||||
"@polkadot/util-crypto": "^0.19.6",
|
||||
"@polkadot/util-keyring": "^0.19.6",
|
||||
"@polkadot/storage-substrate": "^0.13.10",
|
||||
"@polkadot/util": "^0.19.7",
|
||||
"@polkadot/util-crypto": "^0.19.7",
|
||||
"@polkadot/util-keyring": "^0.19.7",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"eventemitter3": "^2.0.3",
|
||||
"isomorphic-fetch": "^2.2.1",
|
||||
|
||||
@@ -10,7 +10,8 @@ type Cached$ParamJson = string;
|
||||
|
||||
type CachedMap = {
|
||||
[Cached$Name]: {
|
||||
[Cached$ParamJson]: rxjs$BehaviorSubject<*>
|
||||
// flowlint-next-line unclear-type:off
|
||||
[Cached$ParamJson]: rxjs$BehaviorSubject<any>
|
||||
}
|
||||
};
|
||||
|
||||
@@ -18,12 +19,14 @@ const subject = require('./subject');
|
||||
|
||||
const cacheMap: CachedMap = {};
|
||||
|
||||
module.exports = function cached (subName: string, name: string, section: ApiInterface$Section): (...params: Array<mixed>) => rxjs$BehaviorSubject<*> {
|
||||
// flowlint-next-line unclear-type:off
|
||||
module.exports = function cached (subName: string, name: string, section: ApiInterface$Section): (...params: Array<mixed>) => rxjs$BehaviorSubject<any> {
|
||||
if (!cacheMap[subName]) {
|
||||
cacheMap[subName] = {};
|
||||
}
|
||||
|
||||
return (...params: Array<mixed>): rxjs$BehaviorSubject<*> => {
|
||||
// flowlint-next-line unclear-type:off
|
||||
return (...params: Array<mixed>): rxjs$BehaviorSubject<any> => {
|
||||
const paramStr = JSON.stringify(params);
|
||||
|
||||
if (!cacheMap[subName][paramStr]) {
|
||||
|
||||
@@ -10,12 +10,14 @@ const isFunction = require('@polkadot/util/is/function');
|
||||
|
||||
const cached = require('./cached');
|
||||
|
||||
module.exports = function observable (subName: string, name: string, section: ApiInterface$Section): (...params: Array<mixed>) => rxjs$Observable<*> | rxjs$BehaviorSubject<*> {
|
||||
// flowlint-next-line unclear-type:off
|
||||
module.exports = function observable (subName: string, name: string, section: ApiInterface$Section): (...params: Array<mixed>) => rxjs$Observable<any> | rxjs$BehaviorSubject<any> {
|
||||
if (isFunction(section[name].unsubscribe)) {
|
||||
return cached(subName, name, section);
|
||||
}
|
||||
|
||||
return (...params: Array<mixed>): rxjs$Observable<*> =>
|
||||
// flowlint-next-line unclear-type:off
|
||||
return (...params: Array<mixed>): rxjs$Observable<any> =>
|
||||
fromPromise(
|
||||
section[name].apply(null, params)
|
||||
);
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
import type { InterfaceTypes } from '@polkadot/api-jsonrpc/types';
|
||||
|
||||
export type RxApiInterface$Method = (...params: Array<mixed>) => rxjs$Observable<*> | rxjs$BehaviorSubject<*>;
|
||||
// flowlint-next-line unclear-type:off
|
||||
export type RxApiInterface$Method = (...params: Array<mixed>) => rxjs$Observable<any> | rxjs$BehaviorSubject<any>;
|
||||
|
||||
export type RxApiInterface$Section = {
|
||||
[string]: RxApiInterface$Method
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"@polkadot/api-format": "^0.10.11",
|
||||
"@polkadot/api-jsonrpc": "^0.10.11",
|
||||
"@polkadot/api-provider": "^0.10.11",
|
||||
"@polkadot/util": "^0.19.6",
|
||||
"@polkadot/util": "^0.19.7",
|
||||
"babel-runtime": "^6.26.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user