@remix-run/router 1.20.0 → 1.21.0
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/CHANGELOG.md +15 -3
- package/README.md +1 -1
- package/dist/router.cjs.js +12 -5
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.js +12 -5
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +12 -5
- package/dist/router.umd.js.map +1 -1
- package/dist/router.umd.min.js +1 -1
- package/dist/router.umd.min.js.map +1 -1
- package/dist/utils.d.ts +11 -4
- package/package.json +1 -1
- package/utils.ts +11 -4
package/dist/router.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @remix-run/router v1.
|
|
2
|
+
* @remix-run/router v1.21.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -512,7 +512,7 @@ function convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manif
|
|
|
512
512
|
/**
|
|
513
513
|
* Matches the given routes to a location and returns the match data.
|
|
514
514
|
*
|
|
515
|
-
* @see https://reactrouter.com/utils/match-routes
|
|
515
|
+
* @see https://reactrouter.com/v6/utils/match-routes
|
|
516
516
|
*/
|
|
517
517
|
function matchRoutes(routes, locationArg, basename) {
|
|
518
518
|
if (basename === void 0) {
|
|
@@ -737,7 +737,7 @@ function matchRouteBranch(branch, pathname, allowPartial) {
|
|
|
737
737
|
/**
|
|
738
738
|
* Returns a path with params interpolated.
|
|
739
739
|
*
|
|
740
|
-
* @see https://reactrouter.com/utils/generate-path
|
|
740
|
+
* @see https://reactrouter.com/v6/utils/generate-path
|
|
741
741
|
*/
|
|
742
742
|
function generatePath(originalPath, params) {
|
|
743
743
|
if (params === void 0) {
|
|
@@ -777,7 +777,7 @@ function generatePath(originalPath, params) {
|
|
|
777
777
|
* Performs pattern matching on a URL pathname and returns information about
|
|
778
778
|
* the match.
|
|
779
779
|
*
|
|
780
|
-
* @see https://reactrouter.com/utils/match-path
|
|
780
|
+
* @see https://reactrouter.com/v6/utils/match-path
|
|
781
781
|
*/
|
|
782
782
|
function matchPath(pattern, pathname) {
|
|
783
783
|
if (typeof pattern === "string") {
|
|
@@ -889,7 +889,7 @@ function stripBasename(pathname, basename) {
|
|
|
889
889
|
/**
|
|
890
890
|
* Returns a resolved path object relative to the given pathname.
|
|
891
891
|
*
|
|
892
|
-
* @see https://reactrouter.com/utils/resolve-path
|
|
892
|
+
* @see https://reactrouter.com/v6/utils/resolve-path
|
|
893
893
|
*/
|
|
894
894
|
function resolvePath(to, fromPathname) {
|
|
895
895
|
if (fromPathname === void 0) {
|
|
@@ -1043,6 +1043,9 @@ const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#")
|
|
|
1043
1043
|
/**
|
|
1044
1044
|
* This is a shortcut for creating `application/json` responses. Converts `data`
|
|
1045
1045
|
* to JSON and sets the `Content-Type` header.
|
|
1046
|
+
*
|
|
1047
|
+
* @deprecated The `json` method is deprecated in favor of returning raw objects.
|
|
1048
|
+
* This method will be removed in v7.
|
|
1046
1049
|
*/
|
|
1047
1050
|
const json = function json(data, init) {
|
|
1048
1051
|
if (init === void 0) {
|
|
@@ -1211,6 +1214,10 @@ function unwrapTrackedPromise(value) {
|
|
|
1211
1214
|
}
|
|
1212
1215
|
return value._data;
|
|
1213
1216
|
}
|
|
1217
|
+
/**
|
|
1218
|
+
* @deprecated The `defer` method is deprecated in favor of returning raw
|
|
1219
|
+
* objects. This method will be removed in v7.
|
|
1220
|
+
*/
|
|
1214
1221
|
const defer = function defer(data, init) {
|
|
1215
1222
|
if (init === void 0) {
|
|
1216
1223
|
init = {};
|