@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.umd.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
|
*
|
|
@@ -746,7 +746,7 @@
|
|
|
746
746
|
/**
|
|
747
747
|
* Matches the given routes to a location and returns the match data.
|
|
748
748
|
*
|
|
749
|
-
* @see https://reactrouter.com/utils/match-routes
|
|
749
|
+
* @see https://reactrouter.com/v6/utils/match-routes
|
|
750
750
|
*/
|
|
751
751
|
function matchRoutes(routes, locationArg, basename) {
|
|
752
752
|
if (basename === void 0) {
|
|
@@ -979,7 +979,7 @@
|
|
|
979
979
|
/**
|
|
980
980
|
* Returns a path with params interpolated.
|
|
981
981
|
*
|
|
982
|
-
* @see https://reactrouter.com/utils/generate-path
|
|
982
|
+
* @see https://reactrouter.com/v6/utils/generate-path
|
|
983
983
|
*/
|
|
984
984
|
function generatePath(originalPath, params) {
|
|
985
985
|
if (params === void 0) {
|
|
@@ -1031,7 +1031,7 @@
|
|
|
1031
1031
|
* Performs pattern matching on a URL pathname and returns information about
|
|
1032
1032
|
* the match.
|
|
1033
1033
|
*
|
|
1034
|
-
* @see https://reactrouter.com/utils/match-path
|
|
1034
|
+
* @see https://reactrouter.com/v6/utils/match-path
|
|
1035
1035
|
*/
|
|
1036
1036
|
function matchPath(pattern, pathname) {
|
|
1037
1037
|
if (typeof pattern === "string") {
|
|
@@ -1146,7 +1146,7 @@
|
|
|
1146
1146
|
/**
|
|
1147
1147
|
* Returns a resolved path object relative to the given pathname.
|
|
1148
1148
|
*
|
|
1149
|
-
* @see https://reactrouter.com/utils/resolve-path
|
|
1149
|
+
* @see https://reactrouter.com/v6/utils/resolve-path
|
|
1150
1150
|
*/
|
|
1151
1151
|
function resolvePath(to, fromPathname) {
|
|
1152
1152
|
if (fromPathname === void 0) {
|
|
@@ -1312,6 +1312,9 @@
|
|
|
1312
1312
|
/**
|
|
1313
1313
|
* This is a shortcut for creating `application/json` responses. Converts `data`
|
|
1314
1314
|
* to JSON and sets the `Content-Type` header.
|
|
1315
|
+
*
|
|
1316
|
+
* @deprecated The `json` method is deprecated in favor of returning raw objects.
|
|
1317
|
+
* This method will be removed in v7.
|
|
1315
1318
|
*/
|
|
1316
1319
|
const json = function json(data, init) {
|
|
1317
1320
|
if (init === void 0) {
|
|
@@ -1485,6 +1488,10 @@
|
|
|
1485
1488
|
}
|
|
1486
1489
|
return value._data;
|
|
1487
1490
|
}
|
|
1491
|
+
/**
|
|
1492
|
+
* @deprecated The `defer` method is deprecated in favor of returning raw
|
|
1493
|
+
* objects. This method will be removed in v7.
|
|
1494
|
+
*/
|
|
1488
1495
|
const defer = function defer(data, init) {
|
|
1489
1496
|
if (init === void 0) {
|
|
1490
1497
|
init = {};
|