Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 3.42 KB

CHANGELOG.md

File metadata and controls

68 lines (43 loc) · 3.42 KB

Changelog

3.x release

v3.0.0

Breaking Changes

General: Fix serialization of data in HTTP

There is a new serializer in place to automatically detect the Content-Type for the data when using the HTTP Protocol and serialize accordingly. Objects will be send as application/json, Cloud-Events as applications/cloudevents+json, Strings as text/plain, and others as application/octet-stream.

An example of this change can be seen when performing client.invoke with "hello world" as data. The new serializer will correctly return the string type, as opposed to the previous behavior of calling JSON.serialize and returning '"hello world"'.

PubSub: Changes to the subscribe callback for HTTP

The HTTP subscribe callback now returns data after parsing it correctly. Data is either extracted from the body's data field, or the data_base64 field. data_base64 is always expected to be a base64 encoded string, and will be decoded and parsed as JSON if possible. If it is not JSON, it will be returned as a string. If data is not found in either field, the entire body will be returned as-is.

2.x release

v2.0.1

Actors

To make development easier, Actors can now be called in 2 ways:

  1. By creating an actor through a helper method in the DaprClient class, removing the need of needing to know how a builder works.
const actor = await client.actor.create<DemoActorSayImpl>(DemoActorSayImpl);
const res = await actor.sayMulti(123, "123", { hello: "world 123" }, [1, 2, 3]);
  1. By utilizing the Actor builder, where we create a Proxy object that does this for us.
const builder = new ActorProxyBuilder<DemoActorSayImpl>(DemoActorSayImpl, client);
const actor = builder.build(ActorId.createRandomId());
const res = await actor.sayMulti(123, "123", { hello: "world 123" }, [1, 2, 3]);

Behind the hoods, method #1 will utilize method #2

v2.0.0

Version 2.0.0 brings a lot of changes to the Dapr JS SDK that were long due. Below an overview of the major contributions can be found, with a more detailed overview of the Breaking Changes under it.

  • Actor Support has been added
  • Actor Proxy has been added for Actor Access
  • The HTTP Connection is now being reused to reduce the CONNRESET errors when intensively using the JS SDK
  • The Metadata API is supported
  • The Health API is supported
  • The /v1.0/shutdown API endpoint is now supported by calling await client.sidecar.shutdown()

Breaking Changes

  • DaprServer.ts: startServer(), stopServer() have been renamed to start() and stop() this means that await server.startServer() will now be called as await server.start()
  • DaprServer.ts: close() has been removed in favor of stop()

Major Changes

  • KeepAlive for HTTP has been added and a new method in the DaprClient has been added named stop() to stop the client and release the connections kept by the sockets.
  • healthz endpoint was implemented as client.health.isHealthy() for gRPC this checks the getMetadata function since it does not have a Health PROTO.
  • Server startup now ensures the Dapr Sidecar is healthy before starting
  • Add metadata API for gRPC and HTTP
  • Add the SDK implementation for gRPC and HTTP for shutting down the Sidecar through the SDK

1.x release