diff --git a/release-please-config.json b/release-please-config.json index 637e606..44074b0 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -5,7 +5,8 @@ ".": { "release-type": "node", "changelog-path": "CHANGELOG.md", - "versioning": "default" + "versioning": "default", + "extra-files": ["src/workos.ts"] } } } diff --git a/src/workos.spec.ts b/src/workos.spec.ts index da44f31..158b0cc 100644 --- a/src/workos.spec.ts +++ b/src/workos.spec.ts @@ -1,3 +1,4 @@ +import { readFileSync } from 'node:fs'; import { WorkOS } from '@workos-inc/node'; import { getWorkOS, VERSION } from './workos.js'; @@ -7,6 +8,12 @@ describe('workos', () => { vi.clearAllMocks(); }); + it('reports the package version in the user agent', () => { + const { version } = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')); + + expect(VERSION).toEqual(version); + }); + it('initializes WorkOS with the correct configuration', () => { // Extracting the config to avoid a circular dependency error const workosConfig = { diff --git a/src/workos.ts b/src/workos.ts index 104269a..064b072 100644 --- a/src/workos.ts +++ b/src/workos.ts @@ -2,7 +2,7 @@ import { WorkOS } from '@workos-inc/node'; import { WORKOS_API_HOSTNAME, WORKOS_API_KEY, WORKOS_API_HTTPS, WORKOS_API_PORT } from './env-variables.js'; import { lazy } from './utils.js'; -export const VERSION = '2.14.0'; +export const VERSION = '4.3.0'; // x-release-please-version const options = { apiHostname: WORKOS_API_HOSTNAME,