Skip to content

Commit

Permalink
fix: replace statuses with statuses-es for better compact compatibili…
Browse files Browse the repository at this point in the history
…ty (#53)

* fix: uniapp新版本运行报错

* chore: md自动格式化的问题

* chore: 文件README.md编辑器自动格式化
  • Loading branch information
wtto00 authored Sep 20, 2024
1 parent a2d880c commit 4806357
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ un.get('/user/12345', {
});
```
如果你追求语义化,可以使用导出的和挂载的状态码、[statuses](https://github.com/jshttp/statuses)、[http-status-codes](https://github.com/prettymuchbryce/http-status-codes) 或 [node-http-status](https://github.com/adaltas/node-http-status)。
如果你追求语义化,可以使用导出的和挂载的状态码、[statuses-es](https://github.com/esm-ts/statuses-es)、[http-status-codes](https://github.com/prettymuchbryce/http-status-codes) 或 [node-http-status](https://github.com/adaltas/node-http-status)。
```typescript
import { un, HttpStatusCode } from '@uni-helper/uni-network';
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/handling-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ un.get('/user/12345', {
});
```

如果你追求语义化,可以使用导出的和挂载的状态码、[statuses](https://github.com/jshttp/statuses)[http-status-codes](https://github.com/prettymuchbryce/http-status-codes)[node-http-status](https://github.com/adaltas/node-http-status)
如果你追求语义化,可以使用导出的和挂载的状态码、[statuses-es](https://github.com/esm-ts/statuses-es)[http-status-codes](https://github.com/prettymuchbryce/http-status-codes)[node-http-status](https://github.com/adaltas/node-http-status)

```typescript
import { un, HttpStatusCode } from '@uni-helper/uni-network';
Expand Down
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@
"dependencies": {
"@dcloudio/types": "^3.4.8",
"@types/lodash.merge": "^4.6.9",
"@types/statuses": "^2.0.5",
"fast-querystring": "^1.1.2",
"lodash.merge": "^4.6.2",
"statuses": "^2.0.1",
"statuses-es": "^2.0.6",
"vue-demi": "^0.14.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/adapters/download.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import statuses from "statuses";
import statuses from "statuses-es";
import type { UnCancelTokenListener } from "../core/UnCancelToken";
import { UnCanceledError } from "../core/UnCanceledError";
import { settle } from "../core/settle";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/adapters/request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import statuses from "statuses";
import statuses from "statuses-es";
import type { UnCancelTokenListener } from "../core/UnCancelToken";
import { UnCanceledError } from "../core/UnCanceledError";
import { settle } from "../core/settle";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/adapters/upload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import statuses from "statuses";
import statuses from "statuses-es";
import type { UnCancelTokenListener } from "../core/UnCancelToken";
import { UnCanceledError } from "../core/UnCanceledError";
import { settle } from "../core/settle";
Expand Down
33 changes: 22 additions & 11 deletions pnpm-lock.yaml

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

0 comments on commit 4806357

Please sign in to comment.