@spoosh/plugin-invalidation 0.5.3 → 0.5.4

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Cache invalidation plugin for Spoosh - auto-invalidates related queries after mutations.
4
4
 
5
- **[Documentation](https://spoosh.dev/react/docs/plugins/invalidation)** · **Requirements:** TypeScript >= 5.0 · **Peer Dependencies:** `@spoosh/core`
5
+ **[Documentation](https://spoosh.dev/docs/react/plugins/invalidation)** · **Requirements:** TypeScript >= 5.0 · **Peer Dependencies:** `@spoosh/core`
6
6
 
7
7
  ## Installation
8
8
 
@@ -121,8 +121,8 @@ await trigger({
121
121
 
122
122
  // Combined with clearCache (from @spoosh/plugin-cache)
123
123
  await trigger({
124
- clearCache: true, // Clear all cached data
125
- invalidate: "*", // Then refetch all queries
124
+ clearCache: true, // Clear all cached data
125
+ invalidate: "*", // Then refetch all queries
126
126
  });
127
127
  ```
128
128
 
@@ -209,11 +209,12 @@ const { trigger } = useWrite((api) => api("auth/logout").POST);
209
209
 
210
210
  // Clear cache + trigger all queries to refetch
211
211
  await trigger({
212
- clearCache: true, // From cache plugin: clear all cached data
213
- invalidate: "*", // From invalidation plugin: trigger all queries to refetch
212
+ clearCache: true, // From cache plugin: clear all cached data
213
+ invalidate: "*", // From invalidation plugin: trigger all queries to refetch
214
214
  });
215
215
  ```
216
216
 
217
217
  This ensures both:
218
+
218
219
  1. All cached data is cleared (no stale data from previous session)
219
220
  2. All active queries refetch with fresh data
package/dist/index.d.mts CHANGED
@@ -67,7 +67,7 @@ declare module "@spoosh/core" {
67
67
  *
68
68
  * @param config - Plugin configuration
69
69
  *
70
- * @see {@link https://spoosh.dev/docs/plugins/invalidation | Invalidation Plugin Documentation}
70
+ * @see {@link https://spoosh.dev/docs/react/plugins/invalidation | Invalidation Plugin Documentation}
71
71
  *
72
72
  * @example
73
73
  * ```ts
package/dist/index.d.ts CHANGED
@@ -67,7 +67,7 @@ declare module "@spoosh/core" {
67
67
  *
68
68
  * @param config - Plugin configuration
69
69
  *
70
- * @see {@link https://spoosh.dev/docs/plugins/invalidation | Invalidation Plugin Documentation}
70
+ * @see {@link https://spoosh.dev/docs/react/plugins/invalidation | Invalidation Plugin Documentation}
71
71
  *
72
72
  * @example
73
73
  * ```ts
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@spoosh/plugin-invalidation",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Cache invalidation plugin for Spoosh - auto-invalidates after mutations",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/nxnom/spoosh.git",
8
+ "url": "git+https://github.com/spooshdev/spoosh.git",
9
9
  "directory": "packages/plugin-invalidation"
10
10
  },
11
11
  "bugs": {
12
- "url": "https://github.com/nxnom/spoosh/issues"
12
+ "url": "https://github.com/spooshdev/spoosh/issues"
13
13
  },
14
- "homepage": "https://spoosh.dev/react/docs/plugins/invalidation",
14
+ "homepage": "https://spoosh.dev/docs/react/plugins/invalidation",
15
15
  "publishConfig": {
16
16
  "access": "public"
17
17
  },
@@ -36,8 +36,8 @@
36
36
  "@spoosh/core": ">=0.8.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@spoosh/core": "0.9.3",
40
- "@spoosh/test-utils": "0.1.5"
39
+ "@spoosh/test-utils": "0.1.5",
40
+ "@spoosh/core": "0.10.0"
41
41
  },
42
42
  "scripts": {
43
43
  "dev": "tsup --watch",