File tree 7 files changed +904
-692
lines changed
7 files changed +904
-692
lines changed Original file line number Diff line number Diff line change 6
6
jobs :
7
7
Build-and-Publish :
8
8
runs-on : ubuntu-latest
9
+ permissions :
10
+ contents : write
11
+ id-token : write
9
12
steps :
10
13
- uses : actions/checkout@v4
11
14
21
24
run : pnpm i --frozen-lockfile
22
25
23
26
- name : Build & Publish
24
- run : npm publish
27
+ run : npm publish --access public --provenance
25
28
env :
26
29
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
27
30
Original file line number Diff line number Diff line change @@ -33,11 +33,13 @@ Automatic Parsed type:
33
33
34
34
### Browser
35
35
36
- ``` Shell
36
+ #### Installation
37
+
38
+ ``` shell
37
39
npm install koajax
38
40
```
39
41
40
- ` index.html `
42
+ #### ` index.html `
41
43
42
44
``` html
43
45
<head >
@@ -51,11 +53,13 @@ npm install koajax
51
53
52
54
### Node.js
53
55
56
+ #### Installation
57
+
54
58
``` shell
55
59
npm install koajax jsdom
56
60
```
57
61
58
- ` index.js `
62
+ #### ` index.ts `
59
63
60
64
``` javascript
61
65
import { HTTPClient } from ' koajax' ;
@@ -74,6 +78,16 @@ polyfill(origin).then(() => {
74
78
});
75
79
```
76
80
81
+ #### Execution
82
+
83
+ ``` shell
84
+ npx tsx index.ts
85
+ ```
86
+
87
+ ### Non-polyfillable runtimes
88
+
89
+ 1 . https://github.com/idea2app/KoAJAX-Taro-adapter
90
+
77
91
## Example
78
92
79
93
### RESTful API with Token-based Authorization
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " koajax" ,
3
- "version" : " 3.0.2 " ,
3
+ "version" : " 3.0.3 " ,
4
4
"license" : " LGPL-3.0" ,
5
5
6
6
"description" : " HTTP Client based on Koa-like middlewares" ,
29
29
"core-js" : " ^3.38.1" ,
30
30
"regenerator-runtime" : " ^0.14.1" ,
31
31
"web-streams-polyfill" : " ^4.0.0" ,
32
- "web-utility" : " ^4.4.0 "
32
+ "web-utility" : " ^4.4.1 "
33
33
},
34
34
"peerDependencies" : {
35
35
"jsdom" : " >=21"
38
38
"@parcel/packager-ts" : " ~2.12.0" ,
39
39
"@parcel/transformer-typescript-types" : " ~2.12.0" ,
40
40
"@types/core-js" : " ^2.5.8" ,
41
- "@types/jest" : " ^29.5.12 " ,
41
+ "@types/jest" : " ^29.5.14 " ,
42
42
"@types/jsdom" : " ^21.1.7" ,
43
- "@types/node" : " ^20.16.5 " ,
43
+ "@types/node" : " ^20.17.1 " ,
44
44
"cross-env" : " ^7.0.3" ,
45
- "husky" : " ^9.1.5 " ,
45
+ "husky" : " ^9.1.6 " ,
46
46
"jest" : " ^29.7.0" ,
47
47
"jest-environment-jsdom" : " ^29.7.0" ,
48
- "jsdom" : " ^25.0.0 " ,
48
+ "jsdom" : " ^25.0.1 " ,
49
49
"lint-staged" : " ^15.2.10" ,
50
50
"open-cli" : " ^8.0.0" ,
51
51
"parcel" : " ~2.12.0" ,
52
52
"prettier" : " ^3.3.3" ,
53
53
"ts-jest" : " ^29.2.5" ,
54
54
"ts-node" : " ^10.9.2" ,
55
- "typedoc" : " ^0.26.6 " ,
56
- "typedoc-plugin-mdn-links" : " ^3.2.11 " ,
57
- "typescript" : " ~5.5.4 "
55
+ "typedoc" : " ^0.26.10 " ,
56
+ "typedoc-plugin-mdn-links" : " ^3.3.5 " ,
57
+ "typescript" : " ~5.6.3 "
58
58
},
59
59
"prettier" : {
60
60
"singleQuote" : true ,
You can’t perform that action at this time.
0 commit comments