From 47daf924d5c3c8cf8d8320d719fe758a9eb45c47 Mon Sep 17 00:00:00 2001 From: Morley Zhi Date: Fri, 19 Apr 2019 13:44:25 -0400 Subject: [PATCH] V0.15.2 (#261) * Update npm publish keys. * Specify the changes made to the type definitions recently. * Make Server.transactions / Server.payments return CollectionPages again (fixes #262). --- .travis.yml | 2 +- CHANGELOG.md | 21 +++++++++++++++++++-- package.json | 2 +- test/integration/client_headers_test.js | 2 +- test/integration/server_test.js | 10 ++++++---- types/index.d.ts | 6 ++++-- 6 files changed, 32 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 739c1d95a..3ec8c2211 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ deploy: - provider: npm email: npm@stellar.org api_key: - secure: I6WDNI9HIpGIJ8nygTkTmc2FdHC/d9xEkkBuHKPfeurG+i/6+WebUvhaMfDg+KjlxiKE1Rs6qs9gj8TRrwgT0E8pBNVoYayXB40hrVAX8aaw7bcU75jc+0wJ9P/NYXkgar/wpRaWDov1zoaS+ax/xlVrdElRBWvGzysIvkmjGJw= + secure: nfaQ5hzQnn1knh5AwIqMicA18fe2NpvNDv1NpG7I600UKjFh4zUZg+resbBbyjNcpegO6TnxpnxH8TR6NR9hpuFJb4Slh7PrPaLV00Qdln2wdqp5zQktqXc0azDIy04CsI66exrpIERQWxVLfIRib3zjs/Dds2cfZPR+tHueIig= skip_cleanup: true on: tags: true diff --git a/CHANGELOG.md b/CHANGELOG.md index ac00549fe..3f7b1869f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,27 @@ As this project is pre 1.0, breaking changes may happen for minor version bumps. A breaking change will get clearly marked in this log. +## [v0.15.2](https://github.com/stellar/js-stellar-sdk/compare/v0.15.1...v0.15.2) + +- Fix Server.transactions and Server.payments definitions to properly return + collections +- Renew the npm publish key + ## [v0.15.1](https://github.com/stellar/js-stellar-sdk/compare/v0.15.0...v0.15.1) -- Add Typescript type definitions (imported from DefinitelyTyped with new - adjustments). +- Add Typescript type definitions (imported from DefinitelyTyped). +- Make these changes to those definitions: + - Add definitions for Server.fetchBaseFee and Server.fetchTimebounds + - CallBuilder: No long always returns CollectionPaged results. Interfaces that + extend CallBuilder should specify whether their response is a collection or + not + - CallBuilder: Add inflation_destination and last_modified_ledger property + - OfferRecord: Fix the returned properties + - TradeRecord: Fix the returned properties + - TradesCallBuilder: Add forAccount method + - TransactionCallBuilder: Add includeFailed method + - Horizon.BalanceLineNative/Asset: Add buying_liabilities / + selling_liabilities properties - Fix documentation links. ## [v0.15.0](https://github.com/stellar/js-stellar-sdk/compare/v0.14.0...v0.15.0) diff --git a/package.json b/package.json index a98aceae3..47e0de183 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stellar-sdk", - "version": "0.15.1", + "version": "0.15.2", "description": "stellar-sdk is a library for working with the Stellar Horizon server.", "main": "./lib/index.js", "types": "./types/index.d.ts", diff --git a/test/integration/client_headers_test.js b/test/integration/client_headers_test.js index 6187d8a13..06fbb3e50 100644 --- a/test/integration/client_headers_test.js +++ b/test/integration/client_headers_test.js @@ -2,7 +2,7 @@ const http = require('http'); const url = require('url'); const port = 3100; -describe('integration tests', function(done) { +describe('integration tests: client headers', function(done) { if (typeof window !== 'undefined') { done(); return; diff --git a/test/integration/server_test.js b/test/integration/server_test.js index 9e6312d1d..cf09bd143 100644 --- a/test/integration/server_test.js +++ b/test/integration/server_test.js @@ -1,6 +1,6 @@ let axios = require('axios'); -describe('integration tests', function() { +describe('integration tests: server', function() { const TIMEOUT = 20 * 1000; this.timeout(TIMEOUT); this.slow(TIMEOUT / 2); @@ -12,8 +12,9 @@ describe('integration tests', function() { before(function(done) { axios - .get(`${HORIZON}/friendbot?addr=${master.publicKey()}`) - .then(() => done()); + .get(`https://friendbot.stellar.org?addr=${master.publicKey()}`) + .then(() => done()) + .catch((e) => done(e)); }); after(function(done) { @@ -41,7 +42,8 @@ describe('integration tests', function() { server.submitTransaction(tx).then(() => done()); }); - }); + }) + .catch((e) => done(e)); }); function createNewAccount(accountId) { diff --git a/types/index.d.ts b/types/index.d.ts index 3900a852d..671d82c71 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -490,7 +490,7 @@ export namespace Server { CollectionPage > {} abstract class PaymentCallBuilder extends CallBuilder< - PaymentOperationRecord + CollectionPage > { forAccount(accountId: string): this; forLedger(sequence: string): this; @@ -512,7 +512,9 @@ export namespace Server { forAccount(accountId: string): this; } - abstract class TransactionCallBuilder extends CallBuilder { + abstract class TransactionCallBuilder extends CallBuilder< + CollectionPage + > { transaction(transactionId: string): this; forAccount(accountId: string): this; forLedger(sequence: string | number): this;