@spoosh/plugin-deduplication 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 +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -16,12 +16,12 @@ npm install @spoosh/plugin-deduplication
|
|
|
16
16
|
import { deduplicationPlugin } from "@spoosh/plugin-deduplication";
|
|
17
17
|
|
|
18
18
|
// Default: dedupe reads, not writes
|
|
19
|
-
const plugins = [deduplicationPlugin()];
|
|
19
|
+
const plugins = [deduplicationPlugin()] as const;
|
|
20
20
|
|
|
21
21
|
// Enable deduplication for writes too
|
|
22
22
|
// Extreme caution: may cause unintended side effects
|
|
23
23
|
// **Avoid using it unless you fully understand the implications**
|
|
24
|
-
const plugins = [deduplicationPlugin({ write: "in-flight" })];
|
|
24
|
+
const plugins = [deduplicationPlugin({ write: "in-flight" })] as const;
|
|
25
25
|
|
|
26
26
|
// Per-request override
|
|
27
27
|
useRead((api) => api.posts.$get(), { dedupe: false });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spoosh/plugin-deduplication",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Request deduplication plugin for Spoosh - prevents duplicate in-flight requests",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@spoosh/core": ">=0.
|
|
36
|
+
"@spoosh/core": ">=0.2.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@spoosh/core": "0.
|
|
40
|
-
"@spoosh/test-utils": "0.1.
|
|
39
|
+
"@spoosh/core": "0.2.0",
|
|
40
|
+
"@spoosh/test-utils": "0.1.1"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"dev": "tsup --watch",
|