@react-router/node 7.2.0 → 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,5 +1,12 @@
1
1
  # `@react-router/node`
2
2
 
3
+ ## 7.3.0-pre.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - `react-router@7.3.0-pre.0`
9
+
3
10
  ## 7.2.0
4
11
 
5
12
  ### Patch Changes
@@ -67,7 +74,7 @@
67
74
 
68
75
  ### Major Changes
69
76
 
70
- - Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
77
+ - Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
71
78
 
72
79
  - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837))
73
80
 
package/dist/index.d.mts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { RequestListener } from 'node:http';
2
- import { ServerBuild, AppLoadContext, SessionData, SessionStorage, SessionIdStorageStrategy } from 'react-router';
2
+ import { ServerBuild, UNSAFE_MiddlewareEnabled, unstable_InitialContext, AppLoadContext, SessionData, SessionStorage, SessionIdStorageStrategy } from 'react-router';
3
3
  import { ClientAddress } from '@mjackson/node-fetch-server';
4
4
  import { Writable, Readable } from 'node:stream';
5
5
 
6
+ type MaybePromise<T> = T | Promise<T>;
6
7
  interface RequestListenerOptions {
7
8
  build: ServerBuild | (() => ServerBuild | Promise<ServerBuild>);
8
- getLoadContext?: (request: Request, client: ClientAddress) => AppLoadContext | Promise<AppLoadContext>;
9
+ getLoadContext?: (request: Request, client: ClientAddress) => UNSAFE_MiddlewareEnabled extends true ? MaybePromise<unstable_InitialContext> : MaybePromise<AppLoadContext>;
9
10
  mode?: string;
10
11
  }
11
12
  /**
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { RequestListener } from 'node:http';
2
- import { ServerBuild, AppLoadContext, SessionData, SessionStorage, SessionIdStorageStrategy } from 'react-router';
2
+ import { ServerBuild, UNSAFE_MiddlewareEnabled, unstable_InitialContext, AppLoadContext, SessionData, SessionStorage, SessionIdStorageStrategy } from 'react-router';
3
3
  import { ClientAddress } from '@mjackson/node-fetch-server';
4
4
  import { Writable, Readable } from 'node:stream';
5
5
 
6
+ type MaybePromise<T> = T | Promise<T>;
6
7
  interface RequestListenerOptions {
7
8
  build: ServerBuild | (() => ServerBuild | Promise<ServerBuild>);
8
- getLoadContext?: (request: Request, client: ClientAddress) => AppLoadContext | Promise<AppLoadContext>;
9
+ getLoadContext?: (request: Request, client: ClientAddress) => UNSAFE_MiddlewareEnabled extends true ? MaybePromise<unstable_InitialContext> : MaybePromise<AppLoadContext>;
9
10
  mode?: string;
10
11
  }
11
12
  /**
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/node v7.2.0
2
+ * @react-router/node v7.3.0-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -177,12 +177,12 @@ var createReadableStreamFromReadable = (source) => {
177
177
  };
178
178
  var StreamPump = class {
179
179
  highWaterMark;
180
- accumalatedSize;
180
+ accumulatedSize;
181
181
  stream;
182
182
  controller;
183
183
  constructor(stream) {
184
184
  this.highWaterMark = stream.readableHighWaterMark || new import_node_stream.Stream.Readable().readableHighWaterMark;
185
- this.accumalatedSize = 0;
185
+ this.accumulatedSize = 0;
186
186
  this.stream = stream;
187
187
  this.enqueue = this.enqueue.bind(this);
188
188
  this.error = this.error.bind(this);
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/node v7.2.0
2
+ * @react-router/node v7.3.0-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -137,12 +137,12 @@ var createReadableStreamFromReadable = (source) => {
137
137
  };
138
138
  var StreamPump = class {
139
139
  highWaterMark;
140
- accumalatedSize;
140
+ accumulatedSize;
141
141
  stream;
142
142
  controller;
143
143
  constructor(stream) {
144
144
  this.highWaterMark = stream.readableHighWaterMark || new Stream.Readable().readableHighWaterMark;
145
- this.accumalatedSize = 0;
145
+ this.accumulatedSize = 0;
146
146
  this.stream = stream;
147
147
  this.enqueue = this.enqueue.bind(this);
148
148
  this.error = this.error.bind(this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-router/node",
3
- "version": "7.2.0",
3
+ "version": "7.3.0-pre.0",
4
4
  "description": "Node.js platform abstractions for React Router",
5
5
  "bugs": {
6
6
  "url": "https://github.com/remix-run/react-router/issues"
@@ -75,11 +75,11 @@
75
75
  "tsup": "^8.3.0",
76
76
  "typescript": "^5.1.6",
77
77
  "wireit": "0.14.9",
78
- "react-router": "7.2.0"
78
+ "react-router": "7.3.0-pre.0"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "typescript": "^5.1.0",
82
- "react-router": "7.2.0"
82
+ "react-router": "7.3.0-pre.0"
83
83
  },
84
84
  "peerDependenciesMeta": {
85
85
  "typescript": {
@@ -99,6 +99,7 @@
99
99
  "README.md"
100
100
  ],
101
101
  "scripts": {
102
- "build": "wireit"
102
+ "build": "wireit",
103
+ "typecheck": "tsc"
103
104
  }
104
105
  }