@lookiero/checkout 14.8.4 → 15.0.0

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.
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "14.8.4";
2
- export declare const RELEASE = "checkout@14.8.4";
1
+ export declare const VERSION = "15.0.0";
2
+ export declare const RELEASE = "checkout@15.0.0";
@@ -1,2 +1,2 @@
1
- export const VERSION = "14.8.4";
2
- export const RELEASE = "checkout@14.8.4";
1
+ export const VERSION = "15.0.0";
2
+ export const RELEASE = "checkout@15.0.0";
package/metro.config.js CHANGED
@@ -1,26 +1,20 @@
1
1
  // Learn more https://docs.expo.io/guides/customizing-metro
2
- const { getDefaultConfig } = require("expo/metro-config");
3
- const path = require('path');
4
-
5
- const {
6
- withSentryConfig
7
- } = require("@sentry/react-native/metro");
2
+ const { getSentryExpoConfig } = require("@sentry/react-native/metro");
3
+ const path = require("path");
8
4
 
9
5
  // Find the project and workspace directories
10
6
  const projectRoot = __dirname;
11
7
  // This can be replaced with `find-yarn-workspace-root`
12
- const monorepoRoot = path.resolve(projectRoot, '../..');
8
+ const monorepoRoot = path.resolve(projectRoot, "../..");
13
9
 
14
- const config = getDefaultConfig(__dirname);
10
+ const config = getSentryExpoConfig(__dirname);
15
11
 
16
12
  // 1. Watch all files within the monorepo
17
- config.watchFolders = [monorepoRoot];
13
+ config.watchFolders = [...config.watchFolders, projectRoot, monorepoRoot];
18
14
  // 2. Let Metro know where to resolve packages and in what order
19
15
  config.resolver.nodeModulesPaths = [
20
- path.resolve(projectRoot, 'node_modules'),
21
- path.resolve(monorepoRoot, 'node_modules'),
16
+ path.resolve(projectRoot, "node_modules"),
17
+ path.resolve(monorepoRoot, "node_modules"),
22
18
  ];
23
19
 
24
- config.resolver.disableHierarchicalLookup = true;
25
-
26
- module.exports = withSentryConfig(config);
20
+ module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "14.8.4",
3
+ "version": "15.0.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": "false",
@@ -19,28 +19,32 @@
19
19
  "eas:all": "eas build -p all -e test"
20
20
  },
21
21
  "dependencies": {
22
- "@expo/metro-runtime": "^5.0.5",
22
+ "@expo/metro-runtime": "~6.1.2",
23
23
  "@lookiero/messaging": "^8.1.1",
24
24
  "@lookiero/messaging-react": "^8.1.1",
25
25
  "@lookiero/sty-psp-ab-testing": "^0.4",
26
- "@lookiero/sty-psp-expo-config": "^2.0",
26
+ "@lookiero/sty-psp-expo-config": "^3.0",
27
27
  "@lookiero/sty-psp-http": "^2.1",
28
28
  "@lookiero/sty-psp-i18n": "^2.1",
29
29
  "@lookiero/sty-psp-locale": "^2.1",
30
- "@lookiero/sty-psp-logging": "^2.2",
31
- "@lookiero/sty-psp-notifications": "^2.21",
32
- "@lookiero/sty-psp-react-native": "^2.0",
30
+ "@lookiero/sty-psp-logging": "^2.3",
31
+ "@lookiero/sty-psp-notifications": "^2.22",
32
+ "@lookiero/sty-psp-react-native": "^3.0",
33
33
  "@lookiero/sty-psp-segment": "^0.1",
34
34
  "@lookiero/sty-psp-storage": "^1.1",
35
- "@lookiero/sty-psp-tracking": "^2.4",
36
- "@lookiero/sty-psp-ui": "^4.0",
37
- "@lookiero/sty-psp-ui-settings": "^1.6",
35
+ "@lookiero/sty-psp-tracking": "^2.5",
36
+ "@lookiero/sty-psp-ui": "^5.0",
37
+ "@lookiero/sty-psp-ui-settings": "^1.7",
38
38
  "@lookiero/sty-psp-units": "^0.1",
39
39
  "@lookiero/sty-psp-uuid": "^0.2",
40
40
  "@lookiero/sty-sp-tradename": "^1.0",
41
- "@sentry/react-native": "^7.3.0",
41
+ "@sentry/react-native": "~7.2.0",
42
+ "react": "19.1.0",
43
+ "react-native": "0.81.5",
42
44
  "react-native-keyboard-aware-scroll-view": "^0.9.5",
43
- "react-native-svg": "15.11.2",
45
+ "react-native-reanimated": "~4.1.1",
46
+ "react-native-svg": "15.12.1",
47
+ "react-native-worklets": "0.5.1",
44
48
  "tiny-invariant": "^1.3.1"
45
49
  },
