@spoosh/plugin-nextjs 0.1.0-beta.0 → 0.1.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/README.md +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ import { invalidationPlugin } from "@spoosh/plugin-invalidation";
|
|
|
32
32
|
const plugins = [
|
|
33
33
|
invalidationPlugin(),
|
|
34
34
|
nextjsPlugin({ serverRevalidator: revalidateAction }),
|
|
35
|
-
];
|
|
35
|
+
] as const;
|
|
36
36
|
|
|
37
37
|
// After a successful mutation, cache tags are automatically revalidated
|
|
38
38
|
const { trigger } = useWrite((api) => api.posts.$post);
|
|
@@ -74,7 +74,7 @@ const plugins = [
|
|
|
74
74
|
serverRevalidator: revalidate,
|
|
75
75
|
skipServerRevalidation: true, // Skip by default
|
|
76
76
|
}),
|
|
77
|
-
];
|
|
77
|
+
] as const;
|
|
78
78
|
|
|
79
79
|
// Most mutations don't need server revalidation
|
|
80
80
|
await trigger({ body: data });
|
|
@@ -96,7 +96,7 @@ const plugins = [
|
|
|
96
96
|
serverRevalidator: revalidate,
|
|
97
97
|
// skipServerRevalidation: false (default)
|
|
98
98
|
}),
|
|
99
|
-
];
|
|
99
|
+
] as const;
|
|
100
100
|
|
|
101
101
|
// Server cache is revalidated by default
|
|
102
102
|
await trigger({ body: data });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spoosh/plugin-nextjs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Next.js integration plugin for Spoosh - server revalidation after mutations",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@spoosh/core": ">=0.
|
|
37
|
+
"@spoosh/core": ">=0.2.0",
|
|
38
38
|
"next": ">=13.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@spoosh/core": "0.
|
|
41
|
+
"@spoosh/core": "0.2.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"dev": "tsup --watch",
|