From f66fbf6969080f8070dad8675e8cea8226eb10df Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Mon, 29 Mar 2021 18:17:37 +0200 Subject: [PATCH] [dart][dart-dio] Update dependencies (#9122) * [dart-dio] Update dio * [dart-dio] Update to dio 4.0.0 * [dart-dio] Fix dependency problems with Dart 2.12 SDK during build * Revert changes to analyzer This only fails locally, not sure why. CI only shows a warning. * Fix compile error after http_mock update --- .../src/main/resources/dart-dio/pubspec.mustache | 7 +++---- .../resources/dart/libraries/dio/pubspec.mustache | 2 +- .../dart-dio/petstore_client_lib/pubspec.yaml | 5 ++--- .../petstore_client_lib_fake/pubspec.yaml | 2 +- .../petstore_client_lib_fake_tests/pubspec.yaml | 12 ++++++------ .../test/api/pet_api_test.dart | 2 +- .../dart-dio/petstore_client_lib/pubspec.yaml | 5 ++--- .../dart-dio/petstore_client_lib_fake/pubspec.yaml | 5 ++--- .../petstore_client_lib_fake_tests/pubspec.yaml | 2 +- .../test/api/pet_api_test.dart | 2 +- 10 files changed, 20 insertions(+), 24 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache index 8aea662a61a..1d1a328affe 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/pubspec.mustache @@ -4,14 +4,13 @@ description: {{pubDescription}} environment: sdk: '>=2.7.0 <3.0.0' dependencies: - dio: ^3.0.9 + dio: '^3.0.9' built_value: '>=7.1.0 <8.0.0' built_collection: '>=4.3.2 <5.0.0' {{#timeMachine}} - time_machine: ^0.9.12 + time_machine: '^0.9.12' {{/timeMachine}} dev_dependencies: built_value_generator: '>=7.1.0 <8.0.0' - build_runner: ^1.7.1 + build_runner: any test: '>=1.3.0 <1.16.0' - diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache index 55234533fd0..7e466cc87f5 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/pubspec.mustache @@ -6,7 +6,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - dio: '4.0.0-prev2' + dio: '>=4.0.0 <5.0.0' {{#useBuiltValue}} built_value: '>=8.0.3 <9.0.0' built_collection: '>=5.0.0 <6.0.0' diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml b/samples/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml index cd7cef8cc4f..0db393df2b7 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml +++ b/samples/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml @@ -4,11 +4,10 @@ description: OpenAPI API client environment: sdk: '>=2.7.0 <3.0.0' dependencies: - dio: ^3.0.9 + dio: '^3.0.9' built_value: '>=7.1.0 <8.0.0' built_collection: '>=4.3.2 <5.0.0' dev_dependencies: built_value_generator: '>=7.1.0 <8.0.0' - build_runner: ^1.7.1 + build_runner: any test: '>=1.3.0 <1.16.0' - diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/pubspec.yaml index 5bcd72573d6..ccc4160f3fb 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/pubspec.yaml @@ -6,7 +6,7 @@ environment: sdk: '>=2.12.0 <3.0.0' dependencies: - dio: '4.0.0-prev2' + dio: '>=4.0.0 <5.0.0' built_value: '>=8.0.3 <9.0.0' built_collection: '>=5.0.0 <6.0.0' diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/pubspec.yaml index 73a5b2fbe30..14ffe9f815b 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/pubspec.yaml @@ -8,17 +8,17 @@ environment: sdk: '>=2.10.0 <3.0.0' dev_dependencies: - built_collection: '>=5.0.0 <6.0.0' - built_value: '>=8.0.3 <9.0.0' - dio: '4.0.0-prev2' + built_collection: '5.0.0' + built_value: '8.0.3' + dio: '4.0.0' http_mock_adapter: 1.0.0-nullsafety.1 - mockito: ^5.0.0 + mockito: '5.0.0' openapi: path: ../petstore_client_lib_fake - test: ^1.16.5 + test: '1.16.5' dependency_overrides: http_mock_adapter: git: url: https://github.com/kuhnroyal/http-mock-adapter.git - ref: 6f4489cbceb076494d3fb956665259749520a3bf + ref: 1e3115a3de1dde132ebe7cb711d9175a97adda02 diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/pet_api_test.dart index 80aa2b8bfac..5aae7639fda 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/pet_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake_tests/test/api/pet_api_test.dart @@ -190,7 +190,7 @@ void main() { }, ]), request: Request( - method: RequestMethods.GET, + method: RequestMethods.get, queryParameters: { 'status': [ 'available', diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml index cd7cef8cc4f..0db393df2b7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml @@ -4,11 +4,10 @@ description: OpenAPI API client environment: sdk: '>=2.7.0 <3.0.0' dependencies: - dio: ^3.0.9 + dio: '^3.0.9' built_value: '>=7.1.0 <8.0.0' built_collection: '>=4.3.2 <5.0.0' dev_dependencies: built_value_generator: '>=7.1.0 <8.0.0' - build_runner: ^1.7.1 + build_runner: any test: '>=1.3.0 <1.16.0' - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml index cd7cef8cc4f..0db393df2b7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/pubspec.yaml @@ -4,11 +4,10 @@ description: OpenAPI API client environment: sdk: '>=2.7.0 <3.0.0' dependencies: - dio: ^3.0.9 + dio: '^3.0.9' built_value: '>=7.1.0 <8.0.0' built_collection: '>=4.3.2 <5.0.0' dev_dependencies: built_value_generator: '>=7.1.0 <8.0.0' - build_runner: ^1.7.1 + build_runner: any test: '>=1.3.0 <1.16.0' - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml index 0bf2e1272b0..9cfa0f90cd8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/pubspec.yaml @@ -13,7 +13,7 @@ dev_dependencies: http_mock_adapter: git: url: https://github.com/kuhnroyal/http-mock-adapter.git - ref: 2d7bb10369be49d3c53a6567cc76e8580b5d133d + ref: 24cafff5236f8cc7d52a05529751ac47abd895ff openapi: path: ../petstore_client_lib_fake test: 1.15.5 diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/pet_api_test.dart index 616441379ba..39baadd8375 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/pet_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/test/api/pet_api_test.dart @@ -186,7 +186,7 @@ void main() { }, ]), request: Request( - method: RequestMethods.GET, + method: RequestMethods.get, queryParameters: { 'status': [ 'available',