@happy-ts/fetch-t 1.3.2 → 1.4.0
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 +120 -0
- package/LICENSE +21 -674
- package/README.cn.md +138 -46
- package/README.md +136 -49
- package/dist/main.cjs +19 -16
- package/dist/main.cjs.map +1 -1
- package/dist/main.mjs +15 -14
- package/dist/main.mjs.map +1 -1
- package/dist/types.d.ts +432 -206
- package/package.json +39 -26
- package/dist/types.d.ts.map +0 -1
- package/docs/README.md +0 -39
- package/docs/classes/FetchError.md +0 -47
- package/docs/functions/fetchT.md +0 -423
- package/docs/interfaces/FetchInit.md +0 -23
- package/docs/interfaces/FetchProgress.md +0 -16
- package/docs/interfaces/FetchTask.md +0 -46
- package/docs/type-aliases/FetchResponse.md +0 -24
- package/docs/type-aliases/FetchResponseType.md +0 -17
- package/docs/variables/ABORT_ERROR.md +0 -17
- package/docs/variables/TIMEOUT_ERROR.md +0 -17
- package/src/fetch/constants.ts +0 -9
- package/src/fetch/defines.ts +0 -104
- package/src/fetch/fetch.ts +0 -292
- package/src/mod.ts +0 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.4.0] - 2025-12-19
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **BREAKING**: Migrate from Deno test runner to Vitest with MSW mocking
|
|
13
|
+
- **BREAKING**: Migrate from Rollup to Vite for building
|
|
14
|
+
- **BREAKING**: Change license from GPL-3.0 to MIT
|
|
15
|
+
- Upgrade `happy-rusty` dependency to ^1.6.1
|
|
16
|
+
- Upgrade all dev dependencies to latest versions
|
|
17
|
+
- Rewrite README with improved structure, examples, and API documentation
|
|
18
|
+
- Update GitHub Actions workflows for Vitest
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Add `examples/` directory with runnable usage examples
|
|
23
|
+
- Add ESLint stylistic rules for code formatting
|
|
24
|
+
- Add TypeDoc HTML documentation hosted on GitHub Pages
|
|
25
|
+
|
|
26
|
+
### Removed
|
|
27
|
+
|
|
28
|
+
- Remove Deno configuration (`deno.json`)
|
|
29
|
+
- Remove Rollup configuration (`rollup.config.mjs`)
|
|
30
|
+
|
|
31
|
+
## [1.3.3] - 2025-11-27
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Add npm imports to jsr.json for JSR publishing
|
|
36
|
+
- Override name attribute in FetchError class
|
|
37
|
+
- Comment out assertion for progress result in fetch test
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- Upgrade rollup-plugin-dts to v6.3.0
|
|
42
|
+
- Update ESLint config with new API and rules
|
|
43
|
+
- Upgrade dev dependencies
|
|
44
|
+
- Update deno dependencies and import sources
|
|
45
|
+
- Remove .npmrc file
|
|
46
|
+
|
|
47
|
+
## [1.3.2] - 2024-08-13
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- The error type returned by a non-abortable `fetch` is explicitly `Error`
|
|
52
|
+
|
|
53
|
+
## [1.3.1] - 2024-08-11
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- Update dependencies
|
|
58
|
+
|
|
59
|
+
## [1.3.0] - 2024-08-07
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
|
|
63
|
+
- Support `onProgress` callback for tracking download progress
|
|
64
|
+
- Support `onChunk` callback for receiving raw data chunks
|
|
65
|
+
- Complete test cases for new features
|
|
66
|
+
|
|
67
|
+
### Changed
|
|
68
|
+
|
|
69
|
+
- Update dependencies
|
|
70
|
+
- Update installation section of readme
|
|
71
|
+
|
|
72
|
+
## [1.2.1] - 2024-08-05
|
|
73
|
+
|
|
74
|
+
### Changed
|
|
75
|
+
|
|
76
|
+
- Update happy-rusty dependency
|
|
77
|
+
- Make test cases clearer
|
|
78
|
+
|
|
79
|
+
## [1.2.0] - 2024-08-04
|
|
80
|
+
|
|
81
|
+
### Changed
|
|
82
|
+
|
|
83
|
+
- Returns a `FetchError` when the response is not ok (instead of generic Error)
|
|
84
|
+
- Update happy-rusty dependency
|
|
85
|
+
|
|
86
|
+
## [1.1.1] - 2024-08-03
|
|
87
|
+
|
|
88
|
+
### Changed
|
|
89
|
+
|
|
90
|
+
- Update deno imports
|
|
91
|
+
- Update dependencies
|
|
92
|
+
|
|
93
|
+
## [1.1.0] - 2024-08-02
|
|
94
|
+
|
|
95
|
+
### Changed
|
|
96
|
+
|
|
97
|
+
- Reorganize the code structure
|
|
98
|
+
- Update happy-rusty to v1.3.0
|
|
99
|
+
- Fill test cases
|
|
100
|
+
|
|
101
|
+
## [1.0.0] - Initial Release
|
|
102
|
+
|
|
103
|
+
### Added
|
|
104
|
+
|
|
105
|
+
- Abortable requests via `FetchTask.abort()`
|
|
106
|
+
- Type-safe responses with `responseType` parameter ('text' | 'arraybuffer' | 'blob' | 'json')
|
|
107
|
+
- Timeout support
|
|
108
|
+
- Rust-like Result type error handling via `happy-rusty` library
|
|
109
|
+
|
|
110
|
+
[Unreleased]: https://github.com/JiangJie/fetch-t/compare/v1.4.0...HEAD
|
|
111
|
+
[1.4.0]: https://github.com/JiangJie/fetch-t/compare/v1.3.3...v1.4.0
|
|
112
|
+
[1.3.3]: https://github.com/JiangJie/fetch-t/compare/v1.3.2...v1.3.3
|
|
113
|
+
[1.3.2]: https://github.com/JiangJie/fetch-t/compare/v1.3.1...v1.3.2
|
|
114
|
+
[1.3.1]: https://github.com/JiangJie/fetch-t/compare/v1.3.0...v1.3.1
|
|
115
|
+
[1.3.0]: https://github.com/JiangJie/fetch-t/compare/v1.2.1...v1.3.0
|
|
116
|
+
[1.2.1]: https://github.com/JiangJie/fetch-t/compare/v1.2.0...v1.2.1
|
|
117
|
+
[1.2.0]: https://github.com/JiangJie/fetch-t/compare/v1.1.1...v1.2.0
|
|
118
|
+
[1.1.1]: https://github.com/JiangJie/fetch-t/compare/v1.1.0...v1.1.1
|
|
119
|
+
[1.1.0]: https://github.com/JiangJie/fetch-t/compare/v1.0.0...v1.1.0
|
|
120
|
+
[1.0.0]: https://github.com/JiangJie/fetch-t/releases/tag/v1.0.0
|