@faststore/core 4.8.0-dev.5 → 4.8.0-dev.7
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/.turbo/turbo-generate.log +3 -3
- package/.turbo/turbo-test.log +108 -108
- package/CHANGELOG.md +10 -0
- package/package.json +6 -6
- package/src/sdk/graphql/retryPolicy.ts +49 -0
- package/src/sdk/graphql/useQuery.ts +2 -0
- package/test/sdk/graphql/retryPolicy.test.ts +135 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@4.8.0-dev.
|
|
2
|
+
> @faststore/core@4.8.0-dev.6 generate /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> pnpm run gen-types && pnpm run cache-graphql
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@4.8.0-dev.
|
|
6
|
+
> @faststore/core@4.8.0-dev.6 gen-types /home/runner/work/faststore/faststore/packages/core
|
|
7
7
|
> node ../cli/bin/run generate-types .
|
|
8
8
|
|
|
9
9
|
[33m[STARTED][39m Parse Configuration
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
[32m[COMPLETED][39m Generate to @generated/
|
|
20
20
|
[32m[COMPLETED][39m Generate outputs
|
|
21
21
|
|
|
22
|
-
> @faststore/core@4.8.0-dev.
|
|
22
|
+
> @faststore/core@4.8.0-dev.6 cache-graphql /home/runner/work/faststore/faststore/packages/core
|
|
23
23
|
> node ../cli/bin/run cache-graphql --config=./discovery.config.default.js --queries=./@generated/persisted-documents.json
|
|
24
24
|
|
|
25
25
|
[Info] - Config file location: /home/runner/work/faststore/faststore/packages/core/discovery.config.default.js
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@4.8.0-dev.
|
|
2
|
+
> @faststore/core@4.8.0-dev.6 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> vitest run
|
|
4
4
|
|
|
5
5
|
|
|
@@ -7,18 +7,19 @@
|
|
|
7
7
|
|
|
8
8
|
Not implemented: navigation to another Document
|
|
9
9
|
Not implemented: navigation to another Document
|
|
10
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/ui/useScrollRestoration.browser.test.ts [2m([22m[2m43 tests[22m[2m)[22m[33m 620[2mms[22m[39m
|
|
11
10
|
Browserslist: browsers data (caniuse-lite) is 7 months old. Please run:
|
|
12
11
|
npx update-browserslist-db@latest
|
|
13
12
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
14
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
15
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/
|
|
16
|
-
|
|
17
|
-
[33m[2m✓[22m[39m
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
[32m✓[39m [30m[46m browser [49m[39m test/
|
|
21
|
-
|
|
13
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/ui/useScrollRestoration.browser.test.ts [2m([22m[2m43 tests[22m[2m)[22m[33m 837[2mms[22m[39m
|
|
14
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationShelf.browser.test.tsx [2m([22m[2m13 tests[22m[2m)[22m[33m 412[2mms[22m[39m
|
|
15
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/cards/MyAccountListCards.browser.test.tsx [2m([22m[2m14 tests[22m[2m)[22m[33m 1807[2mms[22m[39m
|
|
16
|
+
[33m[2m✓[22m[39m shows the tab bar and renders Personal cards by default [33m 601[2mms[22m[39m
|
|
17
|
+
[33m[2m✓[22m[39m paginates when there are more than 25 cards [33m 324[2mms[22m[39m
|
|
18
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/useBindingSelector.browser.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[32m 130[2mms[22m[39m
|
|
19
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/ContractSwitcher.browser.test.tsx [2m([22m[2m13 tests[22m[2m)[22m[33m 1943[2mms[22m[39m
|
|
20
|
+
[33m[2m✓[22m[39m shows an error state when the list fails to load [33m 610[2mms[22m[39m
|
|
21
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 240[2mms[22m[39m
|
|
22
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 17[2mms[22m[39m
|
|
22
23
|
[90mstderr[2m | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
|
|
23
24
|
[22m[39mError in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=3c71b0d3fc2bade14df68abfa271858beb361b12
|
|
24
25
|
[90m at node:internal/deps/undici/undici:16416:13[39m
|
|
@@ -45,12 +46,12 @@ Browserslist: browsers data (caniuse-lite) is 7 months old. Please run:
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.browser.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 26[2mms[22m[39m
|
|
49
49
|
[90mstderr[2m | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx[2m > [22m[2mRecommendationShelf[2m > [22m[2mrenders nothing when there is an error
|
|
50
50
|
[22m[39mError fetching recommendations [90mundefined[39m boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
|
|
51
51
|
|
|
52
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
53
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.browser.test.tsx [2m([22m[2m12 tests[22m[2m)[22m[32m
|
|
52
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 141[2mms[22m[39m
|
|
53
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.browser.test.tsx [2m([22m[2m12 tests[22m[2m)[22m[32m 96[2mms[22m[39m
|
|
54
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartSidebar/CartSidebar.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 97[2mms[22m[39m
|
|
54
55
|
[90mstderr[2m | test/pages/password-protection.browser.test.tsx[2m > [22m[2mPasswordProtectionLogin[2m > [22m[2mposts the password and redirects to the requested return path
|
|
55
56
|
[22m[39mWarning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
|
|
56
57
|
|
|
@@ -88,7 +89,6 @@ act(() => {
|
|
|
88
89
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
|
|
89
90
|
at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
|
|
90
91
|
|
|
91
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/CartSidebar/CartSidebar.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 126[2mms[22m[39m
|
|
92
92
|
[90mstderr[2m | test/pages/password-protection.browser.test.tsx[2m > [22m[2mPasswordProtectionLogin[2m > [22m[2mdefaults returnTo to root and shows API validation errors
|
|
93
93
|
[22m[39mWarning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
|
|
94
94
|
|
|
@@ -137,6 +137,7 @@ act(() => {
|
|
|
137
137
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
|
|
138
138
|
at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
|
|
139
139
|
|
|
140
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/getInitialSession.browser.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
140
141
|
[90mstderr[2m | test/pages/password-protection.browser.test.tsx[2m > [22m[2mPasswordProtectionLogin[2m > [22m[2muses the fallback invalid-password message when API omits an error
|
|
141
142
|
[22m[39mWarning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
|
|
142
143
|
|
|
@@ -281,13 +282,12 @@ act(() => {
|
|
|
281
282
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act
|
|
282
283
|
at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
|
|
283
284
|
|
|
284
|
-
[32m✓[39m [30m[46m browser [49m[39m test/pages/password-protection.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[33m
|
|
285
|
-
[33m[2m✓[22m[39m renders the password protection form [33m
|
|
286
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawer.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[33m
|
|
287
|
-
[33m[2m✓[22m[39m renders the menu view with contract details and manage footer [33m
|
|
288
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/changeContractToken.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m
|
|
289
|
-
|
|
290
|
-
[90mstderr[2m | test/components/cms/RenderSections.browser.test.tsx
|
|
285
|
+
[32m✓[39m [30m[46m browser [49m[39m test/pages/password-protection.browser.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[33m 619[2mms[22m[39m
|
|
286
|
+
[33m[2m✓[22m[39m renders the password protection form [33m 351[2mms[22m[39m
|
|
287
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawer.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[33m 682[2mms[22m[39m
|
|
288
|
+
[33m[2m✓[22m[39m renders the menu view with contract details and manage footer [33m 326[2mms[22m[39m
|
|
289
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/changeContractToken.browser.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 40[2mms[22m[39m
|
|
290
|
+
[90mstderr[2m | test/sdk/localization/store-url.browser.test.ts
|
|
291
291
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
292
292
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
293
293
|
at validateCart [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/index.ts:120:9[90m)[39m
|
|
@@ -295,7 +295,7 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
295
295
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
|
|
296
296
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
297
297
|
|
|
298
|
-
[90mstderr[2m | test/
|
|
298
|
+
[90mstderr[2m | test/components/cms/RenderSections.browser.test.tsx
|
|
299
299
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
300
300
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
301
301
|
at validateCart [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/index.ts:120:9[90m)[39m
|
|
@@ -303,13 +303,13 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
303
303
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
|
|
304
304
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
305
305
|
|
|
306
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/store-url.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
307
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useAvailableContracts.browser.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
308
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/cms/RenderSections.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
309
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/templates/SearchPage/SearchWrapper.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
310
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
311
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useSwitchContract.browser.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
312
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
306
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/localization/store-url.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
307
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useAvailableContracts.browser.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 23[2mms[22m[39m
|
|
308
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/cms/RenderSections.browser.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 71[2mms[22m[39m
|
|
309
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/templates/SearchPage/SearchWrapper.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 30[2mms[22m[39m
|
|
310
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/recommendations/useRecommendationShelf.sessionFallback.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 120[2mms[22m[39m
|
|
311
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/useSwitchContract.browser.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 25[2mms[22m[39m
|
|
312
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/CartRecommendationShelf/CartRecommendationProductCard.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 42[2mms[22m[39m
|
|
313
313
|
[90mstderr[2m | test/components/account/doLogout.browser.test.ts
|
|
314
314
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
315
315
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -319,10 +319,10 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
319
319
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
320
320
|
|
|
321
321
|
[32m✓[39m [30m[46m browser [49m[39m test/components/account/doLogout.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 21[2mms[22m[39m
|
|
322
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/LocalizationButton.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
323
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountListCards.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
324
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerHeader.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
325
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerFooter.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
322
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/ui/LocalizationButton.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 40[2mms[22m[39m
|
|
323
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/sections/Account/AccountListCards.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 62[2mms[22m[39m
|
|
324
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerHeader.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 220[2mms[22m[39m
|
|
325
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/account/OrganizationDrawerFooter.browser.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 230[2mms[22m[39m
|
|
326
326
|
[90mstderr[2m | test/sdk/account/clearPersistedSessionState.browser.test.ts
|
|
327
327
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
328
328
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -331,10 +331,11 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
331
331
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
|
|
332
332
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
333
333
|
|
|
334
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/clearPersistedSessionState.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
335
|
-
[32m✓[39m [30m[46m browser [49m[39m test/utils/isLocalHost.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
336
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
337
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/bindingPaths.test.ts [2m([22m[2m71 tests[22m[2m)[22m[32m
|
|
334
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/clearPersistedSessionState.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
335
|
+
[32m✓[39m [30m[46m browser [49m[39m test/utils/isLocalHost.browser.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
336
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
337
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/bindingPaths.test.ts [2m([22m[2m71 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
338
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/password-protection-service.test.ts [2m([22m[2m22 tests[22m[2m)[22m[32m 29[2mms[22m[39m
|
|
338
339
|
[90mstderr[2m | test/sdk/account/refreshToken.browser.test.ts
|
|
339
340
|
[22m[39mError in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
|
|
340
341
|
at waitForSessionValidated [90m(/home/runner/work/faststore/faststore/packages/core/[39msrc/sdk/cart/waitForSessionValidated.ts:16:32[90m)[39m
|
|
@@ -343,13 +344,12 @@ This ensures that you're testing the behavior the user would see in the browser.
|
|
|
343
344
|
at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
|
|
344
345
|
[90m at processTicksAndRejections (node:internal/process/task_queues:103:5)[39m
|
|
345
346
|
|
|
346
|
-
[32m✓[39m [30m[46m browser [49m[39m test/components/skeletons/ProductGridSkeleton.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
347
|
-
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/refreshToken.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
348
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/password-protection-service.test.ts [2m([22m[2m22 tests[22m[2m)[22m[32m 37[2mms[22m[39m
|
|
347
|
+
[32m✓[39m [30m[46m browser [49m[39m test/components/skeletons/ProductGridSkeleton.browser.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 34[2mms[22m[39m
|
|
348
|
+
[32m✓[39m [30m[46m browser [49m[39m test/sdk/account/refreshToken.browser.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
349
349
|
[32m✓[39m [30m[43m node [49m[39m test/utils/match-url.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
350
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/useBindingSelector.test.tsx [2m([22m[2m22 tests[22m[2m)[22m[32m
|
|
351
|
-
[32m✓[39m [30m[43m node [49m[39m test/pages/api/unlock.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m
|
|
352
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/bindingSelector.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m
|
|
350
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/useBindingSelector.test.tsx [2m([22m[2m22 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
351
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/unlock.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 140[2mms[22m[39m
|
|
352
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/bindingSelector.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
353
353
|
[90mstderr[2m | test/components/search/SearchInputComponent.test.tsx
|
|
354
354
|
[22m[39mWarning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
|
|
355
355
|
|
|
@@ -413,19 +413,19 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
|
|
|
413
413
|
at Suspense
|
|
414
414
|
at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
|
|
415
415
|
|
|
416
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInputComponent.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
417
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/search/useSearchHistory.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m
|
|
418
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/cookieCacheBusting.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
416
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInputComponent.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 62[2mms[22m[39m
|
|
417
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/search/useSearchHistory.test.ts [2m([22m[2m13 tests[22m[2m)[22m[32m 38[2mms[22m[39m
|
|
418
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/cookieCacheBusting.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
419
419
|
[90mstderr[2m | test/pages/pvt/account/cards/index.test.ts[2m > [22m[2mCards page getServerSideProps[2m > [22m[2mredirects to /pvt/account/403 when the query fails with 401/403
|
|
420
420
|
[22m[39m{ extensions: { status: [33m401[39m } }
|
|
421
421
|
|
|
422
422
|
[90mstderr[2m | test/pages/pvt/account/cards/index.test.ts[2m > [22m[2mCards page getServerSideProps[2m > [22m[2mrenders the error state (no redirect) when the query fails with a non-auth status
|
|
423
423
|
[22m[39m{ extensions: { status: [33m502[39m } }
|
|
424
424
|
|
|
425
|
-
[32m✓[39m [30m[43m node [49m[39m test/pages/pvt/account/cards/index.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
425
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/pvt/account/cards/index.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
426
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/clearCookies.test.ts [2m([22m[2m20 tests[22m[2m)[22m[32m 24[2mms[22m[39m
|
|
426
427
|
[32m✓[39m [30m[43m node [49m[39m test/experimental/myAccountCmsServerSideProps.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
427
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
428
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotesTable.test.tsx [2m([22m[2m12 tests[22m[2m)[22m[33m 417[2mms[22m[39m
|
|
428
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotesTable.test.tsx [2m([22m[2m12 tests[22m[2m)[22m[33m 314[2mms[22m[39m
|
|
429
429
|
[90mstderr[2m | test/pages/api/graphql.test.ts[2m > [22m[2m/api/graphql error status propagation[2m > [22m[2mpropagates the upstream 400 from a wrapped BadRequestError instead of 500
|
|
430
430
|
[22m[39mGraphql execution returned with error: [
|
|
431
431
|
{
|
|
@@ -518,69 +518,69 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
|
|
|
518
518
|
at file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/@vitest+runner@4.0.18/node_modules/[4m@vitest/runner[24m/dist/index.js:1653:37
|
|
519
519
|
at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/[4m.pnpm[24m/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@20.19.13_jiti@2.6.1_jsdom@27.4.0_sas_13be941c57d55f08f06eeaf1c180ddfe/node_modules/[4mvitest[24m/dist/chunks/traces.CCmnQaNT.js:142:27)
|
|
520
520
|
|
|
521
|
-
[32m✓[39m [30m[43m node [49m[39m test/pages/api/graphql.test.ts [2m([22m[2m17 tests[22m[2m)[22m[32m
|
|
522
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotes.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[33m 818[2mms[22m[39m
|
|
523
|
-
[33m[2m✓[22m[39m navigates with the search term on blur [33m 359[2mms[22m[39m
|
|
524
|
-
[33m[2m✓[22m[39m navigates without a label param when the search is cleared [33m 359[2mms[22m[39m
|
|
521
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/graphql.test.ts [2m([22m[2m17 tests[22m[2m)[22m[32m 19[2mms[22m[39m
|
|
525
522
|
[90mstderr[2m | test/sdk/account/useSetPassword.test.ts[2m > [22m[2museSetPassword[2m > [22m[2mmaps wrongcredentials error responses to the existing message
|
|
526
523
|
[22m[39mSet password request failed: Bad Request
|
|
527
524
|
|
|
528
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/useSetPassword.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
525
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/useSetPassword.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 22[2mms[22m[39m
|
|
526
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/quoteFilters.test.ts [2m([22m[2m23 tests[22m[2m)[22m[32m 22[2mms[22m[39m
|
|
527
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountListQuotes.test.tsx [2m([22m[2m9 tests[22m[2m)[22m[33m 796[2mms[22m[39m
|
|
528
|
+
[33m[2m✓[22m[39m navigates with the search term on blur [33m 358[2mms[22m[39m
|
|
529
|
+
[33m[2m✓[22m[39m navigates without a label param when the search is cleared [33m 357[2mms[22m[39m
|
|
529
530
|
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryOperation.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 37[2mms[22m[39m
|
|
530
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
531
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/
|
|
532
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/
|
|
533
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
534
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
535
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
536
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
537
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
538
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
539
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
540
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntry.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
541
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m
|
|
542
|
-
[33m[2m✓[22m[39m should
|
|
543
|
-
|
|
544
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
545
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesSelectedTags.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
546
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
547
|
-
[32m✓[39m [30m[43m node [49m[39m test/proxy.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m
|
|
548
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
549
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
550
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
551
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
552
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/content/service.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
553
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
554
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/refreshToken.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
555
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLdRendering.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
531
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/multipleTemplates.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
532
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/localizeRedirectDestination.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
533
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/localization/hreflang.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
534
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getMyAccountRoutes.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
535
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntryUpload.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 38[2mms[22m[39m
|
|
536
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/redirects/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 39[2mms[22m[39m
|
|
537
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesFilterSlider.test.tsx [2m([22m[2m5 tests[22m[2m)[22m[32m 119[2mms[22m[39m
|
|
538
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLd.test.ts [2m([22m[2m17 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
539
|
+
[32m✓[39m [30m[43m node [49m[39m test/proxy.localization.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 29[2mms[22m[39m
|
|
540
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/graphql/retryPolicy.test.ts [2m([22m[2m18 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
541
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderEntry.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 30[2mms[22m[39m
|
|
542
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/index.test.ts [2m([22m[2m7 tests[22m[2m)[22m[33m 794[2mms[22m[39m
|
|
543
|
+
[33m[2m✓[22m[39m should handle options and execute [33m 376[2mms[22m[39m
|
|
544
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/session/syncSalesChannelFromOrderForm.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
545
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/analytics/useStartRecommendationSession.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 43[2mms[22m[39m
|
|
546
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesSelectedTags.test.tsx [2m([22m[2m8 tests[22m[2m)[22m[32m 69[2mms[22m[39m
|
|
547
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/webops-api.test.ts [2m([22m[2m9 tests[22m[2m)[22m[32m 16[2mms[22m[39m
|
|
548
|
+
[32m✓[39m [30m[43m node [49m[39m test/proxy.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
549
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/orderEntry/useOrderFormItems.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 30[2mms[22m[39m
|
|
550
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/cart/waitForSessionValidated.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
551
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/localization/store-url.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
552
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/cms/myAccountDefaultSections.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
553
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/content/service.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
554
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/productJsonLdRendering.test.tsx [2m([22m[2m4 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
556
555
|
[32m✓[39m [30m[43m node [49m[39m test/server/cms/global.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
557
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/
|
|
558
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
559
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
560
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
561
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
562
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
563
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInput.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
564
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
565
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/Layout.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m
|
|
566
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
567
|
-
[32m✓[39m [30m[43m node [49m[39m test/server/cms/index.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
568
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
569
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
570
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
571
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/
|
|
572
|
-
[32m✓[39m [30m[43m node [49m[39m test/
|
|
573
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/
|
|
574
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/account/OrganizationDrawerBody.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
575
|
-
[32m✓[39m [30m[43m node [49m[39m test/utils/
|
|
556
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/refreshToken.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
557
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/auth/useAuth.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 27[2mms[22m[39m
|
|
558
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuotesStatusSelector.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 112[2mms[22m[39m
|
|
559
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/getRequestHostname.test.ts [2m([22m[2m12 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
560
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/rootSpan.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 32[2mms[22m[39m
|
|
561
|
+
[32m✓[39m [30m[43m node [49m[39m test/pages/api/preview.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
562
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/search/SearchInput.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
563
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/validateSessionRefreshToken.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
564
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/Layout.test.tsx [2m([22m[2m6 tests[22m[2m)[22m[32m 58[2mms[22m[39m
|
|
565
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/vrn.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
566
|
+
[32m✓[39m [30m[43m node [49m[39m test/server/cms/index.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
567
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/retry.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 12[2mms[22m[39m
|
|
568
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/getB2BSessionClaims.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
569
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/unlockResponse.test.ts [2m([22m[2m11 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
570
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/useRecommendations.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
571
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/recommendations/useRecommendationUserId.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 176[2mms[22m[39m
|
|
572
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/isLocalHost.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
573
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/account/OrganizationDrawerBody.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 37[2mms[22m[39m
|
|
574
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/userOrderStatus.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
575
|
+
[32m✓[39m [30m[43m node [49m[39m test/utils/getCookie.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
576
576
|
[32m✓[39m [30m[43m node [49m[39m test/sdk/analytics/utils.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
577
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/auth/ProfileChallenge.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
578
|
-
[32m✓[39m [30m[43m node [49m[39m test/instrumentation.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
579
|
-
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/clearPersistedSessionState.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m
|
|
580
|
-
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuoteStatusBadge.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m
|
|
581
|
-
|
|
582
|
-
[2m Test Files [22m [1m[
|
|
583
|
-
[2m Tests [22m [1m[
|
|
584
|
-
[2m Start at [22m
|
|
585
|
-
[2m Duration [22m
|
|
577
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/auth/ProfileChallenge.test.tsx [2m([22m[2m3 tests[22m[2m)[22m[32m 32[2mms[22m[39m
|
|
578
|
+
[32m✓[39m [30m[43m node [49m[39m test/instrumentation.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
579
|
+
[32m✓[39m [30m[43m node [49m[39m test/sdk/account/clearPersistedSessionState.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
580
|
+
[32m✓[39m [30m[43m node [49m[39m test/components/quotes/MyAccountQuoteStatusBadge.test.tsx [2m([22m[2m2 tests[22m[2m)[22m[32m 19[2mms[22m[39m
|
|
581
|
+
|
|
582
|
+
[2m Test Files [22m [1m[32m98 passed[39m[22m[90m (98)[39m
|
|
583
|
+
[2m Tests [22m [1m[32m793 passed[39m[22m[90m (793)[39m
|
|
584
|
+
[2m Start at [22m 17:47:42
|
|
585
|
+
[2m Duration [22m 36.02s[2m (transform 10.49s, setup 0ms, import 32.11s, tests 11.46s, environment 45.03s)[22m
|
|
586
586
|
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.8.0-dev.7](https://github.com/vtex/faststore/compare/v4.8.0-dev.6...v4.8.0-dev.7) (2026-09-14)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- stop retrying upstream 429 responses ([#3453](https://github.com/vtex/faststore/issues/3453)) ([a142258](https://github.com/vtex/faststore/commit/a14225863578965609aa5012cc1ca9f0132959b2)), closes [#3379](https://github.com/vtex/faststore/issues/3379) [#3420](https://github.com/vtex/faststore/issues/3420) [#1629](https://github.com/vtex/faststore/issues/1629) [/github.com/vtex/faststore/pull/3453#issuecomment-5433632179](https://github.com//github.com/vtex/faststore/pull/3453/issues/issuecomment-5433632179)
|
|
11
|
+
|
|
12
|
+
# [4.8.0-dev.6](https://github.com/vtex/faststore/compare/v4.8.0-dev.5...v4.8.0-dev.6) (2026-09-11)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @faststore/core
|
|
15
|
+
|
|
6
16
|
# [4.8.0-dev.5](https://github.com/vtex/faststore/compare/v4.8.0-dev.4...v4.8.0-dev.5) (2026-09-09)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @faststore/core
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "4.8.0-dev.
|
|
3
|
+
"version": "4.8.0-dev.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
"style-loader": "^3.3.1",
|
|
72
72
|
"swr": "^2.2.5",
|
|
73
73
|
"use-sync-external-store": "^1.6.0",
|
|
74
|
-
"@faststore/
|
|
75
|
-
"@faststore/
|
|
76
|
-
"@faststore/
|
|
77
|
-
"@faststore/
|
|
78
|
-
"@faststore/
|
|
74
|
+
"@faststore/api": "4.8.0-dev.7",
|
|
75
|
+
"@faststore/diagnostics": "4.8.0-dev.7",
|
|
76
|
+
"@faststore/ui": "4.8.0-dev.7",
|
|
77
|
+
"@faststore/lighthouse": "4.8.0-dev.7",
|
|
78
|
+
"@faststore/sdk": "4.8.0-dev.7"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@cypress/code-coverage": "^3.12.1",
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const MAX_BACKOFF_EXPONENT = 8
|
|
2
|
+
const TOO_MANY_REQUESTS = 429
|
|
3
|
+
|
|
4
|
+
/** Mirrors SWR's `RevalidatorOptions`. */
|
|
5
|
+
type RetryOptions = { retryCount: number; dedupe?: boolean }
|
|
6
|
+
|
|
7
|
+
/** Mirrors the subset of SWR's resolved config that the retry policy reads. */
|
|
8
|
+
type RetryConfig = { errorRetryCount?: number; errorRetryInterval: number }
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* SWR retry policy: never retry an upstream rate limit, retry everything else
|
|
12
|
+
* exactly as SWR would.
|
|
13
|
+
*
|
|
14
|
+
* A 429 means an upstream is already shedding load, so retrying multiplies the
|
|
15
|
+
* traffic it is trying to reject. Providing `onErrorRetry` replaces SWR's
|
|
16
|
+
* default implementation entirely, so the fall-through branch mirrors
|
|
17
|
+
* swr@2.4.0's default (ceiling check plus jittered exponential backoff) to keep
|
|
18
|
+
* every other status behaving as it did before. Revisit on an SWR upgrade.
|
|
19
|
+
*
|
|
20
|
+
* SWR writes the truncation as `~~`; `Math.trunc` is used here instead because
|
|
21
|
+
* the values stay far below 2^31, where the two are equivalent.
|
|
22
|
+
*/
|
|
23
|
+
export const onErrorRetry = (
|
|
24
|
+
error: unknown,
|
|
25
|
+
_key: string,
|
|
26
|
+
config: RetryConfig,
|
|
27
|
+
revalidate: (opts: RetryOptions) => void,
|
|
28
|
+
opts: RetryOptions
|
|
29
|
+
) => {
|
|
30
|
+
if (
|
|
31
|
+
(error as { status?: number } | undefined)?.status === TOO_MANY_REQUESTS
|
|
32
|
+
) {
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const maxRetryCount = config.errorRetryCount
|
|
37
|
+
const { retryCount } = opts
|
|
38
|
+
|
|
39
|
+
const timeout =
|
|
40
|
+
Math.trunc(
|
|
41
|
+
(Math.random() + 0.5) * (1 << Math.min(retryCount, MAX_BACKOFF_EXPONENT))
|
|
42
|
+
) * config.errorRetryInterval
|
|
43
|
+
|
|
44
|
+
if (maxRetryCount !== undefined && retryCount > maxRetryCount) {
|
|
45
|
+
return
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
setTimeout(revalidate, timeout, opts)
|
|
49
|
+
}
|
|
@@ -5,6 +5,7 @@ import { getClientCacheBustingValue } from 'src/utils/cookieCacheBusting'
|
|
|
5
5
|
|
|
6
6
|
import type { Operation, RequestOptions } from './request'
|
|
7
7
|
import { request } from './request'
|
|
8
|
+
import { onErrorRetry } from './retryPolicy'
|
|
8
9
|
|
|
9
10
|
export type QueryOptions = SWRConfiguration &
|
|
10
11
|
RequestOptions & { doNotRun?: boolean }
|
|
@@ -34,6 +35,7 @@ export const DEFAULT_OPTIONS = {
|
|
|
34
35
|
revalidateOnFocus: false,
|
|
35
36
|
revalidateOnReconnect: false,
|
|
36
37
|
shouldRetryOnError: true,
|
|
38
|
+
onErrorRetry,
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
export const useQuery = <Data, Variables = Record<string, unknown>>(
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
|
2
|
+
|
|
3
|
+
import { onErrorRetry } from '../../../src/sdk/graphql/retryPolicy'
|
|
4
|
+
|
|
5
|
+
const ERROR_RETRY_INTERVAL = 5000
|
|
6
|
+
|
|
7
|
+
type RetryConfig = Parameters<typeof onErrorRetry>[2]
|
|
8
|
+
|
|
9
|
+
const createConfig = (overrides: Partial<RetryConfig> = {}): RetryConfig => ({
|
|
10
|
+
errorRetryCount: 3,
|
|
11
|
+
errorRetryInterval: ERROR_RETRY_INTERVAL,
|
|
12
|
+
...overrides,
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
// The client throws the object built by `baseRequest` in `request.ts`, which
|
|
16
|
+
// carries the HTTP status — not an Error instance.
|
|
17
|
+
const clientError = (status?: number) => ({
|
|
18
|
+
status,
|
|
19
|
+
message: 'upstream failure',
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const runRetry = ({
|
|
23
|
+
error,
|
|
24
|
+
retryCount = 0,
|
|
25
|
+
config = createConfig(),
|
|
26
|
+
}: {
|
|
27
|
+
error: unknown
|
|
28
|
+
retryCount?: number
|
|
29
|
+
config?: RetryConfig
|
|
30
|
+
}) => {
|
|
31
|
+
const revalidate = vi.fn()
|
|
32
|
+
|
|
33
|
+
onErrorRetry(error, 'a-key', config, revalidate, {
|
|
34
|
+
retryCount,
|
|
35
|
+
dedupe: false,
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
vi.runAllTimers()
|
|
39
|
+
|
|
40
|
+
return revalidate
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
describe('useQuery retry policy', () => {
|
|
44
|
+
beforeEach(() => {
|
|
45
|
+
vi.useFakeTimers()
|
|
46
|
+
// Pins SWR's jitter so the backoff assertions are deterministic.
|
|
47
|
+
vi.spyOn(Math, 'random').mockReturnValue(0.5)
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
afterEach(() => {
|
|
51
|
+
// `restoreAllMocks` must run first: the `setTimeout` spy is installed while
|
|
52
|
+
// timers are faked, so restoring it after `useRealTimers` would put the
|
|
53
|
+
// faked timer back onto `globalThis`.
|
|
54
|
+
vi.restoreAllMocks()
|
|
55
|
+
vi.useRealTimers()
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it('never retries an upstream rate limit (429)', () => {
|
|
59
|
+
expect(runRetry({ error: clientError(429) })).not.toHaveBeenCalled()
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
it('does not retry a 429 even on the first attempt of a fresh key', () => {
|
|
63
|
+
const revalidate = runRetry({ error: clientError(429), retryCount: 0 })
|
|
64
|
+
|
|
65
|
+
expect(revalidate).not.toHaveBeenCalled()
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
it.each([400, 401, 403, 404, 409, 422, 500, 502, 503])(
|
|
69
|
+
'still retries status %i',
|
|
70
|
+
(status) => {
|
|
71
|
+
expect(runRetry({ error: clientError(status) })).toHaveBeenCalledTimes(1)
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
it('still retries an error carrying no status (e.g. network failure)', () => {
|
|
76
|
+
expect(runRetry({ error: clientError(undefined) })).toHaveBeenCalledTimes(1)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it('retries while at the errorRetryCount ceiling', () => {
|
|
80
|
+
expect(
|
|
81
|
+
runRetry({ error: clientError(500), retryCount: 3 })
|
|
82
|
+
).toHaveBeenCalledTimes(1)
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
it('stops retrying once errorRetryCount is exceeded', () => {
|
|
86
|
+
expect(
|
|
87
|
+
runRetry({ error: clientError(500), retryCount: 4 })
|
|
88
|
+
).not.toHaveBeenCalled()
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
it.each([
|
|
92
|
+
[0, 1 * ERROR_RETRY_INTERVAL],
|
|
93
|
+
[2, 4 * ERROR_RETRY_INTERVAL],
|
|
94
|
+
[3, 8 * ERROR_RETRY_INTERVAL],
|
|
95
|
+
])(
|
|
96
|
+
'mirrors SWR exponential backoff for retryCount %i',
|
|
97
|
+
(retryCount, expectedTimeout) => {
|
|
98
|
+
const setTimeoutSpy = vi.spyOn(globalThis, 'setTimeout')
|
|
99
|
+
const revalidate = vi.fn()
|
|
100
|
+
|
|
101
|
+
onErrorRetry(
|
|
102
|
+
clientError(500),
|
|
103
|
+
'a-key',
|
|
104
|
+
createConfig({ errorRetryCount: 10 }),
|
|
105
|
+
revalidate,
|
|
106
|
+
{ retryCount, dedupe: false }
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
expect(setTimeoutSpy).toHaveBeenCalledWith(
|
|
110
|
+
revalidate,
|
|
111
|
+
expectedTimeout,
|
|
112
|
+
expect.objectContaining({ retryCount })
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
it('caps the backoff exponent at 8, as SWR does', () => {
|
|
118
|
+
const setTimeoutSpy = vi.spyOn(globalThis, 'setTimeout')
|
|
119
|
+
const revalidate = vi.fn()
|
|
120
|
+
|
|
121
|
+
onErrorRetry(
|
|
122
|
+
clientError(500),
|
|
123
|
+
'a-key',
|
|
124
|
+
createConfig({ errorRetryCount: 100 }),
|
|
125
|
+
revalidate,
|
|
126
|
+
{ retryCount: 12, dedupe: false }
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
expect(setTimeoutSpy).toHaveBeenCalledWith(
|
|
130
|
+
revalidate,
|
|
131
|
+
256 * ERROR_RETRY_INTERVAL,
|
|
132
|
+
expect.objectContaining({ retryCount: 12 })
|
|
133
|
+
)
|
|
134
|
+
})
|
|
135
|
+
})
|