Skip to content

Commit

Permalink
chore: release 3.2.0 (#506)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Uhlíř <[email protected]>
  • Loading branch information
bee-worker and AuHau authored Jan 25, 2022
1 parent 9fb2485 commit 88039bb
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 12 deletions.
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
# Changelog

## [3.2.0](https://www.github.com/ethersphere/bee-js/compare/v3.1.0...v3.2.0) (2022-01-25)

This is after some time a bigger update that brings some new goodies from [Bee 1.4.1 version](https://github.com/ethersphere/bee/releases/tag/v1.4.1) and improved error handling and support.

### ↔️ Direct upload support

Bee introduced direct upload mode, where Bee directly pushes the data to the network instead of the intermediate step of locally saving the data and then syncing it with the network. You can enable this behavior by passing `deferred = false` into `UploadOptions` interface. When you enable this mode the `Promise` returned by the upload methods will resolve only once the data is uploaded and synchronized with the network so if you use timeouts you should adjust those base on the size of data you upload.

**Currently, the direct upload mode is by default turned off, but it is a plan in the future to enable this behavior by default!**

### ⁉️ Error handling

Now `BeeResponseError` and `BeeRequestError` instances contain information about the request (and if applicable also response) that triggered the Error. Also, it has improved for non-JSON responses that were causing unclear errors.

### ⚠️ Deprecations

In this release, there are two changes in Interface's names that are non-breaking as there are backward compatible aliases, but these aliases will be removed with the next breaking change.

- Interface `DebugPostageBatch` was renamed to `PostageBatch`
- Interface `NodesInfo` was renamed to `NodeInfo`

### Features

* direct upload support ([#504](https://www.github.com/ethersphere/bee-js/issues/504)) ([e05fae7](https://www.github.com/ethersphere/bee-js/commit/e05fae76056339a7fdaa21a9382a23d69ed465b2))
* exposing request and response configuration on BeeResponseError ([#517](https://www.github.com/ethersphere/bee-js/issues/517)) ([7448958](https://www.github.com/ethersphere/bee-js/commit/7448958e00ed3e26704bfb7833460c4a5221506c))
* node 17 support ([#507](https://www.github.com/ethersphere/bee-js/issues/507)) ([c9e727a](https://www.github.com/ethersphere/bee-js/commit/c9e727a4b6b584044c371cf9f77d29676ebd5067))

### Bug Fixes

* handling of non-json responses when json is expected ([#508](https://www.github.com/ethersphere/bee-js/issues/508)) ([8e0962c](https://www.github.com/ethersphere/bee-js/commit/8e0962c992f04ed4212928556efb90937e30d6f2))
* rename DebugPostageBatch into PostageBatch ([#495](https://www.github.com/ethersphere/bee-js/issues/495)) ([38f2758](https://www.github.com/ethersphere/bee-js/commit/38f27587a8291745cfa3821608931f71b256444a))
* rename NodesInfo into NodeInfo ([#493](https://www.github.com/ethersphere/bee-js/issues/493)) ([9d1ec0a](https://www.github.com/ethersphere/bee-js/commit/9d1ec0a44691f5ffdb12e77402e0e112f0162398))

## [3.1.0](https://www.github.com/ethersphere/bee-js/compare/v3.0.0...v3.1.0) (2021-12-09)

This is another small release that brings support for [Bee 1.4.1](https://github.com/ethersphere/bee/releases/tag/v1.4.1) and a few small improvements
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ethersphere/bee-js",
"version": "3.1.0",
"version": "3.2.0",
"description": "Javascript client for Bee",
"keywords": [
"bee",
Expand Down
4 changes: 2 additions & 2 deletions test/integration/bee-class.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ describe('Bee class', () => {
const beePeer = new Bee(BEE_PEER_URL)

it('should strip trailing slash', () => {
const bee = new Bee('http://localhost:1633/')
expect(bee.url).toEqual('http://localhost:1633')
const bee = new Bee('http://127.0.0.1:1633/')
expect(bee.url).toEqual('http://127.0.0.1:1633')
})

describe('chunk', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/modules/debug/connectivity.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ describe('modules/debug/connectivity', () => {
const peers = await getPeers(beeDebugKy())
const res = await pingPeer(beeDebugKy(), peers[0].address)

expect(res.rtt).toMatch(/^\d+(\.\d+)[mnpµ]?s$/)
expect(res.rtt).toMatch(/^\d+(\.\d+)?[mnpµ]?s$/)
})
})
4 changes: 2 additions & 2 deletions test/tests-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { BatchId, Ky } from '../src'
export default async function testsSetup(): Promise<void> {
try {
const beeDebugKy = ky.create({
prefixUrl: process.env.BEE_DEBUG_API_URL || 'http://localhost:1635',
prefixUrl: process.env.BEE_DEBUG_API_URL || 'http://127.0.0.1:1635',
timeout: false,
})
const beeDebugPeerKy = ky.create({
prefixUrl: process.env.BEE_PEER_DEBUG_API_URL || 'http://localhost:11635',
prefixUrl: process.env.BEE_PEER_DEBUG_API_URL || 'http://127.0.0.1:11635',
timeout: false,
})

Expand Down
8 changes: 4 additions & 4 deletions test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export function randomByteArray(length: number, seed = 500): Uint8Array {
* Returns a url for testing the Bee public API
*/
export function beeUrl(): string {
return process.env.BEE_API_URL || 'http://localhost:1633'
return process.env.BEE_API_URL || 'http://127.0.0.1:1633'
}

export function beeKy(): Ky {
Expand All @@ -218,7 +218,7 @@ export function beeKy(): Ky {
* Returns a url of another peer for testing the Bee public API
*/
export function beePeerUrl(): string {
return process.env.BEE_PEER_API_URL || 'http://localhost:11633'
return process.env.BEE_PEER_API_URL || 'http://127.0.0.1:11633'
}

export function beePeerKy(): Ky {
Expand Down Expand Up @@ -255,7 +255,7 @@ export function getPostageBatch(url = beeDebugUrl()): BatchId {
* Returns a url for testing the Bee Debug API
*/
export function beeDebugUrl(): string {
return process.env.BEE_DEBUG_API_URL || 'http://localhost:1635'
return process.env.BEE_DEBUG_API_URL || 'http://127.0.0.1:1635'
}

export function beeDebugKy(): Ky {
Expand All @@ -266,7 +266,7 @@ export function beeDebugKy(): Ky {
* Returns a url for testing the Bee Debug API
*/
export function beePeerDebugUrl(): string {
return process.env.BEE_PEER_DEBUG_API_URL || 'http://localhost:11635'
return process.env.BEE_PEER_DEBUG_API_URL || 'http://127.0.0.1:11635'
}

export function beePeerDebugKy(): Ky {
Expand Down

0 comments on commit 88039bb

Please sign in to comment.