@rspack/dev-server 2.0.0-beta.7 → 2.0.0-rc.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/dist/server.d.ts CHANGED
@@ -8,8 +8,8 @@
8
8
  * https://github.com/webpack/webpack-dev-server/blob/main/LICENSE
9
9
  */
10
10
  import type { DevServerClient, DevServerHeaders, DevServerHost, DevServerProxyConfigArray, DevServerStatic } from '@rspack/core';
11
- import type { BasicApplication, BasicServer, ClientConnection, Compiler, ConnectHistoryApiFallbackOptions, DevMiddlewareContext, DevMiddlewareOptions, DevServer, EXPECTED_ANY, FSWatcher, HTTPServer, LiteralUnion, Middleware, MultiCompiler, MultiStats, Open, Port, Request, RequestHandler, Response, ServerConfiguration, ServerType, Socket, Stats, StatsOptions, WatchFiles, WatchOptions, WebSocketServerConfiguration, WebSocketServerImplementation } from './types';
12
- import type { ConnectApplication } from './types';
11
+ import type { BasicApplication, BasicServer, ClientConnection, Compiler, ConnectHistoryApiFallbackOptions, DevMiddlewareContext, DevMiddlewareOptions, DevServer, EXPECTED_ANY, FSWatcher, HTTPServer, LiteralUnion, Middleware, MultiCompiler, MultiStats, Open, Port, Request, RequestHandler, Response, ServerConfiguration, ServerType, Socket, Stats, StatsOptions, WatchFiles, WatchOptions, WebSocketServerConfiguration, WebSocketServerImplementation } from './types.js';
12
+ import type { ConnectApplication } from './types.js';
13
13
  export interface Configuration<A extends BasicApplication = ConnectApplication, S extends BasicServer = HTTPServer> {
14
14
  ipc?: boolean | string;
15
15
  host?: DevServerHost;
@@ -7,8 +7,8 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack-dev-server/blob/main/LICENSE
9
9
  */
10
- import type { Server } from '../server';
11
- import type { ClientConnection } from '../types';
10
+ import type { Server } from '../server.js';
11
+ import type { ClientConnection } from '../types.js';
12
12
  declare class BaseServer {
13
13
  server: Server;
14
14
  clients: ClientConnection[];
@@ -8,8 +8,8 @@
8
8
  * https://github.com/webpack/webpack-dev-server/blob/main/LICENSE
9
9
  */
10
10
  import * as Ws from 'ws';
11
- import type { Server } from '../server';
12
- import BaseServer from './BaseServer';
11
+ import type { Server } from '../server.js';
12
+ import BaseServer from './BaseServer.js';
13
13
  export declare class WebsocketServer extends BaseServer {
14
14
  static heartbeatInterval: number;
15
15
  implementation: Ws.WebSocketServer;
package/dist/types.d.ts CHANGED
@@ -5,7 +5,6 @@ import type { FSWatcher, ChokidarOptions as WatchOptions } from 'chokidar';
5
5
  import type { Server as ConnectApplication, IncomingMessage as ConnectIncomingMessage, ErrorHandleFunction, HandleFunction, NextHandleFunction } from 'connect-next';
6
6
  import type { RequestHandler } from 'http-proxy-middleware';
7
7
  export type { FSWatcher, WatchOptions, RequestHandler, BasicServer, HTTPServer, ServerOptions, IncomingMessage, ConnectApplication, };
8
- export type { IPv6 } from 'ipaddr.js';
9
8
  export type { Socket } from 'node:net';
10
9
  export type { AddressInfo } from 'node:net';
11
10
  export type { NetworkInterfaceInfo } from 'node:os';
@@ -64,10 +63,12 @@ export interface MiddlewareObject {
64
63
  }
65
64
  export type Middleware = MiddlewareObject | DevServerMiddlewareHandler | ErrorHandleFunction;
66
65
  export type OverlayMessageOptions = boolean | ((error: Error) => void);
67
- declare function useFn(fn: NextHandleFunction): BasicApplication;
68
- declare function useFn(fn: HandleFunction): BasicApplication;
69
- declare function useFn(route: string, fn: NextHandleFunction): BasicApplication;
70
- declare function useFn(route: string, fn: HandleFunction): BasicApplication;
66
+ type UseFn = {
67
+ (fn: NextHandleFunction): BasicApplication;
68
+ (fn: HandleFunction): BasicApplication;
69
+ (route: string, fn: NextHandleFunction): BasicApplication;
70
+ (route: string, fn: HandleFunction): BasicApplication;
71
+ };
71
72
  export type BasicApplication = {
72
- use: typeof useFn;
73
+ use: UseFn;
73
74
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/dev-server",
3
- "version": "2.0.0-beta.7",
3
+ "version": "2.0.0-rc.0",
4
4
  "description": "Development server for rspack",
5
5
  "homepage": "https://rspack.rs",
6
6
  "bugs": "https://github.com/rstackjs/rspack-dev-server/issues",
@@ -26,8 +26,8 @@
26
26
  "bump": "npx bumpp",
27
27
  "dev": "rslib -w",
28
28
  "format": "prettier --write .",
29
- "lint": "biome check .",
30
- "lint:write": "biome check . --write",
29
+ "lint": "rslint",
30
+ "lint:write": "rslint --fix",
31
31
  "prettier:ci": "prettier --check .",
32
32
  "test": "pnpm run test:install && pnpm run build && rstest",
33
33
  "test:install": "cross-env ./node_modules/.bin/puppeteer browsers install chrome"
@@ -37,31 +37,29 @@
37
37
  },
38
38
  "nano-staged": {
39
39
  "*.{yaml,yml,json,md,json5}": [
40
- "npm rum format"
40
+ "npm run format"
41
41
  ],
42
42
  "*.{js,jsx,ts,tsx,mjs,cjs}": [
43
43
  "npm run format",
44
- "biome lint --write --no-errors-on-unmatched"
44
+ "rslint --fix"
45
45
  ]
46
46
  },
47
47
  "dependencies": {
48
- "@rspack/dev-middleware": "2.0.0-beta.2",
48
+ "@rspack/dev-middleware": "^2.0.0",
49
49
  "@types/ws": "^8.18.1",
50
50
  "chokidar": "^5.0.0",
51
51
  "connect-history-api-fallback": "^2.0.0",
52
52
  "connect-next": "^4.0.0",
53
53
  "http-proxy-middleware": "^3.0.5",
54
- "ipaddr.js": "^2.3.0",
55
- "serve-static": "^2.2.1",
56
- "ws": "^8.19.0"
54
+ "ws": "^8.20.0"
57
55
  },
58
56
  "devDependencies": {
59
- "@biomejs/biome": "^1.9.4",
60
- "@hono/node-server": "^1.19.11",
61
- "@rslib/core": "^0.20.0",
62
- "@rspack/core": "2.0.0-beta.6",
57
+ "@hono/node-server": "^1.19.12",
58
+ "@rslib/core": "^0.20.2",
59
+ "@rslint/core": "^0.3.3",
60
+ "@rspack/core": "2.0.0-rc.0",
63
61
  "@rspack/plugin-react-refresh": "1.6.1",
64
- "@rstest/core": "^0.9.2",
62
+ "@rstest/core": "^0.9.5",
65
63
  "@types/mime-types": "3.0.1",
66
64
  "@types/node": "^24.12.0",
67
65
  "@types/serve-static": "^2.2.0",
@@ -70,21 +68,23 @@
70
68
  "cross-env": "^10.1.0",
71
69
  "css-loader": "^7.1.4",
72
70
  "express": "^5.2.1",
73
- "hono": "^4.12.5",
71
+ "hono": "^4.12.9",
74
72
  "http-compression": "^1.1.2",
75
73
  "http-proxy": "^1.18.1",
76
- "launch-editor": "^2.13.1",
74
+ "ipaddr.js": "^2.3.0",
75
+ "launch-editor": "^2.13.2",
77
76
  "nano-staged": "^0.9.0",
78
77
  "open": "^11.0.0",
79
78
  "p-retry": "^7.1.1",
80
79
  "prettier": "3.8.1",
81
- "puppeteer": "^24.39.0",
80
+ "puppeteer": "^24.40.0",
82
81
  "react-refresh": "0.18.0",
83
82
  "require-from-string": "^2.0.2",
84
83
  "selfsigned": "^5.5.0",
84
+ "serve-static": "^2.2.1",
85
85
  "simple-git-hooks": "^2.13.1",
86
86
  "style-loader": "^4.0.0",
87
- "typescript": "^5.9.3"
87
+ "typescript": "^6.0.2"
88
88
  },
89
89
  "peerDependencies": {
90
90
  "@rspack/core": "^2.0.0-0",
@@ -95,7 +95,7 @@
95
95
  "optional": true
96
96
  }
97
97
  },
98
- "packageManager": "pnpm@10.32.1",
98
+ "packageManager": "pnpm@10.33.0",
99
99
  "engines": {
100
100
  "node": "^20.19.0 || >=22.12.0"
101
101
  },
@@ -1,75 +0,0 @@
1
- var __webpack_modules__ = {};
2
- var __webpack_module_cache__ = {};
3
- function __webpack_require__(moduleId) {
4
- var cachedModule = __webpack_module_cache__[moduleId];
5
- if (void 0 !== cachedModule) return cachedModule.exports;
6
- var module = __webpack_module_cache__[moduleId] = {
7
- exports: {}
8
- };
9
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
10
- return module.exports;
11
- }
12
- __webpack_require__.m = __webpack_modules__;
13
- (()=>{
14
- __webpack_require__.n = (module)=>{
15
- var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
16
- __webpack_require__.d(getter, {
17
- a: getter
18
- });
19
- return getter;
20
- };
21
- })();
22
- (()=>{
23
- var getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__;
24
- var leafPrototypes;
25
- __webpack_require__.t = function(value, mode) {
26
- if (1 & mode) value = this(value);
27
- if (8 & mode) return value;
28
- if ('object' == typeof value && value) {
29
- if (4 & mode && value.__esModule) return value;
30
- if (16 & mode && 'function' == typeof value.then) return value;
31
- }
32
- var ns = Object.create(null);
33
- __webpack_require__.r(ns);
34
- var def = {};
35
- leafPrototypes = leafPrototypes || [
36
- null,
37
- getProto({}),
38
- getProto([]),
39
- getProto(getProto)
40
- ];
41
- for(var current = 2 & mode && value; ('object' == typeof current || 'function' == typeof current) && !~leafPrototypes.indexOf(current); current = getProto(current))Object.getOwnPropertyNames(current).forEach((key)=>{
42
- def[key] = ()=>value[key];
43
- });
44
- def['default'] = ()=>value;
45
- __webpack_require__.d(ns, def);
46
- return ns;
47
- };
48
- })();
49
- (()=>{
50
- __webpack_require__.d = (exports, definition)=>{
51
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
52
- enumerable: true,
53
- get: definition[key]
54
- });
55
- };
56
- })();
57
- (()=>{
58
- __webpack_require__.add = function(modules) {
59
- Object.assign(__webpack_require__.m, modules);
60
- };
61
- })();
62
- (()=>{
63
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
64
- })();
65
- (()=>{
66
- __webpack_require__.r = (exports)=>{
67
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
68
- value: 'Module'
69
- });
70
- Object.defineProperty(exports, '__esModule', {
71
- value: true
72
- });
73
- };
74
- })();
75
- export { __webpack_require__ };