@react-router/express 7.2.0 → 7.3.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,22 @@
1
1
  # `@react-router/express`
2
2
 
3
+ ## 7.3.0-pre.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - `react-router@7.3.0-pre.1`
9
+ - `@react-router/node@7.3.0-pre.1`
10
+
11
+ ## 7.3.0-pre.0
12
+
13
+ ### Patch Changes
14
+
15
+ - Update `express` `peerDependency` to include v5 (https://github.com/remix-run/react-router/pull/13064) ([#12961](https://github.com/remix-run/react-router/pull/12961))
16
+ - Updated dependencies:
17
+ - `react-router@7.3.0-pre.0`
18
+ - `@react-router/node@7.3.0-pre.0`
19
+
3
20
  ## 7.2.0
4
21
 
5
22
  ### Patch Changes
@@ -76,7 +93,7 @@
76
93
 
77
94
  ### Major Changes
78
95
 
79
- - Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
96
+ - Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
80
97
  - update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690))
81
98
  - Add `exports` field to all packages ([#11675](https://github.com/remix-run/react-router/pull/11675))
82
99
  - node package no longer re-exports from react-router ([#11702](https://github.com/remix-run/react-router/pull/11702))
package/dist/index.d.mts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as express from 'express';
2
- import { AppLoadContext, ServerBuild } from 'react-router';
2
+ import { UNSAFE_MiddlewareEnabled, unstable_InitialContext, AppLoadContext, ServerBuild } from 'react-router';
3
3
 
4
4
  /// <reference lib="dom.iterable" />
5
5
 
6
+ type MaybePromise<T> = T | Promise<T>;
6
7
  /**
7
8
  * A function that returns the value to use as `context` in route `loader` and
8
9
  * `action` functions.
@@ -11,7 +12,7 @@ import { AppLoadContext, ServerBuild } from 'react-router';
11
12
  * environment/platform-specific values through to your loader/action, such as
12
13
  * values that are generated by Express middleware like `req.session`.
13
14
  */
14
- type GetLoadContextFunction = (req: express.Request, res: express.Response) => Promise<AppLoadContext> | AppLoadContext;
15
+ type GetLoadContextFunction = (req: express.Request, res: express.Response) => UNSAFE_MiddlewareEnabled extends true ? MaybePromise<unstable_InitialContext> : MaybePromise<AppLoadContext>;
15
16
  type RequestHandler = (req: express.Request, res: express.Response, next: express.NextFunction) => Promise<void>;
16
17
  /**
17
18
  * Returns a request handler for Express that serves the response using Remix.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as express from 'express';
2
- import { AppLoadContext, ServerBuild } from 'react-router';
2
+ import { UNSAFE_MiddlewareEnabled, unstable_InitialContext, AppLoadContext, ServerBuild } from 'react-router';
3
3
 
4
4
  /// <reference lib="dom.iterable" />
5
5
 
6
+ type MaybePromise<T> = T | Promise<T>;
6
7
  /**
7
8
  * A function that returns the value to use as `context` in route `loader` and
8
9
  * `action` functions.
@@ -11,7 +12,7 @@ import { AppLoadContext, ServerBuild } from 'react-router';
11
12
  * environment/platform-specific values through to your loader/action, such as
12
13
  * values that are generated by Express middleware like `req.session`.
13
14
  */
14
- type GetLoadContextFunction = (req: express.Request, res: express.Response) => Promise<AppLoadContext> | AppLoadContext;
15
+ type GetLoadContextFunction = (req: express.Request, res: express.Response) => UNSAFE_MiddlewareEnabled extends true ? MaybePromise<unstable_InitialContext> : MaybePromise<AppLoadContext>;
15
16
  type RequestHandler = (req: express.Request, res: express.Response, next: express.NextFunction) => Promise<void>;
16
17
  /**
17
18
  * Returns a request handler for Express that serves the response using Remix.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/express v7.2.0
2
+ * @react-router/express v7.3.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/express v7.2.0
2
+ * @react-router/express v7.3.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-router/express",
3
- "version": "7.2.0",
3
+ "version": "7.3.0-pre.1",
4
4
  "description": "Express server request handler for React Router",
5
5
  "bugs": {
6
6
  "url": "https://github.com/remix-run/react-router/issues"
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@react-router/node": "7.2.0"
48
+ "@react-router/node": "7.3.0-pre.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/express": "^4.17.9",
@@ -59,9 +59,9 @@
59
59
  "wireit": "0.14.9"
60
60
  },
61
61
  "peerDependencies": {
62
- "express": "^4.17.1",
62
+ "express": "^4.17.1 || ^5",
63
63
  "typescript": "^5.1.0",
64
- "react-router": "7.2.0"
64
+ "react-router": "7.3.0-pre.1"
65
65
  },
66
66
  "peerDependenciesMeta": {
67
67
  "typescript": {
@@ -78,6 +78,7 @@
78
78
  "README.md"
79
79
  ],
80
80
  "scripts": {
81
- "build": "wireit"
81
+ "build": "wireit",
82
+ "typecheck": "tsc"
82
83
  }
83
84
  }