Skip to content

Commit

Permalink
Add breaking changes tip in docs (cfug#1844)
Browse files Browse the repository at this point in the history
Resolves cfug#1843.

### New Pull Request Checklist

- [x] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [x] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [x] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [ ] I have added the required tests to prove the fix/feature I'm
adding
- [x] I have updated the documentation (if necessary)
- [ ] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

Apparently, the previous tips are not obvious enough.

---------

Signed-off-by: Alex Li <[email protected]>
  • Loading branch information
AlexV525 authored Jun 1, 2023
1 parent 801b3f3 commit 073efb4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Language: [English](README.md) | 简体中文
- dio: [链接](dio)
[![Pub](https://img.shields.io/pub/v/dio.svg?label=dev&include_prereleases)](https://pub.flutter-io.cn/packages/dio)

**在你更新之前:大版本和次要版本可能会包含不兼容的重大改动。<br/>
请阅读 [迁移指南](dio/migration_guide.md) 了解完整的重大变更内容。**

### 插件

- cookie_manager: [链接](plugins/cookie_manager)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Please move specific paths for projects instructions.
- dio: [link](dio)
[![Pub](https://img.shields.io/pub/v/dio.svg?label=dev&include_prereleases)](https://pub.dev/packages/dio)

**Before you upgrade: Breaking changes might happen in major and minor versions of packages.<br/>
See the [Migration Guide](dio/migration_guide.md) for the complete breaking changes list.**

### Plugins

- cookie_manager: [link](plugins/cookie_manager)
Expand Down
5 changes: 5 additions & 0 deletions dio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

**Before you upgrade: Breaking changes might happen in major and minor versions of packages.<br/>
See the [Migration Guide][] for the complete breaking changes list.**

## Unreleased

- Make `LogInterceptor` prints in DEBUG mode (when the assertion is enabled) by default.
Expand Down Expand Up @@ -324,3 +327,5 @@ First Stable version for 2.x
## 0.0.1

- Initial version, created by Stagehand

[Migration Guide]: ./migration_guide.md
6 changes: 4 additions & 2 deletions dio/README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ dio 是一个强大的 Dart HTTP 请求库,支持全局配置、Restful API、

## 开始使用

> 查看 [迁移指南](migration_guide.md) 以了解各个版本之间的重大变更。
### 添加依赖

你可以使用以下命令将 dio 的最新稳定版依赖添加至你的项目:
Expand All @@ -72,6 +70,9 @@ dependencies:
最新稳定版本为:![Pub](https://img.shields.io/pub/v/dio.svg)
最新包含开发版的版本为:![Pub](https://img.shields.io/pub/v/dio?include_prereleases)
**在你更新之前:大版本和次要版本可能会包含不兼容的重大改动。<br/>
请阅读 [迁移指南][] 了解完整的重大变更内容。**
## 一个极简的示例
```dart
Expand Down Expand Up @@ -867,5 +868,6 @@ class MyDio with DioMixin implements Dio {

你可以参考简单请求的定义修改你的请求,或者为你的服务加上 CORS 中间件进行跨域处理。

[迁移指南]: ./migration_guide.md
[简单请求]: https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CORS#%E7%AE%80%E5%8D%95%E8%AF%B7%E6%B1%82
[CORS 预检]: https://developer.mozilla.org/zh-CN/docs/Glossary/Preflight_request
6 changes: 4 additions & 2 deletions dio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ timeout, and custom adapters etc.

## Get started

> Checkout the [Migration Guide](migration_guide.md) for breaking changes between versions.
### Add dependency

You can use the command to add dio as a dependency with the latest stable version:
Expand All @@ -73,6 +71,9 @@ dependencies:
The latest version is: ![Pub](https://img.shields.io/pub/v/dio.svg)
The latest version including pre-releases is: ![Pub](https://img.shields.io/pub/v/dio?include_prereleases)
**Before you upgrade: Breaking changes might happen in major and minor versions of packages.<br/>
See the [Migration Guide][] for the complete breaking changes list.**
### Super simple to use
```dart
Expand Down Expand Up @@ -918,5 +919,6 @@ and a server is aware using specific methods and headers.
You can modify your requests to match the definition of simple request,
or add a CORS middleware for your service to handle CORS requests.

[Migration Guide]: ./migration_guide.md
[simple request]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests
[CORS preflight request]: https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request

0 comments on commit 073efb4

Please sign in to comment.