From 28b38d6a01d6823037a00c93d2ee4d6dac119e4d Mon Sep 17 00:00:00 2001 From: Austin DeNoble Date: Mon, 6 Nov 2023 12:58:58 -0500 Subject: [PATCH] add @spruce release to version.json and incorporate in user-agent --- src/utils/user-agent.ts | 5 +++++ src/version.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/utils/user-agent.ts b/src/utils/user-agent.ts index 4e291263..eddac888 100644 --- a/src/utils/user-agent.ts +++ b/src/utils/user-agent.ts @@ -10,6 +10,11 @@ export const buildUserAgent = (isLegacy: boolean) => { 'lang=typescript', ]; + // If the @spruce release is in use, add that to the user agent + if (packageInfo.release) { + userAgentParts.push(`release=${packageInfo.release}`); + } + if (isEdge()) { userAgentParts.push('Edge Runtime'); } diff --git a/src/version.json b/src/version.json index adc962b9..793d151d 100644 --- a/src/version.json +++ b/src/version.json @@ -1,4 +1,5 @@ { "name": "@pinecone-database/pinecone", - "version": "1.1.2" + "version": "1.1.2", + "release": "@spruce" }