@alwatr/fetch 4.1.6 → 4.1.7
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 +31 -27
- package/dist/main.cjs +2 -2
- package/dist/main.mjs +2 -2
- package/package.json +10 -10
- package/src/main.test.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.1.7](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@4.1.6...@alwatr/fetch@4.1.7) (2024-10-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @alwatr/fetch
|
|
9
|
+
|
|
6
10
|
## [4.1.6](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@4.1.5...@alwatr/fetch@4.1.6) (2024-10-12)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @alwatr/fetch
|
|
@@ -11,14 +15,14 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
15
|
|
|
12
16
|
### Code Refactoring
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
- prevent side-effects ([01e00e1](https://github.com/Alwatr/nanolib/commit/01e00e191385cc92b28677df0c01a085916ae677)) by @mohammadhonarvar
|
|
19
|
+
- use new `global-this` package ([42510b9](https://github.com/Alwatr/nanolib/commit/42510b9ae0e385206a902db093d188949f1cb84e)) by @mohammadhonarvar
|
|
16
20
|
|
|
17
21
|
## [4.1.4](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@4.1.3...@alwatr/fetch@4.1.4) (2024-10-11)
|
|
18
22
|
|
|
19
23
|
### Miscellaneous Chores
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
- include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @AliMD
|
|
22
26
|
|
|
23
27
|
## [4.1.3](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@4.1.2...@alwatr/fetch@4.1.3) (2024-10-11)
|
|
24
28
|
|
|
@@ -28,7 +32,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
28
32
|
|
|
29
33
|
### Dependencies update
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
- bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @dependabot[bot]
|
|
32
36
|
|
|
33
37
|
## [4.1.1](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@4.1.0...@alwatr/fetch@4.1.1) (2024-10-08)
|
|
34
38
|
|
|
@@ -38,30 +42,30 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
38
42
|
|
|
39
43
|
### Features
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
- use `package-tracer` ([cc3c5f9](https://github.com/Alwatr/nanolib/commit/cc3c5f9c1a3d03f0d81b46835665f16a0426fd0d)) by @mohammadhonarvar
|
|
42
46
|
|
|
43
47
|
### Bug Fixes
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
- all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar
|
|
50
|
+
- **fetch:** remove unused import from fetch core module ([28ec726](https://github.com/Alwatr/nanolib/commit/28ec7269322f90dba02fbb33e4e622db42169368)) by @AliMD
|
|
47
51
|
|
|
48
52
|
### Code Refactoring
|
|
49
53
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
- **fetch:** update fetch package to use @alwatr/parse-duration for timeout and retryDelay durations ([1108c54](https://github.com/Alwatr/nanolib/commit/1108c547e43f2c65f46d65b58dd19cee9abd2fd7)) by @AliMD
|
|
55
|
+
- **fetch:** Update logger import and initialization ([1f0451c](https://github.com/Alwatr/nanolib/commit/1f0451c9fec81b875736135778cdd4150556ba97)) by @AliMD
|
|
56
|
+
- **fetch:** use new DictionaryReq type ([a8149cf](https://github.com/Alwatr/nanolib/commit/a8149cff114da7c7ce9a335c837ae794904fa3ca)) by @AliMD
|
|
57
|
+
- update Dictionary type definitions ([c94cbc4](https://github.com/Alwatr/nanolib/commit/c94cbc4523864e2cc47828ccf5508b68945ac2b8)) by @AliMD
|
|
58
|
+
- use new type-helper global types and remove all import types ([08b5d08](https://github.com/Alwatr/nanolib/commit/08b5d08c03c7c315382337239de0426462f384b8)) by @AliMD
|
|
59
|
+
- **wait:** rename package to delay ([cf8c45c](https://github.com/Alwatr/nanolib/commit/cf8c45cf3f5b61fdd4b1b1c7f744c4eb3e230016)) by @AliMD
|
|
56
60
|
|
|
57
61
|
### Miscellaneous Chores
|
|
58
62
|
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
- **fetch:** change the license to AGPL-3.0 ([edf9069](https://github.com/Alwatr/nanolib/commit/edf9069608bd276b85c9ac937e33ad225c5921a9)) by @ArmanAsadian
|
|
64
|
+
- Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @AliMD
|
|
61
65
|
|
|
62
66
|
### Dependencies update
|
|
63
67
|
|
|
64
|
-
|
|
68
|
+
- bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @dependabot[bot]
|
|
65
69
|
|
|
66
70
|
## [4.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@4.0.0...@alwatr/fetch@4.0.1) (2024-09-21)
|
|
67
71
|
|
|
@@ -71,23 +75,23 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
71
75
|
|
|
72
76
|
### ⚠ BREAKING CHANGES
|
|
73
77
|
|
|
74
|
-
|
|
78
|
+
- **fetch:** queryParametters renamed to queryParams
|
|
75
79
|
|
|
76
80
|
### Code Refactoring
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
- **fetch:** handle fetchJson error responses properly ([ae8fe24](https://github.com/Alwatr/nanolib/commit/ae8fe244aca17f235c4347ff1fd10070a410340c)) by @AliMD
|
|
83
|
+
- **fetch:** update query parameters handling ([939b3d5](https://github.com/Alwatr/nanolib/commit/939b3d52998ec7b3f5c32ff5438b649148109ede)) by @AliMD
|
|
80
84
|
|
|
81
85
|
### Dependencies update
|
|
82
86
|
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
- bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot]
|
|
88
|
+
- update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @AliMD
|
|
85
89
|
|
|
86
90
|
## [3.1.8](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@3.1.7...@alwatr/fetch@3.1.8) (2024-08-31)
|
|
87
91
|
|
|
88
92
|
### Miscellaneous Chores
|
|
89
93
|
|
|
90
|
-
|
|
94
|
+
- Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @
|
|
91
95
|
|
|
92
96
|
## [3.1.7](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@3.1.6...@alwatr/fetch@3.1.7) (2024-08-31)
|
|
93
97
|
|
|
@@ -97,19 +101,19 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
97
101
|
|
|
98
102
|
### Dependencies update
|
|
99
103
|
|
|
100
|
-
|
|
104
|
+
- update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @AliMD
|
|
101
105
|
|
|
102
106
|
## [3.1.5](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@3.1.4...@alwatr/fetch@3.1.5) (2024-07-04)
|
|
103
107
|
|
|
104
108
|
### Dependencies update
|
|
105
109
|
|
|
106
|
-
|
|
110
|
+
- update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @
|
|
107
111
|
|
|
108
112
|
## [3.1.4](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@3.1.3...@alwatr/fetch@3.1.4) (2024-05-12)
|
|
109
113
|
|
|
110
114
|
### Dependencies update
|
|
111
115
|
|
|
112
|
-
|
|
116
|
+
- upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @AliMD
|
|
113
117
|
|
|
114
118
|
## [3.1.3](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@3.1.2...@alwatr/fetch@3.1.3) (2024-04-25)
|
|
115
119
|
|
|
@@ -123,11 +127,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
123
127
|
|
|
124
128
|
### Bug Fixes
|
|
125
129
|
|
|
126
|
-
|
|
130
|
+
- exported types by add .js extensions to all imports ([fc3d83e](https://github.com/Alwatr/nanolib/commit/fc3d83e8f375da97ba276314b2e6966aa82c9b3f)) by @AliMD
|
|
127
131
|
|
|
128
132
|
### Miscellaneous Chores
|
|
129
133
|
|
|
130
|
-
|
|
134
|
+
- **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @AliMD
|
|
131
135
|
|
|
132
136
|
## [3.1.0](https://github.com/Alwatr/nanolib/compare/@alwatr/fetch@3.0.0...@alwatr/fetch@3.1.0) (2024-01-24)
|
|
133
137
|
|
package/dist/main.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @alwatr/fetch v4.1.
|
|
1
|
+
/* @alwatr/fetch v4.1.7 */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -33,7 +33,7 @@ var import_global_this = require("@alwatr/global-this");
|
|
|
33
33
|
var import_logger = require("@alwatr/logger");
|
|
34
34
|
var import_package_tracer = require("@alwatr/package-tracer");
|
|
35
35
|
var import_parse_duration = require("@alwatr/parse-duration");
|
|
36
|
-
__dev_mode__: import_package_tracer.packageTracer.add("@alwatr/fetch", "4.1.
|
|
36
|
+
__dev_mode__: import_package_tracer.packageTracer.add("@alwatr/fetch", "4.1.7");
|
|
37
37
|
var logger_ = /* @__PURE__ */ (0, import_logger.createLogger)("@alwatr/fetch");
|
|
38
38
|
var globalThis_ = /* @__PURE__ */ (0, import_global_this.getGlobalThis)();
|
|
39
39
|
var cacheStorage_;
|
package/dist/main.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @alwatr/fetch v4.1.
|
|
1
|
+
/* @alwatr/fetch v4.1.7 */
|
|
2
2
|
|
|
3
3
|
// src/core.ts
|
|
4
4
|
import { delay } from "@alwatr/delay";
|
|
@@ -6,7 +6,7 @@ import { getGlobalThis } from "@alwatr/global-this";
|
|
|
6
6
|
import { createLogger } from "@alwatr/logger";
|
|
7
7
|
import { packageTracer } from "@alwatr/package-tracer";
|
|
8
8
|
import { parseDuration } from "@alwatr/parse-duration";
|
|
9
|
-
__dev_mode__: packageTracer.add("@alwatr/fetch", "4.1.
|
|
9
|
+
__dev_mode__: packageTracer.add("@alwatr/fetch", "4.1.7");
|
|
10
10
|
var logger_ = /* @__PURE__ */ createLogger("@alwatr/fetch");
|
|
11
11
|
var globalThis_ = /* @__PURE__ */ getGlobalThis();
|
|
12
12
|
var cacheStorage_;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/fetch",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.7",
|
|
4
4
|
"description": "Enhanced fetch API with cache strategy, retry pattern, timeout, helper methods and enhanced types.",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
6
|
"keywords": [
|
|
@@ -72,19 +72,19 @@
|
|
|
72
72
|
"clean": "rm -rfv dist *.tsbuildinfo"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@alwatr/delay": "^1.0.
|
|
76
|
-
"@alwatr/global-this": "^1.0.
|
|
77
|
-
"@alwatr/logger": "^4.0.
|
|
78
|
-
"@alwatr/package-tracer": "^1.0.
|
|
79
|
-
"@alwatr/parse-duration": "^1.1.
|
|
75
|
+
"@alwatr/delay": "^1.0.7",
|
|
76
|
+
"@alwatr/global-this": "^1.0.2",
|
|
77
|
+
"@alwatr/logger": "^4.0.7",
|
|
78
|
+
"@alwatr/package-tracer": "^1.0.7",
|
|
79
|
+
"@alwatr/parse-duration": "^1.1.7"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@alwatr/nano-build": "^2.0.
|
|
82
|
+
"@alwatr/nano-build": "^2.0.3",
|
|
83
83
|
"@alwatr/prettier-config": "^1.0.6",
|
|
84
|
-
"@alwatr/tsconfig-base": "^1.3.
|
|
85
|
-
"@alwatr/type-helper": "^2.0.
|
|
84
|
+
"@alwatr/tsconfig-base": "^1.3.3",
|
|
85
|
+
"@alwatr/type-helper": "^2.0.3",
|
|
86
86
|
"jest": "^29.7.0",
|
|
87
87
|
"typescript": "^5.6.3"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "a1e430a02f9a5711fc43f19012091bcd8806c4f9"
|
|
90
90
|
}
|
package/src/main.test.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {fetch, fetchJson} from '@alwatr/fetch'
|
|
1
|
+
import {fetch, fetchJson} from '@alwatr/fetch';
|
|
2
2
|
|
|
3
3
|
describe('fetch with search params', () => {
|
|
4
4
|
it('should make a GET request to the specified URL', async () => {
|
|
@@ -29,7 +29,7 @@ describe('fetch json', () => {
|
|
|
29
29
|
url: 'http://httpbin.org/post',
|
|
30
30
|
method: 'POST',
|
|
31
31
|
bodyJson: {
|
|
32
|
-
a: 2
|
|
32
|
+
a: 2,
|
|
33
33
|
},
|
|
34
34
|
cacheStrategy: 'network_only',
|
|
35
35
|
};
|
|
@@ -38,7 +38,7 @@ describe('fetch json', () => {
|
|
|
38
38
|
|
|
39
39
|
expect(responseJson.ok).toBe(true);
|
|
40
40
|
expect(responseJson.json.a).toBe(2);
|
|
41
|
-
})
|
|
41
|
+
});
|
|
42
42
|
|
|
43
43
|
it('should make a GET request to the specified URL and parse json and handle 404 status code', async () => {
|
|
44
44
|
const options = {
|