@remix-run/router 1.16.0-pre.1 → 1.16.1-pre.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 CHANGED
@@ -1,34 +1,26 @@
1
1
  # `@remix-run/router`
2
2
 
3
- ## 1.16.0-pre.1
3
+ ## 1.16.1-pre.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - [REMOVE] Remove staticHandler.query flags that we can implement in dataStrategy ([#11384](https://github.com/remix-run/react-router/pull/11384))
7
+ - Support `unstable_dataStrategy` on `staticHandler.queryRoute` ([#11515](https://github.com/remix-run/react-router/pull/11515))
8
8
 
9
- ## 1.16.0-pre.0
9
+ ## 1.16.0
10
10
 
11
11
  ### Minor Changes
12
12
 
13
13
  - Add a new `unstable_dataStrategy` configuration option ([#11098](https://github.com/remix-run/react-router/pull/11098))
14
-
15
14
  - This option allows Data Router applications to take control over the approach for executing route loaders and actions
16
15
  - The default implementation is today's behavior, to fetch all loaders in parallel, but this option allows users to implement more advanced data flows including Remix single-fetch, middleware/context APIs, automatic loader caching, and more
17
-
16
+ - Move `unstable_dataStrategy` from `createStaticHandler` to `staticHandler.query` so it can be request-specific for use with the `ResponseStub` approach in Remix. It's not really applicable to `queryRoute` for now since that's a singular handler call anyway so any pre-processing/post/processing could be done there manually. ([#11377](https://github.com/remix-run/react-router/pull/11377))
18
17
  - Add a new `future.unstable_skipActionRevalidation` future flag ([#11098](https://github.com/remix-run/react-router/pull/11098))
19
-
20
18
  - Currently, active loaders revalidate after any action, regardless of the result
21
19
  - With this flag enabled, actions that return/throw a 4xx/5xx response status will no longer automatically revalidate
22
20
  - This should reduce load on your server since it's rare that a 4xx/5xx should actually mutate any data
23
21
  - If you need to revalidate after a 4xx/5xx result with this flag enabled, you can still do that via returning `true` from `shouldRevalidate`
24
22
  - `shouldRevalidate` now also receives a new `unstable_actionStatus` argument alongside `actionResult` so you can make decision based on the status of the `action` response without having to encode it into the action data
25
-
26
- - - Move `unstable_dataStrategy` from `createStaticHandler` to `staticHandler.query` so it can be request-specific for use with the `ResponseStub` approach in Remix. It's not really applicable to `queryRoute` for now since that's a singular handler call anyway so any pre-processing/post/processing could be done there manually. ([#11377](https://github.com/remix-run/react-router/pull/11377))
27
- - Added a new `skipLoaders` flag to `staticHandler.query` for calling only the action in Remix Single Fetch
28
- - Added 2 new options to the `staticHandler.query` method for use in Remix's Single Fetch implementation: ([#11098](https://github.com/remix-run/react-router/pull/11098))
29
-
30
- - `loadRouteIds`: An optional array of route IDs to load if you wish to load a subset of the matched routes (useful for fine-grained revalidation)
31
- - `skipLoaderErrorBubbling`: Disable error bubbling on loader executions for single-fetch scenarios where the client-side router will handle the bubbling
23
+ - Added a `skipLoaderErrorBubbling` flag to `staticHandler.query` to disable error bubbling on loader executions for single-fetch scenarios where the client-side router will handle the bubbling ([#11098](https://github.com/remix-run/react-router/pull/11098))
32
24
 
33
25
  ## 1.15.3
34
26
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/router v1.16.0-pre.1
2
+ * @remix-run/router v1.16.1-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -3456,7 +3456,8 @@ function createStaticHandler(routes, opts) {
3456
3456
  async function queryRoute(request, _temp4) {
3457
3457
  let {
3458
3458
  routeId,
3459
- requestContext
3459
+ requestContext,
3460
+ unstable_dataStrategy
3460
3461
  } = _temp4 === void 0 ? {} : _temp4;
3461
3462
  let url = new URL(request.url);
3462
3463
  let method = request.method;
@@ -3485,7 +3486,7 @@ function createStaticHandler(routes, opts) {
3485
3486
  pathname: location.pathname
3486
3487
  });
3487
3488
  }
3488
- let result = await queryImpl(request, location, matches, requestContext, null, false, match);
3489
+ let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, false, match);
3489
3490
  if (isResponse(result)) {
3490
3491
  return result;
3491
3492
  }