@faststore/core 4.4.0-dev.4 → 4.4.0-dev.6

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.4.0-dev.3 generate /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.4.0-dev.5 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.4.0-dev.3 gen-types /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@4.4.0-dev.5 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.4.0-dev.3 cache-graphql /home/runner/work/faststore/faststore/packages/core
22
+ > @faststore/core@4.4.0-dev.5 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,20 +1,13 @@
1
1
 
2
- > @faststore/core@4.4.0-dev.3 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@4.4.0-dev.5 test /home/runner/work/faststore/faststore/packages/core
3
3
  > vitest run
4
4
 
5
5
 
6
6
   RUN  v4.0.7 /home/runner/work/faststore/faststore/packages/core
7
7
 
8
- ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 41ms
9
- ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 25ms
10
- ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 15ms
11
- stderr | test/sdk/localization/store-url.browser.test.ts
12
- Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
13
- at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:119:27)
14
- at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
15
- at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
16
-  at processTicksAndRejections (node:internal/process/task_queues:103:5)
17
-
8
+ ✓  browser  test/sdk/session/reconcileSessionLocale.browser.test.ts (5 tests) 23ms
9
+ ✓  browser  test/sdk/session/getInitialSession.browser.test.ts (6 tests) 65ms
10
+ ✓  browser  test/utils/isLocalHost.browser.test.ts (3 tests) 8ms
18
11
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > posts the password and redirects to the requested return path
19
12
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
20
13
 
