Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3486809
D6698.id22382.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D6698.id22382.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 6:01 AM (21 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2675146
Default Alt Text
D6698.id22382.diff (2 KB)
Attached To
Mode
D6698: [lib] Remove url-parse-lax from Webpack bundles
Attached
Detach File
Event Timeline
Log In to Comment