@decocms/tanstack 7.86.6 → 7.87.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/tanstack",
3
- "version": "7.86.6",
3
+ "version": "7.87.0",
4
4
  "type": "module",
5
5
  "description": "Deco framework binding for TanStack Start + Cloudflare Workers",
6
6
  "repository": {
@@ -26,9 +26,9 @@
26
26
  "lint:unused": "knip"
27
27
  },
28
28
  "dependencies": {
29
- "@decocms/blocks": "7.86.6",
30
- "@decocms/blocks-admin": "7.86.6",
31
- "@decocms/blocks-cli": "7.86.6"
29
+ "@decocms/blocks": "7.87.0",
30
+ "@decocms/blocks-admin": "7.87.0",
31
+ "@decocms/blocks-cli": "7.87.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@tanstack/react-query": ">=5.0.0",
@@ -447,8 +447,10 @@ export interface DecoWorkerEntryOptions {
447
447
  * A raw response doesn't depend on the code or the decofile; the new
448
448
  * code re-transforms it, so a deploy can't serve an old shape.
449
449
  *
450
- * `cachedLoader` results, HTML responses and sections stay per-build in both
451
- * modes: they hold code output. Segment/device and geo stay in every key.
450
+ * HTML responses, sections and `cachedLoader` results stay per-build in both
451
+ * modes: they hold code output. The one exception: under `"preserve"`, a
452
+ * `cachedLoader` that sets `dataVersion` is keyed like `fetch:*` and survives
453
+ * too. Segment/device and geo stay in every key.
452
454
  * Any other value falls back to `"invalidate"`.
453
455
  *
454
456
  * To drop preserved responses once, set `DECO_DATA_CACHE_PURGE` to a new value
@@ -2623,7 +2625,9 @@ export function createDecoWorkerEntry(
2623
2625
  // Loader/commerce cache purge (in-memory, this isolate only). Escape hatch
2624
2626
  // to invalidate loader results immediately after an out-of-band upstream
2625
2627
  // change (e.g. a Magento catalog sync) without waiting out the TTL. A
2626
- // redeploy is the global lever — loader cache keys are build-hash versioned.
2628
+ // redeploy is the global lever for loaders keyed by build hash; one with
2629
+ // `dataVersion` under DECO_DATA_CACHE_ON_DEPLOY=preserve survives it (bump
2630
+ // its `dataVersion`, or use DECO_DATA_CACHE_PURGE).
2627
2631
  if (url.pathname === "/_cache/purge-loaders" && request.method === "POST") {
2628
2632
  return handlePurgeLoaders(request, env);
2629
2633
  }