46
50
  "devDependencies": {
@@ -52,7 +56,7 @@
52
56
  "@lookiero/sty-psp-prettier-config": "*",
53
57
  "@lookiero/sty-psp-scripts": "*",
54
58
  "@lookiero/sty-psp-typescript": "*",
55
- "@react-native-async-storage/async-storage": "2.1.2",
59
+ "@react-native-async-storage/async-storage": "2.2.0",
56
60
  "@react-native/assets-registry": "^0.79.2",
57
61
  "@remix-run/router": ">=1.10",
58
62
  "@testing-library/react-native": ">=13",
@@ -66,10 +70,9 @@
66
70
  "http-proxy-middleware": "^2.0.9",
67
71
  "jest-mock-extended": ">=3",
68
72
  "jest-when": ">=3",
69
- "react-native-gesture-handler": "~2.24.0",
73
+ "react-native-gesture-handler": "~2.28.0",
70
74
  "react-native-get-random-values": "~1.11.0",
71
- "react-native-reanimated": "~3.17.4",
72
- "react-native-safe-area-context": "5.4.0",
75
+ "react-native-safe-area-context": "~5.6.0",
73
76
  "react-router-dom": "6.30.3",
74
77
  "react-router-native": "6.30.3"
75
78
  },
@@ -82,13 +85,13 @@
82
85
  "@lookiero/i18n-react": ">=3",
83
86
  "@lookiero/payments-front": ">=9",
84
87
  "apollo-boost": "0.4.4",
85
- "expo": ">=53",
88
+ "expo": ">=54",
86
89
  "expo-font": ">=12",
87
90
  "react": ">=19",
88
- "react-native": ">=0.76",
91
+ "react-native": ">=0.81",
89
92
  "react-native-gesture-handler": ">=2.24",
90
93
  "react-native-get-random-values": ">=1.11",
91
- "react-native-reanimated": ">=3.17",
94
+ "react-native-reanimated": ">=4",
92
95
  "react-native-safe-area-context": ">=5.4",
93
96
  "react-router-dom": ">=6.14",
94
97
  "react-router-native": ">=6.14",
@@ -9,9 +9,11 @@ import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
9
9
  import { useReturnCheckoutItem as sut } from "./useReturnCheckoutItem";
10
10
 
11
11
  const mockCreateToastNotification = jest.fn();
12
+ const mockClearNotifications = jest.fn();
12
13
  jest.mock("@lookiero/sty-psp-notifications", () => ({
13
14
  ...jest.requireActual("@lookiero/sty-psp-notifications"),
14
15
  useCreateToastNotification: () => [mockCreateToastNotification],
16
+ useClearNotifications: () => [mockClearNotifications],
15
17
  }));
16
18
 
17
19
  const checkoutItemId = "6248e14a-a269-4259-838b-39f493f30769";
@@ -38,7 +40,21 @@ const { Component: Messaging } = bootstrap({ id: MESSAGING_CONTEXT_ID })
38
40
  .command(RETURN_CHECKOUT_ITEM, mockReturnCheckoutItemHandler, {})(get, save)
39
41
  .build();
