Skip to content

Commit

Permalink
feat: remove AbortController polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed Mar 18, 2024
1 parent ea35a62 commit 8eea8bb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
- api 超时支持
- 统一的错误处理方式
- 类 axios 的取消请求
- 支持 node 环境发送 http 请求

<!-- - 支持 node 环境发送 http 请求 (Node.js v18+) -->

- 文件上传支持,基于 `XMLHttpRequest` 封装,支持获取上传进度
- 文件下载支持,基于 [downloadjs](https://www.npmjs.com/package/downloadjs) 封装

Expand All @@ -76,7 +78,7 @@
| 特性 | @yuntijs/request | umi-request | fetch | axios |
| :--------- | :--------------- | :------------- | :------------- | :------------- |
| 实现 | 浏览器原生支持 | 浏览器原生支持 | 浏览器原生支持 | XMLHttpRequest |
| 大小 | - | 9k | 4k (polyfill) | 14k |
| 大小 | 17k | 9k | 4k (polyfill) | 15.5k |
| query 简化 |||||
| post 简化 |||||
| 超时 |||||
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
},
"dependencies": {
"@babel/runtime": "^7.12.5",
"abort-controller": "^3.0.0",
"downloadjs": "^1.4.7",
"qs": "^6.9.4"
},
Expand Down
15 changes: 0 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/core/abortController.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'abort-controller/polyfill';

import { getEnv } from '../helpers';

export const AbortController =
Expand Down

0 comments on commit 8eea8bb

Please sign in to comment.