@commercetools/frontend-sdk
Advanced tools
Comparing version 1.12.2 to 1.12.3
## Version 1.12.3 (2024-06-17) | ||
* Updated query serialisation to support square bracket syntax | ||
## Version 1.12.2 (2024-06-13) | ||
* fix: fixed array serialisation into query | ||
* fix: Fixed jsdocs customerHeaderValue type | ||
* Fixed array serialisation into query | ||
* Fixed jsdocs customerHeaderValue type | ||
@@ -8,0 +13,0 @@ ## Version 1.12.1 (2024-05-16) |
@@ -49,2 +49,4 @@ "use strict"; | ||
var generateQueryString = function(query) { | ||
let queryString = ""; | ||
let arrayParams = []; | ||
const params = new URLSearchParams(); | ||
@@ -55,2 +57,3 @@ Object.keys(query).forEach((key) => { | ||
if (Array.isArray(value)) { | ||
arrayParams.push(key); | ||
value.forEach((currentValue) => { | ||
@@ -64,3 +67,10 @@ params.append(key, currentValue.toString()); | ||
}); | ||
return `?${params.toString()}`; | ||
queryString = params.toString(); | ||
arrayParams.forEach((arrayParam) => { | ||
queryString = queryString.replaceAll( | ||
`${arrayParam}=`, | ||
`${arrayParam}[]=` | ||
); | ||
}); | ||
return queryString ? `?${queryString}` : ""; | ||
}; | ||
@@ -67,0 +77,0 @@ // Annotate the CommonJS export names for ESM import in node: |
@@ -600,2 +600,4 @@ "use strict"; | ||
var generateQueryString = function(query) { | ||
let queryString = ""; | ||
let arrayParams = []; | ||
const params = new URLSearchParams(); | ||
@@ -606,2 +608,3 @@ Object.keys(query).forEach((key) => { | ||
if (Array.isArray(value)) { | ||
arrayParams.push(key); | ||
value.forEach((currentValue) => { | ||
@@ -615,3 +618,10 @@ params.append(key, currentValue.toString()); | ||
}); | ||
return `?${params.toString()}`; | ||
queryString = params.toString(); | ||
arrayParams.forEach((arrayParam) => { | ||
queryString = queryString.replaceAll( | ||
`${arrayParam}=`, | ||
`${arrayParam}[]=` | ||
); | ||
}); | ||
return queryString ? `?${queryString}` : ""; | ||
}; | ||
@@ -618,0 +628,0 @@ |
@@ -380,2 +380,4 @@ "use strict"; | ||
var generateQueryString = function(query) { | ||
let queryString = ""; | ||
let arrayParams = []; | ||
const params = new URLSearchParams(); | ||
@@ -386,2 +388,3 @@ Object.keys(query).forEach((key) => { | ||
if (Array.isArray(value)) { | ||
arrayParams.push(key); | ||
value.forEach((currentValue) => { | ||
@@ -395,3 +398,10 @@ params.append(key, currentValue.toString()); | ||
}); | ||
return `?${params.toString()}`; | ||
queryString = params.toString(); | ||
arrayParams.forEach((arrayParam) => { | ||
queryString = queryString.replaceAll( | ||
`${arrayParam}=`, | ||
`${arrayParam}[]=` | ||
); | ||
}); | ||
return queryString ? `?${queryString}` : ""; | ||
}; | ||
@@ -398,0 +408,0 @@ |
{ | ||
"name": "@commercetools/frontend-sdk", | ||
"version": "1.12.2", | ||
"version": "1.12.3", | ||
"license": "UNLICENSED", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
487999
6110