From c35f6246941a5ab026650dcdfff427f627cae23b Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Thu, 4 Jul 2024 14:08:35 +0200 Subject: [PATCH 1/4] Remove WASM imports --- dio/lib/src/adapter.dart | 1 - dio/lib/src/compute/compute.dart | 1 - dio/lib/src/dio.dart | 1 - dio/lib/src/dio_mixin.dart | 1 - dio/lib/src/multipart_file.dart | 1 - 5 files changed, 5 deletions(-) diff --git a/dio/lib/src/adapter.dart b/dio/lib/src/adapter.dart index 1f88a3fc1..96bf2149d 100644 --- a/dio/lib/src/adapter.dart +++ b/dio/lib/src/adapter.dart @@ -4,7 +4,6 @@ import 'dart:typed_data'; import 'package:meta/meta.dart'; import 'adapters/io_adapter.dart' - if (dart.library.js_interop) 'adapters/browser_adapter.dart' if (dart.library.html) 'adapters/browser_adapter.dart' as adapter; import 'headers.dart'; import 'options.dart'; diff --git a/dio/lib/src/compute/compute.dart b/dio/lib/src/compute/compute.dart index 291b46466..60047e5a7 100644 --- a/dio/lib/src/compute/compute.dart +++ b/dio/lib/src/compute/compute.dart @@ -26,7 +26,6 @@ import 'dart:async'; import 'compute_io.dart' - if (dart.library.js_interop) 'compute_web.dart' if (dart.library.html) 'compute_web.dart' as _c; /// Signature for the callback passed to [compute]. diff --git a/dio/lib/src/dio.dart b/dio/lib/src/dio.dart index 321398745..0cbd18529 100644 --- a/dio/lib/src/dio.dart +++ b/dio/lib/src/dio.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'adapter.dart'; import 'cancel_token.dart'; import 'dio/dio_for_native.dart' - if (dart.library.js_interop) 'dio/dio_for_browser.dart' if (dart.library.html) 'dio/dio_for_browser.dart'; import 'dio_mixin.dart'; import 'headers.dart'; diff --git a/dio/lib/src/dio_mixin.dart b/dio/lib/src/dio_mixin.dart index dbc1bd96b..87c04e17c 100644 --- a/dio/lib/src/dio_mixin.dart +++ b/dio/lib/src/dio_mixin.dart @@ -16,7 +16,6 @@ import 'headers.dart'; import 'interceptors/imply_content_type.dart'; import 'options.dart'; import 'progress_stream/io_progress_stream.dart' - if (dart.library.js_interop) 'progress_stream/browser_progress_stream.dart' if (dart.library.html) 'progress_stream/browser_progress_stream.dart'; import 'response.dart'; import 'response/response_stream_handler.dart'; diff --git a/dio/lib/src/multipart_file.dart b/dio/lib/src/multipart_file.dart index 8d451a4d3..f40e050cf 100644 --- a/dio/lib/src/multipart_file.dart +++ b/dio/lib/src/multipart_file.dart @@ -4,7 +4,6 @@ import 'dart:typed_data' show Uint8List; import 'package:http_parser/http_parser.dart' show MediaType; import 'multipart_file/io_multipart_file.dart' - if (dart.library.js_interop) 'multipart_file/browser_multipart_file.dart' if (dart.library.html) 'multipart_file/browser_multipart_file.dart'; import 'utils.dart'; From 2f61d9be0219977f7a328e2de45af6897d262660 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Thu, 4 Jul 2024 14:17:03 +0200 Subject: [PATCH 2/4] Fix format --- dio/lib/src/compute/compute.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dio/lib/src/compute/compute.dart b/dio/lib/src/compute/compute.dart index 60047e5a7..a1c1aef4d 100644 --- a/dio/lib/src/compute/compute.dart +++ b/dio/lib/src/compute/compute.dart @@ -25,8 +25,7 @@ import 'dart:async'; -import 'compute_io.dart' - if (dart.library.html) 'compute_web.dart' as _c; +import 'compute_io.dart' if (dart.library.html) 'compute_web.dart' as _c; /// Signature for the callback passed to [compute]. /// From 8a0e3d7ed8a1eac926ee7403a6d4677632722c35 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Thu, 4 Jul 2024 14:30:01 +0200 Subject: [PATCH 3/4] Add changelog --- dio/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dio/CHANGELOG.md b/dio/CHANGELOG.md index 2ec1fd902..de4259f61 100644 --- a/dio/CHANGELOG.md +++ b/dio/CHANGELOG.md @@ -7,6 +7,10 @@ See the [Migration Guide][] for the complete breaking changes list.** *None.* +## 5.5.0+1 + +- Fix WASM compile errors after moving the web implementation to `dio_web_adapter`. + ## 5.5.0 - Raise the min Dart SDK version to 2.18.0. From c870083c5d98a8a608b7196a65b51e68be7dd8f5 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Thu, 4 Jul 2024 20:47:06 +0800 Subject: [PATCH 4/4] Update dio/CHANGELOG.md Signed-off-by: Alex Li --- dio/CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dio/CHANGELOG.md b/dio/CHANGELOG.md index de4259f61..030011bc9 100644 --- a/dio/CHANGELOG.md +++ b/dio/CHANGELOG.md @@ -5,10 +5,6 @@ See the [Migration Guide][] for the complete breaking changes list.** ## Unreleased -*None.* - -## 5.5.0+1 - - Fix WASM compile errors after moving the web implementation to `dio_web_adapter`. ## 5.5.0