Skip to content

Releases: ethersphere/bee-js

v4.0.0

19 May 07:09
0201d5a
Compare
Choose a tag to compare

4.0.0 (2022-05-18)

This release brings several new features and one ad-hoc breaking fix that is passed on from the new Bee version 1.6.0, but affects only the BeeDebug.getReserveState() method.

💮 ENS support

Bee supports ENS for resolution of ENS domains into Swarm references. bee-js was until now refusing ENS domains with the input validation. Now we are bringing support for all the download* methods and a few other ones as well.

🗂. Get Feed's specific update

The FeedReader.download() function now accepts an option index where you can specify which of the feed's updates you want to download.

❓ Is Feed Retrievable?

There is a new method Bee.isFeedRetrievable() that helps you to check whether a given feed is available.

It operates in two modes. If you know the last index of the feed update then you can use it as an optional parameter and then be sure that this update is present in the network. If you won't specify the index parameter, then it will check for the "latest" update by traversing all the known updates from the start. This does not guarantee though that the found "latest" update is indeed the latest one though and hence provides a weaker guarantee.

⚠ BREAKING CHANGES

  • updated interface returned by BeeDebug.getReserveState() based on Bee 1.6.0 (#675)

Features

Bug Fixes

  • reserve state update response interface (#675) (f8564e3)

@ethersphere/bee-js v3.3.4

12 Apr 12:34
02fc062
Compare
Choose a tag to compare

This is a small patch release that brings mainly support for the new Bee 1.5.1 and two small bug fixes.

Bug Fixes

  • nodeinfo interface (#622) (6a70cad)
  • remove browser blob polyfill for service workers support (#614) (7c5c78d)

@ethersphere/bee-js v3.3.3

25 Mar 22:35
4a52972
Compare
Choose a tag to compare

🧱 EcmaScript Modules

The bee-js v3.3.0 introduced support for ES Modules. In v3.3.3 we increase the compatibility with older versions of various build systems.

Bug Fixes

@ethersphere/bee-js v3.3.2

21 Mar 16:49
0ce2685
Compare
Choose a tag to compare

This is another small release that brings support for Bee 1.5.0 and a few small improvements.

🔌 Node endpoint

The Bee 1.5.0 introduced new mode called ultra-light mode. This mode has been added to the existing BeeModes.

🧱 EcmaScript Modules

The bee-js v3.3.0 introduced support for ES Modules. In 3.3.2 we include several fixes to resolve some of the reported issues and broken builds.

Bug Fixes

  • add cross-env to devDeps (c559535)
  • add ultra light bee mode (#597) (4ac6bd8)
  • replace deprecated type DebugPostageBatch with PostageBatch (#594) (265557d)
  • web-stream-polyfill typings (#585) (3b18848)

@ethersphere/bee-js v3.3.1

16 Feb 09:13
c559535
Compare
Choose a tag to compare

This is a patching release that targets especially issues discovered thanks to the introduction of the ESM hybrid build. The main change is that if you want to use the function Utils.readableWebToNode() in browser then you have to polyfill stream package with your bundler.

Major changes of the last 3.3.0 release are:

🧱 EcmaScript Modules support

We plan to migrate our bee-js package to ES Modules (see the issue for more info) when Node v12 will reach its end-of-life (on 30th of April). With this release, we are starting a transition period by supporting both ES Modules and CommonJS builds. Please start migrating your applications to the ESM stack otherwise, you won't be able to upgrade bee-js after we drop support for CommonJS.

❓ Is supported version?

Since we are in a fast-paced environment where Bee's versions can be incompatible with each other, it is important that in your application you check whether the Bee that you connect to has the correct version that you expect and support (through bee-js).

Untill now we had the isSupportedVersion() function that indicated if the Bee node version is not matching the one that bee-js was tested and built against. This implementation has its downside because it is very strict and if for example there is a small Bee's release that patches only something internal and does not touch the API, which means that the bee-js should be compatible, you will still get a false with this check.

Except for Bee's version itself, there are two other versions that version the Bee endpoint's API and the Bee Debug endpoint's API. We have decided to implement methods that do compatibility checks using these versions and hence should be more relaxed towards Bee's small patches but might pose some risk if some change will be unnoticed and API versions not bumped accordingly.

These methods are:

  • BeeDebug.isSupportedExactVersion() - renamed isSupportedVersion which is now deprecated
  • BeeDebug.isSupportedMainApiVersion() which checks compatibility only for the main Bee endpoint
  • BeeDebug.isSupportedDebugApiVersion() which checks compatibility only for the Bee Debug endpoint
  • BeeDebug.isSupportedApiVersion() which checks compatibility for both endpoints

The compatibility is checked using the major versions of the API. If you would like to make your own assertions you can get all the versions (both from Bee itself and the one that bee-js should support) using the method BeeDebug.getVersions()

Bug Fixes

  • add js suffix in imports for esm support with babel (#562) (62489aa)
  • create minified browser bundle for release (#549) (b92fdb0)
  • drop readable stream (#565) (3e36ccc)
  • exposing ky options (#553) (085c565)
  • making readable-stream optional (#556) (4983fdc)
  • rename the browser bundle in order not to break unpkg.com (#552) (7076d94)
  • use default import styles for esm compatibility (#550) (90aaf7b)

@ethersphere/bee-js v3.3.0

10 Feb 06:40
173faeb
Compare
Choose a tag to compare

This is a smaller update with two main changes.

🧱 EcmaScript Modules support

We plan to migrate our bee-js package to ES Modules (see the issue for more info) when Node v12 will reach its end-of-life (on 30th of April). With this release, we are starting a transition period by supporting both ES Modules and CommonJS builds. Please start migrating your applications to the ESM stack otherwise, you won't be able to upgrade bee-js after we drop support for CommonJS.

❓ Is supported version?

Since we are in a fast-paced environment where Bee's versions can be incompatible with each other, it is important that in your application you check whether the Bee that you connect to has the correct version that you expect and support (through bee-js).

Untill now we had the isSupportedVersion() function that indicated if the Bee node version is not matching the one that bee-js was tested and built against. This implementation has its downside because it is very strict and if for example there is a small Bee's release that patches only something internal and does not touch the API, which means that the bee-js should be compatible, you will still get a false with this check.

Except for Bee's version itself, there are two other versions that version the Bee endpoint's API and the Bee Debug endpoint's API. We have decided to implement methods that do compatibility checks using these versions and hence should be more relaxed towards Bee's small patches but might pose some risk if some change will be unnoticed and API versions not bumped accordingly.

These methods are:

  • BeeDebug.isSupportedExactVersion() - renamed isSupportedVersion which is now deprecated
  • BeeDebug.isSupportedMainApiVersion() which checks compatibility only for the main Bee endpoint
  • BeeDebug.isSupportedDebugApiVersion() which checks compatibility only for the Bee Debug endpoint
  • BeeDebug.isSupportedApiVersion() which checks compatibility for both endpoints

The compatibility is checked using the major versions of the API. If you would like to make your own assertions you can get all the versions (both from Bee itself and the one that bee-js should support) using the method BeeDebug.getVersions()

Features

@ethersphere/bee-js v3.2.0

25 Jan 10:17
88039bb
Compare
Choose a tag to compare

This is after some time a bigger update that brings some new goodies from Bee 1.4.1 version 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

Bug Fixes

  • handling of non-json responses when json is expected (#508) (8e0962c)
  • rename DebugPostageBatch into PostageBatch (#495) (38f2758)
  • rename NodesInfo into NodeInfo (#493) (9d1ec0a)

@ethersphere/bee-js v3.1.0

10 Dec 08:22
67a85f3
Compare
Choose a tag to compare

This is another small release that brings support for Bee 1.4.1 and a few small improvements

🔌 Node endpoint support

The Bee 1.4.1 release brought a new endpoint on Debug API called /node which provides information about in what mode the Bee node runs (such as dev mode, light mode, or full mode or information about gateway mode).

🔗 Chunk endpoint supports

We used chunk endpoints internally in bee-js but now we have decided to expose them for your usage as well.

∵ Stamp usage utility functions

In order to calculate the usage of a postage stamp (eq. percentage in form of a number between 0 and 1) we have added a small utility function that calculates it called getStampUsage().

Features

Bug Fixes

  • convert buffer to uint8array for readablestream (#473) (7f34ea6)

@ethersphere/bee-js v3.0.0

25 Nov 13:55
a69b8a0
Compare
Choose a tag to compare

This is a small release in size, but big on impact. It is a breaking release thanks to breaking changes introduced in Bee 1.4.

⚠ BREAKING CHANGES

  • dropping postage stamps methods from Bee class (#458)

Features

  • dropping bee class postage stamps methods (#458) (98afdcd)
  • openapi versions in /health endpoint and methods (#459) (98afdcd)

@ethersphere/bee-js v2.1.1

08 Nov 16:33
b8d1a20
Compare
Choose a tag to compare

This is small release that fixes few small issues and mainly brings compatibility with the Bee 1.3.

Bug Fixes

  • build: sourcemap (#440) (2bfb7c8)
  • readable-stream should be dependency (#444) (fd39c46)
  • build: limit the scope of files that are published to npm