@decocms/tanstack 7.12.0 → 7.12.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.
- package/package.json +4 -4
- package/src/routes/cmsRoute.ts +11 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/tanstack",
|
|
3
|
-
"version": "7.12.
|
|
3
|
+
"version": "7.12.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco framework binding for TanStack Start + Cloudflare Workers",
|
|
6
6
|
"repository": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"lint:unused": "knip"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@decocms/blocks": "7.12.
|
|
28
|
-
"@decocms/blocks-admin": "7.12.
|
|
29
|
-
"@decocms/blocks-cli": "7.12.
|
|
27
|
+
"@decocms/blocks": "7.12.1",
|
|
28
|
+
"@decocms/blocks-admin": "7.12.1",
|
|
29
|
+
"@decocms/blocks-cli": "7.12.1",
|
|
30
30
|
"@deco-cx/warp-node": "^0.3.16",
|
|
31
31
|
"fast-json-patch": "^3.1.0",
|
|
32
32
|
"ws": "^8.18.0"
|
package/src/routes/cmsRoute.ts
CHANGED
|
@@ -205,11 +205,19 @@ export const loadCmsPage = createServerFn({ method: "GET" })
|
|
|
205
205
|
// Use the full path (including query string) as the dedup key.
|
|
206
206
|
// Using basePath only caused /s?q=a and /s?q=b to share one promise,
|
|
207
207
|
// returning wrong/empty results for search and filtered PLPs.
|
|
208
|
-
|
|
208
|
+
//
|
|
209
|
+
// Client-nav resolves all sections eagerly (#277). An in-flight SSR response
|
|
210
|
+
// for the same path may carry deferredSections; sharing that promise with a
|
|
211
|
+
// concurrent SPA transition would smuggle those deferred sections in, causing
|
|
212
|
+
// loadDeferredSection to run without the per-request commerce app context.
|
|
213
|
+
// Use separate dedup buckets for SSR vs client-nav.
|
|
214
|
+
const clientNav = isClientNavigation(fullPath, getRequestUrl());
|
|
215
|
+
const inflightKey = clientNav ? `__nav:${fullPath}` : fullPath;
|
|
216
|
+
const existing = pageInflight.get(inflightKey);
|
|
209
217
|
if (existing) return existing;
|
|
210
218
|
|
|
211
|
-
const promise = loadCmsPageInternal(fullPath).finally(() => pageInflight.delete(
|
|
212
|
-
pageInflight.set(
|
|
219
|
+
const promise = loadCmsPageInternal(fullPath).finally(() => pageInflight.delete(inflightKey));
|
|
220
|
+
pageInflight.set(inflightKey, promise);
|
|
213
221
|
return promise;
|
|
214
222
|
});
|
|
215
223
|
|