Skip to content

Commit

Permalink
fix: use whatwg-url for creating urls in android (#1326)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuncaulubilge authored and craigbilner committed Sep 14, 2018
1 parent 276e9e8 commit ac28429
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions android-app/index.android.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { AppRegistry } from "react-native";
import { URL, URLSearchParams } from "whatwg-url";
import AuthorProfileView from "./pages/author-profile";
import ArticleView from "./pages/article";
import TopicView from "./pages/topic";

// see https://github.com/facebook/react-native/issues/16434
global.URL = URL;
global.URLSearchParams = URLSearchParams;

AppRegistry.registerComponent("AuthorProfile", () => AuthorProfileView);
AppRegistry.registerComponent("Article", () => ArticleView);
AppRegistry.registerComponent("Topic", () => TopicView);
3 changes: 2 additions & 1 deletion android-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"prop-types": "15.6.2",
"react": "16.4.2",
"react-native": "0.55.4",
"react-native-device-info": "0.13.0"
"react-native-device-info": "0.13.0",
"whatwg-url": "7.0.0"
},
"devDependencies": {
"babel-preset-react-native": "4.0.0",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16216,6 +16216,14 @@ whatwg-mimetype@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4"

whatwg-url@7.0.0, whatwg-url@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd"
dependencies:
lodash.sortby "^4.7.0"
tr46 "^1.0.1"
webidl-conversions "^4.0.2"

whatwg-url@^4.3.0:
version "4.8.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0"
Expand All @@ -16231,14 +16239,6 @@ whatwg-url@^6.4.1, whatwg-url@^6.5.0:
tr46 "^1.0.1"
webidl-conversions "^4.0.2"

whatwg-url@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd"
dependencies:
lodash.sortby "^4.7.0"
tr46 "^1.0.1"
webidl-conversions "^4.0.2"

whet.extend@~0.9.9:
version "0.9.9"
resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
Expand Down

0 comments on commit ac28429

Please sign in to comment.