@backpackjs/transform-product-feed
Advanced tools
Comparing version 4.27.3-next.0 to 4.27.3
@@ -23,6 +23,13 @@ "use strict"; | ||
const getProducts = ({ products, collections, options }) => { | ||
const feedCollectionProducts = collections | ||
.find((collection) => collection.handle === options.collectionHandle) | ||
?.products?.map(getProduct(products)); | ||
return feedCollectionProducts || products; | ||
const optionCollection = options.collectionHandle; | ||
const productByHandle = getProduct(products); | ||
const byOptionsCollection = ({ handle }) => handle === optionCollection; | ||
const collection = collections.find(byOptionsCollection); | ||
const feedCollectionProducts = collection?.products | ||
.map((product) => product.handle) | ||
.map(productByHandle); | ||
if (feedCollectionProducts.filter(Boolean).length === 0) { | ||
return products; | ||
} | ||
return feedCollectionProducts; | ||
}; | ||
@@ -29,0 +36,0 @@ const getFeedItems = (product) => { |
{ | ||
"name": "@backpackjs/transform-product-feed", | ||
"version": "4.27.3-next.0", | ||
"version": "4.27.3", | ||
"license": "MIT", | ||
@@ -25,3 +25,3 @@ "author": "BackpackJS <dev@packdigial.com> (http://packdigital.com/)", | ||
}, | ||
"gitHead": "2f7ee29eba1fd51f01264295893efd2433ce3479" | ||
"gitHead": "00d27df5e9960b541a676d1ba1f895cbfd63d191" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10043
101
1