@react-router/cloudflare 7.2.0-pre.6 → 7.3.0-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,53 +1,18 @@
1
1
  # `@react-router/cloudflare`
2
2
 
3
- ## 7.2.0-pre.6
3
+ ## 7.3.0-pre.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies:
8
- - `react-router@7.2.0-pre.6`
8
+ - `react-router@7.3.0-pre.0`
9
9
 
10
- ## 7.2.0-pre.5
10
+ ## 7.2.0
11
11
 
12
12
  ### Patch Changes
13
13
 
14
14
  - Updated dependencies:
15
- - `react-router@7.2.0-pre.5`
16
-
17
- ## 7.2.0-pre.4
18
-
19
- ### Patch Changes
20
-
21
- - Updated dependencies:
22
- - `react-router@7.2.0-pre.4`
23
-
24
- ## 7.2.0-pre.3
25
-
26
- ### Patch Changes
27
-
28
- - Updated dependencies:
29
- - `react-router@7.2.0-pre.3`
30
-
31
- ## 7.2.0-pre.2
32
-
33
- ### Patch Changes
34
-
35
- - Updated dependencies:
36
- - `react-router@7.2.0-pre.2`
37
-
38
- ## 7.2.0-pre.1
39
-
40
- ### Patch Changes
41
-
42
- - Updated dependencies:
43
- - `react-router@7.2.0-pre.1`
44
-
45
- ## 7.2.0-pre.0
46
-
47
- ### Patch Changes
48
-
49
- - Updated dependencies:
50
- - `react-router@7.2.0-pre.0`
15
+ - `react-router@7.2.0`
51
16
 
52
17
  ## 7.1.5
53
18
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { SessionData, SessionStorage, SessionIdStorageStrategy, AppLoadContext, ServerBuild } from 'react-router';
1
+ import { SessionData, SessionStorage, SessionIdStorageStrategy, UNSAFE_MiddlewareEnabled, unstable_InitialContext, AppLoadContext, ServerBuild } from 'react-router';
2
2
  import { CacheStorage } from '@cloudflare/workers-types';
3
3
 
4
4
  interface WorkersKVSessionStorageOptions {
@@ -20,6 +20,7 @@ interface WorkersKVSessionStorageOptions {
20
20
  */
21
21
  declare function createWorkersKVSessionStorage<Data = SessionData, FlashData = Data>({ cookie, kv, }: WorkersKVSessionStorageOptions): SessionStorage<Data, FlashData>;
22
22
 
23
+ type MaybePromise<T> = T | Promise<T>;
23
24
  /**
24
25
  * A function that returns the value to use as `context` in route `loader` and
25
26
  * `action` functions.
@@ -39,7 +40,7 @@ type GetLoadContextFunction<Env = unknown, Params extends string = any, Data ext
39
40
  caches: CacheStorage;
40
41
  };
41
42
  };
42
- }) => AppLoadContext | Promise<AppLoadContext>;
43
+ }) => UNSAFE_MiddlewareEnabled extends true ? MaybePromise<unstable_InitialContext> : MaybePromise<AppLoadContext>;
43
44
  type RequestHandler<Env = any> = PagesFunction<Env>;
44
45
  interface createPagesFunctionHandlerParams<Env = any> {
45
46
  build: ServerBuild | (() => ServerBuild | Promise<ServerBuild>);
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SessionData, SessionStorage, SessionIdStorageStrategy, AppLoadContext, ServerBuild } from 'react-router';
1
+ import { SessionData, SessionStorage, SessionIdStorageStrategy, UNSAFE_MiddlewareEnabled, unstable_InitialContext, AppLoadContext, ServerBuild } from 'react-router';
2
2
  import { CacheStorage } from '@cloudflare/workers-types';
3
3
 
4
4
  interface WorkersKVSessionStorageOptions {
@@ -20,6 +20,7 @@ interface WorkersKVSessionStorageOptions {
20
20
  */
21
21
  declare function createWorkersKVSessionStorage<Data = SessionData, FlashData = Data>({ cookie, kv, }: WorkersKVSessionStorageOptions): SessionStorage<Data, FlashData>;
22
22
 
23
+ type MaybePromise<T> = T | Promise<T>;
23
24
  /**
24
25
  * A function that returns the value to use as `context` in route `loader` and
25
26
  * `action` functions.
@@ -39,7 +40,7 @@ type GetLoadContextFunction<Env = unknown, Params extends string = any, Data ext
39
40
  caches: CacheStorage;
40
41
  };
41
42
  };
42
- }) => AppLoadContext | Promise<AppLoadContext>;
43
+ }) => UNSAFE_MiddlewareEnabled extends true ? MaybePromise<unstable_InitialContext> : MaybePromise<AppLoadContext>;
43
44
  type RequestHandler<Env = any> = PagesFunction<Env>;
44
45
  interface createPagesFunctionHandlerParams<Env = any> {
45
46
  build: ServerBuild | (() => ServerBuild | Promise<ServerBuild>);
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/cloudflare v7.2.0-pre.6
2
+ * @react-router/cloudflare v7.3.0-pre.0
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/cloudflare v7.2.0-pre.6
2
+ * @react-router/cloudflare v7.3.0-pre.0
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/cloudflare",
3
- "version": "7.2.0-pre.6",
3
+ "version": "7.3.0-pre.0",
4
4
  "description": "Cloudflare platform abstractions for React Router",
5
5
  "bugs": {
6
6
  "url": "https://github.com/remix-run/react-router/issues"
@@ -41,17 +41,17 @@
41
41
  }
42
42
  },
43
43
  "devDependencies": {
44
- "@cloudflare/workers-types": "^4.20230518.0",
44
+ "@cloudflare/workers-types": "^4.20250214.0",
45
45
  "tsup": "^8.3.0",
46
46
  "typescript": "^5.1.6",
47
47
  "wireit": "0.14.9",
48
- "react-router": "7.2.0-pre.6"
48
+ "react-router": "7.3.0-pre.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@cloudflare/workers-types": "^4.0.0",
52
52
  "tsup": "^8.3.0",
53
53
  "typescript": "^5.1.0",
54
- "react-router": "^7.2.0-pre.6"
54
+ "react-router": "^7.3.0-pre.0"
55
55
  },
56
56
  "peerDependenciesMeta": {
57
57
  "typescript": {
@@ -68,6 +68,7 @@
68
68
  "README.md"
69
69
  ],
70
70
  "scripts": {
71
- "build": "wireit"
71
+ "build": "wireit",
72
+ "typecheck": "tsc"
72
73
  }
73
74
  }