@rspack/dev-server 2.2.0 → 2.2.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/dist/index.d.ts CHANGED
@@ -174,7 +174,7 @@ declare const EntryTypes: {
174
174
  readonly EVERYTHING_TYPE: "all";
175
175
  };
176
176
 
177
- declare type ErrorHandleFunction = (err: any, req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
177
+ declare type ErrorHandleFunction = (err: any, req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => unknown;
178
178
 
179
179
  declare type EventName = (typeof EVENTS)[keyof typeof EVENTS];
180
180
 
@@ -338,6 +338,8 @@ declare interface IncomingMessage extends http.IncomingMessage {
338
338
  originalUrl?: http.IncomingMessage['url'] | undefined;
339
339
  }
340
340
 
341
+ declare type ListenCallback = () => void;
342
+
341
343
  /** https://github.com/microsoft/TypeScript/issues/29729 */
342
344
  declare type LiteralUnion<T extends U, U> = T | (U & Record<never, never>);
343
345
 
@@ -360,7 +362,7 @@ declare interface MiddlewareObject {
360
362
 
361
363
  declare type NextFunction = (err?: any) => void;
362
364
 
363
- declare type NextHandleFunction = (req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
365
+ declare type NextHandleFunction = (req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => unknown;
364
366
 
365
367
  /**
366
368
  * @mixin
@@ -525,21 +527,21 @@ export declare class RspackDevServer<A extends BasicApplication = Server, S exte
525
527
  }
526
528
 
527
529
  declare interface Server extends EventEmitter {
528
- (req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
530
+ (req: http.IncomingMessage, res: http.ServerResponse, next?: NextFunction): void;
529
531
  route: string;
530
532
  stack: ServerStackItem[];
531
- handle(req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
533
+ handle(req: http.IncomingMessage, res: http.ServerResponse, next?: NextFunction): void;
532
534
  use(fn: NextHandleFunction): Server;
533
535
  use(fn: HandleFunction): Server;
534
536
  use(fn: http.Server): Server;
535
537
  use(route: string, fn: NextHandleFunction): Server;
536
538
  use(route: string, fn: HandleFunction): Server;
537
539
  use(route: string, fn: http.Server): Server;
538
- listen(port: number, hostname?: string, backlog?: number, callback?: Function): http.Server;
539
- listen(port: number, hostname?: string, callback?: Function): http.Server;
540
- listen(path: string, callback?: Function): http.Server;
541
- listen(options: ListenOptions, callback?: Function): http.Server;
542
- listen(handle: unknown, listeningListener?: Function): http.Server;
540
+ listen(port: number, hostname?: string, backlog?: number, callback?: ListenCallback): http.Server;
541
+ listen(port: number, hostname?: string, callback?: ListenCallback): http.Server;
542
+ listen(path: string, callback?: ListenCallback): http.Server;
543
+ listen(options: ListenOptions, callback?: ListenCallback): http.Server;
544
+ listen(handle: unknown, listeningListener?: ListenCallback): http.Server;
543
545
  }
544
546
 
545
547
  declare class Server_5<
@@ -625,7 +627,7 @@ declare interface ServerStackItem {
625
627
 
626
628
  declare type ServerType<A extends BasicApplication, S extends BasicServer> = LiteralUnion<'http' | 'https' | 'http2', string> | ((serverOptions: ServerOptions, application: A) => S);
627
629
 
628
- declare type SimpleHandleFunction = (req: IncomingMessage, res: http.ServerResponse) => void;
630
+ declare type SimpleHandleFunction = (req: IncomingMessage, res: http.ServerResponse) => unknown;
629
631
 
630
632
  /** Filterer for files */
631
633
  declare type Tester = (entryInfo: EntryInfo) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/dev-server",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Development server for Rspack",
5
5
  "homepage": "https://github.com/rstackjs/rspack-dev-server",
6
6
  "bugs": "https://github.com/rstackjs/rspack-dev-server/issues",
@@ -37,13 +37,13 @@
37
37
  "@rspack/dev-middleware": "^2.0.3"
38
38
  },
39
39
  "devDependencies": {
40
- "@hono/node-server": "^2.0.11",
41
- "@microsoft/api-extractor": "^7.58.12",
40
+ "@hono/node-server": "^2.1.1",
41
+ "@microsoft/api-extractor": "^7.58.13",
42
42
  "@rslib/core": "^0.23.2",
43
- "@rslint/core": "^0.7.1",
43
+ "@rslint/core": "^0.8.1",
44
44
  "@rspack/core": "2.0.0-rc.0",
45
45
  "@rspack/plugin-react-refresh": "2.0.2",
46
- "@rstest/core": "^0.11.4",
46
+ "@rstest/core": "^0.11.9",
47
47
  "@types/connect-history-api-fallback": "^1.5.4",
48
48
  "@types/mime-types": "3.0.1",
49
49
  "@types/node": "^24.13.3",
@@ -52,17 +52,17 @@
52
52
  "@types/ws": "8.18.1",
53
53
  "chokidar": "^5.0.0",
54
54
  "connect-history-api-fallback": "^2.0.0",
55
- "connect-next": "^4.0.3",
55
+ "connect-next": "^5.0.0",
56
56
  "cross-env": "^10.1.0",
57
57
  "express": "^5.2.1",
58
- "hono": "^4.12.25",
58
+ "hono": "^4.13.3",
59
59
  "http-compression": "^1.1.3",
60
60
  "http-proxy": "^1.18.1",
61
61
  "http-proxy-middleware": "4.2.0",
62
- "ipaddr.js": "^2.4.0",
62
+ "ipaddr.js": "^2.5.0",
63
63
  "launch-editor": "^2.14.1",
64
64
  "nano-staged": "^1.0.2",
65
- "open": "^11.0.0",
65
+ "open": "^11.0.1",
66
66
  "p-retry": "^7.1.1",
67
67
  "prettier": "3.9.6",
68
68
  "puppeteer": "^24.43.1",
@@ -72,7 +72,7 @@
72
72
  "serve-static": "^2.2.1",
73
73
  "simple-git-hooks": "^2.13.1",
74
74
  "typescript": "^7.0.2",
75
- "ws": "^8.21.1"
75
+ "ws": "^8.21.3"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "@rspack/core": "^2.0.0",