Page MenuHomePhabricator

D6698.diff
No OneTemporary

D6698.diff

diff --git a/lib/package.json b/lib/package.json
--- a/lib/package.json
+++ b/lib/package.json
@@ -51,7 +51,6 @@
"siwe": "^1.1.6",
"tinycolor2": "^1.4.1",
"tokenize-text": "^1.1.3",
- "url-parse-lax": "^3.0.0",
"util-inspect": "^0.1.8",
"utils-copy-error": "^1.0.1",
"wagmi": "^0.6.0"
diff --git a/lib/utils/url-utils.js b/lib/utils/url-utils.js
--- a/lib/utils/url-utils.js
+++ b/lib/utils/url-utils.js
@@ -1,7 +1,5 @@
// @flow
-import urlParseLax from 'url-parse-lax';
-
import { pendingThreadIDRegex } from '../shared/thread-utils.js';
export type URLInfo = {
@@ -89,10 +87,6 @@
return returnObj;
}
-function normalizeURL(url: string): string {
- return urlParseLax(url).href;
-}
-
const setURLPrefix = 'SET_URL_PREFIX';
-export { infoFromURL, normalizeURL, setURLPrefix };
+export { infoFromURL, setURLPrefix };
diff --git a/native/markdown/markdown-link.react.js b/native/markdown/markdown-link.react.js
--- a/native/markdown/markdown-link.react.js
+++ b/native/markdown/markdown-link.react.js
@@ -4,8 +4,6 @@
import * as React from 'react';
import { Text, Linking, Alert } from 'react-native';
-import { normalizeURL } from 'lib/utils/url-utils.js';
-
import {
MarkdownContext,
type MarkdownContextType,
@@ -13,6 +11,7 @@
import { MarkdownSpoilerContext } from './markdown-spoiler-context.js';
import { MessagePressResponderContext } from '../chat/message-press-responder-context.js';
import { TextMessageMarkdownContext } from '../chat/text-message-markdown-context.js';
+import { normalizeURL } from '../utils/url-utils.js';
function useDisplayLinkPrompt(
inputURL: string,
diff --git a/native/package.json b/native/package.json
--- a/native/package.json
+++ b/native/package.json
@@ -119,7 +119,9 @@
"rn-emoji-keyboard": "^1.2.0",
"shallowequal": "^1.0.2",
"simple-markdown": "^0.7.2",
- "tinycolor2": "^1.4.1"
+ "tinycolor2": "^1.4.1",
+ "url": "^0.11.0",
+ "url-parse-lax": "^3.0.0"
},
"jest": {
"preset": "react-native"
diff --git a/native/utils/url-utils.js b/native/utils/url-utils.js
--- a/native/utils/url-utils.js
+++ b/native/utils/url-utils.js
@@ -3,6 +3,7 @@
import invariant from 'invariant';
import { Platform } from 'react-native';
import DeviceInfo from 'react-native-device-info';
+import urlParseLax from 'url-parse-lax';
import {
natDevHostname,
@@ -63,6 +64,10 @@
const setCustomServer = 'SET_CUSTOM_SERVER';
+function normalizeURL(url: string): string {
+ return urlParseLax(url).href;
+}
+
export {
defaultURLPrefix,
defaultLandingURLPrefix,
@@ -70,4 +75,5 @@
nodeServerOptions,
natNodeServer,
setCustomServer,
+ normalizeURL,
};

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 3:18 AM (21 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2675146
Default Alt Text
D6698.diff (2 KB)

Event Timeline