nuxt-skew-protection 2.0.0 → 2.0.2

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/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "nuxt": "^4.6.0 || ^5.0.0-0"
5
5
  },
6
6
  "configKey": "skewProtection",
7
- "version": "2.0.0",
7
+ "version": "2.0.2",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.3",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -1153,7 +1153,7 @@ export {}
1153
1153
  for (const { route, seconds, source, fromMaxAgeAlone } of caching) {
1154
1154
  if (seconds > ceiling)
1155
1155
  logger.warn(`routeRules['${route}'] (${source}) caches a document for ${seconds}s. Retention only keeps a build for ${ceiling}s. The cached document will outlive its chunks. Lower the window to ${ceiling}s or less.`);
1156
- if (fromMaxAgeAlone)
1156
+ if (fromMaxAgeAlone && options.cookie !== false)
1157
1157
  logger.warn(`routeRules['${route}'] caches documents with \`max-age\` and no \`s-maxage\`. The version cookie is dropped there, so \`isClientOutdated\` falls back to the build id. Use \`s-maxage\` for CDN caching, or \`private\` if you meant browser caching only.`);
1158
1158
  }
1159
1159
  }
@@ -1,4 +1,4 @@
1
- import { useBotDetection } from "#imports";
1
+ import { useBotDetection } from "#robots/app";
2
2
  export function useSkewBotDetection() {
3
3
  return useBotDetection().isBot.value;
4
4
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-skew-protection",
3
3
  "type": "module",
4
- "version": "2.0.0",
4
+ "version": "2.0.2",
5
5
  "description": "Solve Nuxt version skews with persistent assets and instant updates.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",