diff --git a/package.json b/package.json index 0a3fafd4..8322a757 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "unleash-client", - "version": "6.4.1", + "version": "6.4.2", "description": "Unleash Client for Node", "license": "Apache-2.0", "main": "./lib/index.js", diff --git a/src/details.json b/src/details.json index 351c181f..eb30b8ef 100644 --- a/src/details.json +++ b/src/details.json @@ -1 +1 @@ -{"name":"unleash-client-node","version":"6.4.1","sdkVersion":"unleash-client-node:6.4.1"} \ No newline at end of file +{"name":"unleash-client-node","version":"6.4.2","sdkVersion":"unleash-client-node:6.4.2"} \ No newline at end of file diff --git a/src/request.ts b/src/request.ts index 1a607cb3..48cf3b64 100644 --- a/src/request.ts +++ b/src/request.ts @@ -101,7 +101,7 @@ export const buildHeaders = ({ head['Unleash-Client-Spec'] = specVersionSupported; } const version = details.version; - head['x-unleash-sdk'] = `unleash-node@${version}`; + head['x-unleash-sdk'] = `unleash-client-node:${version}`; if (custom) { Object.assign(head, custom); } diff --git a/src/test/metrics.test.ts b/src/test/metrics.test.ts index 1b545aa4..3b3df301 100644 --- a/src/test/metrics.test.ts +++ b/src/test/metrics.test.ts @@ -130,12 +130,12 @@ test('should send correct custom and x-unleash headers', (t) => const metricsEP = nockMetrics(url) .matchHeader('randomKey', randomKey) .matchHeader('x-unleash-appname', 'appName') - .matchHeader('x-unleash-sdk', /^unleash-node@(\d+\.\d+\.\d+)$/) + .matchHeader('x-unleash-sdk', /^unleash-client-node:\d+\.\d+\.\d+/) .matchHeader('x-unleash-connection-id', 'connectionId'); const regEP = nockRegister(url) .matchHeader('randomKey', randomKey) .matchHeader('x-unleash-appname', 'appName') - .matchHeader('x-unleash-sdk', /^unleash-node@(\d+\.\d+\.\d+)$/) + .matchHeader('x-unleash-sdk', /^unleash-client-node:\d+\.\d+\.\d+/) .matchHeader('x-unleash-connection-id', 'connectionId'); // @ts-expect-error diff --git a/src/test/repository.test.ts b/src/test/repository.test.ts index 7e31db0f..5204b534 100644 --- a/src/test/repository.test.ts +++ b/src/test/repository.test.ts @@ -191,7 +191,7 @@ test('should request with correct custom and x-unleash headers', (t) => .matchHeader('randomKey', randomKey) .matchHeader('x-unleash-appname', appName) .matchHeader('x-unleash-connection-id', connectionId) - .matchHeader('x-unleash-sdk', /^unleash-node@(\d+\.\d+\.\d+)$/) + .matchHeader('x-unleash-sdk', /^unleash-client-node:\d+\.\d+\.\d+/) .persist() .get('/client/features') .reply(200, { features: [] }, { Etag: '12345-3' }); diff --git a/src/test/request.test.ts b/src/test/request.test.ts index f131aa1d..967ec3a5 100644 --- a/src/test/request.test.ts +++ b/src/test/request.test.ts @@ -29,5 +29,5 @@ test('Correct headers should be included', (t) => { t.is(headers['UNLEASH-INSTANCEID'], 'instanceId'); t.is(headers['x-unleash-connection-id'], 'connectionId'); t.is(headers['x-unleash-appname'], 'myApp'); - t.regex(headers['x-unleash-sdk'], /^unleash-node@(\d+\.\d+\.\d+)$/); + t.regex(headers['x-unleash-sdk'], /^unleash-client-node:\d+\.\d+\.\d+/); });