@faststore/api 2.2.36 → 2.2.42

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.
@@ -23,7 +23,7 @@ var api = require('@opentelemetry/api');
23
23
  var apiLogs = require('@opentelemetry/api-logs');
24
24
 
25
25
  var name = "@faststore/api";
26
- var version = "2.2.35";
26
+ var version = "2.2.38";
27
27
  var license = "MIT";
28
28
  var main = "dist/index.js";
29
29
  var typings = "dist/index.d.ts";
@@ -61,8 +61,8 @@ var dependencies = {
61
61
  };
62
62
  var devDependencies = {
63
63
  "@envelop/core": "^2.6.0",
64
- "@faststore/eslint-config": "^2.2.33",
65
- "@faststore/shared": "^2.2.33",
64
+ "@faststore/eslint-config": "^2.2.38",
65
+ "@faststore/shared": "^2.2.38",
66
66
  "@graphql-codegen/cli": "2.2.0",
67
67
  "@graphql-codegen/typescript": "2.2.2",
68
68
  "@types/express": "^4.17.16",
@@ -2217,7 +2217,9 @@ const StoreSearchResult = {
2217
2217
  } = root;
2218
2218
  const [terms, productSearchResult] = await Promise.all([search.suggestedTerms(searchArgs), productSearchPromise]);
2219
2219
  const skus = productSearchResult.products.map(product => {
2220
- const [maybeSku] = product.items;
2220
+ // What determines the presentation of the SKU is the price order
2221
+ // https://help.vtex.com/pt/tutorial/ordenando-imagens-na-vitrine-e-na-pagina-de-produto--tutorials_278
2222
+ const maybeSku = pickBestSku(product.items);
2221
2223
  return maybeSku && enhanceSku(maybeSku, product);
2222
2224
  }).filter(sku => !!sku);
2223
2225
  const {
@@ -2236,7 +2238,9 @@ const StoreSearchResult = {
2236
2238
  }) => {
2237
2239
  const productSearchResult = await productSearchPromise;
2238
2240
  const skus = productSearchResult.products.map(product => {
2239
- const [maybeSku] = product.items;
2241
+ // What determines the presentation of the SKU is the price order
2242
+ // https://help.vtex.com/pt/tutorial/ordenando-imagens-na-vitrine-e-na-pagina-de-produto--tutorials_278
2243
+ const maybeSku = pickBestSku(product.items);
2240
2244
  return maybeSku && enhanceSku(maybeSku, product);
2241
2245
  }).filter(sku => !!sku);
2242
2246
  return {