@sebspark/retry 1.0.18 → 1.0.19
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/CHANGELOG.md +137 -0
- package/dist/index.d.cts +5 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +5 -6
- package/dist/index.d.mts.map +1 -1
- package/package.json +9 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# @sebspark/retry
|
|
2
|
+
|
|
3
|
+
## 1.0.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 66ac832: * Upgraded to TypeScript 7
|
|
8
|
+
- Replaced tsup with tsdown for package builds
|
|
9
|
+
- Fixed cli-tester stdout parsing, resolving flaky e2e tests across the repo
|
|
10
|
+
- Patched vulnerable transitive dependencies (uuid, socket.io-parser, and others)
|
|
11
|
+
|
|
12
|
+
## 1.0.18
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- eefb531: Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 1.0.17
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 612a407: Implement maxDelay option
|
|
23
|
+
|
|
24
|
+
## 1.0.16
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- e0eda57: Updated dependencies
|
|
29
|
+
|
|
30
|
+
## 1.0.15
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- 97fe7da: Updated dependencies
|
|
35
|
+
|
|
36
|
+
## 1.0.14
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- c5e9c99: Resolve protobufjs CVE by pinning to `8.3.0` across all affected packages via root resolutions. Upgraded OpenTelemetry packages to `0.218.0` (which also eliminates the previous hardpin on `protobufjs@8.0.1`), `axios` to `1.16.1`, `ws` to `8.20.1`, `qs` to `6.15.2`, and `@opentelemetry/semantic-conventions` to `1.41.1`.
|
|
41
|
+
|
|
42
|
+
## 1.0.13
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- 7d8cc98: Dependabot dependency updates
|
|
47
|
+
|
|
48
|
+
## 1.0.12
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- 8a120f6: Updated dependencies for all and docs for emulator
|
|
53
|
+
|
|
54
|
+
## 1.0.11
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- e9a7a28: Updated dependencies
|
|
59
|
+
|
|
60
|
+
## 1.0.10
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- 4124516: Updated dependencies
|
|
65
|
+
- 4e12590: Updated dependencies
|
|
66
|
+
|
|
67
|
+
## 1.0.9
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- 91aed80: Updated dependencies
|
|
72
|
+
|
|
73
|
+
## 1.0.8
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- 736a0b3: No bundling of packages in packages
|
|
78
|
+
|
|
79
|
+
## 1.0.7
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- 063d384: Updated dependencies
|
|
84
|
+
|
|
85
|
+
## 1.0.6
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- 11a11ce: Updated dependencies
|
|
90
|
+
|
|
91
|
+
## 1.0.4
|
|
92
|
+
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- c7886fc: retry should still support cjs
|
|
96
|
+
|
|
97
|
+
## 1.0.3
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- e0cb5ee: Updated build from tsup to tsdown
|
|
102
|
+
|
|
103
|
+
## 1.0.2
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- cacbaf5: chore: upgrade dependencies
|
|
108
|
+
|
|
109
|
+
## 1.0.1
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- 7e5c2e9: Switched to new tsconfig with moduleResolution=bundler
|
|
114
|
+
|
|
115
|
+
## 1.0.0
|
|
116
|
+
|
|
117
|
+
### Major Changes
|
|
118
|
+
|
|
119
|
+
- 0864ec2: Minimum node version 22
|
|
120
|
+
|
|
121
|
+
## 0.1.2
|
|
122
|
+
|
|
123
|
+
### Patch Changes
|
|
124
|
+
|
|
125
|
+
- 3a40e49: Cleaned up dependencies
|
|
126
|
+
|
|
127
|
+
## 0.1.1
|
|
128
|
+
|
|
129
|
+
### Patch Changes
|
|
130
|
+
|
|
131
|
+
- 93a37b3: Patch dependencies
|
|
132
|
+
|
|
133
|
+
## 0.1.0
|
|
134
|
+
|
|
135
|
+
### Minor Changes
|
|
136
|
+
|
|
137
|
+
- fc423aa: Split retry into a separate package
|
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
//#region src/retry.d.ts
|
|
2
|
-
type RetryConditionFunction = (error: any) => boolean;
|
|
3
|
-
interface RetrySettings {
|
|
2
|
+
export type RetryConditionFunction = (error: any) => boolean;
|
|
3
|
+
export interface RetrySettings {
|
|
4
4
|
maxRetries: number;
|
|
5
5
|
interval: (retryCount: number) => number;
|
|
6
6
|
retryCondition?: RetryConditionFunction;
|
|
7
7
|
maxDelay?: number;
|
|
8
8
|
}
|
|
9
|
-
declare const retry: <T>(func: () => Promise<T>, ...settings: Array<RetrySettings | undefined>) => Promise<T>;
|
|
10
|
-
declare const interval: {
|
|
9
|
+
export declare const retry: <T>(func: () => Promise<T>, ...settings: Array<RetrySettings | undefined>) => Promise<T>;
|
|
10
|
+
export declare const interval: {
|
|
11
11
|
fixed: (delay: number) => (_retries: number) => number;
|
|
12
12
|
linear: (delay: number) => (retries: number) => number;
|
|
13
13
|
exponential: (delay: number, base?: number) => (retries: number) => number;
|
|
@@ -25,12 +25,11 @@ type HttpError = {
|
|
|
25
25
|
statusCode?: number;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
declare const retryCondition: {
|
|
28
|
+
export declare const retryCondition: {
|
|
29
29
|
always: (_error: unknown) => boolean;
|
|
30
30
|
httpErrors: (...codes: ErrorType[]) => (error: HttpError) => boolean;
|
|
31
31
|
serverErrors: (error: HttpError) => boolean;
|
|
32
32
|
custom: (func: (error: any) => boolean) => (error: any) => boolean;
|
|
33
33
|
};
|
|
34
34
|
//#endregion
|
|
35
|
-
export { RetryConditionFunction, RetrySettings, interval, retry, retryCondition };
|
|
36
35
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/retry.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/retry.ts"],"mappings":";YACY,0BAA0B;iBAErB;EACf;EACA,WAAW;EACX,iBAAiB;EACjB;;qBAsBW,QAAe,GAAC,YACf,QAAQ,OAAE,UACT,MAAM,+BAClB,QAAQ;qBA6BE;EACX,QAAK,mBAAgB;EACrB,SAAM,mBAAgB;EACtB,cAAW,eACK,mBAAA;;cAKZ;KAID,0BAA0B;cAEzB;KAGD,0BAA0B;KAE1B,kCAAkC,kBAAkB;KAEpD;EACH;EACA;EACA;IACE;IACA;;;qBAIS;EACX,SAAM;EACN,gBAAU,OACG,iBAAW,OACd;EAoBV,eAAY,OAAU;EAGtB,SAAM,OAAU,4BAAsB"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
//#region src/retry.d.ts
|
|
2
|
-
type RetryConditionFunction = (error: any) => boolean;
|
|
3
|
-
interface RetrySettings {
|
|
2
|
+
export type RetryConditionFunction = (error: any) => boolean;
|
|
3
|
+
export interface RetrySettings {
|
|
4
4
|
maxRetries: number;
|
|
5
5
|
interval: (retryCount: number) => number;
|
|
6
6
|
retryCondition?: RetryConditionFunction;
|
|
7
7
|
maxDelay?: number;
|
|
8
8
|
}
|
|
9
|
-
declare const retry: <T>(func: () => Promise<T>, ...settings: Array<RetrySettings | undefined>) => Promise<T>;
|
|
10
|
-
declare const interval: {
|
|
9
|
+
export declare const retry: <T>(func: () => Promise<T>, ...settings: Array<RetrySettings | undefined>) => Promise<T>;
|
|
10
|
+
export declare const interval: {
|
|
11
11
|
fixed: (delay: number) => (_retries: number) => number;
|
|
12
12
|
linear: (delay: number) => (retries: number) => number;
|
|
13
13
|
exponential: (delay: number, base?: number) => (retries: number) => number;
|
|
@@ -25,12 +25,11 @@ type HttpError = {
|
|
|
25
25
|
statusCode?: number;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
declare const retryCondition: {
|
|
28
|
+
export declare const retryCondition: {
|
|
29
29
|
always: (_error: unknown) => boolean;
|
|
30
30
|
httpErrors: (...codes: ErrorType[]) => (error: HttpError) => boolean;
|
|
31
31
|
serverErrors: (error: HttpError) => boolean;
|
|
32
32
|
custom: (func: (error: any) => boolean) => (error: any) => boolean;
|
|
33
33
|
};
|
|
34
34
|
//#endregion
|
|
35
|
-
export { RetryConditionFunction, RetrySettings, interval, retry, retryCondition };
|
|
36
35
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/retry.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/retry.ts"],"mappings":";YACY,0BAA0B;iBAErB;EACf;EACA,WAAW;EACX,iBAAiB;EACjB;;qBAsBW,QAAe,GAAC,YACf,QAAQ,OAAE,UACT,MAAM,+BAClB,QAAQ;qBA6BE;EACX,QAAK,mBAAgB;EACrB,SAAM,mBAAgB;EACtB,cAAW,eACK,mBAAA;;cAKZ;KAID,0BAA0B;cAEzB;KAGD,0BAA0B;KAE1B,kCAAkC,kBAAkB;KAEpD;EACH;EACA;EACA;IACE;IACA;;;qBAIS;EACX,SAAM;EACN,gBAAU,OACG,iBAAW,OACd;EAoBV,eAAY,OAAU;EAGtB,SAAM,OAAU,4BAAsB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebspark/retry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -25,13 +25,18 @@
|
|
|
25
25
|
"dev": "tsc --watch --noEmit",
|
|
26
26
|
"lint": "biome lint .",
|
|
27
27
|
"test": "vitest run --passWithNoTests --coverage",
|
|
28
|
-
"typecheck": "vitest --typecheck.only --passWithNoTests"
|
|
28
|
+
"typecheck": "vitest --typecheck.only --passWithNoTests --run"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"
|
|
31
|
+
"@biomejs/biome": "2.5.12",
|
|
32
|
+
"@sebspark/tsconfig": "*",
|
|
33
|
+
"axios": "1.20.0",
|
|
34
|
+
"typescript": "7.0.2",
|
|
35
|
+
"vite": "8.2.2",
|
|
36
|
+
"vitest": "5.0.0"
|
|
32
37
|
},
|
|
33
38
|
"repository": {
|
|
34
39
|
"type": "git",
|
|
35
40
|
"url": "https://github.com/seb-oss/Spark-packages.git"
|
|
36
41
|
}
|
|
37
|
-
}
|
|
42
|
+
}
|