webpack-dev-server 5.0.4 → 5.2.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/README.md +1 -1
- package/client/clients/SockJSClient.js +3 -3
- package/client/clients/WebSocketClient.js +3 -3
- package/client/index.js +296 -17
- package/client/modules/logger/index.js +213 -122
- package/client/modules/sockjs-client/index.js +2 -2
- package/client/overlay.js +357 -16
- package/client/progress.js +124 -0
- package/client/utils/log.js +1 -17
- package/lib/Server.js +624 -376
- package/lib/options.json +23 -5
- package/package.json +36 -36
- package/types/bin/cli-flags.d.ts +15 -0
- package/types/lib/Server.d.ts +199 -291
- package/types/lib/servers/WebsocketServer.d.ts +0 -1
- package/client/overlay/fsm.js +0 -64
- package/client/overlay/runtime-error.js +0 -47
- package/client/overlay/state-machine.js +0 -100
- package/client/overlay/styles.js +0 -74
- package/client/utils/createSocketURL.js +0 -121
- package/client/utils/getCurrentScriptSource.js +0 -24
- package/client/utils/parseURL.js +0 -36
- package/client/utils/reloadApp.js +0 -63
- package/client/utils/stripAnsi.js +0 -18
package/lib/options.json
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
"title": "Dev Server options",
|
|
3
3
|
"type": "object",
|
|
4
4
|
"definitions": {
|
|
5
|
+
"App": {
|
|
6
|
+
"instanceof": "Function",
|
|
7
|
+
"description": "Allows to use custom applications, such as 'connect', 'fastify', etc.",
|
|
8
|
+
"link": "https://webpack.js.org/configuration/dev-server/#devserverapp"
|
|
9
|
+
},
|
|
5
10
|
"AllowedHosts": {
|
|
6
11
|
"anyOf": [
|
|
7
12
|
{
|
|
@@ -151,11 +156,12 @@
|
|
|
151
156
|
]
|
|
152
157
|
},
|
|
153
158
|
"ClientProgress": {
|
|
154
|
-
"description": "
|
|
159
|
+
"description": "Displays compilation progress in the browser. Options include 'linear' and 'circular' for visual indicators.",
|
|
155
160
|
"link": "https://webpack.js.org/configuration/dev-server/#progress",
|
|
156
|
-
"type": "boolean",
|
|
161
|
+
"type": ["boolean", "string"],
|
|
162
|
+
"enum": [true, false, "linear", "circular"],
|
|
157
163
|
"cli": {
|
|
158
|
-
"negatedDescription": "Does not
|
|
164
|
+
"negatedDescription": "Does not display compilation progress in the browser."
|
|
159
165
|
}
|
|
160
166
|
},
|
|
161
167
|
"ClientReconnect": {
|
|
@@ -509,6 +515,9 @@
|
|
|
509
515
|
{
|
|
510
516
|
"$ref": "#/definitions/ServerEnum"
|
|
511
517
|
},
|
|
518
|
+
{
|
|
519
|
+
"$ref": "#/definitions/ServerFn"
|
|
520
|
+
},
|
|
512
521
|
{
|
|
513
522
|
"$ref": "#/definitions/ServerString"
|
|
514
523
|
},
|
|
@@ -520,10 +529,13 @@
|
|
|
520
529
|
"description": "Allows to set server and options (by default 'http')."
|
|
521
530
|
},
|
|
522
531
|
"ServerType": {
|
|
523
|
-
"enum": ["http", "https", "spdy"]
|
|
532
|
+
"enum": ["http", "https", "spdy", "http2"]
|
|
533
|
+
},
|
|
534
|
+
"ServerFn": {
|
|
535
|
+
"instanceof": "Function"
|
|
524
536
|
},
|
|
525
537
|
"ServerEnum": {
|
|
526
|
-
"enum": ["http", "https", "spdy"],
|
|
538
|
+
"enum": ["http", "https", "spdy", "http2"],
|
|
527
539
|
"cli": {
|
|
528
540
|
"exclude": true
|
|
529
541
|
}
|
|
@@ -545,6 +557,9 @@
|
|
|
545
557
|
},
|
|
546
558
|
{
|
|
547
559
|
"$ref": "#/definitions/ServerString"
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"$ref": "#/definitions/ServerFn"
|
|
548
563
|
}
|
|
549
564
|
]
|
|
550
565
|
},
|
|
@@ -997,6 +1012,9 @@
|
|
|
997
1012
|
"server": {
|
|
998
1013
|
"$ref": "#/definitions/Server"
|
|
999
1014
|
},
|
|
1015
|
+
"app": {
|
|
1016
|
+
"$ref": "#/definitions/App"
|
|
1017
|
+
},
|
|
1000
1018
|
"setupExitSignals": {
|
|
1001
1019
|
"$ref": "#/definitions/SetupExitSignals"
|
|
1002
1020
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webpack-dev-server",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Serves a webpack app. Updates the browser on changes.",
|
|
5
5
|
"bin": "bin/webpack-dev-server.js",
|
|
6
6
|
"main": "lib/Server.js",
|
|
@@ -59,79 +59,79 @@
|
|
|
59
59
|
"colorette": "^2.0.10",
|
|
60
60
|
"compression": "^1.7.4",
|
|
61
61
|
"connect-history-api-fallback": "^2.0.0",
|
|
62
|
-
"
|
|
63
|
-
"express": "^4.17.3",
|
|
62
|
+
"express": "^4.21.2",
|
|
64
63
|
"graceful-fs": "^4.2.6",
|
|
65
|
-
"
|
|
66
|
-
"http-proxy-middleware": "^2.0.3",
|
|
64
|
+
"http-proxy-middleware": "^2.0.7",
|
|
67
65
|
"ipaddr.js": "^2.1.0",
|
|
68
66
|
"launch-editor": "^2.6.1",
|
|
69
67
|
"open": "^10.0.3",
|
|
70
68
|
"p-retry": "^6.2.0",
|
|
71
|
-
"rimraf": "^5.0.5",
|
|
72
69
|
"schema-utils": "^4.2.0",
|
|
73
70
|
"selfsigned": "^2.4.1",
|
|
74
71
|
"serve-index": "^1.9.1",
|
|
75
72
|
"sockjs": "^0.3.24",
|
|
76
73
|
"spdy": "^4.0.2",
|
|
77
|
-
"webpack-dev-middleware": "^7.
|
|
78
|
-
"ws": "^8.
|
|
74
|
+
"webpack-dev-middleware": "^7.4.2",
|
|
75
|
+
"ws": "^8.18.0"
|
|
79
76
|
},
|
|
80
77
|
"devDependencies": {
|
|
81
|
-
"@babel/cli": "^7.
|
|
82
|
-
"@babel/core": "^7.
|
|
83
|
-
"@babel/eslint-parser": "^7.
|
|
84
|
-
"@babel/plugin-transform-object-assign": "^7.
|
|
85
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
86
|
-
"@babel/preset-env": "^7.
|
|
87
|
-
"@babel/runtime": "^7.
|
|
88
|
-
"@commitlint/cli": "^19.0
|
|
89
|
-
"@commitlint/config-conventional": "^19.0
|
|
78
|
+
"@babel/cli": "^7.25.9",
|
|
79
|
+
"@babel/core": "^7.25.9",
|
|
80
|
+
"@babel/eslint-parser": "^7.25.9",
|
|
81
|
+
"@babel/plugin-transform-object-assign": "^7.25.9",
|
|
82
|
+
"@babel/plugin-transform-runtime": "^7.25.9",
|
|
83
|
+
"@babel/preset-env": "^7.25.9",
|
|
84
|
+
"@babel/runtime": "^7.25.9",
|
|
85
|
+
"@commitlint/cli": "^19.5.0",
|
|
86
|
+
"@commitlint/config-conventional": "^19.5.0",
|
|
87
|
+
"@hono/node-server": "^1.13.3",
|
|
90
88
|
"@types/compression": "^1.7.2",
|
|
91
|
-
"@types/
|
|
92
|
-
"@types/node": "^20.11.16",
|
|
89
|
+
"@types/node": "^22.8.4",
|
|
93
90
|
"@types/node-forge": "^1.3.1",
|
|
94
91
|
"@types/sockjs-client": "^1.5.1",
|
|
95
92
|
"@types/trusted-types": "^2.0.2",
|
|
96
|
-
"acorn": "^8.
|
|
93
|
+
"acorn": "^8.14.0",
|
|
97
94
|
"babel-jest": "^29.5.0",
|
|
98
|
-
"babel-loader": "^9.1
|
|
95
|
+
"babel-loader": "^9.2.1",
|
|
99
96
|
"body-parser": "^1.19.2",
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
97
|
+
"connect": "^3.7.0",
|
|
98
|
+
"core-js": "^3.38.1",
|
|
99
|
+
"cspell": "^8.15.5",
|
|
100
|
+
"css-loader": "^7.1.1",
|
|
101
|
+
"eslint": "^8.57.1",
|
|
104
102
|
"eslint-config-prettier": "^9.1.0",
|
|
105
103
|
"eslint-config-webpack": "^1.2.5",
|
|
106
|
-
"eslint-plugin-import": "^2.
|
|
104
|
+
"eslint-plugin-import": "^2.31.0",
|
|
107
105
|
"execa": "^5.1.1",
|
|
108
|
-
"
|
|
106
|
+
"hono": "^4.6.8",
|
|
107
|
+
"html-webpack-plugin": "^5.6.3",
|
|
109
108
|
"http-proxy": "^1.18.1",
|
|
110
|
-
"husky": "^9.
|
|
109
|
+
"husky": "^9.1.6",
|
|
111
110
|
"jest": "^29.5.0",
|
|
112
111
|
"jest-environment-jsdom": "^29.5.0",
|
|
113
112
|
"klona": "^2.0.4",
|
|
114
113
|
"less": "^4.1.1",
|
|
115
114
|
"less-loader": "^12.1.0",
|
|
116
|
-
"lint-staged": "^15.2.
|
|
115
|
+
"lint-staged": "^15.2.10",
|
|
117
116
|
"marked": "^12.0.0",
|
|
118
|
-
"memfs": "^4.
|
|
117
|
+
"memfs": "^4.14.0",
|
|
119
118
|
"npm-run-all": "^4.1.5",
|
|
120
119
|
"prettier": "^3.2.4",
|
|
121
|
-
"puppeteer": "^
|
|
120
|
+
"puppeteer": "^23.6.1",
|
|
122
121
|
"readable-stream": "^4.5.2",
|
|
123
122
|
"require-from-string": "^2.0.2",
|
|
123
|
+
"rimraf": "^5.0.5",
|
|
124
124
|
"sockjs-client": "^1.6.1",
|
|
125
125
|
"standard-version": "^9.3.0",
|
|
126
126
|
"strip-ansi-v6": "npm:strip-ansi@^6.0.0",
|
|
127
|
-
"style-loader": "^
|
|
128
|
-
"supertest": "^
|
|
127
|
+
"style-loader": "^4.0.0",
|
|
128
|
+
"supertest": "^7.0.0",
|
|
129
129
|
"tcp-port-used": "^1.0.2",
|
|
130
|
-
"typescript": "^5.
|
|
130
|
+
"typescript": "^5.7.2",
|
|
131
131
|
"wait-for-expect": "^3.0.2",
|
|
132
|
-
"webpack": "^5.
|
|
132
|
+
"webpack": "^5.94.0",
|
|
133
133
|
"webpack-cli": "^5.0.1",
|
|
134
|
-
"webpack-merge": "^
|
|
134
|
+
"webpack-merge": "^6.0.1"
|
|
135
135
|
},
|
|
136
136
|
"peerDependencies": {
|
|
137
137
|
"webpack": "^5.0.0"
|
package/types/bin/cli-flags.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ declare const _exports: {
|
|
|
6
6
|
multiple: boolean;
|
|
7
7
|
description: string;
|
|
8
8
|
path: string;
|
|
9
|
+
values?: undefined;
|
|
9
10
|
}
|
|
10
11
|
| {
|
|
11
12
|
description: string;
|
|
@@ -152,6 +153,7 @@ declare const _exports: {
|
|
|
152
153
|
multiple: boolean;
|
|
153
154
|
description: string;
|
|
154
155
|
path: string;
|
|
156
|
+
negatedDescription?: undefined;
|
|
155
157
|
}
|
|
156
158
|
)[];
|
|
157
159
|
description: string;
|
|
@@ -172,6 +174,7 @@ declare const _exports: {
|
|
|
172
174
|
multiple: boolean;
|
|
173
175
|
description: string;
|
|
174
176
|
path: string;
|
|
177
|
+
values?: undefined;
|
|
175
178
|
}
|
|
176
179
|
)[];
|
|
177
180
|
description: string;
|
|
@@ -247,6 +250,7 @@ declare const _exports: {
|
|
|
247
250
|
multiple: boolean;
|
|
248
251
|
path: string;
|
|
249
252
|
type: string;
|
|
253
|
+
values?: undefined;
|
|
250
254
|
}
|
|
251
255
|
)[];
|
|
252
256
|
description: string;
|
|
@@ -302,6 +306,7 @@ declare const _exports: {
|
|
|
302
306
|
multiple: boolean;
|
|
303
307
|
path: string;
|
|
304
308
|
type: string;
|
|
309
|
+
values?: undefined;
|
|
305
310
|
}
|
|
306
311
|
)[];
|
|
307
312
|
description: string;
|
|
@@ -316,6 +321,7 @@ declare const _exports: {
|
|
|
316
321
|
description: string;
|
|
317
322
|
negatedDescription: string;
|
|
318
323
|
path: string;
|
|
324
|
+
values?: undefined;
|
|
319
325
|
}
|
|
320
326
|
| {
|
|
321
327
|
type: string;
|
|
@@ -323,6 +329,7 @@ declare const _exports: {
|
|
|
323
329
|
multiple: boolean;
|
|
324
330
|
description: string;
|
|
325
331
|
path: string;
|
|
332
|
+
negatedDescription?: undefined;
|
|
326
333
|
}
|
|
327
334
|
)[];
|
|
328
335
|
description: string;
|
|
@@ -515,6 +522,7 @@ declare const _exports: {
|
|
|
515
522
|
multiple: boolean;
|
|
516
523
|
description: string;
|
|
517
524
|
path: string;
|
|
525
|
+
values?: undefined;
|
|
518
526
|
}
|
|
519
527
|
| {
|
|
520
528
|
type: string;
|
|
@@ -559,6 +567,7 @@ declare const _exports: {
|
|
|
559
567
|
multiple: boolean;
|
|
560
568
|
description: string;
|
|
561
569
|
path: string;
|
|
570
|
+
negatedDescription?: undefined;
|
|
562
571
|
}
|
|
563
572
|
| {
|
|
564
573
|
type: string;
|
|
@@ -645,6 +654,7 @@ declare const _exports: {
|
|
|
645
654
|
multiple: boolean;
|
|
646
655
|
description: string;
|
|
647
656
|
path: string;
|
|
657
|
+
values?: undefined;
|
|
648
658
|
}
|
|
649
659
|
| {
|
|
650
660
|
type: string;
|
|
@@ -832,6 +842,7 @@ declare const _exports: {
|
|
|
832
842
|
multiple: boolean;
|
|
833
843
|
description: string;
|
|
834
844
|
path: string;
|
|
845
|
+
negatedDescription?: undefined;
|
|
835
846
|
}
|
|
836
847
|
| {
|
|
837
848
|
type: string;
|
|
@@ -951,12 +962,15 @@ declare const _exports: {
|
|
|
951
962
|
path: string;
|
|
952
963
|
type: string;
|
|
953
964
|
values: string[];
|
|
965
|
+
negatedDescription?: undefined;
|
|
954
966
|
}
|
|
955
967
|
| {
|
|
956
968
|
description: string;
|
|
957
969
|
multiple: boolean;
|
|
958
970
|
path: string;
|
|
959
971
|
type: string;
|
|
972
|
+
negatedDescription?: undefined;
|
|
973
|
+
values?: undefined;
|
|
960
974
|
}
|
|
961
975
|
)[];
|
|
962
976
|
description: string;
|
|
@@ -977,6 +991,7 @@ declare const _exports: {
|
|
|
977
991
|
multiple: boolean;
|
|
978
992
|
path: string;
|
|
979
993
|
type: string;
|
|
994
|
+
values?: undefined;
|
|
980
995
|
}
|
|
981
996
|
)[];
|
|
982
997
|
description: string;
|