@moonbase.sh/vue 0.3.7 → 0.3.8

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/index.cjs CHANGED
@@ -664,6 +664,10 @@ function useCart(context) {
664
664
  lineItem.quantity += 1;
665
665
  if (!lineItem.variation && variation)
666
666
  lineItem.variation = variation;
667
+ if (!lineItem.price && variation)
668
+ lineItem.price = variation.price;
669
+ if (!lineItem.appliedDiscount && variation.discount)
670
+ lineItem.appliedDiscount = variation.discount;
667
671
  if (lineItem.type === "Product" && item.type === "product" && !lineItem.product)
668
672
  lineItem.product = item;
669
673
  if (lineItem.type === "Bundle" && item.type === "bundle" && !lineItem.bundle)
package/dist/index.js CHANGED
@@ -634,6 +634,10 @@ function useCart(context) {
634
634
  lineItem.quantity += 1;
635
635
  if (!lineItem.variation && variation)
636
636
  lineItem.variation = variation;
637
+ if (!lineItem.price && variation)
638
+ lineItem.price = variation.price;
639
+ if (!lineItem.appliedDiscount && variation.discount)
640
+ lineItem.appliedDiscount = variation.discount;
637
641
  if (lineItem.type === "Product" && item.type === "product" && !lineItem.product)
638
642
  lineItem.product = item;
639
643
  if (lineItem.type === "Bundle" && item.type === "bundle" && !lineItem.bundle)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/vue",
3
3
  "type": "module",
4
- "version": "0.3.7",
4
+ "version": "0.3.8",
5
5
  "description": "Package to let you build vue.js storefronts with Moonbase.sh as payment and delivery provider",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "@vue/devtools-api": "^6.6.3",
20
20
  "uuid": "^9.0.1",
21
21
  "zod": "^3.23.8",
22
- "@moonbase.sh/storefront-api": "0.3.7"
22
+ "@moonbase.sh/storefront-api": "0.3.8"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/uuid": "^9.0.8",