From b190a9246b13758bb6787b125b3d7bc358f9a4fd Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sat, 2 Dec 2023 17:53:11 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=9A=A8=20Add=20`dart=20fix`=20configu?= =?UTF-8?q?rations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dio/lib/fix_data/fix.yaml | 75 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 dio/lib/fix_data/fix.yaml diff --git a/dio/lib/fix_data/fix.yaml b/dio/lib/fix_data/fix.yaml new file mode 100644 index 000000000..ab802eda2 --- /dev/null +++ b/dio/lib/fix_data/fix.yaml @@ -0,0 +1,75 @@ +version: 1 + +transforms: + # Changes made in https://github.com/cfug/diox/pull/14/files + - title: "Migrate to 'IOHttpClientAdapter'" + date: 2022-11-07 + element: + uris: ['dio.dart', 'adapter.dart', 'adapters/io_adapter.dart'] + class: 'DefaultHttpClientAdapter' + changes: + - kind: 'rename' + newName: 'IOHttpClientAdapter' + + # Changes made in https://github.com/cfug/diox/pull/62/files + - title: "Migrate to 'BackgroundTransformer'" + date: 2023-01-31 + element: + uris: ['dio.dart', 'transformer.dart'] + class: 'DefaultTransformer' + changes: + - kind: 'rename' + newName: 'BackgroundTransformer' + + # Changes made in https://github.com/cfug/dio/pull/1812 + - title: "Migrate to 'CreateHttpClient'" + date: 2023-05-14 + element: + uris: ['dio.dart', 'adapters/io_adapter.dart'] + typedef: 'OnHttpClientCreate' + changes: + - kind: 'rename' + newName: 'CreateHttpClient' + - kind: 'removeParameter' + index: 0 + - title: "Migrate to 'createHttpClient'" + date: 2023-05-14 + element: + uris: ['dio.dart', 'adapters/io_adapter.dart'] + constructor: '' + inClass: 'IOHttpClientAdapter' + changes: + - kind: 'renameParameter' + oldName: 'onHttpClientCreate' + newName: 'createHttpClient' + + # Changes made in https://github.com/cfug/dio/pull/1803 + - title: "Migrate to 'DioException'" + date: 2023-05-15 + element: + uris: ['dio.dart', 'dio_exception.dart', 'dio_error.dart'] + class: 'DioError' + changes: + - kind: 'rename' + newName: 'DioException' + + # Changes made in https://github.com/cfug/dio/pull/1803 + - title: "Migrate to 'DioExceptionType'" + date: 2023-05-15 + element: + uris: ['dio.dart', 'dio_exception.dart', 'dio_error.dart'] + class: 'DioErrorType' + changes: + - kind: 'rename' + newName: 'DioExceptionType' + + # Changes made in https://github.com/cfug/dio/pull/1903 + - title: "Migrate to 'MultipartFile.fromStream'" + date: 2023-06-25 + element: + uris: ['dio.dart', 'multipart_file.dart'] + constructor: '' + inClass: 'MultipartFile' + changes: + - kind: 'rename' + newName: 'fromStream' From a1e171019fa82da0513be1fab44697c90e573c6d Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sat, 2 Dec 2023 18:01:47 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=92=AC=20--?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dio/lib/fix_data/fix.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dio/lib/fix_data/fix.yaml b/dio/lib/fix_data/fix.yaml index ab802eda2..3ffd443fe 100644 --- a/dio/lib/fix_data/fix.yaml +++ b/dio/lib/fix_data/fix.yaml @@ -1,7 +1,7 @@ version: 1 transforms: - # Changes made in https://github.com/cfug/diox/pull/14/files + # Changes made in https://github.com/cfug/diox/pull/14 - title: "Migrate to 'IOHttpClientAdapter'" date: 2022-11-07 element: @@ -11,7 +11,7 @@ transforms: - kind: 'rename' newName: 'IOHttpClientAdapter' - # Changes made in https://github.com/cfug/diox/pull/62/files + # Changes made in https://github.com/cfug/diox/pull/62 - title: "Migrate to 'BackgroundTransformer'" date: 2023-01-31 element: From d1c3e0840358b69f37dcb215c718037d1c1c6dd4 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sat, 2 Dec 2023 18:07:49 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20uris?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dio/lib/fix_data/fix.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dio/lib/fix_data/fix.yaml b/dio/lib/fix_data/fix.yaml index 3ffd443fe..7cf78e8e9 100644 --- a/dio/lib/fix_data/fix.yaml +++ b/dio/lib/fix_data/fix.yaml @@ -5,7 +5,7 @@ transforms: - title: "Migrate to 'IOHttpClientAdapter'" date: 2022-11-07 element: - uris: ['dio.dart', 'adapter.dart', 'adapters/io_adapter.dart'] + uris: ['dio.dart', 'src/adapter.dart', 'src/adapters/io_adapter.dart'] class: 'DefaultHttpClientAdapter' changes: - kind: 'rename' @@ -15,7 +15,7 @@ transforms: - title: "Migrate to 'BackgroundTransformer'" date: 2023-01-31 element: - uris: ['dio.dart', 'transformer.dart'] + uris: ['dio.dart', 'src/transformer.dart'] class: 'DefaultTransformer' changes: - kind: 'rename' @@ -25,7 +25,7 @@ transforms: - title: "Migrate to 'CreateHttpClient'" date: 2023-05-14 element: - uris: ['dio.dart', 'adapters/io_adapter.dart'] + uris: ['dio.dart', 'src/adapters/io_adapter.dart'] typedef: 'OnHttpClientCreate' changes: - kind: 'rename' @@ -35,7 +35,7 @@ transforms: - title: "Migrate to 'createHttpClient'" date: 2023-05-14 element: - uris: ['dio.dart', 'adapters/io_adapter.dart'] + uris: ['dio.dart', 'src/adapters/io_adapter.dart'] constructor: '' inClass: 'IOHttpClientAdapter' changes: @@ -47,7 +47,7 @@ transforms: - title: "Migrate to 'DioException'" date: 2023-05-15 element: - uris: ['dio.dart', 'dio_exception.dart', 'dio_error.dart'] + uris: ['dio.dart', 'src/dio_exception.dart', 'src/dio_error.dart'] class: 'DioError' changes: - kind: 'rename' @@ -57,7 +57,7 @@ transforms: - title: "Migrate to 'DioExceptionType'" date: 2023-05-15 element: - uris: ['dio.dart', 'dio_exception.dart', 'dio_error.dart'] + uris: ['dio.dart', 'src/dio_exception.dart', 'src/dio_error.dart'] class: 'DioErrorType' changes: - kind: 'rename' @@ -67,7 +67,7 @@ transforms: - title: "Migrate to 'MultipartFile.fromStream'" date: 2023-06-25 element: - uris: ['dio.dart', 'multipart_file.dart'] + uris: ['dio.dart', 'src/multipart_file.dart'] constructor: '' inClass: 'MultipartFile' changes: From 4f52c45e5ed13f045ddd8bb0e9d1fdc357957602 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sat, 2 Dec 2023 18:08:32 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=9A=A8=20native=5Fdio=5Fadapter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../native_dio_adapter/lib/fix_data/fix.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 plugins/native_dio_adapter/lib/fix_data/fix.yaml diff --git a/plugins/native_dio_adapter/lib/fix_data/fix.yaml b/plugins/native_dio_adapter/lib/fix_data/fix.yaml new file mode 100644 index 000000000..af64bb201 --- /dev/null +++ b/plugins/native_dio_adapter/lib/fix_data/fix.yaml @@ -0,0 +1,17 @@ +version: 1 + +transforms: + # Changes made in https://github.com/cfug/dio/pull/2040 + - title: "Migrate to create configuration" + date: 2023-11-25 + element: + uris: ['native_dio_adapter.dart', 'src/native_adapter.dart'] + constructor: '' + inClass: 'NativeAdapter' + changes: + - kind: 'renameParameter' + oldName: 'androidCronetEngine' + newName: 'createCronetEngine' + - kind: 'renameParameter' + oldName: 'cupertinoConfiguration' + newName: 'createCupertinoConfiguration' From b6d9fb794ae8c17289b3f941e1d7989416f6f853 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sat, 2 Dec 2023 18:09:39 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=93=9D=20CHANGELOG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dio/CHANGELOG.md | 2 +- plugins/native_dio_adapter/CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dio/CHANGELOG.md b/dio/CHANGELOG.md index a39a21f1d..255ac7e7e 100644 --- a/dio/CHANGELOG.md +++ b/dio/CHANGELOG.md @@ -5,7 +5,7 @@ See the [Migration Guide][] for the complete breaking changes list.** ## Unreleased -*None.* +- Provide fix suggestions for `dart fix`. ## 5.4.0 diff --git a/plugins/native_dio_adapter/CHANGELOG.md b/plugins/native_dio_adapter/CHANGELOG.md index 077499bd1..edfcbc728 100644 --- a/plugins/native_dio_adapter/CHANGELOG.md +++ b/plugins/native_dio_adapter/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -*None.* +- Provide fix suggestions for `dart fix`. ## 1.2.0