Skip to content

Commit 083be3e

Browse files
authored
chore: update Rspack to 2.0.0-beta.6 (#156)
1 parent 6e7750e commit 083be3e

7 files changed

Lines changed: 23 additions & 153 deletions

File tree

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"preview": "rspack preview"
99
},
1010
"devDependencies": {
11-
"@rspack/cli": "2.0.0-beta.5",
12-
"@rspack/core": "2.0.0-beta.5",
11+
"@rspack/cli": "2.0.0-beta.6",
12+
"@rspack/core": "2.0.0-beta.6",
1313
"@rspack/dev-server": "workspace:*"
1414
}
1515
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"@biomejs/biome": "^1.9.4",
6262
"@hono/node-server": "^1.19.11",
6363
"@rslib/core": "^0.20.0",
64-
"@rspack/core": "2.0.0-beta.5",
64+
"@rspack/core": "2.0.0-beta.6",
6565
"@rspack/plugin-react-refresh": "1.6.1",
6666
"@rstest/core": "^0.9.2",
6767
"@types/mime-types": "3.0.1",

pnpm-lock.yaml

Lines changed: 14 additions & 134 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import type { DevServerOpenOptions } from '@rspack/core';
12
import type {
23
ClientConfiguration,
34
ConnectHistoryApiFallbackOptions,
45
DevServer,
56
NormalizedStatic,
6-
Open,
77
ServerConfiguration,
88
WatchFiles,
99
WebSocketServerConfiguration,
@@ -15,7 +15,7 @@ export interface ResolvedDevServer extends DevServer {
1515
devMiddleware: DevServer['devMiddleware'];
1616
hot: boolean | 'only';
1717
host?: string;
18-
open: Open[];
18+
open: DevServerOpenOptions[];
1919
magicHtml: boolean;
2020
liveReload: boolean;
2121
webSocketServer: false | WebSocketServerConfiguration;

src/server.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ import type {
5050
NormalizedStatic,
5151
Open,
5252
OpenApp,
53-
OpenOptions,
5453
OverlayMessageOptions,
5554
Port,
5655
ProxyConfigArray,
@@ -1069,7 +1068,7 @@ class Server<
10691068
? ([
10701069
{
10711070
target: '<url>',
1072-
options: defaultOpenOptions as OpenOptions,
1071+
options: defaultOpenOptions,
10731072
},
10741073
] as NormalizedOpen[])
10751074
: [];

src/types.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type {
44
ServerResponse,
55
} from 'node:http';
66
import type { ServerOptions } from 'node:https';
7+
import type { DevServerOpenOptions } from '@rspack/core';
78
import type { FSWatcher, ChokidarOptions as WatchOptions } from 'chokidar';
89
import type { Options as ConnectHistoryApiFallbackOptions } from 'connect-history-api-fallback';
910
import type {
@@ -168,7 +169,7 @@ export interface Open {
168169

169170
export interface NormalizedOpen {
170171
target: string;
171-
options: OpenOptions;
172+
options: DevServerOpenOptions;
172173
}
173174

174175
export interface WebSocketURL {
@@ -226,13 +227,3 @@ function useFn(
226227
export type BasicApplication = {
227228
use: typeof useFn;
228229
};
229-
230-
// Type definition matching open package's Options type
231-
// (Cannot import directly from ES module in CommonJS context)
232-
export type OpenOptions = {
233-
readonly wait?: boolean;
234-
readonly background?: boolean;
235-
readonly newInstance?: boolean;
236-
readonly app?: OpenApp | readonly OpenApp[];
237-
readonly allowNonzeroExitCode?: boolean;
238-
};

0 commit comments

Comments
 (0)