@shoppexio/storefront 1.0.94 → 1.0.95
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/CHANGELOG.md +4 -0
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.95
|
|
4
|
+
|
|
5
|
+
- `Product.sku` and `ProductVariant.sku` / `PriceVariant.sku` carry the merchant's SKU (`null` when they set none). `getProduct` keeps each option's SKU on `product.variants`; before, the mapper dropped it (PR #3719).
|
|
6
|
+
|
|
3
7
|
## 1.0.94
|
|
4
8
|
|
|
5
9
|
- `getProduct(idOrSlug, { variant })` reads a product for a variant's direct link (`?variant=<id>`). A private variant (`is_private: true`) is listed only when it is named this way; it then comes first in `price_variants`, so a buy box that opens on the first sellable option preselects it. Product lists never carry a private variant.
|
package/dist/index.cjs
CHANGED
|
@@ -1354,6 +1354,7 @@ function priceVariantToProductVariant(variant) {
|
|
|
1354
1354
|
id: variant.id,
|
|
1355
1355
|
title: variant.title ?? variant.label ?? "",
|
|
1356
1356
|
price: typeof variant.price === "number" ? variant.price : Number(variant.price) || 0,
|
|
1357
|
+
sku: variant.sku,
|
|
1357
1358
|
stock: typeof variant.stock === "number" ? variant.stock : void 0,
|
|
1358
1359
|
// Dynamic Delivery (S8): carry the availability pair through. A supplier-backed
|
|
1359
1360
|
// variant reports `stock: 0`, so dropping `orderable` here would make the mapped
|