@faststore/core 3.96.4-dev.0 → 3.96.5
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +21 -21
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/83.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/api/graphql.js +3 -3
- package/.next/server/pages/en-US/404.html +1 -1
- package/.next/server/pages/en-US/500.html +1 -1
- package/.next/server/pages/en-US/checkout.html +1 -1
- package/.next/server/pages/en-US/login.html +1 -1
- package/.next/server/pages/en-US/s.html +1 -1
- package/.next/server/pages/en-US.html +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/chunks/{83.f765ce2ffc1915be.js → 83.98ce246c274ee7e4.js} +1 -1
- package/.next/static/chunks/{webpack-5ac0858ff0030797.js → webpack-b258ad8e93314030.js} +1 -1
- package/.next/trace +139 -139
- package/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-test.log +5 -5
- package/CHANGELOG.md +9 -7
- package/package.json +7 -7
- package/src/components/search/Filter/FilterSlider.tsx +3 -1
- package/src/pages/api/graphql.ts +83 -18
- /package/.next/static/{iASZ3lkWoTXpcEiPm4xkW → C2KW247EGkiOer_CZhGSH}/_buildManifest.js +0 -0
- /package/.next/static/{iASZ3lkWoTXpcEiPm4xkW → C2KW247EGkiOer_CZhGSH}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.96.
|
|
2
|
+
> @faststore/core@3.96.4 prebuild /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> na run partytown && na run generate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@3.96.
|
|
6
|
+
> @faststore/core@3.96.4 partytown /home/runner/work/faststore/faststore/packages/core
|
|
7
7
|
> partytown copylib ./public/~partytown
|
|
8
8
|
|
|
9
9
|
Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
|
|
10
10
|
|
|
11
|
-
> @faststore/core@3.96.
|
|
11
|
+
> @faststore/core@3.96.4 generate /home/runner/work/faststore/faststore/packages/core
|
|
12
12
|
> na run generate:schema && na run generate:codegen && na run format:generated
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
> @faststore/core@3.96.
|
|
15
|
+
> @faststore/core@3.96.4 generate:schema /home/runner/work/faststore/faststore/packages/core
|
|
16
16
|
> tsx src/server/generator/generateGraphQLSchemaFile.ts
|
|
17
17
|
|
|
18
18
|
Schema GraphQL file generated successfully
|
|
19
19
|
|
|
20
|
-
> @faststore/core@3.96.
|
|
20
|
+
> @faststore/core@3.96.4 generate:codegen /home/runner/work/faststore/faststore/packages/core
|
|
21
21
|
> graphql-codegen
|
|
22
22
|
|
|
23
23
|
[STARTED] Parse Configuration
|
|
@@ -37,11 +37,11 @@ Running lifecycle hook "afterStart" scripts...
|
|
|
37
37
|
[CLI] Loading Documents
|
|
38
38
|
[CLI] Generating output
|
|
39
39
|
|
|
40
|
-
> @faststore/core@3.96.
|
|
40
|
+
> @faststore/core@3.96.4 format:generated /home/runner/work/faststore/faststore/packages/core
|
|
41
41
|
> prettier --write "@generated/**/*.{ts,js,tsx,jsx,json}" --loglevel error
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
> @faststore/core@3.96.
|
|
44
|
+
> @faststore/core@3.96.4 build /home/runner/work/faststore/faststore/packages/core
|
|
45
45
|
> next build
|
|
46
46
|
|
|
47
47
|
⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
|
|
@@ -58,7 +58,7 @@ Browserslist: caniuse-lite is outdated. Please run:
|
|
|
58
58
|
Creating an optimized production build ...
|
|
59
59
|
Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc.js" https://nextjs.org/docs/messages/swc-disabled
|
|
60
60
|
Using external babel configuration from /home/runner/work/faststore/faststore/packages/core/.babelrc.js
|
|
61
|
-
Browserslist: browsers data (caniuse-lite) is
|
|
61
|
+
Browserslist: browsers data (caniuse-lite) is 13 months old. Please run:
|
|
62
62
|
npx update-browserslist-db@latest
|
|
63
63
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
64
64
|
<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'Compilation/modules|/home/runner/work/faststore/faststore/node_modules/.pnpm/next@13.5.11_@babel+core@7.26.7_@opentelemetry+api@1.4.1_react-dom@18.3.1_react@18.3.1__react@18.3.1_sass@1.83.4/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[7].oneOf[9].use[1]!/home/runner/work/faststore/faststore/node_modules/.pnpm/next@13.5.11_@babel+core@7.26.7_@opentelemetry+api@1.4.1_react-dom@18.3.1_react@18.3.1__react@18.3.1_sass@1.83.4/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[7].oneOf[9].use[2]!/home/runner/work/faststore/faststore/node_modules/.pnpm/next@13.5.11_@babel+core@7.26.7_@opentelemetry+api@1.4.1_react-dom@18.3.1_react@18.3.1__react@18.3.1_sass@1.83.4/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/index.js??ruleSet[1].rules[7].oneOf[9].use[3]!/home/runner/work/faststore/faststore/node_modules/.pnpm/next@13.5.11_@babel+core@7.26.7_@opentelemetry+api@1.4.1_react-dom@18.3.1_react@18.3.1__react@18.3.1_sass@1.83.4/node_modules/next/dist/compiled/sass-loader/cjs.js??ruleSet[1].rules[7].oneOf[9].use[4]!/home/runner/work/faststore/faststore/packages/core/src/components/common/Toast/section.module.scss': No serializer registered for Warning
|
|
@@ -80,8 +80,8 @@ Import trace for requested module:
|
|
|
80
80
|
Collecting page data ...
|
|
81
81
|
Generating static pages (0/6) ...
|
|
82
82
|
|
|
83
83
|
Generating static pages (1/6)
|
|
84
|
-
Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
|
|
85
84
|
|
|
86
85
|
Generating static pages (2/6)
|
|
86
|
+
Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
|
|
87
87
|
|
|
88
88
|
Generating static pages (4/6)
|
|
89
89
|
|
|
90
90
|
✓ Generating static pages (6/6)
|
|
91
91
|
Finalizing page optimization ...
|
|
@@ -124,7 +124,7 @@ Route (pages) Size First Load JS
|
|
|
124
124
|
├ chunks/framework-d514426edf885c68.js 45.4 kB
|
|
125
125
|
├ chunks/main-ec03882c4375091d.js 33.2 kB
|
|
126
126
|
├ chunks/pages/_app-3898f7fdf2646553.js 25.8 kB
|
|
127
|
-
├ chunks/webpack-
|
|
127
|
+
├ chunks/webpack-b258ad8e93314030.js 3.85 kB
|
|
128
128
|
└ css/0f070d03aacd9cc5.css 3.57 kB
|
|
129
129
|
|
|
130
130
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.96.
|
|
2
|
+
> @faststore/core@3.96.4 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS test/utils/multipleTemplates.test.ts (
|
|
6
|
-
PASS test/utils/clearCookies.test.ts (
|
|
5
|
+
PASS test/utils/multipleTemplates.test.ts (28.831 s)
|
|
6
|
+
PASS test/utils/clearCookies.test.ts (28.815 s)
|
|
7
7
|
PASS test/utils/cookieCacheBusting.test.ts
|
|
8
8
|
PASS test/server/cms/global.test.ts
|
|
9
9
|
PASS test/server/cms/index.test.ts
|
|
10
|
-
PASS test/server/index.test.ts (
|
|
10
|
+
PASS test/server/index.test.ts (33.347 s)
|
|
11
11
|
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
|
12
12
|
|
|
13
13
|
Test Suites: 6 passed, 6 total
|
|
14
14
|
Tests: 47 passed, 47 total
|
|
15
15
|
Snapshots: 0 total
|
|
16
|
-
Time:
|
|
16
|
+
Time: 34.565 s
|
|
17
17
|
Ran all test suites.
|
package/CHANGELOG.md
CHANGED
|
@@ -3,11 +3,17 @@
|
|
|
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
|
-
## [3.96.
|
|
6
|
+
## [3.96.5](https://github.com/vtex/faststore/compare/v3.96.4...v3.96.5) (2026-02-02)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
### Bug Fixes
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
- normalize set cookies domain host - SFS-3034 ([#3190](https://github.com/vtex/faststore/issues/3190)) ([645c91d](https://github.com/vtex/faststore/commit/645c91debeb16379f41aff6cb2225e2ed3b6086b))
|
|
11
|
+
|
|
12
|
+
## [3.96.4](https://github.com/vtex/faststore/compare/v3.96.3...v3.96.4) (2026-01-26)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- close filter on apply button click in FilterSlider component ([#3187](https://github.com/vtex/faststore/issues/3187)) ([f3c96eb](https://github.com/vtex/faststore/commit/f3c96eb5e73178d8c863a3e40ac576dc623a0624))
|
|
11
17
|
|
|
12
18
|
## [3.96.3](https://github.com/vtex/faststore/compare/v3.96.2...v3.96.3) (2026-01-21)
|
|
13
19
|
|
|
@@ -27,10 +33,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
27
33
|
|
|
28
34
|
- version 20251223 ([#3161](https://github.com/vtex/faststore/issues/3161)) ([ad5e8d1](https://github.com/vtex/faststore/commit/ad5e8d12fe45f1fb8e1134165172bf1c6b2a91e2))
|
|
29
35
|
|
|
30
|
-
# 3.96.0-dev.22 (2026-01-21)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @faststore/core
|
|
33
|
-
|
|
34
36
|
# [3.96.0-dev.21](https://github.com/vtex/faststore/compare/v3.96.0-dev.20...v3.96.0-dev.21) (2026-01-08)
|
|
35
37
|
|
|
36
38
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.96.
|
|
3
|
+
"version": "3.96.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@envelop/graphql-jit": "^8.0.3",
|
|
52
52
|
"@envelop/parser-cache": "^6.0.2",
|
|
53
53
|
"@envelop/validation-cache": "^6.0.2",
|
|
54
|
-
"@faststore/api": "3.96.
|
|
55
|
-
"@faststore/graphql-utils": "^3.96.
|
|
56
|
-
"@faststore/lighthouse": "3.96.
|
|
57
|
-
"@faststore/sdk": "3.96.
|
|
58
|
-
"@faststore/ui": "3.96.
|
|
54
|
+
"@faststore/api": "3.96.3",
|
|
55
|
+
"@faststore/graphql-utils": "^3.96.0",
|
|
56
|
+
"@faststore/lighthouse": "3.96.0",
|
|
57
|
+
"@faststore/sdk": "3.96.0",
|
|
58
|
+
"@faststore/ui": "3.96.0",
|
|
59
59
|
"@graphql-codegen/cli": "5.0.2",
|
|
60
60
|
"@graphql-codegen/client-preset": "4.2.6",
|
|
61
61
|
"@graphql-codegen/typescript": "4.0.7",
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"ts-jest": "29.1.1",
|
|
124
124
|
"typescript": "5.3.2"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "042bd974c01eca93141e55cf54eafd0c071101aa"
|
|
127
127
|
}
|
|
@@ -97,7 +97,7 @@ function FilterSlider({
|
|
|
97
97
|
applyButtonLabel,
|
|
98
98
|
}: FilterSliderProps & ReturnType<typeof useFilter>) {
|
|
99
99
|
const { resetInfiniteScroll, setState, state } = useSearch()
|
|
100
|
-
const { openRegionSlider } = useUI()
|
|
100
|
+
const { closeFilter, openRegionSlider } = useUI()
|
|
101
101
|
|
|
102
102
|
const cmsData = getGlobalSettings()
|
|
103
103
|
const { deliveryPromise: deliveryPromiseSettings } = cmsData ?? {}
|
|
@@ -147,6 +147,8 @@ function FilterSlider({
|
|
|
147
147
|
: selected,
|
|
148
148
|
page: 0,
|
|
149
149
|
})
|
|
150
|
+
|
|
151
|
+
closeFilter()
|
|
150
152
|
},
|
|
151
153
|
children: applyButtonLabel ?? 'Apply',
|
|
152
154
|
}}
|
package/src/pages/api/graphql.ts
CHANGED
|
@@ -13,24 +13,91 @@ import { execute } from '../../server'
|
|
|
13
13
|
|
|
14
14
|
const DEFAULT_MAX_AGE = 5 * 60 // 5 minutes
|
|
15
15
|
const DEFAULT_STALE_WHILE_REVALIDATE = 60 * 60 // 1 hour
|
|
16
|
+
const ALLOWED_HOST_SUFFIXES = ['localhost', '.vtex.app', '.localhost']
|
|
17
|
+
|
|
18
|
+
// Example: "Set-Cookie: key=value; Domain=example.com; Path=/"
|
|
19
|
+
const MATCH_DOMAIN_REGEXP = /(?:^|;\s*)(?:domain=)([^;]+)/i
|
|
16
20
|
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @param request NextApiRequest
|
|
21
|
-
* @param setCookie setCookie string that comes from FastStore API
|
|
22
|
-
* @returns setCookie string with it domains replace
|
|
22
|
+
* Extracts hostname from the incoming request.
|
|
23
23
|
*/
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
const getRequestHostname = ({
|
|
25
|
+
request,
|
|
26
|
+
}: {
|
|
27
|
+
request: NextApiRequest
|
|
28
|
+
}): string | null => {
|
|
29
|
+
const hostHeader = request.headers.host?.trim()
|
|
30
|
+
if (!hostHeader) {
|
|
31
|
+
return null
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
try {
|
|
35
|
+
return new URL(`https://${hostHeader}`).hostname
|
|
36
|
+
} catch {
|
|
37
|
+
return null
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Checks whether the cookie domain should be replaced by host.
|
|
43
|
+
*/
|
|
44
|
+
const shouldReplaceCookieDomain = ({
|
|
45
|
+
cookieDomain,
|
|
46
|
+
host,
|
|
47
|
+
}: {
|
|
48
|
+
cookieDomain: string
|
|
49
|
+
host: string
|
|
50
|
+
}) => {
|
|
51
|
+
const normalizedDomain = cookieDomain.replace(/^\./, '').toLowerCase()
|
|
52
|
+
const normalizedHost = host.toLowerCase()
|
|
53
|
+
|
|
54
|
+
return normalizedDomain !== normalizedHost
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Determines if host is eligible for domain normalization.
|
|
59
|
+
*/
|
|
60
|
+
const isAllowedHost = ({
|
|
61
|
+
host,
|
|
62
|
+
allowList,
|
|
63
|
+
}: {
|
|
64
|
+
host: string
|
|
65
|
+
allowList: string[]
|
|
66
|
+
}) => {
|
|
67
|
+
const normalizedHost = host.toLowerCase()
|
|
68
|
+
|
|
69
|
+
return allowList.some((suffix) => normalizedHost.endsWith(suffix))
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Ensure the cookie domain matches the current host so the browser can store it.
|
|
74
|
+
*/
|
|
75
|
+
const normalizeSetCookieDomain = ({
|
|
76
|
+
request,
|
|
77
|
+
setCookie,
|
|
78
|
+
}: {
|
|
79
|
+
request: NextApiRequest
|
|
80
|
+
setCookie: string
|
|
81
|
+
}) => {
|
|
82
|
+
const domainMatch = setCookie.match(MATCH_DOMAIN_REGEXP)
|
|
83
|
+
if (!domainMatch) {
|
|
84
|
+
return setCookie
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const host = getRequestHostname({ request })
|
|
88
|
+
if (!host) {
|
|
89
|
+
return setCookie
|
|
90
|
+
}
|
|
91
|
+
const cookieDomain = domainMatch[1]
|
|
92
|
+
|
|
93
|
+
if (
|
|
94
|
+
!isAllowedHost({ host, allowList: ALLOWED_HOST_SUFFIXES }) ||
|
|
95
|
+
!shouldReplaceCookieDomain({ cookieDomain, host })
|
|
96
|
+
) {
|
|
97
|
+
return setCookie
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return setCookie.replace(MATCH_DOMAIN_REGEXP, `; domain=${host}`)
|
|
34
101
|
}
|
|
35
102
|
|
|
36
103
|
const parseRequest = (request: NextApiRequest) => {
|
|
@@ -201,9 +268,7 @@ const handler: NextApiHandler = async (request, response) => {
|
|
|
201
268
|
response.setHeader(
|
|
202
269
|
'set-cookie',
|
|
203
270
|
setCookieValues.map(({ setCookie }) =>
|
|
204
|
-
|
|
205
|
-
? replaceSetCookieDomain(request, setCookie)
|
|
206
|
-
: setCookie
|
|
271
|
+
normalizeSetCookieDomain({ request, setCookie })
|
|
207
272
|
)
|
|
208
273
|
)
|
|
209
274
|
}
|
|
File without changes
|
|
File without changes
|