Releases: dapr/js-sdk
Release v3.3.1
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
- chore(release): Prepare for v3.3.0 release by @shubham1172 in #577
Full Changelog: v3.3.0...v3.3.1
Release v3.3.0
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
- feat(workflow): Workflow authoring support by @kaibocai in #563
- feat(client): If an api token is not passed in the constructor, check the env variable by @elena-kolevska in #548
- feat(grpc): Grpc endpoint parsing by @elena-kolevska in #543
Fixes
- fix(actors): Fix actor reminder and timer period parameter by @heunghingwan in #536
- fix(sample): Modify example pubsub by @MregXN in #558
- fix(config): Fix Configuration GRPC calls not sending metadata by @tlund101 in #571
- fix(actors): Add Actor ID validation by @heunghingwan in #539
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
- docs(server): Update _index.md by @fyzact in #552
- docs(header): Fix file header styling by @stuartleeks in #559
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
- @heunghingwan made their first contribution in #536
- @fyzact made their first contribution in #552
- @MregXN made their first contribution in #553
- @stuartleeks made their first contribution in #559
- @kaibocai made their first contribution in #563
- @tlund101 made their first contribution in #571
Full Changelog: v3.2.0...v3.3.0
Release v3.3.0-rc.1
Release v3.3.0-rc.1
Release v3.2.0
What's Changed
Features
- feat(client): Support for the
DAPR_HTTP_ENDPOINT
andDAPR_GRPC_ENDPOINT
environment variables by @elena-kolevska in #519 - feat(client): Support for DAPR_API_TOKEN to gRPC client by @elena-kolevska in #519
- feat(pubsub): Add wildcard support (+, #) to pubsub by @XavierGeerinck and @shubham1172 in #529
- feat(workflow): Upgrade Workflow API to use beta endpoints instead of alpha by @DeepanshuA in #531
Fixes
- fix(invocation): Add missing HTTP patch method by @VazeeKevin in #518
- fix(test): Fix gRPC library upgrade issue with e2e test by @shubham1172 in #533
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
- test(unit): Added test cases for version check by @salmankhan-prs in #514
New Contributors
- @jriffs made their first contribution in #508
- @VazeeKevin made their first contribution in #518
- @owate made their first contribution in #527
- @elena-kolevska made their first contribution in #519
Full Changelog: v3.1.1...v3.2.0
Release v3.1.2
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
- chore(release): bump version in package-lock.json by @shubham1172 in #504
- chore(release): bump to v3.1.2 by @shubham1172 in #506
Full Changelog: v3.1.1...v3.1.2
Release v3.1.1
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
What's Changed
Features
- feat(state): add optional attributes in state management APIs by @SoTrx in #476
- feat(lock): Implement the Lock API on HTTP by @XavierGeerinck in #478
- feat(crypto): add encrypt and decrypt APIs by @ItalyPaleAle in #491
- feat(workflow): Add workflow management HTTP APIs by @shubham1172 in #485
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
- @SoTrx made their first contribution in #476
- @ruokun-niu made their first contribution in #486
- @shivamkm07 made their first contribution in #496
Full Changelog: v3.0.0...v3.1.0
Release v3.0.0
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
: anoptions
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 anoptions
parameter to configure the metadata and parallelism.IClientPubSub
:publish
method now takes anoptions
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 theserverHttp
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
- chore(misc): Add CODE_OF_CONDUCT.md by @shubham1172 in #423
- chore(misc): Add community details and CoC to README by @shubham1172 in #424
- chore(misc): Remove
crypto.randomUUID()
by @XavierGeerinck in #381 - chore(misc): Remove Restana in favor of Express by @XavierGeerinck in #381
- chore(misc): add extra logging to HTTPClient error Throwing by @XavierGeerinck in #432
- chore(deps): Bump qs from 6.9.6 to 6.11.0 by @dependabot in #427
- chore(deps): Bump json5 from 2.2.0 to 2.2.3 by @dependabot in #436
- chore(misc): Update README.md by @DarqueWarrior in #446
- chore(release) Update workflows and protos to use v1.10.0 Dapr by @shubham1172 in #455
- chore(deps): Bump golang.org/x/text from 0.3.3 to 0.3.8 in /examples/grpc/proxying/server by @dependabot in #456
- chore(deps): Bump golang.org/x/net from 0.0.0-20201021035429-f5854403a974 to 0.7.0 in /examples/grpc/proxying/server by @dependabot in #459
- chore(release): deprecate dapr-client NPM package by @shubham1172 in #467
- chore(release): bump version to v3.0.0 by @shubham1172 in #468
Tests
- test: Allow writing Dapr logs to file in e2e test shell script by @shubham1172 in #457
New Contributors
- @DarqueWarrior made their first contribution in #446
- @marcduiker made their first contribution in #450
Full Changelog: v2.5.0...v3.0.0
Release v2.5.0
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
- chore(deps): Bump got and nodemon in examples by @dependabot in #393, #394, #395, #396, #397, #398
- chore(deps): Update nodemon and node-fetch to fix dependabot alerts by @shubham1172 in #405
- chore(ci): Remove Husky initialization on npm install by @XavierGeerinck in #407
- chore(release): bump version to v2.5.0 by @shubham1172 in #420
Tests
- tests(e2e/ts): End to end test for testing typescript build by @amulyavarote in #388
New Contributors
- @ItalyPaleAle made their first contribution in #402
- @salmankhan-prs made their first contribution in #408
- @giovannism20 made their first contribution in #418
- @addjuarez made their first contribution in #345
Full Changelog: v2.4.2...v2.5.0
Release v2.4.2
What's Changed
Features
- feat(client): add DAPR_API_TOKEN to headers by @ahmedhesham6 in #364
- feat(actors): add ability to specify type in ActorStateManager by @shubham1172 in #372
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
- docs: Move pubsub subscribe to the correct place by @XavierGeerinck in #375
New Contributors
- @ahmedhesham6 made their first contribution in #364
Full Changelog: v2.4.1...v2.4.2