@faststore/core 4.6.0-dev.0 → 4.6.0-dev.1

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,9 +1,9 @@
1
1
 
2
- > @faststore/core@4.5.1-dev.4 generate /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.6.0-dev.0 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.5.1-dev.4 gen-types /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@4.6.0-dev.0 gen-types /home/runner/work/faststore/faststore/packages/core
7
7
  > node ../cli/bin/run generate-types .
8
8
 
9
9
  [STARTED] Parse Configuration
@@ -19,7 +19,7 @@
19
19
  [COMPLETED] Generate to /home/runner/work/faststore/faststore/packages/core/@generated/
20
20
  [COMPLETED] Generate outputs
21
21
 
22
- > @faststore/core@4.5.1-dev.4 cache-graphql /home/runner/work/faststore/faststore/packages/core
22
+ > @faststore/core@4.6.0-dev.0 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
@@ -1,11 +1,12 @@
1
1
 
2
- > @faststore/core@4.5.1-dev.4 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.6.0-dev.0 test /home/runner/work/faststore/faststore/packages/core
3
3
  > vitest run
4
4
 
5
5
 
6
6
   RUN  v4.0.18 /home/runner/work/faststore/faststore/packages/core
7
7
 
8
- ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 36ms
8
+ Not implemented: navigation to another Document
9
+ Not implemented: navigation to another Document
9
10
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx
10
11
  Error in optimistic validation: TypeError: Failed to parse URL from /api/graphql?operationName=ValidateCartMutation&operationHash=8199d03debb0a6751ec53d8ee8987b78d0292acb
11
12
   at node:internal/deps/undici/undici:16416:13
@@ -35,12 +36,18 @@
35
36
  Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
36
37
  npx update-browserslist-db@latest
37
38
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
39
+ ✓  browser  test/sdk/ui/useScrollRestoration.browser.test.ts (43 tests) 1055ms
38
40
  stderr | test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx > RecommendationShelf > renders nothing when there is an error
39
41
  Error fetching recommendations undefined boom for campaign vrn:recommendations:acc:rec-top-items-v2:campaign-1
40
42
 
41
- ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 283ms
42
- ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (13 tests) 2139ms
43
- ✓ shows an error state when the list fails to load  585ms
43
+ ✓  browser  test/components/RecommendationShelf/RecommendationShelf.browser.test.tsx (8 tests) 209ms
44
+ ✓  browser  test/components/account/ContractSwitcher.browser.test.tsx (13 tests) 2760ms
45
+ ✓ shows an error state when the list fails to load  743ms
46
+ ✓ requires selecting a contract before Confirm is enabled, then switches (REQ-03)  391ms
47
+ ✓ does not reload when the switch returns false  308ms
48
+ ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 63ms
49
+ ✓  browser  test/components/ui/ProductGallery/GalleryPageHeightLock.browser.test.tsx (8 tests) 252ms
50
+ ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 26ms
44
51
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > posts the password and redirects to the requested return path
45
52
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
46
53
 
@@ -270,12 +277,11 @@ act(() => {
270
277
  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
271
278
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
272
279
 
273
- ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 1851ms
274
- ✓ renders the password protection form  789ms
275
- ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 29ms
276
- ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 80ms
277
- ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (5 tests) 1109ms
278
- ✓ renders the menu view with contract details and manage footer  577ms
280
+ ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 1700ms
281
+ ✓ renders the password protection form  845ms
282
+ ✓  browser  test/components/account/OrganizationDrawer.browser.test.tsx (5 tests) 1546ms
283
+ ✓ renders the menu view with contract details and manage footer  853ms
284
+ ✓  browser  test/sdk/account/changeContractToken.browser.test.ts (9 tests) 112ms
279
285
  stderr | test/sdk/localization/store-url.browser.test.ts
280
286
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
281
287
  at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:121:27)
@@ -283,9 +289,10 @@ This ensures that you're testing the behavior the user would see in the browser.
283
289
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
284
290
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
285
291
 
286
- ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 17ms
287
- ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (4 tests) 119ms
288
- ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 74ms
292
+ ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 10ms
293
+ ✓  browser  test/sdk/account/useAvailableContracts.browser.test.ts (6 tests) 41ms
294
+ ✓  browser  test/components/templates/SearchPage/SearchWrapper.browser.test.tsx (3 tests) 38ms
295
+ ✓  browser  test/sdk/account/useSwitchContract.browser.test.ts (4 tests) 43ms
289
296
  stderr | test/components/account/doLogout.browser.test.ts
290
297
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
291
298
  at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:121:27)
