Bump deps (#861)

* Bump deps

* Align with published common

* Fix rxjs to 6.4.0 (false deprecations on 6.5.1)
This commit is contained in:
Jaco Greeff
2019-04-29 13:47:55 +02:00
committed by GitHub
parent ba77e93500
commit 5445314d95
27 changed files with 944 additions and 1097 deletions
+9 -1
View File
@@ -2,16 +2,24 @@ language: node_js
node_js:
- "10"
env:
- GH_PAGES_SRC="build-docs"
global:
- CC_TEST_REPORTER_ID=2e7a4e12a9039fd1b3721e79e2efa92e1d4925af092679f3d106428e01373436
- GH_PAGES_SRC="build-docs"
cache:
yarn: true
directories:
- node_modules
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- export PATH=$HOME/.yarn/bin::$(yarn global bin):$PATH
before_script:
- ./cc-test-reporter before-build
script:
- yarn polkadot-dev-travis-build
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
deploy:
skip_cleanup: true
provider: script
+2 -4
View File
@@ -3,11 +3,9 @@
[![style](https://img.shields.io/badge/code%20style-semistandard-lightgrey.svg?style=flat-square)](https://github.com/Flet/semistandard)
[![npm](https://img.shields.io/npm/v/@polkadot/api.svg?style=flat-square)](https://www.npmjs.com/package/@polkadot/api)
[![travis](https://img.shields.io/travis/polkadot-js/api.svg?style=flat-square)](https://travis-ci.com/polkadot-js/api)
[![maintainability](https://img.shields.io/codeclimate/maintainability/polkadot-js/api.svg?style=flat-square)](https://codeclimate.com/github/polkadot-js/api/maintainability)
[![coverage](https://img.shields.io/coveralls/polkadot-js/api.svg?style=flat-square)](https://coveralls.io/github/polkadot-js/api?branch=master)
[![maintainability](https://img.shields.io/codeclimate/maintainability/polkadot-js/api.svg?style=flat-square)](https://codeclimate.com/github/polkadot-js/api))
[![coverage](https://img.shields.io/codeclimate/coverage/polkadot-js/api.svg?style=flat-square)](https://codeclimate.com/github/polkadot-js/api)
[![greenkeeper](https://img.shields.io/badge/greenkeeper-enabled-brightgreen.svg?style=flat-square)](https://greenkeeper.io/)
[![dependency](https://david-dm.org/polkadot-js/api.svg?style=flat-square)](https://david-dm.org/polkadot-js/api)
[![devDependency](https://david-dm.org/polkadot-js/api/dev-status.svg?style=flat-square&path=packages/api-provider)](https://david-dm.org/polkadot-js/api#info=devDependencies)
# @polkadot/api
+5 -5
View File
@@ -10,7 +10,7 @@
],
"resolutions": {
"babel-core": "^7.0.0-bridge.0",
"typescript": "^3.4.3"
"typescript": "^3.4.5"
},
"scripts": {
"build": "polkadot-dev-build-ts && yarn run build:methodsdoc && polkadot-dev-build-docs",
@@ -23,10 +23,10 @@
"test": "jest --coverage"
},
"devDependencies": {
"@babel/core": "^7.4.3",
"@babel/register": "^7.4.0",
"@babel/runtime": "^7.4.3",
"@polkadot/dev": "^0.30.0-beta.1",
"@babel/core": "^7.4.4",
"@babel/register": "^7.4.4",
"@babel/runtime": "^7.4.4",
"@polkadot/dev": "^0.30.0-beta.3",
"@polkadot/ts": "^0.1.56",
"gh-pages": "^2.0.1"
}
+1 -1
View File
@@ -30,7 +30,7 @@
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"dependencies": {
"@babel/runtime": "^7.4.3",
"@babel/runtime": "^7.4.4",
"@polkadot/api": "^0.78.0-beta.0",
"@polkadot/types": "^0.78.0-beta.0",
"@types/memoizee": "^0.4.2",
+2 -2
View File
@@ -12,7 +12,7 @@ import { drr } from '../util/drr';
export function fees (api: ApiInterface$Rx) {
return (): Observable<DerivedFees> => {
return (combineLatest(
return (combineLatest([
api.query.balances.creationFee(),
api.query.balances.existentialDeposit(),
api.query.fees
@@ -22,7 +22,7 @@ export function fees (api: ApiInterface$Rx) {
? api.query.fees.transactionByteFee()
: api.query.balances.transactionByteFee(),
api.query.balances.transferFee()
) as any as Observable<[BN, BN, BN, BN, BN]>).pipe(
]) as any as Observable<[BN, BN, BN, BN, BN]>).pipe(
map(([creationFee, existentialDeposit, transactionBaseFee, transactionByteFee, transferFee]) => ({
creationFee,
existentialDeposit,
@@ -15,10 +15,10 @@ import { votingBalancesNominatorsFor } from './votingBalancesNominatorsFor';
export function validatingBalance (api: ApiInterface$Rx) {
return (address: AccountId | AccountIndex | Address | string): Observable<DerivedBalances> => {
return combineLatest(
return combineLatest([
votingBalance(api)(address),
votingBalancesNominatorsFor(api)(address)
).pipe(
]).pipe(
map(([balance, nominators]) => {
const nominatedBalance = nominators.reduce(
(total: BN, nominatorBalance: DerivedBalances) =>
@@ -18,11 +18,11 @@ export function votingBalance (api: ApiInterface$Rx) {
return idAndIndex(api)(address).pipe(
switchMap(([accountId]) =>
(accountId
? combineLatest(
? combineLatest([
of(accountId),
api.query.balances.freeBalance(accountId),
api.query.balances.reservedBalance(accountId)
)
])
: of([undefined, undefined, undefined])
) as Observable<[AccountId?, Balance?, Balance?]>
),
@@ -14,6 +14,6 @@ export function votingBalances (api: ApiInterface$Rx) {
return (addresses?: Array<AccountId | AccountIndex | Address | string>): Observable<Array<DerivedBalances>> => {
return !addresses || !addresses.length
? of([]).pipe(drr())
: combineLatest(...addresses.map(votingBalance(api))).pipe(drr());
: combineLatest(addresses.map(votingBalance(api))).pipe(drr());
};
}
@@ -24,10 +24,10 @@ import { bestNumberFinalized } from './bestNumberFinalized';
*/
export function bestNumberLag (api: ApiInterface$Rx) {
return (): Observable<BlockNumber> =>
combineLatest(
combineLatest([
bestNumber(api)(),
bestNumberFinalized(api)()
).pipe(
]).pipe(
map(([bestNumber, bestNumberFinalized]) =>
new BlockNumber(bestNumber.sub(bestNumberFinalized))
),
+2 -2
View File
@@ -25,12 +25,12 @@ import { HeaderAndValidators } from './subscribeNewHead';
export function getHeader (api: ApiInterface$Rx) {
return (hash: Uint8Array | string): Observable<HeaderExtended | undefined> =>
// tslint:disable-next-line
(combineLatest(
(combineLatest([
api.rpc.chain.getHeader(hash) as Observable<Header>,
api.query.session
? api.query.session.validators.at(hash)
: of([])
) as Observable<HeaderAndValidators>).pipe(
]) as Observable<HeaderAndValidators>).pipe(
map(([header, validators]) =>
new HeaderExtended(header, validators)
),
@@ -30,7 +30,7 @@ export function subscribeNewHead (api: ApiInterface$Rx) {
header && !!header.blockNumber
),
switchMap((header: Header): Observable<HeaderAndValidators> =>
(combineLatest(
(combineLatest([
of(header),
// theoretically we could combine at the first call with session.validators(), however
// we make 100% sure we actually get the validators at a specific block so when these
@@ -38,7 +38,7 @@ export function subscribeNewHead (api: ApiInterface$Rx) {
api.query.session
? api.query.session.validators.at(header.hash)
: of([])
) as Observable<HeaderAndValidators>)
]) as Observable<HeaderAndValidators>)
),
map(([header, validators]) =>
new HeaderExtended(header, validators)
@@ -17,11 +17,11 @@ export function referendumVotesFor (api: ApiInterface$Rx) {
return (referendumId: BN | number): Observable<Array<DerivedReferendumVote>> =>
(api.query.democracy.votersFor(referendumId) as Observable<Vector<AccountId>>).pipe(
switchMap((votersFor) =>
combineLatest(
combineLatest([
of(votersFor),
votes(api)(referendumId as BN, votersFor),
votingBalances(api)(votersFor)
)
])
),
map(([votersFor, votes, balances]) =>
votersFor.map((accountId, index): DerivedReferendumVote => ({
@@ -13,10 +13,10 @@ import { referendumInfos } from './referendumInfos';
export function referendums (api: ApiInterface$Rx) {
return (): Observable<Array<Option<ReferendumInfoExtended>>> =>
(combineLatest(
(combineLatest([
api.query.democracy.nextTally(),
api.query.democracy.referendumCount()
) as Observable<[ReferendumIndex?, ReferendumIndex?]>).pipe(
]) as Observable<[ReferendumIndex?, ReferendumIndex?]>).pipe(
switchMap(([nextTally, referendumCount]) =>
referendumCount && nextTally && referendumCount.gt(nextTally) && referendumCount.gtn(0)
? referendumInfos(api)(
+2 -2
View File
@@ -12,10 +12,10 @@ import { drr } from '../util/drr';
export function eraLength (api: ApiInterface$Rx) {
return (): Observable<BN> =>
(combineLatest(
(combineLatest([
api.query.session.sessionLength(),
api.query.staking.sessionsPerEra()
) as Observable<[BlockNumber?, BlockNumber?]>).pipe(
]) as Observable<[BlockNumber?, BlockNumber?]>).pipe(
map(
([sessionLength, sessionsPerEra]) =>
(sessionLength || new BN(1)).mul(sessionsPerEra || new BN(1))
@@ -13,13 +13,13 @@ import { drr } from '../util/drr';
export function eraProgress (api: ApiInterface$Rx) {
return (): Observable<BN> =>
(combineLatest(
(combineLatest([
sessionProgress(api)(),
api.query.session.currentIndex(),
api.query.session.sessionLength(),
api.query.staking.lastEraLengthChange(),
api.query.staking.sessionsPerEra()
) as Observable<[BN, BlockNumber?, BlockNumber?, BlockNumber?, BlockNumber?]>).pipe(
]) as Observable<[BN, BlockNumber?, BlockNumber?, BlockNumber?, BlockNumber?]>).pipe(
map(
([sessionProgress, currentIndex, sessionLength, lastEraLengthChange, sessionsPerEra]) =>
(currentIndex || new BN(0))
@@ -13,11 +13,11 @@ import { drr } from '../util/drr';
export function sessionProgress (api: ApiInterface$Rx) {
return (): Observable<BN> =>
combineLatest(
combineLatest([
bestNumber(api)(),
api.query.session.sessionLength(),
api.query.session.lastLengthChange()
).pipe(
]).pipe(
map(
([bestNumber, sessionLength, lastLengthChange]) =>
(bestNumber || new BN(0))
@@ -25,10 +25,10 @@ export function controllers (api: ApiInterface$Rx) {
(api.query.staking.validators() as any as Observable<[Array<AccountId>, any]>)
.pipe(
switchMap(([stashIds]) =>
combineLatest(
combineLatest([
of(stashIds),
allBonds(api, stashIds)
)
])
),
drr()
);
+2 -2
View File
@@ -29,13 +29,13 @@
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.4.3",
"@babel/runtime": "^7.4.4",
"@polkadot/api-derive": "^0.78.0-beta.0",
"@polkadot/extrinsics": "^0.78.0-beta.0",
"@polkadot/rpc-provider": "^0.78.0-beta.0",
"@polkadot/rpc-rx": "^0.78.0-beta.0",
"@polkadot/storage": "^0.78.0-beta.0",
"@polkadot/types": "^0.78.0-beta.0",
"@polkadot/util-crypto": "^0.76.1"
"@polkadot/util-crypto": "^0.90.0-beta.1"
}
}
+2 -2
View File
@@ -90,10 +90,10 @@ export default function createSubmittableExtrinsic<CodecResult, SubscriptionResu
const blockHash = status.asFinalized;
return combineLatest(
return combineLatest([
api.rpc.chain.getBlock(blockHash) as Observable<SignedBlock>,
api.query.system.events.at(blockHash) as Observable<Vector<EventRecord>>
).pipe(
]).pipe(
map(([signedBlock, allEvents]) => {
const result = new SubmittableResult({
events: filterEvents(_extrinsic.hash, signedBlock, allEvents),
+2 -2
View File
@@ -29,10 +29,10 @@
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.4.3",
"@babel/runtime": "^7.4.4",
"@polkadot/jsonrpc": "^0.78.0-beta.0",
"@polkadot/rpc-provider": "^0.78.0-beta.0",
"@polkadot/types": "^0.78.0-beta.0",
"@polkadot/util": "^0.76.1"
"@polkadot/util": "^0.90.0-beta.1"
}
}
+4 -4
View File
@@ -29,11 +29,11 @@
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"dependencies": {
"@babel/runtime": "^7.4.3",
"@polkadot/keyring": "^0.76.1",
"@babel/runtime": "^7.4.4",
"@polkadot/keyring": "^0.90.0-beta.1",
"@polkadot/storage": "^0.78.0-beta.0",
"@polkadot/util": "^0.76.1",
"@polkadot/util-crypto": "^0.76.1",
"@polkadot/util": "^0.90.0-beta.1",
"@polkadot/util-crypto": "^0.90.0-beta.1",
"@types/nock": "^9.3.1",
"eventemitter3": "^3.1.0",
"isomorphic-fetch": "^2.2.1",
+2 -2
View File
@@ -29,12 +29,12 @@
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-rx#readme",
"dependencies": {
"@babel/runtime": "^7.4.3",
"@babel/runtime": "^7.4.4",
"@polkadot/rpc-core": "^0.78.0-beta.0",
"@polkadot/rpc-provider": "^0.78.0-beta.0",
"@types/memoizee": "^0.4.2",
"@types/rx": "^4.1.1",
"memoizee": "^0.4.14",
"rxjs": "^6.4.0"
"rxjs": "6.4.0"
}
}
+2 -2
View File
@@ -10,8 +10,8 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.4.3",
"@babel/runtime": "^7.4.4",
"@polkadot/types": "^0.78.0-beta.0",
"@polkadot/util": "^0.76.1"
"@polkadot/util": "^0.90.0-beta.1"
}
}
+1 -1
View File
@@ -29,6 +29,6 @@
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-jsonrpc#readme",
"dependencies": {
"@babel/runtime": "^7.4.3"
"@babel/runtime": "^7.4.4"
}
}
+4 -4
View File
@@ -29,10 +29,10 @@
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-storage#readme",
"dependencies": {
"@babel/runtime": "^7.4.3",
"@polkadot/keyring": "^0.76.1",
"@babel/runtime": "^7.4.4",
"@polkadot/keyring": "^0.90.0-beta.1",
"@polkadot/types": "^0.78.0-beta.0",
"@polkadot/util": "^0.76.1",
"@polkadot/util-crypto": "^0.76.1"
"@polkadot/util": "^0.90.0-beta.1",
"@polkadot/util-crypto": "^0.90.0-beta.1"
}
}
+3 -3
View File
@@ -29,8 +29,8 @@
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"dependencies": {
"@babel/runtime": "^7.4.3",
"@polkadot/keyring": "^0.76.1",
"@polkadot/util": "^0.76.1"
"@babel/runtime": "^7.4.4",
"@polkadot/keyring": "^0.90.0-beta.1",
"@polkadot/util": "^0.90.0-beta.1"
}
}
+880 -1039
View File
File diff suppressed because it is too large Load Diff