From b8bf38a38ef65441b6eded512ded12c864c075e9 Mon Sep 17 00:00:00 2001 From: Wes Schlenker <49787065+wesleyschlenker@users.noreply.github.com> Date: Thu, 26 Feb 2026 12:08:42 -0500 Subject: [PATCH 1/2] docs(README): add section on BigInt support for large numeric IDs --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 7366c35..b585316 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,17 @@ const result = await strava.uploads.post({ }); ``` +### Large numeric IDs (BigInt support) + +Strava activity IDs and other numeric identifiers can exceed JavaScript's `Number.MAX_SAFE_INTEGER` (2^53 - 1). To preserve precision, this library uses [json-bigint](https://www.npmjs.com/package/json-bigint) to parse API responses. Since `JSONbig.parse()` is called with default options, large integers are returned as [bignumber.js](https://www.npmjs.com/package/bignumber.js) `BigNumber` objects (not native JavaScript `BigInt`). + +When working with these IDs, you may need to convert them to strings for display or storage: + +```js +const activity = await strava.activities.get({ id: '12345678901234567' }); +console.log(activity.id.toString()); // Use .toString() for display or JSON serialization +``` + ### Rate limits According to Strava's API each response contains information about rate limits. From 828ee60ea9aafd3fcbfd998a5de3520cf0c882b0 Mon Sep 17 00:00:00 2001 From: Wes Schlenker <49787065+wesleyschlenker@users.noreply.github.com> Date: Thu, 26 Feb 2026 14:45:38 -0500 Subject: [PATCH 2/2] chore: bump version to 4.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a49f7cd..47efca4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "strava-v3", - "version": "4.0.0", + "version": "4.0.1", "description": "Simple wrapper for Strava v3 API", "main": "index.js", "types": "index.d.ts",