@@ -293,9 +300,8 @@ This ensures that you're testing the behavior the user would see in the browser.
293
300
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
294
301
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
295
302
 
296
- ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 31ms
297
- ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (3 tests) 251ms
298
- ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (3 tests) 306ms
303
+ ✓  browser  test/components/account/doLogout.browser.test.ts (1 test) 18ms
304
+ ✓  browser  test/components/account/OrganizationDrawerHeader.browser.test.tsx (3 tests) 295ms
299
305
  stderr | test/sdk/account/clearPersistedSessionState.browser.test.ts
300
306
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
301
307
  at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:121:27)
@@ -303,12 +309,11 @@ This ensures that you're testing the behavior the user would see in the browser.
303
309
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
304
310
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
305
311
 
312
+ ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (1 test) 8ms
313
+ ✓  browser  test/components/account/OrganizationDrawerFooter.browser.test.tsx (3 tests) 255ms
306
314
  ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 5ms
307
- ✓  browser  test/sdk/account/clearPersistedSessionState.browser.test.ts (1 test) 7ms
308
315
  ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 3ms
309
- ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 27ms
310
- ✓  node  test/server/password-protection-service.test.ts (22 tests) 35ms
311
- ✓  node  test/utils/match-url.test.ts (10 tests) 9ms
316
+ ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 29ms
312
317
  stderr | test/sdk/account/refreshToken.browser.test.ts
313
318
  Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
314
319
  at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:121:27)
@@ -316,10 +321,13 @@ This ensures that you're testing the behavior the user would see in the browser.
316
321
  at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
317
322
   at processTicksAndRejections (node:internal/process/task_queues:103:5)
318
323
 
319
- ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 13ms
320
- ✓  browser  test/sdk/account/refreshToken.browser.test.ts (1 test) 5ms
321
- ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 10ms
322
- ✓  node  test/pages/api/unlock.test.ts (15 tests) 147ms
324
+ ✓  browser  test/sdk/account/refreshToken.browser.test.ts (1 test) 4ms
325
+ ✓  browser  test/components/skeletons/ProductGridSkeleton.browser.test.tsx (2 tests) 48ms
326
+ ✓  node  test/server/password-protection-service.test.ts (22 tests) 38ms
327
+ ✓  node  test/utils/match-url.test.ts (10 tests) 10ms
328
+ ✓  node  test/sdk/localization/useBindingSelector.test.tsx (22 tests) 14ms
329
+ ✓  node  test/pages/api/unlock.test.ts (15 tests) 284ms
330
+ ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 11ms
323
331
  stderr | test/components/search/SearchInputComponent.test.tsx
324
332
  Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
325
333
 
@@ -383,12 +391,11 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
383
391
  at Suspense
384
392
  at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
385
393
 
