@pinia/colada-plugin-retry 0.0.1 → 0.0.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.
Files changed (2) hide show
  1. package/README.md +11 -2
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -21,7 +21,7 @@ npm install @pinia/colada-plugin-retry
21
21
  import { PiniaColadaRetry } from '@pinia/colada-plugin-retry'
22
22
 
23
23
  // Pass the plugin to Pinia Colada options
24
- app.use(PiniaColadaRetry, {
24
+ app.use(PiniaColada, {
25
25
  // ...
26
26
  plugins: [
27
27
  PiniaColadaRetry({
@@ -34,7 +34,16 @@ app.use(PiniaColadaRetry, {
34
34
  You can customize the retry behavior individually for each query/mutation with the `retry` option:
35
35
 
36
36
  ```ts
37
- // TODO:
37
+ useQuery({
38
+ key: ['todos'],
39
+ query: getTodos,
40
+ retry: {
41
+ // Number of retries, can also be a function
42
+ retry: 3,
43
+ // Delay between retries, can also be a function
44
+ delay: 1000,
45
+ },
46
+ })
38
47
  ```
39
48
 
40
49
  ## License
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.0.1",
7
+ "version": "0.0.2",
8
8
  "description": "Retry failed requests with Pinia Colada",
9
9
  "author": {
10
10
  "name": "Eduardo San Martin Morote",
@@ -58,14 +58,14 @@
58
58
  "dist"
59
59
  ],
60
60
  "peerDependencies": {
61
- "@pinia/colada": "^0.11.0"
61
+ "@pinia/colada": "^0.12.1"
62
62
  },
63
63
  "devDependencies": {
64
- "@pinia/colada": "^0.11.0"
64
+ "@pinia/colada": "^0.12.1"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "tsup",
68
68
  "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . -l @pinia/colada-plugin-retry -r 1",
69
- "test": "echo \"Error: no test specified\" && exit 1"
69
+ "test": "vitest --ui"
70
70
  }
71
71
  }