Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
".": {
"release-type": "node",
"changelog-path": "CHANGELOG.md",
"versioning": "default"
"versioning": "default",
"extra-files": ["src/workos.ts"]
}
}
}
7 changes: 7 additions & 0 deletions src/workos.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { readFileSync } from 'node:fs';
import { WorkOS } from '@workos-inc/node';
import { getWorkOS, VERSION } from './workos.js';

Expand All @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion src/workos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading