apache / couchdb-nano

Nano: The official Apache CouchDB library for Node.js
https://www.npmjs.com/package/nano
Apache License 2.0
651 stars 165 forks source link

Changed datatype of update_seq and purge_seq to be `number | string` #317

Closed divyanshshekhar closed 1 year ago

divyanshshekhar commented 1 year ago

Overview

The datatype of udpate_seq and purge_seq in actual response object from CouchDB is string but in the nano library it is defined as number. This PR tries to fix this issue. See issue #316 for more details.

Testing recommendations

Run nano against older and newer versions of apache couchdb to validate the datatype in actual response object vs the one defined in nano.d.ts. Also please check if the doc-comments for the fields are correct or not as they are like below:

/** The number of purge operations on the database. */
purge_seq: number | string;

I am not sure if changing the description to be something like The sequence ID of purge operations on the database. i.e. if calling it ID instead of number is appropriate or not.

GitHub issue number

Fixes #316

Checklist

divyanshshekhar commented 1 year ago

Thank you @glynnbird. I can't tell you how happy I am that my first ever OSS PR got merged without issues! :)