Skip to content

AllStreamResolvedEvent.commitPosition declares as a bigint but is deserialized as a number #423

@aovens-quantifi

Description

@aovens-quantifi

🐛 Current behavior

I'm using commitPosition to track my position for subsequent calls to readAll. In the old client it was a bigint, this library declares it as a bigint and I think it should be a bigint in order to hold large commit positions.

Here is the console log of a resolved event:

{
  event: {
    streamId: '...',
    id: '8dd912be-af55-4892-ba36-ab9102129318',
    revision: 60,
    type: '...',
    data: {
      ...
    },
    metadata: undefined,
    isJson: true,
    created: 2025-06-18T15:24:11.000Z,
    position: { commit: 1245436n, prepare: 1245436n }
  },
  commitPosition: 1245436
}

🔍 Steps to reproduce

Read an event using readAll() and check the type of commitPosition

Reproducible link

<n/a>

💭 Expected behavior

commitPosition should be a bigint, similar to event.event.position.commit

Package version

"@kurrent/kurrentdb-client": "^1.0.2"

KurrentDB Version

24.10.5.2125-experimental

Connection string

kurrentdb+discover://localhost:2113?tls=false

☁️ Deployment Environment

Single-node (Docker)

Other Deployment Details

No response

Operating system

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions