@remix-run/router 1.5.0-pre.0 → 1.5.0-pre.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # `@remix-run/router`
2
2
 
3
+ ## 1.5.0-pre.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Remove `instanceof` check for `DeferredData` to be resiliant to ESM/CJS boundaries in SSR bundling scenarios ([#10247](https://github.com/remix-run/react-router/pull/10247))
8
+
3
9
  ## 1.5.0-pre.0
4
10
 
5
11
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/router v1.5.0-pre.0
2
+ * @remix-run/router v1.5.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -3802,7 +3802,7 @@ async function callLoaderOrAction(type, request, match, matches, manifest, detec
3802
3802
  };
3803
3803
  }
3804
3804
 
3805
- if (result instanceof DeferredData) {
3805
+ if (isDeferredData(result)) {
3806
3806
  var _result$init, _result$init2;
3807
3807
 
3808
3808
  return {
@@ -4106,6 +4106,11 @@ function isRedirectResult(result) {
4106
4106
  return (result && result.type) === ResultType.redirect;
4107
4107
  }
4108
4108
 
4109
+ function isDeferredData(value) {
4110
+ let deferred = value;
4111
+ return deferred && typeof deferred === "object" && typeof deferred.data === "object" && typeof deferred.subscribe === "function" && typeof deferred.cancel === "function" && typeof deferred.resolveData === "function";
4112
+ }
4113
+
4109
4114
  function isResponse(value) {
4110
4115
  return value != null && typeof value.status === "number" && typeof value.statusText === "string" && typeof value.headers === "object" && typeof value.body !== "undefined";
4111
4116
  }
@@ -4247,6 +4252,7 @@ exports.defer = defer;
4247
4252
  exports.generatePath = generatePath;
4248
4253
  exports.getStaticContextFromError = getStaticContextFromError;
4249
4254
  exports.getToPathname = getToPathname;
4255
+ exports.isDeferredData = isDeferredData;
4250
4256
  exports.isRouteErrorResponse = isRouteErrorResponse;
4251
4257
  exports.joinPaths = joinPaths;
4252
4258
  exports.json = json;