Skip to content

Commit f8a733e

Browse files
committed
fix: had to rollback but now you can ignore ‘url’ if disabling normalizeUrls
1 parent f88bccb commit f8a733e

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"lerna": "^4.0.0",
4242
"nativescript-vue": "^2.9.0",
4343
"ng-packagr": "~12.2.0",
44-
"normalize-url": "^7.0.2",
4544
"prettier": "^2.3.2",
4645
"promise-polyfill": "^8.2.0",
4746
"react-nativescript": "^2.2.0",
@@ -56,6 +55,7 @@
5655
"tslib": "^2.3.0",
5756
"typedoc": "^0.21.5",
5857
"typescript": "~4.3.5",
58+
"url": "^0.11.0",
5959
"vue": "^2.6.14",
6060
"yargs": "^17.1.0"
6161
},

packages/webview/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript-community/ui-webview",
3-
"version": "1.2.6",
3+
"version": "1.2.5",
44
"description": "Image caching plugin for NativeScript",
55
"main": "./index",
66
"sideEffects": false,
@@ -70,6 +70,6 @@
7070
"license": "Apache-2.0",
7171
"readmeFilename": "README.md",
7272
"dependencies": {
73-
"normalize-url": "^7.0.2"
73+
"url": "^0.11.0"
7474
}
7575
}

src/webview/index.common.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export const webConsoleProperty = new Property<WebViewExtBase, boolean>({
5858
valueConverter: booleanConverter
5959
});
6060

61-
6261
export const displayZoomControlsProperty = new Property<WebViewExtBase, boolean>({
6362
name: 'displayZoomControls',
6463
defaultValue: true,
@@ -107,10 +106,6 @@ export const normalizeUrlsProperty = new Property<WebViewExtBase, boolean>({
107106
defaultValue: true,
108107
valueConverter: booleanConverter
109108
});
110-
export const normalizeUrlsOptionsProperty = new Property<WebViewExtBase, any>({
111-
name: 'normalizeUrlsOptions'
112-
});
113-
114109
export type ViewPortValue = boolean | ViewPortProperties;
115110
export const viewPortProperty = new Property<WebViewExtBase, ViewPortValue>({
116111
name: 'viewPortSize',
@@ -375,7 +370,6 @@ export class UnsupportedSDKError extends Error {
375370
export abstract class WebViewExtBase extends ContainerView {
376371
public webConsoleEnabled: boolean;
377372
public normalizeUrls: boolean;
378-
public normalizeUrlsOptions: any;
379373

380374
public static readonly supportXLocalScheme: boolean;
381375

@@ -1107,8 +1101,7 @@ export abstract class WebViewExtBase extends ContainerView {
11071101
if (!url || !this.normalizeUrls || url.startsWith(this.interceptScheme)) {
11081102
return url;
11091103
}
1110-
1111-
return normalizeUrl(url, this.normalizeUrlsOptions);
1104+
return require('url').parse(url).format();
11121105
}
11131106

11141107
/**

0 commit comments

Comments
 (0)