40
42
 
43
+ beforeAll(() => {
44
+ jest.useFakeTimers();
45
+ });
46
+
47
+ afterAll(() => {
48
+ jest.useRealTimers();
49
+ });
50
+
41
51
  describe("useReturnCheckoutItem integration hook", () => {
52
+ beforeEach(() => {
53
+ logger.captureException.mockClear();
54
+ mockCreateToastNotification.mockClear();
55
+ mockClearNotifications.mockClear();
56
+ });
57
+
42
58
  it("returns success as the status when 'return' succeeds", async () => {
43
59
  mockReturnCheckoutItemHandler.mockImplementation(() => () => ({ domainEvents: [] }));
44
60
  const { result } = renderHook(() => sut({ checkoutItemId, logger }), { wrapper: Messaging });
@@ -21,7 +21,6 @@ beforeAll(() => {
21
21
  });
22
22
 
23
23
  afterAll(() => {
24
- jest.runOnlyPendingTimers();
25
24
  jest.useRealTimers();
26
25
  });
27
26
 
@@ -156,20 +156,16 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
156
156
  collapsable={false}
157
157
  duration={1200}
158
158
  style={
159
- [
160
- {
161
- "height": "100%",
162
- "width": "100%",
163
- },
164
- {
165
- "left": 0,
166
- "transform": [
167
- {
168
- "translateX": -375,
169
- },
170
- ],
171
- },
172
- ]
159
+ {
160
+ "height": "100%",
161
+ "left": 0,
162
+ "transform": [
163
+ {
164
+ "translateX": -375,
165
+ },
166
+ ],
167
+ "width": "100%",
168
+ }
173
169
  }
174
170
  >
175
171
  <ViewManagerAdapter_ExpoLinearGradient
@@ -317,20 +313,16 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
317
313
  collapsable={false}
318
314
  duration={1200}
319
315
  style={
320
- [
321
- {
322
- "height": "100%",
323
- "width": "100%",
324
- },
325
- {
326
- "left": 0,
327
- "transform": [
328
- {
329
- "translateX": -375,
330
- },
331
- ],
332
- },
333
- ]
316
+ {
317
+ "height": "100%",
318
+ "left": 0,
319
+ "transform": [
320
+ {
321
+ "translateX": -375,
322
+ },
323
+ ],
324
+ "width": "100%",
325
+ }
334
326
  }
335
327
  >
336
328
  <ViewManagerAdapter_ExpoLinearGradient
@@ -471,9 +463,9 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
471
463
  "marginHorizontal": 3,
472
464
  },
473
465
  {
474
- "height": 8,
475
- "opacity": 1,
476
- "width": 8,
466
+ "height": 0,
467
+ "opacity": 0,
468
+ "width": 0,
477
469
  },
478
470
  {
479
471
  "borderRadius": 8,
@@ -527,9 +519,9 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
527
519
  "marginHorizontal": 3,
528
520
  },
529
521
  {
530
- "height": 8,
531
- "opacity": 0.3,
532
- "width": 8,
522
+ "height": 0,
523
+ "opacity": 0,
524
+ "width": 0,
533
525
  },
534
526
  {
535
527
  "borderRadius": 8,
@@ -167,20 +167,16 @@ exports[`ItemActions component matches the snapshot for a KEPT checkoutItem 1`]
167
167
  collapsable={false}
168
168
  duration={1200}
169
169
  style={
170
- [
171
- {
172
- "height": "100%",
173
- "width": "100%",
174
- },
175
- {
176
- "left": 0,
177
- "transform": [
178
- {
179
- "translateX": -375,
180
- },
181
- ],
182
- },
183
- ]
170
+ {
171
+ "height": "100%",
172
+ "left": 0,
173
+ "transform": [
174
+ {
175
+ "translateX": -375,
176
+ },
177
+ ],
178
+ "width": "100%",
179
+ }
184
180
  }
185
181
  >
186
182
  <ViewManagerAdapter_ExpoLinearGradient
@@ -328,20 +324,16 @@ exports[`ItemActions component matches the snapshot for a KEPT checkoutItem 1`]
328
324
  collapsable={false}
329
325
  duration={1200}
330
326
  style={
331
- [
332
- {
333
- "height": "100%",
334
- "width": "100%",
335
- },
336
- {
337
- "left": 0,
338
- "transform": [
339
- {
340
- "translateX": -375,
341
- },
342
- ],
343
- },
344
- ]
327
+ {
328
+ "height": "100%",
329
+ "left": 0,
330
+ "transform": [
331
+ {
332
+ "translateX": -375,
333
+ },
334
+ ],
335
+ "width": "100%",
336
+ }
345
337
  }
346
338
  >
347
339
  <ViewManagerAdapter_ExpoLinearGradient
@@ -482,9 +474,9 @@ exports[`ItemActions component matches the snapshot for a KEPT checkoutItem 1`]
482
474
  "marginHorizontal": 3,
483
475
  },
484
476
  {
485
- "height": 8,
486
- "opacity": 1,
487
- "width": 8,
477
+ "height": 0,
478
+ "opacity": 0,
479
+ "width": 0,
488
480
  },
489
481
  {
490
482
  "borderRadius": 8,
@@ -538,9 +530,9 @@ exports[`ItemActions component matches the snapshot for a KEPT checkoutItem 1`]
538
530
  "marginHorizontal": 3,
539
531
  },
540
532
  {
541
- "height": 8,
542
- "opacity": 0.3,
543
- "width": 8,
533
+ "height": 0,
534
+ "opacity": 0,
535
+ "width": 0,
544
536
  },
545
537
  {
546
538
  "borderRadius": 8,
@@ -851,20 +843,16 @@ exports[`ItemActions component matches the snapshot for a REPLACED checkoutItem
851
843
  collapsable={false}
852
844
  duration={1200}
853
845
  style={
854
- [
855
- {
856
- "height": "100%",
857
- "width": "100%",
858
- },
859
- {
860
- "left": 0,
861
- "transform": [
862
- {
863
- "translateX": -375,
864
- },
865
- ],
866
- },
867
- ]
846
+ {
847
+ "height": "100%",
848
+ "left": 0,
849
+ "transform": [
850
+ {
851
+ "translateX": -375,
852
+ },
853
+ ],
854
+ "width": "100%",
855
+ }
868
856
  }
869
857
  >
870
858
  <ViewManagerAdapter_ExpoLinearGradient
@@ -1012,20 +1000,16 @@ exports[`ItemActions component matches the snapshot for a REPLACED checkoutItem
1012
1000
  collapsable={false}
1013
1001
  duration={1200}
1014
1002
  style={
1015
- [
1016
- {
1017
- "height": "100%",
1018
- "width": "100%",
1019
- },
1020
- {
1021
- "left": 0,
1022
- "transform": [
1023
- {
1024
- "translateX": -375,
1025
- },
1026
- ],
1027
- },
1028
- ]
1003
+ {
1004
+ "height": "100%",
1005
+ "left": 0,
1006
+ "transform": [
1007
+ {
1008
+ "translateX": -375,
1009
+ },
1010
+ ],
1011
+ "width": "100%",
1012
+ }
1029
1013
  }
1030
1014
  >
1031
1015
  <ViewManagerAdapter_ExpoLinearGradient
@@ -1166,9 +1150,9 @@ exports[`ItemActions component matches the snapshot for a REPLACED checkoutItem
1166
1150
  "marginHorizontal": 3,
1167
1151
  },
1168
1152
  {
1169
- "height": 8,
1170
- "opacity": 1,
1171
- "width": 8,
1153
+ "height": 0,
1154
+ "opacity": 0,
1155
+ "width": 0,
1172
1156
  },
1173
1157
  {
1174
1158
  "borderRadius": 8,
@@ -1222,9 +1206,9 @@ exports[`ItemActions component matches the snapshot for a REPLACED checkoutItem
1222
1206
  "marginHorizontal": 3,
1223
1207
  },
1224
1208
  {
1225
- "height": 8,
1226
- "opacity": 0.3,
1227
- "width": 8,
1209
+ "height": 0,
1210
+ "opacity": 0,
1211
+ "width": 0,
1228
1212
  },
1229
1213
  {
1230
1214
  "borderRadius": 8,
@@ -1535,20 +1519,16 @@ exports[`ItemActions component matches the snapshot for an INITIAL checkoutItem
1535
1519
  collapsable={false}
1536
1520
  duration={1200}
1537
1521
  style={
1538
- [
1539
- {
1540
- "height": "100%",
1541
- "width": "100%",
1542
- },
1543
- {
1544
- "left": 0,
1545
- "transform": [
1546
- {
1547
- "translateX": -375,
1548
- },
1549
- ],
1550
- },
1551
- ]
1522
+ {
1523
+ "height": "100%",
1524
+ "left": 0,
1525
+ "transform": [
1526
+ {
1527
+ "translateX": -375,
1528
+ },
1529
+ ],
1530
+ "width": "100%",
1531
+ }
1552
1532
  }
1553
1533
  >
1554
1534
  <ViewManagerAdapter_ExpoLinearGradient
@@ -1696,20 +1676,16 @@ exports[`ItemActions component matches the snapshot for an INITIAL checkoutItem
1696
1676
  collapsable={false}
1697
1677
  duration={1200}
1698
1678
  style={
1699
- [
1700
- {
1701
- "height": "100%",
1702
- "width": "100%",
1703
- },
1704
- {
1705
- "left": 0,
1706
- "transform": [
1707
- {
1708
- "translateX": -375,
1709
- },
1710
- ],
1711
- },
1712
- ]
1679
+ {
1680
+ "height": "100%",
1681
+ "left": 0,
1682
+ "transform": [
1683
+ {
1684
+ "translateX": -375,
1685
+ },
1686
+ ],
1687
+ "width": "100%",
1688
+ }
1713
1689
  }
1714
1690
  >
1715
1691
  <ViewManagerAdapter_ExpoLinearGradient
@@ -1850,9 +1826,9 @@ exports[`ItemActions component matches the snapshot for an INITIAL checkoutItem
1850
1826
  "marginHorizontal": 3,
1851
1827
  },
1852
1828
  {
1853
- "height": 8,
1854
- "opacity": 1,
1855
- "width": 8,
1829
+ "height": 0,
1830
+ "opacity": 0,
1831
+ "width": 0,
1856
1832
  },
1857
1833
  {
1858
1834
  "borderRadius": 8,
@@ -1906,9 +1882,9 @@ exports[`ItemActions component matches the snapshot for an INITIAL checkoutItem
1906
1882
  "marginHorizontal": 3,
1907
1883
  },
1908
1884
  {
1909
- "height": 8,
1910
- "opacity": 0.3,
1911
- "width": 8,
1885
+ "height": 0,
1886
+ "opacity": 0,
1887
+ "width": 0,
1912
1888
  },
1913
1889
  {
1914
1890
  "borderRadius": 8,
@@ -129,20 +129,16 @@ exports[`ProductVariant component matches the snapshot for a non-unique size: no
129
129
  collapsable={false}
130
130
  duration={1200}
131
131
  style={
132
- [
133
- {
134
- "height": "100%",
135
- "width": "100%",
136
- },
137
- {
138
- "left": 0,
139
- "transform": [
140
- {
141
- "translateX": -375,
142
- },
143
- ],
144
- },
145
- ]
132
+ {
133
+ "height": "100%",
134
+ "left": 0,
135
+ "transform": [
136
+ {
137
+ "translateX": -375,
138
+ },
139
+ ],
140
+ "width": "100%",
141
+ }
146
142
  }
147
143
  >
148
144
  <ViewManagerAdapter_ExpoLinearGradient
@@ -487,20 +483,16 @@ exports[`ProductVariant component matches the snapshot for an unique size: uniqu
487
483
  collapsable={false}
488
484
  duration={1200}
489
485
  style={
490
- [
491
- {
492
- "height": "100%",
493
- "width": "100%",
494
- },
495
- {
496
- "left": 0,
497
- "transform": [
498
- {
499
- "translateX": -375,
500
- },
501
- ],
502
- },
503
- ]
486
+ {
487
+ "height": "100%",
488
+ "left": 0,
489
+ "transform": [
490
+ {
491
+ "translateX": -375,
492
+ },
493
+ ],
494
+ "width": "100%",
495
+ }
504
496
  }
505
497
  >
506
498
  <ViewManagerAdapter_ExpoLinearGradient
@@ -24,7 +24,6 @@ beforeAll(() => {
24
24
  });
25
25
 
26
26
  afterAll(() => {
27
- jest.runOnlyPendingTimers();
28
27
  jest.useRealTimers();
29
28
  });
30
29
 
@@ -414,20 +414,16 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
414
414
  collapsable={false}
415
415
  duration={1200}
416
416
  style={
417
- [
418
- {
419
- "height": "100%",
420
- "width": "100%",
421
- },
422
- {
423
- "left": 0,
424
- "transform": [
425
- {
426
- "translateX": -375,
427
- },
428
- ],
429
- },
430
- ]
417
+ {
418
+ "height": "100%",
419
+ "left": 0,
420
+ "transform": [
421
+ {
422
+ "translateX": -375,
423
+ },
424
+ ],
425
+ "width": "100%",
426
+ }
431
427
  }
432
428
  >
433
429
  <ViewManagerAdapter_ExpoLinearGradient
@@ -744,20 +740,16 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
744
740
  collapsable={false}
745
741
  duration={1200}
746
742
  style={
747
- [
748
- {
749
- "height": "100%",
750
- "width": "100%",
751
- },
752
- {
753
- "left": 0,
754
- "transform": [
755
- {
756
- "translateX": -375,
757
- },
758
- ],
759
- },
760
- ]
743
+ {
744
+ "height": "100%",
745
+ "left": 0,
746
+ "transform": [
747
+ {
748
+ "translateX": -375,
749
+ },
750
+ ],
751
+ "width": "100%",
752
+ }
761
753
  }
762
754
  >
763
755
  <ViewManagerAdapter_ExpoLinearGradient
@@ -1119,20 +1111,16 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
1119
1111
  collapsable={false}
1120
1112
  duration={1200}
1121
1113
  style={
1122
- [
1123
- {
1124
- "height": "100%",
1125
- "width": "100%",
1126
- },
1127
- {
1128
- "left": 0,
1129
- "transform": [
1130
- {
1131
- "translateX": -375,
1132
- },
1133
- ],
1134
- },
1135
- ]
1114
+ {
1115
+ "height": "100%",
1116
+ "left": 0,
1117
+ "transform": [
1118
+ {
1119
+ "translateX": -375,
1120
+ },
1121
+ ],
1122
+ "width": "100%",
1123
+ }
1136
1124
  }
1137
1125
  >
1138
1126
  <ViewManagerAdapter_ExpoLinearGradient
@@ -1449,20 +1437,16 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
1449
1437
  collapsable={false}
1450
1438
  duration={1200}
1451
1439
  style={
1452
- [
1453
- {
1454
- "height": "100%",
1455
- "width": "100%",
1456
- },
1457
- {
1458
- "left": 0,
1459
- "transform": [
1460
- {
1461
- "translateX": -375,
1462
- },
1463
- ],
1464
- },
1465
- ]
1440
+ {
1441
+ "height": "100%",
1442
+ "left": 0,
1443
+ "transform": [
1444
+ {
1445
+ "translateX": -375,
1446
+ },
1447
+ ],
1448
+ "width": "100%",
1449
+ }
1466
1450
  }
1467
1451
  >
1468
1452
  <ViewManagerAdapter_ExpoLinearGradient