From 073efb435fdb1df9f262b475916544f636128530 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 2 Jun 2023 00:08:22 +0800 Subject: [PATCH] Add breaking changes tip in docs (#1844) Resolves #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 --- README-ZH.md | 3 +++ README.md | 3 +++ dio/CHANGELOG.md | 5 +++++ dio/README-ZH.md | 6 ++++-- dio/README.md | 6 ++++-- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index 73f3abe61..1cfc53025 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -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) +**在你更新之前:大版本和次要版本可能会包含不兼容的重大改动。
+请阅读 [迁移指南](dio/migration_guide.md) 了解完整的重大变更内容。** + ### 插件 - cookie_manager: [链接](plugins/cookie_manager) diff --git a/README.md b/README.md index 6b95da0d7..4a52c0e05 100644 --- a/README.md +++ b/README.md @@ -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.
+See the [Migration Guide](dio/migration_guide.md) for the complete breaking changes list.** + ### Plugins - cookie_manager: [link](plugins/cookie_manager) diff --git a/dio/CHANGELOG.md b/dio/CHANGELOG.md index 0c9e9d213..acd6301e9 100644 --- a/dio/CHANGELOG.md +++ b/dio/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +**Before you upgrade: Breaking changes might happen in major and minor versions of packages.
+See the [Migration Guide][] for the complete breaking changes list.** + ## Unreleased - Make `LogInterceptor` prints in DEBUG mode (when the assertion is enabled) by default. @@ -324,3 +327,5 @@ First Stable version for 2.x ## 0.0.1 - Initial version, created by Stagehand + +[Migration Guide]: ./migration_guide.md diff --git a/dio/README-ZH.md b/dio/README-ZH.md index 331a426f3..ae98a093a 100644 --- a/dio/README-ZH.md +++ b/dio/README-ZH.md @@ -52,8 +52,6 @@ dio 是一个强大的 Dart HTTP 请求库,支持全局配置、Restful API、 ## 开始使用 -> 查看 [迁移指南](migration_guide.md) 以了解各个版本之间的重大变更。 - ### 添加依赖 你可以使用以下命令将 dio 的最新稳定版依赖添加至你的项目: @@ -72,6 +70,9 @@ dependencies: 最新稳定版本为:![Pub](https://img.shields.io/pub/v/dio.svg) 最新包含开发版的版本为:![Pub](https://img.shields.io/pub/v/dio?include_prereleases) +**在你更新之前:大版本和次要版本可能会包含不兼容的重大改动。
+请阅读 [迁移指南][] 了解完整的重大变更内容。** + ## 一个极简的示例 ```dart @@ -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 diff --git a/dio/README.md b/dio/README.md index fdeace3f7..daa75e16c 100644 --- a/dio/README.md +++ b/dio/README.md @@ -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: @@ -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.
+See the [Migration Guide][] for the complete breaking changes list.** + ### Super simple to use ```dart @@ -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