@faststore/core 2.2.56 → 2.2.57

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.
Files changed (43) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +11 -11
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/eslint/.cache_1gneedd +1 -1
  6. package/.next/cache/next-server.js.nft.json +1 -1
  7. package/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/.next/cache/webpack/client-production/index.pack +0 -0
  9. package/.next/cache/webpack/server-production/0.pack +0 -0
  10. package/.next/cache/webpack/server-production/index.pack +0 -0
  11. package/.next/next-server.js.nft.json +1 -1
  12. package/.next/prerender-manifest.json +1 -1
  13. package/.next/routes-manifest.json +1 -1
  14. package/.next/server/chunks/350.js +1 -1
  15. package/.next/server/chunks/74.js +2 -1
  16. package/.next/server/middleware-build-manifest.js +1 -1
  17. package/.next/server/pages/404.js.nft.json +1 -1
  18. package/.next/server/pages/500.js.nft.json +1 -1
  19. package/.next/server/pages/[...slug].js.nft.json +1 -1
  20. package/.next/server/pages/[slug]/p.js.nft.json +1 -1
  21. package/.next/server/pages/_app.js.nft.json +1 -1
  22. package/.next/server/pages/_error.js.nft.json +1 -1
  23. package/.next/server/pages/account.js.nft.json +1 -1
  24. package/.next/server/pages/api/graphql.js +1 -1
  25. package/.next/server/pages/checkout.js.nft.json +1 -1
  26. package/.next/server/pages/en-US/404.html +2 -2
  27. package/.next/server/pages/en-US/500.html +2 -2
  28. package/.next/server/pages/en-US/account.html +2 -2
  29. package/.next/server/pages/en-US/checkout.html +2 -2
  30. package/.next/server/pages/en-US/login.html +2 -2
  31. package/.next/server/pages/en-US/s.html +2 -2
  32. package/.next/server/pages/en-US.html +2 -2
  33. package/.next/server/pages/index.js.nft.json +1 -1
  34. package/.next/server/pages/login.js.nft.json +1 -1
  35. package/.next/server/pages/s.js.nft.json +1 -1
  36. package/.next/static/chunks/{158-df35a8644ae9d281.js → 158-ef35da4842083552.js} +1 -1
  37. package/.next/static/{47fwTwSkxhDjogwpLLwCm → sToiuT4rncwaUIk2owcIX}/_buildManifest.js +1 -1
  38. package/.next/trace +81 -81
  39. package/.turbo/turbo-build.log +1 -1
  40. package/.turbo/turbo-test.log +8 -8
  41. package/package.json +2 -2
  42. package/src/components/product/ProductCard/ProductCard.tsx +3 -1
  43. /package/.next/static/{47fwTwSkxhDjogwpLLwCm → sToiuT4rncwaUIk2owcIX}/_ssgManifest.js +0 -0
@@ -1,7 +1,7 @@
1
1
  $ yarn partytown & yarn generate && next build
2
+ $ faststore generate-graphql -c
2
3
  $ partytown copylib ./public/~partytown
3
4
  Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
4
- $ faststore generate-graphql -c
5
5
  success - GraphQL schema, types, and optimizations successfully generated 🎉
6
6
  warn - You have enabled experimental feature (scrollRestoration) in next.config.js.
7
7
  warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
@@ -1,23 +1,23 @@
1
1
  $ jest
2
- PASS test/server/index.test.ts (21.266 s)
2
+ PASS test/server/index.test.ts (21.422 s)
3
3
  FastStore GraphQL Layer
4
4
  @faststore/api
5
- ✓ should return a valid GraphQL schema (5 ms)
6
- ✓ should return a valid GraphQL schema contain all expected types (4 ms)
5
+ ✓ should return a valid GraphQL schema (6 ms)
6
+ ✓ should return a valid GraphQL schema contain all expected types (12 ms)
7
7
  ✓ should return a valid GraphQL schema contain all expected queries (1 ms)
8
- ✓ should return a valid GraphQL schema contain all expected mutations
8
+ ✓ should return a valid GraphQL schema contain all expected mutations (1 ms)
9
9
  VTEX API Extension
10
- ✓ getTypeDefsFromFolder function should return an Array (5 ms)
10
+ ✓ getTypeDefsFromFolder function should return an Array (7 ms)
11
11
  Third Party API Extension
12
- ✓ getTypeDefsFromFolder function should return an Array (4 ms)
12
+ ✓ getTypeDefsFromFolder function should return an Array (6 ms)
13
13
  Final Schema after merging
14
14
  ✓ should return a valid merged GraphQL schema (28 ms)
15
15
  Envelop
16
16
  ✓ should exist with its plugins (24 ms)
17
- ✓ should handle options and execute (144 ms)
17
+ ✓ should handle options and execute (211 ms)
18
18
 
19
19
  Test Suites: 1 passed, 1 total
20
20
  Tests: 9 passed, 9 total
21
21
  Snapshots: 0 total
22
- Time: 21.384 s
22
+ Time: 21.572 s
23
23
  Ran all test suites.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "2.2.56",
3
+ "version": "2.2.57",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -123,5 +123,5 @@
123
123
  "node": "18.19.0",
124
124
  "yarn": "1.19.1"
125
125
  },
126
- "gitHead": "8e96095ed20741066b2fe97e2ff7e9947f42032b"
126
+ "gitHead": "93d8ac4811b96182c66f3d3d112eb4ceb430e691"
127
127
  }
@@ -88,6 +88,8 @@ function ProductCard({
88
88
  [availability]
89
89
  )
90
90
 
91
+ const hasDiscount = spotPrice <= listPrice
92
+
91
93
  return (
92
94
  <UIProductCard
93
95
  outOfStock={outOfStock}
@@ -117,7 +119,7 @@ function ProductCard({
117
119
  outOfStock={outOfStock}
118
120
  onButtonClick={onButtonClick}
119
121
  linkProps={linkProps}
120
- showDiscountBadge={showDiscountBadge}
122
+ showDiscountBadge={hasDiscount && showDiscountBadge}
121
123
  />
122
124
  </UIProductCard>
123
125
  )