Skip to content

Commit

Permalink
Pacakge migration
Browse files Browse the repository at this point in the history
  • Loading branch information
rk0cc committed Apr 20, 2024
1 parent 5ab1613 commit d4392d5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions model/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 2 additions & 1 deletion model/lib/src/disguise_ua/disguise_ua.dart
Original file line number Diff line number Diff line change
@@ -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';
2 changes: 1 addition & 1 deletion model/lib/src/disguise_ua/disguise_ua_other.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
3 changes: 1 addition & 2 deletions model/lib/src/disguise_ua/disguise_ua_web.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:html';

import 'package:meta/meta.dart';
import 'package:web/web.dart';

@internal
String get disguisedUserAgent => window.navigator.userAgent;
3 changes: 2 additions & 1 deletion model/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down

0 comments on commit d4392d5

Please sign in to comment.