@sebspark/retry 1.0.18 → 1.0.20

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 ADDED
@@ -0,0 +1,143 @@
1
+ # @sebspark/retry
2
+
3
+ ## 1.0.20
4
+
5
+ ### Patch Changes
6
+
7
+ - 9f44fbd: Updated dependencies
8
+
9
+ ## 1.0.19
10
+
11
+ ### Patch Changes
12
+
13
+ - 66ac832: * Upgraded to TypeScript 7
14
+ - Replaced tsup with tsdown for package builds
15
+ - Fixed cli-tester stdout parsing, resolving flaky e2e tests across the repo
16
+ - Patched vulnerable transitive dependencies (uuid, socket.io-parser, and others)
17
+
18
+ ## 1.0.18
19
+
20
+ ### Patch Changes
21
+
22
+ - eefb531: Updated dependencies
23
+
24
+ ## 1.0.17
25
+
26
+ ### Patch Changes
27
+
28
+ - 612a407: Implement maxDelay option
29
+
30
+ ## 1.0.16
31
+
32
+ ### Patch Changes
33
+
34
+ - e0eda57: Updated dependencies
35
+
36
+ ## 1.0.15
37
+
38
+ ### Patch Changes
39
+
40
+ - 97fe7da: Updated dependencies
41
+
42
+ ## 1.0.14
43
+
44
+ ### Patch Changes
45
+
46
+ - 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`.
47
+
48
+ ## 1.0.13
49
+
50
+ ### Patch Changes
51
+
52
+ - 7d8cc98: Dependabot dependency updates
53
+
54
+ ## 1.0.12
55
+
56
+ ### Patch Changes
57
+
58
+ - 8a120f6: Updated dependencies for all and docs for emulator
59
+
60
+ ## 1.0.11
61
+
62
+ ### Patch Changes
63
+
64
+ - e9a7a28: Updated dependencies
65
+
66
+ ## 1.0.10
67
+
68
+ ### Patch Changes
69
+
70
+ - 4124516: Updated dependencies
71
+ - 4e12590: Updated dependencies
72
+
73
+ ## 1.0.9
74
+
75
+ ### Patch Changes
76
+
77
+ - 91aed80: Updated dependencies
78
+
79
+ ## 1.0.8
80
+
81
+ ### Patch Changes
82
+
83
+ - 736a0b3: No bundling of packages in packages
84
+
85
+ ## 1.0.7
86
+
87
+ ### Patch Changes
88
+
89
+ - 063d384: Updated dependencies
90
+
91
+ ## 1.0.6
92
+
93
+ ### Patch Changes
94
+
95
+ - 11a11ce: Updated dependencies
96
+
97
+ ## 1.0.4
98
+
99
+ ### Patch Changes
100
+
101
+ - c7886fc: retry should still support cjs
102
+
103
+ ## 1.0.3
104
+
105
+ ### Patch Changes
106
+
107
+ - e0cb5ee: Updated build from tsup to tsdown
108
+
109
+ ## 1.0.2
110
+
111
+ ### Patch Changes
112
+
113
+ - cacbaf5: chore: upgrade dependencies
114
+
115
+ ## 1.0.1
116
+
117
+ ### Patch Changes
118
+
119
+ - 7e5c2e9: Switched to new tsconfig with moduleResolution=bundler
120
+
121
+ ## 1.0.0
122
+
123
+ ### Major Changes
124
+
125
+ - 0864ec2: Minimum node version 22
126
+
127
+ ## 0.1.2
128
+
129
+ ### Patch Changes
130
+
131
+ - 3a40e49: Cleaned up dependencies
132
+
133
+ ## 0.1.1
134
+
135
+ ### Patch Changes
136
+
137
+ - 93a37b3: Patch dependencies
138
+
139
+ ## 0.1.0
140
+
141
+ ### Minor Changes
142
+
143
+ - 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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/retry.ts"],"mappings":";KACY,0BAA0B;UAErB;EACf;EACA,WAAW;EACX,iBAAiB;EACjB;;cAsBW,QAAe,GAC1B,YAAY,QAAQ,OACjB,UAAU,MAAM,+BAClB,QAAQ;cA6BE;EACI,QAAA,mBAAY;EACX,SAAA,mBAAY;EAElB,cAAA,eAAM,mBACb;;cAIC;KAID,0BAA0B;cAEzB;KAGD,0BAA0B;KAE1B,kCAAkC,kBAAkB;KAEpD;EACH;EACA;EACA;IACE;IACA;;;cAIS;EACM,SAAA;EAEJ,gBAAA,OAAA,iBACV,OAAO;EAoBY,eAAA,OAAA;EAGP,SAAA,OAAC,4BAAsB"}
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/retry.ts"],"mappings":";KACY,0BAA0B;UAErB;EACf;EACA,WAAW;EACX,iBAAiB;EACjB;;cAsBW,QAAe,GAC1B,YAAY,QAAQ,OACjB,UAAU,MAAM,+BAClB,QAAQ;cA6BE;EACI,QAAA,mBAAY;EACX,SAAA,mBAAY;EAElB,cAAA,eAAM,mBACb;;cAIC;KAID,0BAA0B;cAEzB;KAGD,0BAA0B;KAE1B,kCAAkC,kBAAkB;KAEpD;EACH;EACA;EACA;IACE;IACA;;;cAIS;EACM,SAAA;EAEJ,gBAAA,OAAA,iBACV,OAAO;EAoBY,eAAA,OAAA;EAGP,SAAA,OAAC,4BAAsB"}
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.18",
3
+ "version": "1.0.20",
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
- "axios": "1.19.0"
31
+ "@biomejs/biome": "2.5.14",
32
+ "@sebspark/tsconfig": "*",
33
+ "axios": "1.20.0",
34
+ "typescript": "7.0.2",
35
+ "vite": "8.3.0",
36
+ "vitest": "5.0.1"
32
37
  },
33
38
  "repository": {
34
39
  "type": "git",
35
40
  "url": "https://github.com/seb-oss/Spark-packages.git"
36
41
  }
37
- }
42
+ }