Releases: kurrent-io/KurrentDB-Client-NodeJS
v1.1.0
What's Changed
- feat: add multi stream append feature by @YoEight in #422
- [DEV-863] Support PinnedByCorrelation in create persistent subscription by @w1am in #434
- [DEV-792] Support tracing in multi stream append by @w1am in #430
- Refactor multi stream append to use v2 protocol by @w1am in #439
- Require plain json object as metadata by @w1am in #441
Full Changelog: v1.0.4...v1.1.0
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
What's Changed
Rebranding
We have officially rebranded EventStoreDB to KurrentDB. As part of this transition:
EventStoreDBClienthas been renamed toKurrentDBClient.- The connection protocol now supports
kurrentdb.
The rebranded client is registered as a new package on NPM as @kurrent/kurrentdb-client
Read Performance Enhancements
The readStream and readAll operations now use the Rust client, significantly improving efficiency and performance.
Server-Side Filtering for readAll
The readAll function now supports server-side filtering using the filter option.
Example Usage:
// Filter by stream name
const stream = client.readAll({
filter: streamNameFilter({ prefixes: ["someprefix-"] })
});
// Filter by event type
const stream = client.readAll({
filter: eventTypeFilter({ prefixes: ["someprefix-"] })
});- Thanks @aovens-quantifi for your contribution
Other
Breaking Changes ⚠️
Upgrading to @kurrent/kurrentdb-client v1.0.0 introduces breaking changes. Ensure you address these changes to prevent application failures.
1. Client Initialization via Connection String
The traditional class constructor method for KurrentDBClient has been removed. Clients must now be initialized using a connection string, ensuring consistency across our ecosystem.
Migration Example:
- const client = new EventStoreDBClient({
- { endpoint: "localhost:2113" },
- { rootCertificate: node.certs.root },
- { username: "admin", password: "changeit" }
- });
+ const client = KurrentDBClient.connectionString`kurrentdb://localhost:2113?tls=false`;Note: If you were already using a connection string, no changes are required.
2. Node.js 14 Deprecation
Support for Node.js 14 has been officially dropped, in accordance with the Node.js Release Schedule.
Action Required:
- Upgrade to Node.js v20 or later (LTS recommended).
3. Migration to Async Iterables for Stream Handling
The event emitter pattern for handling streams has been removed. Streams must now be processed using async iteration.
Migration Example:
// ❌ Event Emitter Pattern (No Longer Supported)
- client
- .readAll()
- .on("data", (event) => handleEvent(event))
- .on("error", (err) => handleError(err));
// ✅ Async Iteration Pattern (Supported)
try {
const stream = client.readAll();
for await (const event of stream) {
handleEvent(event);
}
} catch (err) {
handleError(err);
}4. Move ExpectedRevision to StreamState
await client.appendToStream("stream", eventOne, {
- expectedRevision: NO_STREAM,
+ streamState: NO_STREAM,
});