386
- ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 84ms
387
- ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 9ms
388
- ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 54ms
389
- ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 10ms
390
- ✓  node  test/utils/clearCookies.test.ts (20 tests) 29ms
391
- ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 386ms
394
+ ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 63ms
395
+ ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 11ms
396
+ ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 63ms
397
+ ✓  node  test/experimental/myAccountCmsServerSideProps.test.ts (5 tests) 11ms
398
+ ✓  node  test/utils/clearCookies.test.ts (20 tests) 23ms
392
399
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > propagates the upstream 400 from a wrapped BadRequestError instead of 500
393
400
  Graphql execution returned with error: [
394
401
  {
@@ -481,61 +488,62 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
481
488
  at file:///home/runner/work/faststore/faststore/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:1653:37
482
489
  at Traces.$ (file:///home/runner/work/faststore/faststore/node_modules/.pnpm/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/vitest/dist/chunks/traces.CCmnQaNT.js:142:27)
483
490
 
484
- ✓  node  test/pages/api/graphql.test.ts (17 tests) 20ms
491
+ ✓  node  test/pages/api/graphql.test.ts (17 tests) 39ms
492
+ ✓  node  test/components/quotes/MyAccountListQuotesTable.test.tsx (12 tests) 424ms
493
+ ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 847ms
494
+ ✓ navigates with the search term on blur  363ms
495
+ ✓ navigates without a label param when the search is cleared  357ms
485
496
  stderr | test/sdk/account/useSetPassword.test.ts > useSetPassword > maps wrongcredentials error responses to the existing message
486
497
  Set password request failed: Bad Request
487
498
 
488
- ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 29ms
489
- ✓  node  test/components/quotes/MyAccountListQuotes.test.tsx (9 tests) 842ms
490
- ✓ navigates with the search term on blur  362ms
491
- ✓ navigates without a label param when the search is cleared  364ms
492
- ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 35ms
493
- ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 6ms
494
- ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 30ms
495
- ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 5ms
496
- ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 71ms
497
- ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (5 tests) 125ms
498
- ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 45ms
499
- ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 40ms
500
- ✓  node  test/proxy.localization.test.ts (5 tests) 45ms
501
- ✓  node  test/server/index.test.ts (7 tests) 830ms
502
- ✓ should handle options and execute  313ms
503
- ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (10 tests) 9ms
504
- ✓  node  test/proxy.test.ts (4 tests) 14ms
505
- ✓  node  test/server/webops-api.test.ts (9 tests) 15ms
506
- ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 46ms
499
+ ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 32ms
500
+ ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 41ms
501
+ ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 7ms
502
+ ✓  node  test/components/quotes/quoteFilters.test.ts (23 tests) 28ms
503
+ ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 6ms
504
+ ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 54ms
505
+ ✓  node  test/components/quotes/MyAccountQuotesFilterSlider.test.tsx (5 tests) 198ms
506
+ ✓  node  test/sdk/analytics/useStartRecommendationSession.test.ts (6 tests) 51ms
507
+ ✓  node  test/server/index.test.ts (7 tests) 809ms
508
+ ✓ should return a valid merged GraphQL schema  315ms
509
+ ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 42ms
510
+ ✓  node  test/sdk/account/getMyAccountRoutes.test.ts (10 tests) 7ms
511
+ ✓  node  test/proxy.localization.test.ts (5 tests) 49ms
512
+ ✓  node  test/proxy.test.ts (4 tests) 21ms
513
+ ✓  node  test/server/webops-api.test.ts (9 tests) 14ms
507
514
  ✓  node  test/server/content/service.test.ts (5 tests) 5ms
508
- ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 103ms
515
+ ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 46ms
516
+ ✓  node  test/components/quotes/MyAccountQuotesSelectedTags.test.tsx (8 tests) 112ms
509
517
  ✓  node  test/sdk/account/refreshToken.test.ts (5 tests) 9ms
510
- ✓  node  test/server/cms/global.test.ts (3 tests) 5ms
518
+ ✓  node  test/server/cms/global.test.ts (3 tests) 6ms
511
519
  ✓  node  test/sdk/localization/store-url.test.ts (1 test) 4ms
512
- ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 27ms
513
- ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (6 tests) 120ms
514
- ✓  node  test/sdk/analytics/hasEnabledRecommendationShelf.test.ts (6 tests) 5ms
515
- ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 7ms
516
- ✓  node  test/pages/api/preview.test.ts (2 tests) 9ms
517
- ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 5ms
518
- ✓  node  test/server/rootSpan.test.ts (4 tests) 31ms
519
- ✓  node  test/components/search/SearchInput.test.ts (6 tests) 8ms
520
- ✓  node  test/components/RecommendationShelf/vrn.test.ts (5 tests) 4ms
520
+ ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 29ms
521
+ ✓  node  test/sdk/analytics/hasEnabledRecommendationShelf.test.ts (6 tests) 4ms
522
+ ✓  node  test/components/quotes/MyAccountQuotesStatusSelector.test.tsx (6 tests) 143ms
523
+ ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 8ms
524
+ ✓  node  test/pages/api/preview.test.ts (2 tests) 11ms
525
+ ✓  node  test/components/search/SearchInput.test.ts (6 tests) 6ms
526
+ ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 6ms
527
+ ✓  node  test/server/rootSpan.test.ts (4 tests) 39ms
528
+ ✓  node  test/components/RecommendationShelf/vrn.test.ts (5 tests) 7ms
521
529
  ✓  node  test/server/cms/index.test.ts (2 tests) 6ms
522
- ✓  node  test/utils/retry.test.ts (5 tests) 13ms
523
- ✓  node  test/components/account/Layout.test.tsx (4 tests) 39ms
524
- ✓  node  test/components/RecommendationShelf/useRecommendationUserId.test.ts (4 tests) 193ms
525
- ✓  node  test/utils/unlockResponse.test.ts (11 tests) 4ms
526
- ✓  node  test/server/cms/myAccountDefaultSections.test.ts (5 tests) 5ms
527
- ✓  node  test/components/RecommendationShelf/useRecommendations.test.ts (2 tests) 5ms
530
+ ✓  node  test/utils/retry.test.ts (5 tests) 19ms
531
+ ✓  node  test/components/account/Layout.test.tsx (4 tests) 42ms
532
+ ✓  node  test/components/RecommendationShelf/useRecommendationUserId.test.ts (4 tests) 183ms
533
+ ✓  node  test/utils/unlockResponse.test.ts (11 tests) 6ms
534
+ ✓  node  test/server/cms/myAccountDefaultSections.test.ts (5 tests) 4ms
535
+ ✓  node  test/components/RecommendationShelf/useRecommendations.test.ts (2 tests) 4ms
528
536
  ✓  node  test/utils/isLocalHost.test.ts (7 tests) 6ms
529
- ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 39ms
537
+ ✓  node  test/components/account/OrganizationDrawerBody.test.tsx (3 tests) 42ms
530
538
  ✓  node  test/utils/userOrderStatus.test.ts (3 tests) 4ms
531
- ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 3ms
532
- ✓  node  test/instrumentation.test.ts (3 tests) 6ms
533
- ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 27ms
539
+ ✓  node  test/sdk/analytics/utils.test.ts (2 tests) 4ms
540
+ ✓  node  test/instrumentation.test.ts (3 tests) 7ms
541
+ ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 33ms
534
542
  ✓  node  test/sdk/account/clearPersistedSessionState.test.ts (1 test) 12ms
535
- ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 22ms
543
+ ✓  node  test/components/quotes/MyAccountQuoteStatusBadge.test.tsx (2 tests) 25ms
536
544
 
537
-  Test Files  75 passed (75)
538
-  Tests  584 passed (584)
539
-  Start at  22:51:57
540
-  Duration  33.94s (transform 8.01s, setup 0ms, import 27.87s, tests 10.10s, environment 44.06s)
545
+  Test Files  79 passed (79)
546
+  Tests  640 passed (640)
547
+  Start at  23:16:25
548
+  Duration  41.03s (transform 8.89s, setup 0ms, import 34.03s, tests 12.55s, environment 53.93s)
541
549
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
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.6.0-dev.1](https://github.com/vtex/faststore/compare/v4.6.0-dev.0...v4.6.0-dev.1) (2026-08-11)
7
+
8
+ ## [4.5.1](https://github.com/vtex/faststore/compare/v4.5.1-dev.4...v4.5.1) (2026-08-11)
9
+
10
+ ### Bug Fixes
11
+
12
+ - **core:** address scroll restoration review feedback ([a5fe6a3](https://github.com/vtex/faststore/commit/a5fe6a35c54e6095f81c7995a815ce6ef3b4dd4e))
13
+ - **core:** align beforePopState callback with NextHistoryState ([10719e5](https://github.com/vtex/faststore/commit/10719e5eca199385d9fe18bdd6d7da290716a1d5))
14
+ - **core:** compare window to undefined directly for Sonar ([bf05a54](https://github.com/vtex/faststore/commit/bf05a54bb014d120b7bdc95ff7c01a4e9b35b485))
15
+ - **core:** harden scroll restore path matching and hydration-safe heights ([34efa6b](https://github.com/vtex/faststore/commit/34efa6bda7549895a4531277c2fe55bd6bbe98a7))
16
+ - **core:** hash gallery height keys to avoid truncation collisions ([9e98043](https://github.com/vtex/faststore/commit/9e980438d74e457fa33aa77900438339463a078c))
17
+ - **core:** prevent IS redirect hang and improve scroll restoration ([5f30778](https://github.com/vtex/faststore/commit/5f30778161eec2e4381b3fe971479dd7cbe53b08))
18
+ - **core:** reset infinite scroll on forward listing navigations ([249226a](https://github.com/vtex/faststore/commit/249226a3acbe4cb26d687cf962125b2593d5949e))
19
+ - **core:** resolve Sonar new-code smells for scroll restoration ([59b41ed](https://github.com/vtex/faststore/commit/59b41ed1d2a30ba693726b19895a0279eb1ba464))
20
+ - **core:** restore PLP infinite-scroll pages on back navigation ([92b2efa](https://github.com/vtex/faststore/commit/92b2efa1d4d0895a10b5a0e71a4d9bf37cae1686))
21
+ - **core:** resync gallery height lock when children change ([5058089](https://github.com/vtex/faststore/commit/50580898d97baf800b97c8a876f7967529859c61))
22
+ - **core:** satisfy Sonar on gallery height key hash ([3a6ce47](https://github.com/vtex/faststore/commit/3a6ce47485c26be75d6d76906df3af64c9e34fd6))
23
+ - **core:** type scroll restore paint timer for DOM/Node setTimeout ([940c903](https://github.com/vtex/faststore/commit/940c90376f8d2eb77665e73a6fb0ea53c9786c8e))
24
+ - **core:** use replaceAll for infinite-scroll session key ([4f52048](https://github.com/vtex/faststore/commit/4f520482a9ba9661782fcf25a286b8f2e6c6b922))
25
+
6
26
  # [4.6.0-dev.0](https://github.com/vtex/faststore/compare/v4.5.1-dev.4...v4.6.0-dev.0) (2026-08-11)
7
27
 
8
28
  ### Features
@@ -23,6 +43,22 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
23
43
  - **core:** remove duplicated twitter meta tag ([f388288](https://github.com/vtex/faststore/commit/f388288731ff75fceedba3cd7449ef1088b0b0c2))
24
44
  - **metaTags:** add twitter meta tags to nextSeo ([9c2439b](https://github.com/vtex/faststore/commit/9c2439b4a668dd81b7bfe5bdc44df575725067ec))
25
45
 
46
+ ## [4.5.1](https://github.com/vtex/faststore/compare/v4.5.1-dev.2...v4.5.1) (2026-08-11)
47
+
48
+ - **core:** address scroll restoration review feedback ([a5fe6a3](https://github.com/vtex/faststore/commit/a5fe6a35c54e6095f81c7995a815ce6ef3b4dd4e))
49
+ - **core:** align beforePopState callback with NextHistoryState ([10719e5](https://github.com/vtex/faststore/commit/10719e5eca199385d9fe18bdd6d7da290716a1d5))
50
+ - **core:** compare window to undefined directly for Sonar ([bf05a54](https://github.com/vtex/faststore/commit/bf05a54bb014d120b7bdc95ff7c01a4e9b35b485))
51
+ - **core:** harden scroll restore path matching and hydration-safe heights ([34efa6b](https://github.com/vtex/faststore/commit/34efa6bda7549895a4531277c2fe55bd6bbe98a7))
52
+ - **core:** hash gallery height keys to avoid truncation collisions ([9e98043](https://github.com/vtex/faststore/commit/9e980438d74e457fa33aa77900438339463a078c))
53
+ - **core:** prevent IS redirect hang and improve scroll restoration ([5f30778](https://github.com/vtex/faststore/commit/5f30778161eec2e4381b3fe971479dd7cbe53b08))
54
+ - **core:** reset infinite scroll on forward listing navigations ([249226a](https://github.com/vtex/faststore/commit/249226a3acbe4cb26d687cf962125b2593d5949e))
55
+ - **core:** resolve Sonar new-code smells for scroll restoration ([59b41ed](https://github.com/vtex/faststore/commit/59b41ed1d2a30ba693726b19895a0279eb1ba464))
56
+ - **core:** restore PLP infinite-scroll pages on back navigation ([92b2efa](https://github.com/vtex/faststore/commit/92b2efa1d4d0895a10b5a0e71a4d9bf37cae1686))
57
+ - **core:** resync gallery height lock when children change ([5058089](https://github.com/vtex/faststore/commit/50580898d97baf800b97c8a876f7967529859c61))
58
+ - **core:** satisfy Sonar on gallery height key hash ([3a6ce47](https://github.com/vtex/faststore/commit/3a6ce47485c26be75d6d76906df3af64c9e34fd6))
59
+ - **core:** type scroll restore paint timer for DOM/Node setTimeout ([940c903](https://github.com/vtex/faststore/commit/940c90376f8d2eb77665e73a6fb0ea53c9786c8e))
60
+ - **core:** use replaceAll for infinite-scroll session key ([4f52048](https://github.com/vtex/faststore/commit/4f520482a9ba9661782fcf25a286b8f2e6c6b922))
61
+
26
62
  ## [4.5.1-dev.2](https://github.com/vtex/faststore/compare/v4.5.1-dev.1...v4.5.1-dev.2) (2026-08-04)
27
63
 
28
64
  **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.6.0-dev.0",
3
+ "version": "4.6.0-dev.1",
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/api": "4.6.0-dev.0",
75
- "@faststore/diagnostics": "4.6.0-dev.0",
76
- "@faststore/lighthouse": "4.6.0-dev.0",
77
- "@faststore/sdk": "4.6.0-dev.0",
78
- "@faststore/ui": "4.6.0-dev.0"
74
+ "@faststore/api": "4.6.0-dev.1",
75
+ "@faststore/ui": "4.6.0-dev.1",
76
+ "@faststore/lighthouse": "4.6.0-dev.1",
77
+ "@faststore/diagnostics": "4.6.0-dev.1",
78
+ "@faststore/sdk": "4.6.0-dev.1"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@cypress/code-coverage": "^3.12.1",
@@ -94,6 +94,7 @@ function ProductGrid({
94
94
  <ProductGridSkeleton
95
95
  aspectRatio={aspectRatio}
96
96
  loading={products.length === 0}
97
+ count={pageSize}
97
98
  >
98
99
  <UIProductGrid
99
100
  data-af-element={searchId && 'search-result'}
@@ -7,16 +7,19 @@ import ProductCardSkeleton from '../ProductCardSkeleton'
7
7
  interface ProductGridSkeletonProps {
8
8
  loading?: boolean
9
9
  aspectRatio?: number
10
+ /** How many placeholder cards to render — defaults to the global ITEMS_PER_PAGE. */
11
+ count?: number
10
12
  }
11
13
 
12
14
  function ProductGridSkeleton({
13
15
  children,
14
16
  aspectRatio,
15
17
  loading = true,
18
+ count = ITEMS_PER_PAGE,
16
19
  }: PropsWithChildren<ProductGridSkeletonProps>) {
17
20
  return loading ? (
18
21
  <ul data-fs-product-grid>
19
- {Array.from({ length: ITEMS_PER_PAGE }, (_, index) => (
22
+ {Array.from({ length: count }, (_, index) => (
20
23
  <li key={String(index)}>
21
24
  <ProductCardSkeleton aspectRatio={aspectRatio} bordered />
22
25
  </li>
@@ -1,3 +1,4 @@
1
+ import { useEffect, useRef } from 'react'
1
2
  import { useSearch } from '@faststore/sdk'
2
3
  import { useRouter } from 'next/router'
3
4
 
@@ -40,6 +41,19 @@ export default function SearchWrapper({
40
41
  selectedFacets,
41
42
  })
42
43
 
44
+ const redirectUrl = pageProductGalleryData?.redirect?.url
45
+ const lastRedirectedUrl = useRef<string | null>(null)
46
+
47
+ // Intelligent Search redirects must run in an effect — calling router.replace
48
+ // during render re-fires on every state update (e.g. scrollRestoration's
49
+ // resetInfiniteScroll) and loops until the tab hangs.
50
+ useEffect(() => {
51
+ if (!redirectUrl || lastRedirectedUrl.current === redirectUrl) return
52
+
53
+ lastRedirectedUrl.current = redirectUrl
54
+ void router.replace(redirectUrl)
55
+ }, [redirectUrl, router])
56
+
43
57
  const emptySearchProps = storeConfig.experimental.enableSearchSSR
44
58
  ? {
45
59
  title: storeConfig.seo.search.bodyH1 ?? 'Showing results for:',
@@ -58,11 +72,7 @@ export default function SearchWrapper({
58
72
  }
59
73
 
60
74
  // Redirect when there are registered Intelligent Search redirects on VTEX Admin
61
- if (pageProductGalleryData?.redirect?.url) {
62
- router.replace(pageProductGalleryData?.redirect?.url, null, {
63
- shallow: true,
64
- })
65
-
75
+ if (redirectUrl) {
66
76
  return (
67
77
  <PageProvider context={{ globalSettings }}>
68
78
  <RenderSections globalSections={globalSections}>