From 9d377b36ee31719849c87c8fd91da8a42eb50ab7 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Sun, 15 Sep 2024 14:50:47 +0200 Subject: [PATCH] fix wasm support --- http_browser/dart_test.yaml | 5 ++++- http_browser/lib/src/export/export.dart | 2 +- http_browser/pubspec.yaml | 4 +--- http_browser/test/multiplatform/http_browser_api_test.dart | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/http_browser/dart_test.yaml b/http_browser/dart_test.yaml index 035af14..fee5c0f 100644 --- a/http_browser/dart_test.yaml +++ b/http_browser/dart_test.yaml @@ -1,3 +1,6 @@ platforms: - chrome - - vm \ No newline at end of file + - vm +compilers: + - dart2js + - dart2wasm \ No newline at end of file diff --git a/http_browser/lib/src/export/export.dart b/http_browser/lib/src/export/export.dart index 9181d0e..0631d29 100644 --- a/http_browser/lib/src/export/export.dart +++ b/http_browser/lib/src/export/export.dart @@ -1 +1 @@ -export 'export_stub.dart' if (dart.library.html) 'export_web.dart'; +export 'export_stub.dart' if (dart.library.js_interop) 'export_web.dart'; diff --git a/http_browser/pubspec.yaml b/http_browser/pubspec.yaml index 0ff29b6..87abaef 100644 --- a/http_browser/pubspec.yaml +++ b/http_browser/pubspec.yaml @@ -1,6 +1,6 @@ name: tekartik_http_browser description: Http browser -version: 0.7.2 +version: 0.7.3 publish_to: none environment: @@ -12,7 +12,6 @@ dependencies: url: https://github.com/tekartik/http.dart path: http ref: dart3a - version: '>=0.6.0' http: dev_dependencies: process_run: @@ -25,7 +24,6 @@ dev_dependencies: url: https://github.com/tekartik/http.dart path: http_test ref: dart3a - version: '>=0.6.0' dependency_overrides: tekartik_http: diff --git a/http_browser/test/multiplatform/http_browser_api_test.dart b/http_browser/test/multiplatform/http_browser_api_test.dart index fdda24b..1651acd 100644 --- a/http_browser/test/multiplatform/http_browser_api_test.dart +++ b/http_browser/test/multiplatform/http_browser_api_test.dart @@ -8,10 +8,10 @@ import 'package:test/test.dart'; Future main() async { group('http_browser_api', () { - test('httpClientFactoryIo', () async { + test('httpClientFactoryBrowser', () async { try { httpClientFactoryBrowser; - expect(isRunningAsJavascript, isTrue); + expect(kDartIsWeb, isTrue); } on UnimplementedError catch (_) {} }); });