@spoosh/plugin-optimistic 0.4.0 → 0.4.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/README.md +1 -1
- package/dist/index.d.mts +2 -5
- package/dist/index.d.ts +2 -5
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Optimistic updates plugin for Spoosh - instant UI updates with automatic rollback on error.
|
|
4
4
|
|
|
5
|
-
**[Documentation](https://spoosh.dev/docs/plugins/optimistic)** · **Requirements:** TypeScript >= 5.0 · **Peer Dependencies:** `@spoosh/core`, `@spoosh/plugin-invalidation`
|
|
5
|
+
**[Documentation](https://spoosh.dev/docs/react/plugins/optimistic)** · **Requirements:** TypeScript >= 5.0 · **Peer Dependencies:** `@spoosh/core`, `@spoosh/plugin-invalidation`
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { FindMatchingKey, HasParams, ExtractParamNames, ExtractData, SpooshPlugin } from '@spoosh/core';
|
|
1
|
+
import { FindMatchingKey, HasParams, ExtractParamNames, Simplify, ExtractData, SpooshPlugin } from '@spoosh/core';
|
|
2
2
|
|
|
3
|
-
type Simplify<T> = {
|
|
4
|
-
[K in keyof T]: T[K];
|
|
5
|
-
} & {};
|
|
6
3
|
/**
|
|
7
4
|
* Check if query exists in the method config.
|
|
8
5
|
*/
|
|
@@ -229,7 +226,7 @@ declare const OPTIMISTIC_SNAPSHOTS_KEY = "optimistic:snapshots";
|
|
|
229
226
|
* unnecessary refetches that would override the optimistic data. You can override
|
|
230
227
|
* this by explicitly setting the `invalidate` option with a mode string or array.
|
|
231
228
|
*
|
|
232
|
-
* @see {@link https://spoosh.dev/docs/plugins/optimistic | Optimistic Plugin Documentation}
|
|
229
|
+
* @see {@link https://spoosh.dev/docs/react/plugins/optimistic | Optimistic Plugin Documentation}
|
|
233
230
|
*
|
|
234
231
|
* @returns Optimistic plugin instance
|
|
235
232
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { FindMatchingKey, HasParams, ExtractParamNames, ExtractData, SpooshPlugin } from '@spoosh/core';
|
|
1
|
+
import { FindMatchingKey, HasParams, ExtractParamNames, Simplify, ExtractData, SpooshPlugin } from '@spoosh/core';
|
|
2
2
|
|
|
3
|
-
type Simplify<T> = {
|
|
4
|
-
[K in keyof T]: T[K];
|
|
5
|
-
} & {};
|
|
6
3
|
/**
|
|
7
4
|
* Check if query exists in the method config.
|
|
8
5
|
*/
|
|
@@ -229,7 +226,7 @@ declare const OPTIMISTIC_SNAPSHOTS_KEY = "optimistic:snapshots";
|
|
|
229
226
|
* unnecessary refetches that would override the optimistic data. You can override
|
|
230
227
|
* this by explicitly setting the `invalidate` option with a mode string or array.
|
|
231
228
|
*
|
|
232
|
-
* @see {@link https://spoosh.dev/docs/plugins/optimistic | Optimistic Plugin Documentation}
|
|
229
|
+
* @see {@link https://spoosh.dev/docs/react/plugins/optimistic | Optimistic Plugin Documentation}
|
|
233
230
|
*
|
|
234
231
|
* @returns Optimistic plugin instance
|
|
235
232
|
*
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spoosh/plugin-optimistic",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Optimistic updates plugin for Spoosh - instant UI updates with automatic rollback",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/spooshdev/spoosh.git",
|
|
9
9
|
"directory": "packages/plugin-optimistic"
|
|
10
10
|
},
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/
|
|
12
|
+
"url": "https://github.com/spooshdev/spoosh/issues"
|
|
13
13
|
},
|
|
14
|
-
"homepage": "https://spoosh.dev/react/
|
|
14
|
+
"homepage": "https://spoosh.dev/docs/react/plugins/optimistic",
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@spoosh/core": ">=0.
|
|
36
|
+
"@spoosh/core": ">=0.9.0",
|
|
37
37
|
"@spoosh/plugin-invalidation": ">=0.4.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@spoosh/core": "0.
|
|
41
|
-
"@spoosh/plugin-invalidation": "0.4
|
|
40
|
+
"@spoosh/core": "0.10.0",
|
|
41
|
+
"@spoosh/plugin-invalidation": "0.5.4",
|
|
42
42
|
"@spoosh/test-utils": "0.1.5"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|