Skip to content

Commit

Permalink
v5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
George-Payne committed Nov 4, 2022
1 parent d7f2cc0 commit e6a080f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
## [v5.0.0](https://github.com/EventStore/EventStore-Client-NodeJS/compare/v4.0.0...v5.0.0) (2022-11-04)

## Breaking changes

### `RecordedEvent["created"]` is now a `Date`

Previously, a recorded event's created property was being returned in ticks, a 64bit integer in 100ns precision. As well as being an unusual format, this was being parsed into a `Number`, so was unsafe. This release changes the property to be represented by a `Date`.

#### Before:

`created` was an unsafe "ticks" since epoch:

```typescript
for await (const { event } of client.readStream(STREAM_NAME)) {
// 16675621600650000 (greater than Number.MAX_SAFE_INTEGER)
console.log(event?.created);
}
```

#### After:

`created` is a `Date`:

```typescript
for await (const { event } of client.readStream(STREAM_NAME)) {
// 2022-11-04T11:42:40.065Z
console.log(event?.created);
}
```

## [v4.0.0](https://github.com/EventStore/EventStore-Client-NodeJS/compare/v3.4.0...v4.0.0) (2022-09-02)

## Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eventstore/db-client",
"version": "4.0.0",
"version": "5.0.0",
"description": "NodeJS EventStoreDB version 20+ and uses gRPC as the communication protocol.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit e6a080f

Please sign in to comment.