@spoosh/plugin-invalidation 0.5.5 → 0.5.7

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/index.js CHANGED
@@ -40,7 +40,7 @@ function resolveInvalidateTags(context, defaultMode) {
40
40
  const pluginOptions = context.pluginOptions;
41
41
  const invalidateOption = pluginOptions?.invalidate;
42
42
  if (!invalidateOption) {
43
- const overrideDefault = context.metadata.get(INVALIDATION_DEFAULT_KEY);
43
+ const overrideDefault = context.temp.get(INVALIDATION_DEFAULT_KEY);
44
44
  const effectiveDefault = overrideDefault ?? defaultMode;
45
45
  return resolveModeTags(context, effectiveDefault);
46
46
  }
@@ -73,7 +73,7 @@ function invalidationPlugin(config = {}) {
73
73
  exports(context) {
74
74
  return {
75
75
  setDefaultMode(value) {
76
- context.metadata.set(INVALIDATION_DEFAULT_KEY, value);
76
+ context.temp.set(INVALIDATION_DEFAULT_KEY, value);
77
77
  }
78
78
  };
79
79
  },
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ function resolveInvalidateTags(context, defaultMode) {
14
14
  const pluginOptions = context.pluginOptions;
15
15
  const invalidateOption = pluginOptions?.invalidate;
16
16
  if (!invalidateOption) {
17
- const overrideDefault = context.metadata.get(INVALIDATION_DEFAULT_KEY);
17
+ const overrideDefault = context.temp.get(INVALIDATION_DEFAULT_KEY);
18
18
  const effectiveDefault = overrideDefault ?? defaultMode;
19
19
  return resolveModeTags(context, effectiveDefault);
20
20
  }
@@ -47,7 +47,7 @@ function invalidationPlugin(config = {}) {
47
47
  exports(context) {
48
48
  return {
49
49
  setDefaultMode(value) {
50
- context.metadata.set(INVALIDATION_DEFAULT_KEY, value);
50
+ context.temp.set(INVALIDATION_DEFAULT_KEY, value);
51
51
  }
52
52
  };
53
53
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spoosh/plugin-invalidation",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "description": "Cache invalidation plugin for Spoosh - auto-invalidates after mutations",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -33,11 +33,11 @@
33
33
  }
34
34
  },
35
35
  "peerDependencies": {
36
- "@spoosh/core": ">=0.11.0"
36
+ "@spoosh/core": ">=0.12.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@spoosh/core": "0.11.0",
40
- "@spoosh/test-utils": "0.1.6"
39
+ "@spoosh/core": "0.12.0",
40
+ "@spoosh/test-utils": "0.1.8"
41
41
  },
42
42
  "scripts": {
43
43
  "dev": "tsup --watch",