@@ -148,6 +141,13 @@ act(() => {
148
141
  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
149
142
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
150
143
 
144
+ stderr | test/sdk/localization/store-url.browser.test.ts
145
+ Error in optimistic validation: TypeError: Cannot read properties of undefined (reading 'read')
146
+ at validateCart (/home/runner/work/faststore/faststore/packages/core/src/sdk/cart/index.ts:119:27)
147
+ at onValidate (/home/runner/work/faststore/faststore/packages/core/src/sdk/useStore.ts:18:20)
148
+ at a (/home/runner/work/faststore/faststore/packages/sdk/dist/es/index.mjs:354:23)
149
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
150
+
151
151
  stderr | test/pages/password-protection.browser.test.tsx > PasswordProtectionLogin > shows service unavailable when the response is not a login payload
152
152
  Warning: An update to PasswordProtectionLogin inside a test was not wrapped in act(...).
153
153
 
@@ -244,16 +244,16 @@ act(() => {
244
244
  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
245
245
  at PasswordProtectionLogin (/home/runner/work/faststore/faststore/packages/core/src/pages/password-protection/index.tsx:19:69)
246
246
 
247
- ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 1653ms
248
- ✓ renders the password protection form  724ms
249
- ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 14ms
250
- ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 115ms
251
- ✓  node  test/server/password-protection-service.test.ts (22 tests) 122ms
252
- ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 6ms
253
- ✓  node  test/utils/match-url.test.ts (10 tests) 30ms
254
- ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 32ms
255
- ✓  node  test/pages/api/unlock.test.ts (15 tests) 846ms
256
- ✓ returns 405 for non-POST requests  578ms
247
+ ✓  browser  test/pages/password-protection.browser.test.tsx (6 tests) 1773ms
248
+ ✓ renders the password protection form  698ms
249
+ ✓  browser  test/sdk/session/reconcileSessionLocale.disabled.browser.test.ts (1 test) 5ms
250
+ ✓  node  test/utils/localization/bindingPaths.test.ts (71 tests) 89ms
251
+ ✓  browser  test/sdk/localization/store-url.browser.test.ts (3 tests) 22ms
252
+ ✓  node  test/utils/match-url.test.ts (10 tests) 46ms
253
+ ✓  node  test/server/password-protection-service.test.ts (22 tests) 180ms
254
+ ✓  node  test/sdk/localization/bindingSelector.test.ts (18 tests) 47ms
255
+ ✓  node  test/pages/api/unlock.test.ts (15 tests) 793ms
256
+ ✓ returns 405 for non-POST requests  474ms
257
257
  stderr | test/components/search/SearchInputComponent.test.tsx
258
258
  Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
259
259
 
@@ -317,18 +317,18 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
317
317
  at Suspense
318
318
  at Wrapper (/home/runner/work/faststore/faststore/packages/core/test/components/search/SearchInputComponent.test.tsx:106:20)
319
319
 
320
- ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 379ms
321
- ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 62ms
322
- ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 289ms
323
- ✓  node  test/sdk/localization/useBindingSelector.test.tsx (12 tests) 33ms
324
- ✓  node  test/utils/clearCookies.test.ts (20 tests) 34ms
325
- ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 7ms
320
+ ✓  node  test/components/search/SearchInputComponent.test.tsx (6 tests) 318ms
321
+ ✓  node  test/sdk/localization/useBindingSelector.test.tsx (12 tests) 36ms
322
+ ✓  node  test/utils/cookieCacheBusting.test.ts (10 tests) 36ms
323
+ ✓  node  test/sdk/search/useSearchHistory.test.ts (13 tests) 194ms
324
+ ✓  node  test/utils/clearCookies.test.ts (20 tests) 65ms
325
+ ✓  node  test/utils/multipleTemplates.test.ts (8 tests) 20ms
326
+ ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 109ms
326
327
  stderr | test/sdk/account/useSetPassword.test.ts > useSetPassword > maps wrongcredentials error responses to the existing message
327
328
  Set password request failed: Bad Request
328
329
 
329
- ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 52ms
330
- ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 5ms
331
- ✓  node  test/sdk/orderEntry/useOrderEntryOperation.test.ts (8 tests) 45ms
330
+ ✓  node  test/sdk/account/useSetPassword.test.ts (6 tests) 72ms
331
+ ✓  node  test/utils/localization/localizeRedirectDestination.test.ts (11 tests) 7ms
332
332
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > propagates the upstream 400 from a wrapped BadRequestError instead of 500
333
333
  Graphql execution returned with error: [
334
334
  {
@@ -347,7 +347,6 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
347
347
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > propagates NotFoundError status
348
348
  Graphql execution returned with error: [ { message: 'nope', status: 404, type: 'NotFoundError' } ]
349
349
 
350
- ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 67ms
351
350
  stderr | test/pages/api/graphql.test.ts > /api/graphql error status propagation > propagates an unmapped upstream status (UnknownError 429)
352
351
  Graphql execution returned with error: [ { message: 'slow down', status: 429, type: 'UnknownError' } ]
353
352
 
@@ -376,30 +375,32 @@ Warning: React does not recognize the `providerProps` prop on a DOM element. If
376
375
  { message: 'bad', status: 400, type: 'BadRequestError' }
377
376
  ]
378
377
 
379
- ✓  node  test/pages/api/graphql.test.ts (10 tests) 35ms
380
- ✓  node  test/proxy.localization.test.ts (5 tests) 67ms
381
- ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 62ms
382
- ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 48ms
383
- ✓  node  test/proxy.test.ts (4 tests) 68ms
384
- ✓  node  test/server/webops-api.test.ts (9 tests) 22ms
385
- ✓  node  test/server/index.test.ts (7 tests) 877ms
386
- ✓ should return a valid merged GraphQL schema  319ms
387
- ✓  node  test/server/cms/global.test.ts (3 tests) 5ms
388
- ✓  node  test/server/content/service.test.ts (5 tests) 5ms
389
- ✓  node  test/sdk/localization/store-url.test.ts (1 test) 5ms
390
- ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 6ms
391
- ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 33ms
392
- ✓  node  test/pages/api/preview.test.ts (2 tests) 10ms
393
- ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 6ms
394
- ✓  node  test/components/search/SearchInput.test.ts (6 tests) 11ms
395
- ✓  node  test/utils/unlockResponse.test.ts (11 tests) 5ms
396
- ✓  node  test/server/cms/index.test.ts (2 tests) 8ms
378
+ ✓  node  test/pages/api/graphql.test.ts (10 tests) 20ms
379
+ ✓  node  test/sdk/orderEntry/useOrderEntryUpload.test.ts (8 tests) 46ms
380
+ ✓  node  test/proxy.localization.test.ts (5 tests) 56ms
381
+ ✓  node  test/sdk/orderEntry/useOrderEntry.test.ts (8 tests) 47ms
382
+ ✓  node  test/proxy.test.ts (4 tests) 24ms
383
+ ✓  node  test/sdk/orderEntry/useOrderFormItems.test.ts (7 tests) 25ms
384
+ ✓  node  test/server/webops-api.test.ts (9 tests) 15ms
385
+ ✓  node  test/server/index.test.ts (7 tests) 986ms
386
+ ✓ should return a valid merged GraphQL schema  320ms
387
+ ✓ should handle options and execute  417ms
388
+ ✓  node  test/server/cms/global.test.ts (3 tests) 9ms
389
+ ✓  node  test/server/content/service.test.ts (5 tests) 4ms
390
+ ✓  node  test/sdk/localization/store-url.test.ts (1 test) 3ms
391
+ ✓  node  test/utils/getRequestHostname.test.ts (12 tests) 14ms
392
+ ✓  node  test/sdk/auth/useAuth.test.ts (5 tests) 31ms
393
+ ✓  node  test/pages/api/preview.test.ts (2 tests) 8ms
394
+ ✓  node  test/utils/validateSessionRefreshToken.test.ts (6 tests) 4ms
395
+ ✓  node  test/utils/unlockResponse.test.ts (11 tests) 4ms
396
+ ✓  node  test/components/search/SearchInput.test.ts (6 tests) 8ms
397
+ ✓  node  test/server/cms/index.test.ts (2 tests) 7ms
397
398
  ✓  node  test/utils/isLocalHost.test.ts (7 tests) 5ms
398
- ✓  node  test/utils/userOrderStatus.test.ts (3 tests) 3ms
399
- ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 26ms
399
+ ✓  node  test/utils/userOrderStatus.test.ts (3 tests) 4ms
400
+ ✓  node  test/components/auth/ProfileChallenge.test.tsx (3 tests) 25ms
400
401
 
401
402
   Test Files  41 passed (41)
402
403
   Tests  378 passed (378)
403
-  Start at  14:03:48
404
-  Duration  24.51s (transform 6.83s, setup 0ms, collect 18.67s, tests 5.18s, environment 30.97s, prepare 1.05s)
404
+  Start at  14:46:22
405
+  Duration  24.83s (transform 6.68s, setup 0ms, collect 18.78s, tests 5.25s, environment 32.17s, prepare 1.07s)
405
406
 
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
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.4.0-dev.6](https://github.com/vtex/faststore/compare/v4.4.0-dev.5...v4.4.0-dev.6) (2026-07-02)
7
+
8
+ # [4.3.0](https://github.com/vtex/faststore/compare/v4.3.0-dev.8...v4.3.0) (2026-06-17)
9
+
10
+ ### Features
11
+
12
+ - graduate v4.3.0 ([#3396](https://github.com/vtex/faststore/issues/3396)) ([b489766](https://github.com/vtex/faststore/commit/b4897664c7826dcd59bfde7c3599c93259d4d11f)), closes [#3276](https://github.com/vtex/faststore/issues/3276) [#3334](https://github.com/vtex/faststore/issues/3334) [#3386](https://github.com/vtex/faststore/issues/3386) [#3380](https://github.com/vtex/faststore/issues/3380) [#3394](https://github.com/vtex/faststore/issues/3394) [#3395](https://github.com/vtex/faststore/issues/3395) [#3381](https://github.com/vtex/faststore/issues/3381) [#3379](https://github.com/vtex/faststore/issues/3379) [#3375](https://github.com/vtex/faststore/issues/3375)
13
+
14
+ # [4.4.0-dev.5](https://github.com/vtex/faststore/compare/v4.4.0-dev.4...v4.4.0-dev.5) (2026-07-01)
15
+
16
+ ### Features
17
+
18
+ - make cms-sync content-source aware (CMS + CP) ([#3406](https://github.com/vtex/faststore/issues/3406)) ([8e4e4ca](https://github.com/vtex/faststore/commit/8e4e4cab61b6e6fec05b8ae014e4ed2298028b92)), closes [#5c1a1](https://github.com/vtex/faststore/issues/5c1a1) [#ff6b6](https://github.com/vtex/faststore/issues/ff6b6) [#3a0d0](https://github.com/vtex/faststore/issues/3a0d0) [#ff6b6](https://github.com/vtex/faststore/issues/ff6b6) [#10391](https://github.com/vtex/faststore/issues/10391) [#3ddc84](https://github.com/vtex/faststore/issues/3ddc84) [#1](https://github.com/vtex/faststore/issues/1) [#14](https://github.com/vtex/faststore/issues/14) [#15](https://github.com/vtex/faststore/issues/15) [#18](https://github.com/vtex/faststore/issues/18)
19
+
6
20
  # [4.4.0-dev.4](https://github.com/vtex/faststore/compare/v4.4.0-dev.3...v4.4.0-dev.4) (2026-06-30)
7
21
 
8
22
  ### Features
package/README.md CHANGED
@@ -124,6 +124,21 @@ vtex content split-content-types -i cms/faststore/content-types.json -s cms/fast
124
124
  ```
125
125
 
126
126
  IMPORTANT: The Faststore Core Team is the only one that needs to add the -l base.jsonc to the output. Merchants will automatically use the base from the Schema Registry.
127
+
128
+ **Store developers:** set `contentSource: { type: 'CP' }` in `discovery.config.js`, place custom schemas under `cms/faststore/components/` and/or `cms/faststore/pages/`, then run:
129
+
130
+ ```sh
131
+ yarn cms-sync
132
+ ```
133
+
134
+ `cms-sync` detects the content source automatically — in CP mode it generates the schema from your customizations and uploads it to the Schema Registry. Use `--dry-run` to generate locally without uploading.
135
+
136
+ Before running anything in CP mode, `cms-sync` checks that the `vtex` toolbelt is installed and that you are logged into your store's account (`api.storeId` in `discovery.config.js`); otherwise it stops with a hint to run `vtex login <account>` / `vtex switch <account>`. The toolbelt is interactive: `generate-schema` asks you to confirm when one of your definitions overrides a base one, and `upload-schema` asks for the version to publish — answer the prompts in your terminal.
137
+
138
+ If `experimental.enableFaststoreMyAccount` is enabled, `cms-sync` also merges the core My Account schemas (shipped in `@faststore/core`) into the generated schema. These schemas are intentionally excluded from the published base schema (so they are not in the Schema Registry). The command performs a file-level merge of the core My Account JSONC with your own `cms/faststore/{components,pages}` into a temporary staging directory under your store's `.faststore/` (your files override core on name collision), runs a single `generate-schema`/`upload-schema` over it, announces the merge, and removes the staging directory afterwards.
139
+
140
+ **FastStore Core team** (publishing the base schema with the core layer):
141
+
127
142
  2. Generate the schema:
128
143
  ```sh
129
144
  vtex content generate-schema cms/faststore/components cms/faststore/pages -l cms/faststore/base.jsonc -o cms/faststore/schema.json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "4.4.0-dev.4",
3
+ "version": "4.4.0-dev.6",
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/diagnostics": "4.4.0-dev.4",
75
- "@faststore/lighthouse": "4.4.0-dev.4",
76
- "@faststore/api": "4.4.0-dev.4",
77
- "@faststore/sdk": "4.4.0-dev.4",
78
- "@faststore/ui": "4.4.0-dev.4"
74
+ "@faststore/diagnostics": "4.4.0-dev.6",
75
+ "@faststore/sdk": "4.4.0-dev.6",
76
+ "@faststore/lighthouse": "4.4.0-dev.6",
77
+ "@faststore/ui": "4.4.0-dev.6",
78
+ "@faststore/api": "4.4.0-dev.6"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@cypress/code-coverage": "^3.12.1",
@@ -1,5 +1,5 @@
1
- import { useState, useCallback } from 'react'
2
1
  import fetch from 'isomorphic-unfetch'
2
+ import { useCallback, useState } from 'react'
3
3
  import { buildFormData } from 'src/utils/utilities'
4
4
  import config from '../../../discovery.config'
5
5