Skip to content

Releases: dapr/js-sdk

Release v3.3.1

06 Mar 20:33
37937b3
Compare
Choose a tag to compare

What's Changed

Contains a fix were gRPC client was not working (and other gRPC functionality were broken) due to missed proto updates.

Fixes

  • fix(proto): update gRPC requests to use the correct request parameters by @shubham1172 in #581

Chores

Full Changelog: v3.3.0...v3.3.1

Release v3.3.0

06 Mar 06:51
690b053
Compare
Choose a tag to compare

What's Changed

Highlights

New maintainer updates 🥳

Welcome aboard, @DeepanshuA. Thrilled to have you join as a maintainer for the SDK!

Workflow authoring is now supported 🚀

See https://docs.dapr.io/developing-applications/sdks/js/js-workflow/

Six new contributors 🎈

To collaboration and building something amazing together 🥂

Features

Fixes

Chores

  • chore(deps): Bump google.golang.org/grpc from 1.53.0 to 1.56.3 in /examples/grpc/proxying/server by @dependabot in #544
  • chore(deps-dev): Bump @babel/traverse from 7.23.0 to 7.23.2 by @dependabot in #541
  • chore(release): Prepare for v3.3.0-rc.1 release by @shubham1172 in #575
  • chore(release): Prepare for v3.3.0 release by @shubham1172 in #577

Documentation

Tests

  • test(integration): Fix flaky integration test DemoActorReminderOnceImpl by @MregXN in #553
  • test(e2e): Fix e2e test http actortest by @MregXN in #554
  • test(e2e): Fix e2e test common/server/server.test.ts by @MregXN in #555

New Contributors

Full Changelog: v3.2.0...v3.3.0

Release v3.3.0-rc.1

01 Mar 10:09
4189a3d
Compare
Choose a tag to compare
Release v3.3.0-rc.1 Pre-release
Pre-release

Release v3.3.0-rc.1

Release v3.2.0

13 Oct 09:44
b063e10
Compare
Choose a tag to compare

What's Changed

Features

Fixes

Chores

  • chore(release): Bump version in package-lock.json by @shubham1172 in #504
  • chore(release): Merge release-3.1 into main by @shubham1172 in #507
  • chore(errors): Add custom error classes by @jriffs in #508
  • chore(deps): Bump google.golang.org/grpc from 1.47.0 to 1.53.0 in /examples/grpc/proxying/server by @dependabot in #509
  • chore(deps): Bump protobufjs and @grpc/grpc-js by @dependabot in #511
  • chore(deps): Bump tough-cookie from 4.0.0 to 4.1.3 by @dependabot in #512
  • chore(deps-dev): Bump word-wrap from 1.2.3 to 1.2.4 by @dependabot in #515
  • chore(ci): Add holopin.yml config for GHC2023 event by @marcduiker in #523

Documentation

  • docs: Add cascading docs metadata by @AaronCrawfis in #513
  • docs(config): Update examples and docs for subscribing to configuration stores by @shubham1172 in #524
  • docs(ci): Add GitHub Dapr bot commands available in the repo by @owate in #527

Tests

New Contributors

Full Changelog: v3.1.1...v3.2.0

Release v3.1.2

14 Jun 16:18
960a10d
Compare
Choose a tag to compare

What's Changed

The SDK v3.1.1's package-lock.json did not have the updated version (3.1.1), which can cause unexpected behavior. This new patch is to fix that.

Chores

Full Changelog: v3.1.1...v3.1.2

Release v3.1.1

14 Jun 07:13
Compare
Choose a tag to compare

What's Changed

We are releasing a hotfix to handle issues with the crypto api implementation.

Fixes

  • fix(crypto): Fixed handling of backpressure in DaprChunkedStream by @ItalyPaleAle in #503

Full Changelog: v3.1.0...v3.1.1

Release v3.1.0

12 Jun 05:20
553431f
Compare
Choose a tag to compare

What's Changed

Features

Fixes

  • fix(state): return an empty array instead of empty string when state.query does not return anything by @salmankhan-prs in #471
  • fix(actor): Configured the delete operation in the state provider by @ruokun-niu in #486
  • fix(ci): explicitly call pre-build while building for publish steps by @shubham1172 in #495

Chores

  • chore(http): replace method "createHTTPMetadataQueryParam" with "createHTTPQueryParam" by @SoTrx in #480
  • chore(proto): update protos for 1.11 by @ItalyPaleAle in #490
  • chore(release): add support to release dev packages @shubham1172 in #493
  • chore(config): updating config API to use v1 endpoint by @shivamkm07 in #496
  • chore(release): prepare for v3.1.0 release by @shubham1172 in #501

New Contributors

Full Changelog: v3.0.0...v3.1.0

Release v3.0.0

20 Mar 16:36
ae34854
Compare
Choose a tag to compare

What's Changed

In this release we focused on cleaning up technical debt and introducing breaking changes. Please read carefully how to migrate your application code for the impacted lines.

Breaking Changes

Deprecation for dapr-client

As discussed in Deprecate dapr-client NPM package, the dapr-client package won't be published anymore from v3.0.0. Please use the newer @dapr/dapr package.

DaprClient's publish method now infers the content-type from data

feat(pubsub): Allow publishing CloudEvents directly by @shubham1172

Introduced by #371, this enhances the publish method to infer the content-type of the data instead of always using application/json. This enables CloudEvents to be published directly. Earlier, CloudEvents were also sent with the content-type application/json which was treated by the Dapr runtime as a JSON value and embedded in another CloudEvent. This means, editing CloudEvent fields (like type) was not possible earlier.

