@remix-run/router 1.9.0-pre.1 → 1.9.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/dist/router.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/router v1.9.0-pre.1
2
+ * @remix-run/router v1.9.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -248,7 +248,7 @@ function warning(cond, message) {
248
248
  try {
249
249
  // Welcome to debugging history!
250
250
  //
251
- // This error is thrown as a convenience so you can more easily
251
+ // This error is thrown as a convenience, so you can more easily
252
252
  // find the source for a warning that appears in the console by
253
253
  // enabling "pause on exceptions" in your JavaScript debugger.
254
254
  throw new Error(message);
@@ -472,7 +472,7 @@ const immutableRouteKeys = new Set(["lazy", "caseSensitive", "path", "id", "inde
472
472
  function isIndexRoute(route) {
473
473
  return route.index === true;
474
474
  }
475
- // Walk the route tree generating unique IDs where necessary so we are working
475
+ // Walk the route tree generating unique IDs where necessary, so we are working
476
476
  // solely with AgnosticDataRouteObject's within the Router
477
477
  function convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {
478
478
  if (parentPath === void 0) {
@@ -571,7 +571,7 @@ function flattenRoutes(routes, branches, parentsMeta, parentPath) {
571
571
  }
572
572
  let path = joinPaths([parentPath, meta.relativePath]);
573
573
  let routesMeta = parentsMeta.concat(meta);
574
- // Add the children before adding this route to the array so we traverse the
574
+ // Add the children before adding this route to the array, so we traverse the
575
575
  // route tree depth-first and child routes appear before their parents in
576
576
  // the "flattened" version.
577
577
  if (route.children && route.children.length > 0) {
@@ -635,14 +635,14 @@ function explodeOptionalSegments(path) {
635
635
  let restExploded = explodeOptionalSegments(rest.join("/"));
636
636
  let result = [];
637
637
  // All child paths with the prefix. Do this for all children before the
638
- // optional version for all children so we get consistent ordering where the
638
+ // optional version for all children, so we get consistent ordering where the
639
639
  // parent optional aspect is preferred as required. Otherwise, we can get
640
640
  // child sections interspersed where deeper optional segments are higher than
641
- // parent optional segments, where for example, /:two would explodes _earlier_
641
+ // parent optional segments, where for example, /:two would explode _earlier_
642
642
  // then /:one. By always including the parent as required _for all children_
643
643
  // first, we avoid this issue
644
644
  result.push(...restExploded.map(subpath => subpath === "" ? required : [required, subpath].join("/")));
645
- // Then if this is an optional value, add all child versions without
645
+ // Then, if this is an optional value, add all child versions without
646
646
  if (isOptional) {
647
647
  result.push(...restExploded);
648
648
  }
@@ -816,7 +816,7 @@ function compilePath(path, caseSensitive, end) {
816
816
  regexpSource += "\\/*$";
817
817
  } else if (path !== "" && path !== "/") {
818
818
  // If our path is non-empty and contains anything beyond an initial slash,
819
- // then we have _some_ form of path in our regex so we should expect to
819
+ // then we have _some_ form of path in our regex, so we should expect to
820
820
  // match only if we find the end of this path segment. Look for an optional
821
821
  // non-captured trailing slash (to match a portion of the URL) or the end
822
822
  // of the path (if we've matched to the end). We used to do this with a