Skip to content

Commit 7c3dd32

Browse files
author
jarvisjiang
committed
chore(release): 1.5.0
### Added - Automatic retry support with configurable strategies (retry option) - Stream responseType to return raw ReadableStream<Uint8Array> - Runtime validation for fetchT options - examples/with-retry.ts with comprehensive retry examples ### Changed - Optimize timeout handling using native AbortSignal.timeout() and AbortSignal.any() - Upgrade happy-rusty to ^1.8.0, typescript-eslint to ^8.51.0, msw to ^2.12.7 ### Fixed - Abort reason always wrapped as Error with proper ABORT_ERROR name
1 parent aebe6b1 commit 7c3dd32

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.5.0] - 2026-01-04
9+
10+
### Added
11+
12+
- Add automatic retry support with configurable strategies (`retry` option)
13+
- `retries`: Number of retry attempts
14+
- `delay`: Static delay or exponential backoff function
15+
- `when`: Retry on specific HTTP status codes or custom condition
16+
- `onRetry`: Callback before each retry attempt
17+
- Add `'stream'` responseType to return raw `ReadableStream<Uint8Array>`
18+
- Add runtime validation for `fetchT` options (responseType, timeout, callbacks, retry)
19+
- Add `examples/with-retry.ts` with comprehensive retry examples
20+
21+
### Changed
22+
23+
- Optimize timeout handling using native `AbortSignal.timeout()` and `AbortSignal.any()` APIs
24+
- Upgrade `happy-rusty` dependency to ^1.8.0
25+
- Upgrade `typescript-eslint` to ^8.51.0
26+
- Upgrade `msw` to ^2.12.7
27+
28+
### Fixed
29+
30+
- Fix abort reason always wrapped as Error with proper `ABORT_ERROR` name
31+
832
## [1.4.1] - 2025-12-25
933

1034
### Fixed
@@ -119,6 +143,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
119143
- Timeout support
120144
- Rust-like Result type error handling via `happy-rusty` library
121145

146+
[1.5.0]: https://github.com/JiangJie/fetch-t/compare/v1.4.1...v1.5.0
122147
[1.4.1]: https://github.com/JiangJie/fetch-t/compare/v1.4.0...v1.4.1
123148
[1.4.0]: https://github.com/JiangJie/fetch-t/compare/v1.3.3...v1.4.0
124149
[1.3.3]: https://github.com/JiangJie/fetch-t/compare/v1.3.2...v1.3.3

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://jsr.io/schema/config-file.v1.json",
33
"name": "@happy-ts/fetch-t",
44
"license": "MIT",
5-
"version": "1.4.1",
5+
"version": "1.5.0",
66
"exports": "./src/mod.ts",
77
"imports": {
88
"happy-rusty": "npm:happy-rusty@^1.8.0",

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "@happy-ts/fetch-t",
3-
"description": "Type-safe Fetch API wrapper with abortable requests, timeout support, progress tracking, and Rust-like Result error handling.",
3+
"description": "Type-safe Fetch API wrapper with abortable requests, timeout support, progress tracking, automatic retry, and Rust-like Result error handling.",
44
"author": "[email protected]",
55
"license": "MIT",
6-
"version": "1.4.1",
6+
"version": "1.5.0",
77
"type": "module",
88
"main": "dist/main.cjs",
99
"module": "dist/main.mjs",
@@ -48,6 +48,7 @@
4848
"timeout",
4949
"progress",
5050
"streaming",
51+
"retry",
5152
"type-safe",
5253
"typescript",
5354
"result",

0 commit comments

Comments
 (0)