diff --git a/model/CHANGELOG.md b/model/CHANGELOG.md index 9a08d18..18236e6 100644 --- a/model/CHANGELOG.md +++ b/model/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.5.0 + +* Migrate all imported from `dart:html` to `package:web` + ## 3.4.0 * Add `MockOgHrefClient.advance` for building responding content with different content type applied. diff --git a/model/lib/src/disguise_ua/disguise_ua.dart b/model/lib/src/disguise_ua/disguise_ua.dart index fec112b..cbd9668 100644 --- a/model/lib/src/disguise_ua/disguise_ua.dart +++ b/model/lib/src/disguise_ua/disguise_ua.dart @@ -1 +1,2 @@ -export 'disguise_ua_other.dart' if (dart.library.html) 'disguise_ua_web.dart'; +export 'disguise_ua_other.dart' + if (dart.library.js_interop) 'disguise_ua_web.dart'; diff --git a/model/lib/src/disguise_ua/disguise_ua_other.dart b/model/lib/src/disguise_ua/disguise_ua_other.dart index 5c82df5..502d0d3 100644 --- a/model/lib/src/disguise_ua/disguise_ua_other.dart +++ b/model/lib/src/disguise_ua/disguise_ua_other.dart @@ -2,4 +2,4 @@ import 'package:meta/meta.dart'; @internal String get disguisedUserAgent => - throw UnsupportedError("This feature requires dart:html only."); + throw UnsupportedError("This feature only available for web browser."); diff --git a/model/lib/src/disguise_ua/disguise_ua_web.dart b/model/lib/src/disguise_ua/disguise_ua_web.dart index 0ffbfa5..8b8399e 100644 --- a/model/lib/src/disguise_ua/disguise_ua_web.dart +++ b/model/lib/src/disguise_ua/disguise_ua_web.dart @@ -1,6 +1,5 @@ -import 'dart:html'; - import 'package:meta/meta.dart'; +import 'package:web/web.dart'; @internal String get disguisedUserAgent => window.navigator.userAgent; diff --git a/model/pubspec.yaml b/model/pubspec.yaml index e5bc71b..503609d 100644 --- a/model/pubspec.yaml +++ b/model/pubspec.yaml @@ -1,6 +1,6 @@ name: oghref_model description: Object standarized definition with parser interface for constructing rich information of given URL among various metadata protocols. -version: 3.4.0 +version: 3.5.0 repository: https://github.com/rk0cc/oghref/tree/main/model issue_tracker: https://github.com/rk0cc/oghref/issues funding: @@ -17,6 +17,7 @@ dependencies: html: '>=0.15.4 <1.0.0' mime_dart: ^3.0.0 path: ^1.8.3 + web: ^0.5.1 dev_dependencies: lints: ^3.0.0 test: ^1.24.8