Skip to content

Commit f244d80

Browse files
authored
refactor: move @types/connect-history-api-fallback to devDependencies (#159)
1 parent 749ee50 commit f244d80

3 files changed

Lines changed: 6 additions & 58 deletions

File tree

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
]
4646
},
4747
"dependencies": {
48-
"@types/connect-history-api-fallback": "^1.5.4",
4948
"@types/ws": "^8.18.1",
5049
"chokidar": "^5.0.0",
5150
"connect-history-api-fallback": "^2.0.0",
@@ -65,7 +64,6 @@
6564
"@rstest/core": "^0.9.2",
6665
"@types/mime-types": "3.0.1",
6766
"@types/node": "^24.12.0",
68-
"@types/node-forge": "^1.3.14",
6967
"@types/serve-static": "^2.2.0",
7068
"@types/trusted-types": "^2.0.7",
7169
"@types/ws": "8.18.1",

pnpm-lock.yaml

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

src/types.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import type {
55
} from 'node:http';
66
import type { ServerOptions } from 'node:https';
77
import type {
8+
DevServer,
89
DevServerMiddlewareHandler,
910
DevServerOpenOptions,
1011
DevServerStaticItem,
1112
} from '@rspack/core';
1213
import type { FSWatcher, ChokidarOptions as WatchOptions } from 'chokidar';
13-
import type { Options as ConnectHistoryApiFallbackOptions } from 'connect-history-api-fallback';
1414
import type {
1515
Server as ConnectApplication,
1616
IncomingMessage as ConnectIncomingMessage,
@@ -29,7 +29,6 @@ export type {
2929
ServerOptions,
3030
IncomingMessage,
3131
ConnectApplication,
32-
ConnectHistoryApiFallbackOptions,
3332
};
3433
export type { IPv6 } from 'ipaddr.js';
3534
export type { Socket } from 'node:net';
@@ -53,6 +52,11 @@ type BasicServer = import('node:net').Server | import('node:tls').Server;
5352
/** https://github.com/microsoft/TypeScript/issues/29729 */
5453
export type LiteralUnion<T extends U, U> = T | (U & Record<never, never>);
5554

55+
export type ConnectHistoryApiFallbackOptions = Exclude<
56+
NonNullable<DevServer['historyApiFallback']>,
57+
boolean
58+
>;
59+
5660
// type-level helpers, inferred as util types
5761
export type Request<T extends BasicApplication = ConnectApplication> =
5862
T extends ConnectApplication ? ConnectIncomingMessage : IncomingMessage;

0 commit comments

Comments
 (0)