@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.
package/dist/api.esm.js CHANGED
@@ -19,7 +19,7 @@ import { trace, context, SpanKind } from '@opentelemetry/api';
19
19
  import { SeverityNumber } from '@opentelemetry/api-logs';
20
20
 
21
21
  var name = "@faststore/api";
22
- var version = "2.2.35";
22
+ var version = "2.2.38";
23
23
  var license = "MIT";
24
24
  var main = "dist/index.js";
25
25
  var typings = "dist/index.d.ts";
@@ -57,8 +57,8 @@ var dependencies = {
57
57
  };
58
58
  var devDependencies = {
59
59
  "@envelop/core": "^2.6.0",
60
- "@faststore/eslint-config": "^2.2.33",
61
- "@faststore/shared": "^2.2.33",
60
+ "@faststore/eslint-config": "^2.2.38",
61
+ "@faststore/shared": "^2.2.38",
62
62
  "@graphql-codegen/cli": "2.2.0",
63
63
  "@graphql-codegen/typescript": "2.2.2",
64
64
  "@types/express": "^4.17.16",
@@ -2213,7 +2213,9 @@ const StoreSearchResult = {
2213
2213
  } = root;
2214
2214
  const [terms, productSearchResult] = await Promise.all([search.suggestedTerms(searchArgs), productSearchPromise]);
2215
2215
  const skus = productSearchResult.products.map(product => {
2216
- const [maybeSku] = product.items;
2216
+ // What determines the presentation of the SKU is the price order
2217
+ // https://help.vtex.com/pt/tutorial/ordenando-imagens-na-vitrine-e-na-pagina-de-produto--tutorials_278
2218
+ const maybeSku = pickBestSku(product.items);
2217
2219
  return maybeSku && enhanceSku(maybeSku, product);
2218
2220
  }).filter(sku => !!sku);
2219
2221
  const {
@@ -2232,7 +2234,9 @@ const StoreSearchResult = {
2232
2234
  }) => {
2233
2235
  const productSearchResult = await productSearchPromise;
2234
2236
  const skus = productSearchResult.products.map(product => {
2235
- const [maybeSku] = product.items;
2237
+ // What determines the presentation of the SKU is the price order
2238
+ // https://help.vtex.com/pt/tutorial/ordenando-imagens-na-vitrine-e-na-pagina-de-produto--tutorials_278
2239
+ const maybeSku = pickBestSku(product.items);
2236
2240
  return maybeSku && enhanceSku(maybeSku, product);
2237
2241
  }).filter(sku => !!sku);
2238
2242
  return {