@algolia/client-common 5.0.0-alpha.10 → 5.0.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -530,15 +530,13 @@ function createTransporter({
530
530
  const dataQueryParameters = request.method === 'GET' ? { ...request.data,
531
531
  ...requestOptions.data
532
532
  } : {};
533
- const queryParameters = { ...baseQueryParameters,
533
+ const queryParameters = {
534
+ 'x-algolia-agent': algoliaAgent.value,
535
+ ...baseQueryParameters,
534
536
  ...request.queryParameters,
535
537
  ...dataQueryParameters
536
538
  };
537
539
 
538
- if (algoliaAgent.value) {
539
- queryParameters['x-algolia-agent'] = algoliaAgent.value;
540
- }
541
-
542
540
  if (requestOptions && requestOptions.queryParameters) {
543
541
  for (const key of Object.keys(requestOptions.queryParameters)) {
544
542
  // We want to keep `undefined` and `null` values,
@@ -526,15 +526,13 @@ function createTransporter({
526
526
  const dataQueryParameters = request.method === 'GET' ? { ...request.data,
527
527
  ...requestOptions.data
528
528
  } : {};
529
- const queryParameters = { ...baseQueryParameters,
529
+ const queryParameters = {
530
+ 'x-algolia-agent': algoliaAgent.value,
531
+ ...baseQueryParameters,
530
532
  ...request.queryParameters,
531
533
  ...dataQueryParameters
532
534
  };
533
535
 
534
- if (algoliaAgent.value) {
535
- queryParameters['x-algolia-agent'] = algoliaAgent.value;
536
- }
537
-
538
536
  if (requestOptions && requestOptions.queryParameters) {
539
537
  for (const key of Object.keys(requestOptions.queryParameters)) {
540
538
  // We want to keep `undefined` and `null` values,
@@ -1 +1 @@
1
- {"version":3,"file":"createTransporter.d.ts","sourceRoot":"","sources":["../../../src/transporter/createTransporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOV,kBAAkB,EAClB,WAAW,EAEZ,MAAM,UAAU,CAAC;AAsBlB,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,GACf,EAAE,kBAAkB,GAAG,WAAW,CAmTlC"}
1
+ {"version":3,"file":"createTransporter.d.ts","sourceRoot":"","sources":["../../../src/transporter/createTransporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOV,kBAAkB,EAClB,WAAW,EAEZ,MAAM,UAAU,CAAC;AAsBlB,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,GACf,EAAE,kBAAkB,GAAG,WAAW,CAgTlC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/client-common",
3
- "version": "5.0.0-alpha.10",
3
+ "version": "5.0.0-alpha.13",
4
4
  "description": "Common package for the Algolia JavaScript API client.",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -19,11 +19,11 @@
19
19
  "test": "jest"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/jest": "28.1.6",
22
+ "@types/jest": "28.1.7",
23
23
  "@types/node": "16.11.47",
24
24
  "jest": "28.1.3",
25
25
  "jest-environment-jsdom": "28.1.3",
26
- "ts-jest": "28.0.7",
26
+ "ts-jest": "28.0.8",
27
27
  "typescript": "4.7.4"
28
28
  },
29
29
  "engines": {
@@ -110,15 +110,12 @@ export function createTransporter({
110
110
  : {};
111
111
 
112
112
  const queryParameters: QueryParameters = {
113
+ 'x-algolia-agent': algoliaAgent.value,
113
114
  ...baseQueryParameters,
114
115
  ...request.queryParameters,
115
116
  ...dataQueryParameters,
116
117
  };
117
118
 
118
- if (algoliaAgent.value) {
119
- queryParameters['x-algolia-agent'] = algoliaAgent.value;
120
- }
121
-
122
119
  if (requestOptions && requestOptions.queryParameters) {
123
120
  for (const key of Object.keys(requestOptions.queryParameters)) {
124
121
  // We want to keep `undefined` and `null` values,