@tinkoff/router 0.1.73 → 0.1.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.browser.js +3 -1
- package/lib/index.es.js +3 -1
- package/lib/index.js +3 -1
- package/lib/utils.d.ts +1 -1
- package/package.json +4 -4
package/lib/index.browser.js
CHANGED
|
@@ -366,7 +366,9 @@ class AbstractRouter {
|
|
|
366
366
|
pathname = makePath(currentRoute.path, { ...currentRoute.params, ...params });
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
|
|
369
|
+
if (isSameHost(resultUrl)) {
|
|
370
|
+
pathname = this.normalizePathname(pathname);
|
|
371
|
+
}
|
|
370
372
|
return convertRawUrl(rawAssignUrl(resultUrl, {
|
|
371
373
|
pathname,
|
|
372
374
|
search: url ? resultUrl.search : '',
|
package/lib/index.es.js
CHANGED
|
@@ -366,7 +366,9 @@ class AbstractRouter {
|
|
|
366
366
|
pathname = makePath(currentRoute.path, { ...currentRoute.params, ...params });
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
|
|
369
|
+
if (isSameHost(resultUrl)) {
|
|
370
|
+
pathname = this.normalizePathname(pathname);
|
|
371
|
+
}
|
|
370
372
|
return convertRawUrl(rawAssignUrl(resultUrl, {
|
|
371
373
|
pathname,
|
|
372
374
|
search: url ? resultUrl.search : '',
|
package/lib/index.js
CHANGED
|
@@ -381,7 +381,9 @@ class AbstractRouter {
|
|
|
381
381
|
pathname = makePath(currentRoute.path, { ...currentRoute.params, ...params });
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
|
|
384
|
+
if (isSameHost(resultUrl)) {
|
|
385
|
+
pathname = this.normalizePathname(pathname);
|
|
386
|
+
}
|
|
385
387
|
return url.convertRawUrl(url.rawAssignUrl(resultUrl, {
|
|
386
388
|
pathname,
|
|
387
389
|
search: url$1 ? resultUrl.search : '',
|
package/lib/utils.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import type { NavigateOptions, NavigationHook, NavigationSyncHook, NavigationGua
|
|
|
3
3
|
export declare const isFilePath: (pathname: string) => boolean;
|
|
4
4
|
export declare const normalizeTrailingSlash: (pathname: string, trailingSlash?: boolean) => string;
|
|
5
5
|
export declare const normalizeManySlashes: (hrefOrPath: string) => string;
|
|
6
|
-
export declare const isSameHost: import("@tinkoff/utils/typings/types").Func<true> | ((url: Url) => boolean);
|
|
6
|
+
export declare const isSameHost: import("@tinkoff/utils/typings/types").Func<true> | ((url: Url | URL) => boolean);
|
|
7
7
|
export declare const makeNavigateOptions: (options: string | NavigateOptions) => NavigateOptions;
|
|
8
8
|
export declare const registerHook: <T extends NavigationHook | NavigationSyncHook | NavigationGuard>(hooksSet: Set<T>, hook: T) => () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinkoff/router",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.76",
|
|
4
4
|
"description": "router",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"build-for-publish": "true"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@tinkoff/react-hooks": "0.0.
|
|
26
|
-
"@tinkoff/url": "0.7.
|
|
25
|
+
"@tinkoff/react-hooks": "0.0.26",
|
|
26
|
+
"@tinkoff/url": "0.7.38",
|
|
27
27
|
"@tinkoff/utils": "^2.1.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"react": ">=16.
|
|
30
|
+
"react": ">=16.14.0",
|
|
31
31
|
"tslib": "^2.0.3"
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|