// Publish message to topic as application/cloudevents+json
// You can also use the cloudevent SDK to create cloudevents https://github.com/cloudevents/sdk-javascript
const cloudEvent = {
    specversion: "1.0",
    source: "/some/source",
    type: "example",
    id: "1234",
};
await client.pubsub.publish(pubSubName, topic, cloudEvent);

// Other examples where content-type is automatically inferred correctly.
// Publish message to topic as text/plain
await client.pubsub.publish(pubSubName, topic, "hello, world!");
// Publish message to topic as application/json
await client.pubsub.publish(pubSubName, topic, { hello: "world" });

DaprClient's publish method allows specifying an explicit content-type

feat(pubsub): Allow setting explicit content-type during publish operations by @shubham1172

The content-type used in the publish method can also be explicitly specified instead of inferring from the data itself. This can be useful in scenarios when users want to send a JSON data as plain text, or a CloudEvent as vanilla JSON.

// Publish a JSON message as plain text
const options = { contentType: "text/plain" };
await client.pubsub.publish(pubSubName, topic, { hello: "world" }, options)

Address parity between DaprServer's subscribe method's HTTP and gRPC implementations

fix(pubsub): Fix parity between HTTPs and gRPC pub/sub by @shubham1172

Introduced by #343, this aligns the HTTP and gRPC pubsub systems to return data in the same way for both the normal and rawPayload modes.

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.

Update DaprClient APIs

chore: Update DaprClient API by @shubham1172

Introduced by #442, this introduces a new API specification for DaprClient. As the Dapr JS SDK grew, so did the the parameters to the different functions. The API has changed to incorporate an options object where it makes sense. More specifically the following APIs are impacted:

  • DaprClient: an options parameter containing details like communication protocols, Dapr sidecar's host and address, etc. is used to instantiate the object. Options can also be empty, which then uses some sane defaults (e.g. new DaprClient()) specified here.
  • IClientState: getBulk method now takes an options parameter to configure the metadata and parallelism.
  • IClientPubSub: publish method now takes an options parameter to configure the metadata and content-type for the data.

Update DaprServer APIs

chore: refactor DaprServer API by @DeepanshuA

Introduced by #444, this is similar to the above change and introduces a new API specification for DaprServer.

DaprServer's instantiation does not need any required parameters now. All the configuration can be passed using an options parameter. Note, logger settings and communication protocol is shared with the underlying DaprClient object unless it has its own such parameters specified.

Features

  • feat(core): Allow payloads larger than 4MB by @XavierGeerinck in #381
  • feat(core): Implement serialization for gRPC and HTTP in a similar way by @XavierGeerinck in #381
  • feat(core): Implement deserialization for gRPC and HTTP in a similary way by @XavierGeerinck in #381
  • feat(core): Support bring your own express instance through the serverHttp option by @XavierGeerinck in #381
  • feat(pubsub): Add bulk publish support by @shubham1172 in #430
  • feat(pubsub): Add retry logic for PubSub and Implement Deserialization generalized by @XavierGeerinck in #453
  • feat(state): Allow passing metadata to client.state.save and return a custom response with error by @shubham1172 in #461

Fixes

  • fix(invoke): Allow invocations for non-string or object data by @XavierGeerinck in #381
  • fix(actors): Error shouldn't cause Client Fail If Actor Non-Existent method called by @DeepanshuA in #422
  • fix(docs): Fix broken link to Setting up a Typescript project by @marcduiker in #450
  • fix(pubsub): Fix metadata setting in gRPC pubsub and bindings by @shubham1172 in #458

Chores

Tests

  • test: Allow writing Dapr logs to file in e2e test shell script by @shubham1172 in #457

New Contributors

Full Changelog: v2.5.0...v3.0.0

Release v2.5.0

03 Nov 06:01
f9571d5
Compare
Choose a tag to compare

What's Changed

Features

  • feat(configuration): Change configuration API response to dictionary by @addjuarez in #345
  • feat(bindings): Pass Metadata in grpc binding invocation by @DeepanshuA in #348
  • feat(client): Report SDK version in user-agent by @ItalyPaleAle in #402
  • feat(invocation): Allow sending and receiving headers during HTTP service invocation by @salmankhan-prs in #408

Fixes

  • fix(docs): Update titles and links for examples of Xavier Geerinck by @giovannism20 in #418
  • fix(invocation): Fix error reporting in HTTP service invocation by @salmankhan-prs in #415

Chores

Tests

  • tests(e2e/ts): End to end test for testing typescript build by @amulyavarote in #388

New Contributors

Full Changelog: v2.4.2...v2.5.0

Release v2.4.2

03 Oct 11:37
3a5ae46
Compare
Choose a tag to compare

What's Changed

Features

Fixes

  • fix(test): remove DAPR_API_TOKEN from test sidecar by @ahmedhesham6 in #376
  • fix(pubsub): pass headers to PubSub system so that users can get the properties by @XavierGeerinck in #389

Chores

  • chore(ci): Add prettier configuration, prettify the codebase, and add to build validation by @shubham1172 in #384
  • chore(dev): Add pre-commit hooks for help in prettier configuration by @XavierGeerinck in #391
  • chores(proto): manage grpc-tools installation via script by @shubham1172 in #392

Documentation

New Contributors

Full Changelog: v2.4.1...v2.4.2